mirror of
https://github.com/arkorty/Neolite.git
synced 2026-03-18 00:57:12 +00:00
Changes to be committed:
renamed: nvim/init.lua -> init.lua renamed: install.sh -> install renamed: nvim/lua/buffer-tabs.lua -> lua/buffer-tabs.lua renamed: nvim/lua/colorschemes.lua -> lua/colorschemes.lua renamed: nvim/lua/completions.lua -> lua/completions.lua renamed: nvim/lua/file-tree.lua -> lua/file-tree.lua renamed: nvim/lua/fuzzy-finder.lua -> lua/fuzzy-finder.lua renamed: nvim/lua/keybinds.lua -> lua/keybinds.lua renamed: nvim/lua/lsp-config.lua -> lua/lsp-config.lua renamed: nvim/lua/lsp-format.lua -> lua/lsp-format.lua renamed: nvim/lua/options.lua -> lua/options.lua renamed: nvim/lua/plugins.lua -> lua/plugins.lua renamed: nvim/lua/statusline.lua -> lua/statusline.lua renamed: nvim/lua/syntax-highlight.lua -> lua/syntax-highlight.lua renamed: nvim/lua/terminal.lua -> lua/terminal.lua
This commit is contained in:
52
lua/lsp-config.lua
Normal file
52
lua/lsp-config.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not lspconfig_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local mason_status_ok, mason = pcall(require, "mason")
|
||||
if not mason_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local mason_lspconfig_status_ok, mason_lspconfig = pcall(require, "mason-lspconfig")
|
||||
if not mason_lspconfig_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
mason.setup({})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer", "clangd", "pyright", "marksman" },
|
||||
})
|
||||
|
||||
local cnl_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if not cnl_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server)
|
||||
lspconfig[server].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
--["rust_analyzer"] = function()
|
||||
-- local rt_ok, rust_tools = pcall(require, "rust-tools")
|
||||
-- if rt_ok then
|
||||
-- rust_tools.setup({})
|
||||
-- end
|
||||
--end,
|
||||
})
|
||||
Reference in New Issue
Block a user