cleanup nixvim files, add cmake and asm lsp

This commit is contained in:
Patrick Neff 2024-09-01 10:16:38 +02:00
parent 17cb055b71
commit dabf5d006a
28 changed files with 49 additions and 173 deletions

View File

@ -1,7 +1,6 @@
{
imports = [
./yank_highlight.nix
#./remember_cursor_position.nix
./set_conceal_level.nix
./filetype_options.nix
];

View File

@ -1,35 +0,0 @@
let
group = "RememberCursorPosition";
in {
autoGroups = {
${group} = {
clear = true;
};
};
autoCmd = [
{
inherit group;
event = "BufRead";
callback = {
__raw = ''
function(opts)
buffer = opts.buf,
vim.api.nvim_create_autocmd("BufWinEnter", {
callback = function()
local ft = vim.bo[opts.buf].filetype
local last_known_line = vim.api.nvim_buf_get_mark(opts.buf, '"')[1]
if
not (ft:match("commit") and ft:match("rebase"))
and last_known_line > 1
and last_known_line <= vim.api.nvim_buf_line_count(opts.buf)
then
vim.api.nvim_feedkeys([[g`"]], "nx", false)
end
end,
})
end
'';
};
}
];
}

View File

@ -78,6 +78,7 @@ in {
alejandra
vscode-extensions.ms-vscode.cpptools
nixpkgs-fmt
asm-lsp
];
extraPlugins = with pkgs.vimPlugins; [
{
@ -188,6 +189,9 @@ in {
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
require('lspconfig').asm_lsp.setup({})
'';
};
}

View File

@ -10,7 +10,7 @@
store_selection_keys = "<Tab>";
};
fromLua = [
{ paths = ../../snippets; }
{ paths = ../snippets; }
];
};
lspkind = {

View File

@ -6,7 +6,5 @@
cfg = config.programs.nixvim.ai;
in
lib.mkIf cfg.enable {
plugins.codeium-nvim = {
enable = true;
};
plugins.codeium-nvim.enable = true;
}

View File

@ -1,29 +1,34 @@
{pkgs, ...}: {
imports = [
./gitsigns.nix
./cmp.nix
./codeium.nix
./dap.nix
./harpoon.nix
./indent-blankline.nix
./lsp
./lualine.nix
./mini.nix
./neo-tree.nix
./neorg.nix
./noice.nix
./none-ls.nix
./rainbow-delimiters.nix
./telescope.nix
./treesitter.nix
./trouble.nix
./vim-tmux-navigator.nix
./which-key.nix
./mini.nix
./todo-comments.nix
./neorg.nix
./fugitive.nix
./dap.nix
./lastplace.nix
./codeium.nix
./undotree.nix
./transparent.nix
./lsp
];
plugins = {
fugitive.enable = true;
gitsigns.enable = true;
lastplace.enable = true;
tmux-navigator.enable = true;
todo-comments.enable = true;
transparent.enable = true;
which-key.enable = true;
};
extraPlugins = with pkgs.vimPlugins;
[
vim-nftables

View File

@ -1,3 +0,0 @@
{
plugins.fugitive.enable = true;
}

View File

@ -1,3 +0,0 @@
{
plugins.gitsigns.enable = true;
}

View File

@ -1,3 +0,0 @@
{
plugins.lastplace.enable = true;
}

View File

@ -1,7 +1,6 @@
{
imports = [
./languages
./cmp.nix
./lsp.nix
];
}

View File

@ -1,5 +0,0 @@
{
plugins.lsp.servers.clangd = {
enable = true;
};
}

View File

@ -1,21 +1,26 @@
{
imports = [
./rust.nix
./lua.nix
./nix.nix
./go.nix
./htmx.nix
./typescript.nix
./emmet.nix
./eslint.nix
./go.nix
./html.nix
./json.nix
./python.nix
./tailwindcss.nix
./yaml.nix
./c.nix
./templ.nix
./sql.nix
./php.nix
./nix.nix
./rust.nix
];
plugins.lsp.servers = {
clangd.enable = true;
cmake.enable = true;
eslint.enable = true;
htmx.enable = true;
jsonls.enable = true;
lua-ls.enable = true;
phpactor.enable = true;
ruff-lsp.enable = true;
pyright.enable = true;
sqls.enable = true;
tailwindcss.enable = true;
templ.enable = true;
tsserver.enable = true;
yamlls.enable = true;
};
}

View File

@ -1,9 +0,0 @@
{
plugins.lsp = {
servers = {
eslint = {
enable = true;
};
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
htmx.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
jsonls.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
lua-ls.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
#phpactor.enable = true;
};
};
}

View File

@ -1,8 +0,0 @@
{
plugins.lsp = {
servers = {
ruff-lsp.enable = true;
pyright.enable = true;
};
};
}

View File

@ -1,5 +0,0 @@
{
plugins.lsp.servers.sqls = {
enable = true;
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
tailwindcss.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
templ.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
plugins.lsp = {
servers = {
tsserver.enable = true;
};
};
}

View File

@ -1,5 +0,0 @@
{
plugins.lsp.servers = {
yamlls.enable = true;
};
}

View File

@ -13,6 +13,7 @@
formatting = {
phpcbf.enable = true;
goimports.enable = true;
asmfmt.enable = true;
};
};
};

View File

@ -1,3 +0,0 @@
{
plugins.todo-comments.enable = true;
}

View File

@ -1,3 +0,0 @@
{
plugins.tmux-navigator.enable = true;
}

View File

@ -1,3 +0,0 @@
{
plugins.which-key.enable = true;
}

View File

@ -1,8 +1,7 @@
local ls = require("luasnip")
-- for "all" filetypes create snippet for "func"
ls.add_snippets( "all", {
ls.add_snippets( "go", {
ls.parser.parse_snippet(
'iferr',
'if err != nil {\n\t${1}\n}'),
})
})