mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-02-12 04:22:07 +00:00
~
This commit is contained in:
parent
c576378a6a
commit
3099e738ef
4 changed files with 51 additions and 2 deletions
36
configs/neovim/lsp.lua
Normal file
36
configs/neovim/lsp.lua
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
-- cmp
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-space>'] = cmp.mapping.complete(),
|
||||||
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
|
['<tab>'] = cmp.mapping.confirm { select = true }
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
local caps = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
{ workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- lspconfig
|
||||||
|
local lc = require("lspconfig")
|
||||||
|
|
||||||
|
lc.nix_nil.setup {
|
||||||
|
autostart = true,
|
||||||
|
capabilities = caps,
|
||||||
|
cmd = { "nil" }
|
||||||
|
}
|
|
@ -22,6 +22,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
"nvim" = {
|
||||||
|
source = ../../configs/neovim;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
"openbox".source = ../../configs/openbox;
|
"openbox".source = ../../configs/openbox;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,17 @@
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
cmp_luasnip
|
||||||
|
luasnip
|
||||||
|
nvim-cmp
|
||||||
|
nvim-lspconfig
|
||||||
vim-just
|
vim-just
|
||||||
vim-sleuth
|
vim-sleuth
|
||||||
vim-wakatime
|
vim-wakatime
|
||||||
];
|
];
|
||||||
extraLuaConfig = ''
|
extraLuaConfig = ''
|
||||||
|
require("lsp.lua")
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
|
|
|
@ -3,11 +3,14 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# development
|
# development
|
||||||
(fenix.default.withComponents [ "cargo" "rustc" ])
|
(fenix.default.withComponents [ "cargo" "rustc" ])
|
||||||
|
gtk4
|
||||||
just
|
just
|
||||||
nodejs_23
|
nodejs_23
|
||||||
|
vala
|
||||||
## language servers
|
## language servers
|
||||||
nil # Nix
|
nil # Nix
|
||||||
rust-analyzer # Rust
|
rust-analyzer # Rust
|
||||||
|
vala-language-server # Vala
|
||||||
# games
|
# games
|
||||||
prismlauncher
|
prismlauncher
|
||||||
# graphics
|
# graphics
|
||||||
|
|
Loading…
Add table
Reference in a new issue