updated lsp config
This commit is contained in:
@@ -1,30 +1,53 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" },
|
||||
"LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "488bbaa3b5455f4b776a61f2b8d10f8f798604c0" },
|
||||
"bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"cosmic-ui": { "branch": "main", "commit": "c0b14531999f2bfef3d927c4dcd57a1a8fed5ee9" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" },
|
||||
"filetype.nvim": { "branch": "main", "commit": "b522628a45a17d58fc0073ffd64f9dc9530a8027" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "06c20ea71a4519fc60caba9ac688f2f6404f03d5" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
|
||||
"glow.nvim": { "branch": "main", "commit": "a3f24fdaa71d2c25a2b88026032b34f5b6a6e215" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "bb5cc9ef3bbb17541929b745f74551c900188099" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43f2ddf0b5f544d9bb20e24b8ff76b79f2a07ab0" },
|
||||
"mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "7e3f718f43de41053f77b1e8de6de2b759fc4023" },
|
||||
"nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4b478a73b18967d9f9e756a71100d0e63a08690a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" },
|
||||
"nvim-code-action-menu": { "branch": "main", "commit": "e4399dbaf6eabff998d3d5f1cbcd8d9933710027" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "b4ded7de579b4e2a85c203388233b54bf1028816" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "1ca9b938c1c3d8b2c64a168f6a5419b8f3870410" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "e1cd1ab8aac5ad36617aa887912d0d3ba7405799" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "026dff5e2b504941cf172691561a67ea362596aa" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
|
||||
"vim-matchup": { "branch": "master", "commit": "1e276be9306490e439784cf5e8abe1f93b4a41b6" }
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufEnter",
|
||||
opts = {
|
||||
char = "▏",
|
||||
context_char = "▏",
|
||||
|
||||
55
lua/plugins/cmp.lua
Normal file
55
lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lua"
|
||||
},
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
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 }),
|
||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item()
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" }
|
||||
})
|
||||
}
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = { name = "buffer" }
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" }
|
||||
}, {
|
||||
{ name = "cmdline" }
|
||||
})
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -6,7 +6,6 @@ return {
|
||||
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufEnter",
|
||||
config = true
|
||||
},
|
||||
|
||||
@@ -20,8 +19,7 @@ return {
|
||||
|
||||
{
|
||||
"andymass/vim-matchup",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
event = "BufEnter"
|
||||
dependencies = "nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
|
||||
{
|
||||
@@ -51,5 +49,107 @@ return {
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
cmd = "DiffviewOpen",
|
||||
config = true
|
||||
},
|
||||
|
||||
-- NOTE: LSP
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
|
||||
"williamboman/mason-lspconfig.nvim"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = "williamboman/mason.nvim",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local handlers = {
|
||||
function (server_name)
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
require("mason-lspconfig").setup { handlers = handlers }
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
build = ":MasonUpdate",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true
|
||||
},
|
||||
|
||||
"RRethy/vim-illuminate",
|
||||
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
cmd = "TroubleToggle",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"weilbith/nvim-code-action-menu",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
cmd = "CodeActionMenu"
|
||||
},
|
||||
|
||||
{
|
||||
"CosmicNvim/cosmic-ui",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
lazy = true,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,17 @@ return {
|
||||
"MunifTanjim/nui.nvim"
|
||||
},
|
||||
cmd = "Neotree",
|
||||
init = function() vim.g.neo_tree_remove_legacy_commands = true end,
|
||||
init = function()
|
||||
vim.g.neo_tree_remove_legacy_commands = true
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{text = " ", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{text = " ", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{text = " ", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{text = "", texthl = "DiagnosticSignHint"})
|
||||
end,
|
||||
opts = {
|
||||
close_if_last_window = true,
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring"
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
|
||||
Reference in New Issue
Block a user