cleanup nixvim files, add cmake and asm lsp
This commit is contained in:
parent
17cb055b71
commit
dabf5d006a
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./yank_highlight.nix
|
./yank_highlight.nix
|
||||||
#./remember_cursor_position.nix
|
|
||||||
./set_conceal_level.nix
|
./set_conceal_level.nix
|
||||||
./filetype_options.nix
|
./filetype_options.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -78,6 +78,7 @@ in {
|
||||||
alejandra
|
alejandra
|
||||||
vscode-extensions.ms-vscode.cpptools
|
vscode-extensions.ms-vscode.cpptools
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
asm-lsp
|
||||||
];
|
];
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
{
|
{
|
||||||
|
|
@ -188,6 +189,9 @@ in {
|
||||||
dap.listeners.before.event_exited.dapui_config = function()
|
dap.listeners.before.event_exited.dapui_config = function()
|
||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
require('lspconfig').asm_lsp.setup({})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
store_selection_keys = "<Tab>";
|
store_selection_keys = "<Tab>";
|
||||||
};
|
};
|
||||||
fromLua = [
|
fromLua = [
|
||||||
{ paths = ../../snippets; }
|
{ paths = ../snippets; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
lspkind = {
|
lspkind = {
|
||||||
|
|
@ -6,7 +6,5 @@
|
||||||
cfg = config.programs.nixvim.ai;
|
cfg = config.programs.nixvim.ai;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
plugins.codeium-nvim = {
|
plugins.codeium-nvim.enable = true;
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,34 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./gitsigns.nix
|
./cmp.nix
|
||||||
|
./codeium.nix
|
||||||
|
./dap.nix
|
||||||
./harpoon.nix
|
./harpoon.nix
|
||||||
./indent-blankline.nix
|
./indent-blankline.nix
|
||||||
|
./lsp
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
|
./mini.nix
|
||||||
./neo-tree.nix
|
./neo-tree.nix
|
||||||
|
./neorg.nix
|
||||||
./noice.nix
|
./noice.nix
|
||||||
./none-ls.nix
|
./none-ls.nix
|
||||||
./rainbow-delimiters.nix
|
./rainbow-delimiters.nix
|
||||||
./telescope.nix
|
./telescope.nix
|
||||||
./treesitter.nix
|
./treesitter.nix
|
||||||
./trouble.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
|
./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;
|
extraPlugins = with pkgs.vimPlugins;
|
||||||
[
|
[
|
||||||
vim-nftables
|
vim-nftables
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.fugitive.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.gitsigns.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lastplace.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./languages
|
./languages
|
||||||
./cmp.nix
|
|
||||||
./lsp.nix
|
./lsp.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp.servers.clangd = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +1,26 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./rust.nix
|
|
||||||
./lua.nix
|
|
||||||
./nix.nix
|
|
||||||
./go.nix
|
|
||||||
./htmx.nix
|
|
||||||
./typescript.nix
|
|
||||||
./emmet.nix
|
./emmet.nix
|
||||||
./eslint.nix
|
./go.nix
|
||||||
./html.nix
|
./html.nix
|
||||||
./json.nix
|
./nix.nix
|
||||||
./python.nix
|
./rust.nix
|
||||||
./tailwindcss.nix
|
|
||||||
./yaml.nix
|
|
||||||
./c.nix
|
|
||||||
./templ.nix
|
|
||||||
./sql.nix
|
|
||||||
./php.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;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
eslint = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
htmx.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
jsonls.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
lua-ls.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
#phpactor.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
ruff-lsp.enable = true;
|
|
||||||
pyright.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp.servers.sqls = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
tailwindcss.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
templ.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp = {
|
|
||||||
servers = {
|
|
||||||
tsserver.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
plugins.lsp.servers = {
|
|
||||||
yamlls.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
formatting = {
|
formatting = {
|
||||||
phpcbf.enable = true;
|
phpcbf.enable = true;
|
||||||
goimports.enable = true;
|
goimports.enable = true;
|
||||||
|
asmfmt.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.todo-comments.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.tmux-navigator.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
plugins.which-key.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
local ls = require("luasnip")
|
local ls = require("luasnip")
|
||||||
|
|
||||||
-- for "all" filetypes create snippet for "func"
|
ls.add_snippets( "go", {
|
||||||
ls.add_snippets( "all", {
|
ls.parser.parse_snippet(
|
||||||
ls.parser.parse_snippet(
|
'iferr',
|
||||||
'iferr',
|
'if err != nil {\n\t${1}\n}'),
|
||||||
'if err != nil {\n\t${1}\n}'),
|
})
|
||||||
})
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue