kekl
This commit is contained in:
@ -1,35 +0,0 @@
|
||||
{ config, pkgs, nixvim, ...}:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
cmp-nvim-lsp.enable = true;
|
||||
cmp-path.enable = true;
|
||||
cmp-buffer.enable = true;
|
||||
cmp-clippy.enable = true;
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = false;
|
||||
cmdline = {
|
||||
completion = {
|
||||
autocomplete = "require('cmp.types').cmp.TriggerEvent.TextChanged";
|
||||
completeopt = [ "menu" "menuone" "noinsert" "noselect" ];
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = false })";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
};
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; keyword_length = 1; max_item_count = 5; }
|
||||
{ name = "path"; keyword_length = 1; max_item_count = 5; }
|
||||
{ name = "clippy"; keyword_length = 1; max_item_count = 5; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
./lualine.nix
|
||||
./alpha.nix
|
||||
./dev.nix
|
||||
./nonels.nix
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
@ -1,100 +1,71 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
html = {
|
||||
enable = true;
|
||||
programs.nixvim.plugins = {
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
};
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
};
|
||||
# nil-ls = {
|
||||
# enable = true;
|
||||
# };
|
||||
nixd = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
nixos = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options";
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
html = {
|
||||
enable = true;
|
||||
};
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
nixos = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options";
|
||||
};
|
||||
home_manager = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
marksman = {
|
||||
enable = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
};
|
||||
gopls = {
|
||||
enable = true;
|
||||
};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
home_manager = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options";
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
marksman = {
|
||||
enable = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
};
|
||||
gopls = {
|
||||
enable = true;
|
||||
};
|
||||
terraformls = {
|
||||
enable = true;
|
||||
};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
# Use LSP saga keybinding instead
|
||||
# K = {
|
||||
# action = "hover";
|
||||
# desc = "Hover";
|
||||
# };
|
||||
# "<leader>cw" = {
|
||||
# action = "workspace_symbol";
|
||||
# desc = "Workspace Symbol";
|
||||
# };
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
};
|
||||
# diagnostic = {
|
||||
# "<leader>cd" = {
|
||||
# action = "open_float";
|
||||
# desc = "Line Diagnostics";
|
||||
# };
|
||||
# "[d" = {
|
||||
# action = "goto_next";
|
||||
# desc = "Next Diagnostic";
|
||||
# };
|
||||
# "]d" = {
|
||||
# action = "goto_prev";
|
||||
# desc = "Previous Diagnostic";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,66 +0,0 @@
|
||||
{ config, pkgs, nixvim, ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
cmd = [
|
||||
"rustup"
|
||||
"run"
|
||||
"nightly"
|
||||
"rust-analyzer"
|
||||
];
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
inlayHints = {
|
||||
lifetimeElisionHints = {
|
||||
enable = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
standalone = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
asm_lsp = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
gopls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = false;
|
||||
autostart = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
62
modules/nix/nvim/nonels.nix
Normal file
62
modules/nix/nvim/nonels.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
plugins.none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
settings = {
|
||||
updateInInsert = false;
|
||||
};
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
yamllint.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--no-semi" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
stylua.enable = true;
|
||||
yamlfmt = {
|
||||
enable = true;
|
||||
};
|
||||
hclfmt.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user