base for lsp
This commit is contained in:
parent
95f572bc86
commit
1afa83cfcf
@ -18,8 +18,23 @@
|
|||||||
# Colorschemes
|
# Colorschemes
|
||||||
{
|
{
|
||||||
plugin = catppuccin-nvim;
|
plugin = catppuccin-nvim;
|
||||||
config = toLuaFile ./plugins/colorschemes/catppuccin.lua
|
config = toLuaFile ./plugins/colorschemes/catppuccin.lua;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# LSP
|
||||||
|
{
|
||||||
|
plugin = vimPlugins.nvim-lspconfig;
|
||||||
|
config = toLuaFile ./plugins/lsp.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmp-buffer
|
||||||
|
cmp-cmdline
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-nvim-lua
|
||||||
|
cmp-path
|
||||||
|
cmp_luasnip
|
||||||
|
luasnip
|
||||||
|
nvim-cmp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
22
nix/users/base/neovim/plugins/lsp.lua
Normal file
22
nix/users/base/neovim/plugins/lsp.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
-- safe imports
|
||||||
|
local status, cmp = pcall(require, "cmp")
|
||||||
|
if not status then
|
||||||
|
print("cmp not installed")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local status, luasnip = pcall(require, "luasnip")
|
||||||
|
if not status then
|
||||||
|
print("luasnip not installed")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local status, cmp_capabilities = pcall(require, "cmp_nvim_lsp")
|
||||||
|
if not status then
|
||||||
|
print("cmp_nvim_lsp not installed")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local status, lspconfig = pcall(require, "lspconfig")
|
||||||
|
if not status then
|
||||||
|
print("lspconfig not installed")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user