mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Change completion source to blink.cmp
* fix: Completion does not work under Linux * chore: Load less LSPs * feat: Add selection border for completions
This commit is contained in:
parent
47197902c8
commit
569238e45f
5 changed files with 112 additions and 18 deletions
42
tools/nvim/lua/plugins/mod/nvim-lspconfig.lua
Normal file
42
tools/nvim/lua/plugins/mod/nvim-lspconfig.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "saghen/blink.cmp" },
|
||||
|
||||
-- example using `opts` for defining servers
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
bashls = {},
|
||||
clangd = {},
|
||||
eslint = {}, -- JavaScript
|
||||
gopls = {}, -- Go
|
||||
jsonls = {}, -- JSON
|
||||
markdown_oxide = {}, -- Markdown
|
||||
omnisharp = {}, -- C# & F#
|
||||
powershell_es = {}, -- PowerShell
|
||||
pyright = {}, -- Python
|
||||
taplo = {}, -- TOML
|
||||
ts_ls = {}, -- TypeScript
|
||||
vimls = {}, -- vimscript
|
||||
yamlls = {}, -- YAML
|
||||
beancount = {}, -- Beancount
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
for server, config in pairs(opts.servers) do
|
||||
-- passing config.capabilities to blink.cmp merges with the capabilities in your
|
||||
-- `opts[server].capabilities, if you've defined it
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
end,
|
||||
|
||||
-- example calling setup directly for each LSP
|
||||
-- config = function()
|
||||
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
-- local lspconfig = require('lspconfig')
|
||||
--
|
||||
-- lspconfig['lua_ls'].setup({ capabilities = capabilities })
|
||||
-- end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue