增加格式化插件;格式化配置;增加搜索插件

This commit is contained in:
LingZhaoHui 2024-06-20 00:46:34 +08:00
parent dc5fda281a
commit 1ed88eaaca
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC
12 changed files with 407 additions and 345 deletions

View File

@ -17,32 +17,51 @@ return {
end,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = "nvim_lsp" },
{ name = "luasnip" },
}, {
{ name = 'buffer' },
{ name = "buffer" },
{ name = "path" },
}),
})
end,
},
{
"neovim/nvim-lspconfig"
"neovim/nvim-lspconfig",
},
{
"nvim-treesitter/nvim-treesitter",
config = function()
require('nvim-treesitter.configs').setup {
ensure_installed = { 'c', 'cpp', 'cmake', 'bash', 'go', 'lua', 'python', 'java', 'git_config', 'git_rebase', 'gitattributes', 'gitcommit', 'gitignore', 'groovy', 'json', 'sql', 'vim', 'xml', 'tcl'},
}
require("nvim-treesitter.configs").setup({
ensure_installed = {
"c",
"cpp",
"cmake",
"bash",
"go",
"lua",
"python",
"java",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"groovy",
"json",
"sql",
"vim",
"xml",
"tcl",
},
})
end,
}
},
}

View File

@ -20,6 +20,17 @@ return {
s={"<cmd>NvimTreeToggle<cr>", "show dir tree on left"},
c={"<cmd>NvimTreeClose<cr>", "hidden dir tree on left"}
},
f = {
name="Search,Format",
s={
name="search",
f={"<cmd>Telescope find_files<cr>", "Search file by name"},
g={"<cmd>Telescope live_grep<cr>", "Grep in files"},
b={"<cmd>Telescope buffers<cr>", "Grep in buffer"},
},
f={"<cmd>Format<cr>", "Code Format"}
},
l = {
name="Lazy",
s={"<cmd>Lazy show<cr>", "Lazy show"},
@ -38,9 +49,6 @@ return {
name = "version",
v={"<cmd>version<cr>", "neovim version"},
},
s = {
name="Search"
},
}
}, {silent = true, noremap = true})
wk.setup()

View File

@ -1,26 +1,41 @@
return {
'nvim-java/nvim-java',
"nvim-java/nvim-java",
dependencies = {
'nvim-java/lua-async-await',
'nvim-java/nvim-java-refactor',
'nvim-java/nvim-java-core',
'nvim-java/nvim-java-test',
'nvim-java/nvim-java-dap',
'MunifTanjim/nui.nvim',
'neovim/nvim-lspconfig',
'mfussenegger/nvim-dap',
"nvim-java/lua-async-await",
"nvim-java/nvim-java-refactor",
"nvim-java/nvim-java-core",
"nvim-java/nvim-java-test",
"nvim-java/nvim-java-dap",
"MunifTanjim/nui.nvim",
"neovim/nvim-lspconfig",
"mfussenegger/nvim-dap",
{
'williamboman/mason.nvim',
"williamboman/mason.nvim",
opts = {
registries = {
'github:nvim-java/mason-registry',
'github:mason-org/mason-registry',
"github:nvim-java/mason-registry",
"github:mason-org/mason-registry",
},
},
},
}
},
config = function()
require('java').setup({
require("java").setup({
root_markers = {
"settings.gradle",
"settings.gradle.kts",
"pom.xml",
"build.gradle",
"mvnw",
"gradlew",
"build.gradle",
"build.gradle.kts",
".git",
},
java_test = {
enable = true,
},
})
require("lspconfig").jdtls.setup({})
end,
}

View File

@ -2,7 +2,8 @@ return {
{
"ray-x/lsp_signature.nvim",
event = "BufRead",
config = function() require"lsp_signature".on_attach() end,
},
config = function()
require("lsp_signature").on_attach()
end,
},
}

View File

@ -6,4 +6,3 @@ return {
vim.fn["mkdp#util#install"]()
end,
}

View File

@ -8,9 +8,9 @@ return {
extensions = {
h = "cpp",
},
}
},
})
end
end,
},
{
"HiPhish/nvim-ts-rainbow2",
@ -115,10 +115,10 @@ return {
"ray-x/cmp-treesitter",
},
{
'nvim-lualine/lualine.nvim',
"nvim-lualine/lualine.nvim",
config = function()
require('lualine').setup()
end
require("lualine").setup()
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
@ -128,7 +128,7 @@ return {
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
},
},
{
"tiagovla/scope.nvim",
@ -138,24 +138,40 @@ return {
tag = "v3.*",
config = function()
vim.g.termguicolors = true
require("bufferline").setup()
end,
},
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function()
require('dashboard').setup {
require("dashboard").setup({
-- config
}
})
end,
dependencies = { {'nvim-tree/nvim-web-devicons'}}
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
{
"azabiong/vim-highlighter",
},
{"stevearc/dressing.nvim",
opts = {}}
{
"stevearc/dressing.nvim",
opts = {},
},
{
"mhartington/formatter.nvim",
config = function()
require("formatter").setup({
logging = true,
log_level = vim.log.levels.WARN,
filetype = {
lua = { require("formatter.filetypes.lua").stylua },
java = { require("formatter.filetypes.java").clangformat },
},
["*"] = {
require("formatter.filetypes.any").remove_trailing_whitespace,
},
})
end,
},
}

View File

@ -1,6 +1,5 @@
return {
{
"tpope/vim-fugitive",
}
},
}

View File

@ -2,9 +2,9 @@ return {
{
"nvim-tree/nvim-tree.lua",
version = "*",
dependencies = {"nvim-tree/nvim-web-devicons"},
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("nvim-tree").setup {}
end
}
require("nvim-tree").setup({})
end,
},
}

View File

@ -0,0 +1,7 @@
return {
{
"nvim-telescope/telescope.nvim",
tag = "0.1.8",
dependencies = { "nvim-lua/plenary.nvim" },
},
}

View File

@ -1,22 +1,22 @@
return {
{
"simrat39/symbols-outline.nvim",
config = function()
"simrat39/symbols-outline.nvim",
config = function()
require("symbols-outline").setup({
highlight_hovered_item = true,
show_guides = true,
auto_preview = false,
position = 'right',
position = "right",
relative_width = true,
width = 25,
auto_close = false,
show_numbers = false,
show_relative_numbers = false,
show_symbol_details = true,
preview_bg_highlight = 'Pmenu',
preview_bg_highlight = "Pmenu",
autofold_depth = nil,
auto_unfold_hover = true,
fold_markers = { '', '' },
fold_markers = { "", "" },
wrap = false,
keymaps = {
-- These keymaps can be a string or a table for multiple keys
@ -66,7 +66,6 @@ config = function()
Fragment = { icon = "", hl = "@constant" },
},
})
end,
},
end,
},
}

View File

@ -1,14 +1,13 @@
return {
{
'projekt0n/github-nvim-theme',
"projekt0n/github-nvim-theme",
},
{
"Mofiqul/vscode.nvim",
lazy=false,
lazy = false,
config = function()
require('vscode').setup({
})
vim.cmd('colorscheme vscode')
require("vscode").setup({})
vim.cmd("colorscheme vscode")
end,
}
},
}