first
This commit is contained in:
38
lua/plugins/lsp.lua
Normal file
38
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
'saghen/blink.cmp',
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require'lspconfig'
|
||||
local capabilities = require'blink.cmp'.get_lsp_capabilities()
|
||||
|
||||
lspconfig.lua_ls.setup {capabilities = capabilities}
|
||||
lspconfig.ccls.setup {
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
compilationDatabaseDirectory = "build";
|
||||
index = {
|
||||
threads = 0;
|
||||
};
|
||||
clang = {
|
||||
excludeArgs = { "-frounding-math"} ;
|
||||
};
|
||||
}
|
||||
}
|
||||
lspconfig.cmake.setup {capabilities = capabilities}
|
||||
end,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user