parent
6aa17892b1
commit
359c8534f9
6 changed files with 418 additions and 407 deletions
|
@ -38,7 +38,7 @@ in
|
|||
};
|
||||
|
||||
programs.kitty = {
|
||||
theme = "Catppuccin-Frappe";
|
||||
themeFile = "Catppuccin-Frappe";
|
||||
font.name = "DejaVuSansMono Nerd Font";
|
||||
};
|
||||
|
||||
|
|
|
@ -6,15 +6,6 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.programs.v.nvim;
|
||||
nvim-nio = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "nvim-nio";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-neotest";
|
||||
repo = "nvim-nio";
|
||||
rev = "refs/tags/v1.8.0";
|
||||
sha256 = "sha256-RFmH+683vrg4BELwtAQqjV8oGkvRgzcd6kd5r1s3Jp8=";
|
||||
};
|
||||
};
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
|
@ -24,384 +15,182 @@ with lib;
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ fd ];
|
||||
home.file.".config/nvim/lua".source = ./lua;
|
||||
programs.nixvim = {helpers, ...}: {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
luaLoader.enable = true;
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
conceallevel = 2;
|
||||
expandtab = true;
|
||||
tabstop = 2;
|
||||
|
||||
shiftwidth = 2;
|
||||
smartindent = true;
|
||||
};
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
keymaps = with helpers; [
|
||||
# General
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>";
|
||||
action = ":noh<CR>";
|
||||
}
|
||||
# Telescope
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action = ":Telescope find_files<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fs";
|
||||
action = ":Telescope file_browser<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fg";
|
||||
action = mkRaw "require('telescope.builtin').live_grep";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fb";
|
||||
action = ":Telescope buffers<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fo";
|
||||
action = ":Telescope oldfiles<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fr";
|
||||
action = ":Telescope frecency<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ob";
|
||||
action = mkRaw "require('obsidian_picker').obsidian_picker";
|
||||
}
|
||||
# Commenting
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-/>";
|
||||
action = mkRaw "require('Comment.api').toggle.linewise.current";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<C-/>";
|
||||
action = mkRaw ''
|
||||
function()
|
||||
local esc = vim.api.nvim_replace_termcodes(
|
||||
'<ESC>', true, false, true
|
||||
)
|
||||
vim.api.nvim_feedkeys(esc, 'nx', false)
|
||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||
end
|
||||
'';
|
||||
}
|
||||
# Float Term
|
||||
{
|
||||
mode = "n";
|
||||
key = "t";
|
||||
action = ":FloatermToggle myfloat<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<ESC>";
|
||||
action = mkRaw "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||
}
|
||||
# Switch buffers
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>q";
|
||||
action = ":bd<CR>"; # Delete buffer
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>s";
|
||||
action = ":bn<CR>"; # Buffer next
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>a";
|
||||
action = ":bp<CR>"; # Buffer previous
|
||||
}
|
||||
# Change Indenting
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<<_";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = ">>_";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<Tab>";
|
||||
action = ">gv";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<S-Tab>";
|
||||
action = "<gv";
|
||||
}
|
||||
# Neotest
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>nr";
|
||||
action = mkRaw "require('neotest').run.run";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>no";
|
||||
action = mkRaw "require('neotest').output.open";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ns";
|
||||
action = mkRaw "require('neotest').run.stop";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>nf";
|
||||
action = mkRaw "function() require('neotest').run.run(vim.fn.expand('%')) end";
|
||||
}
|
||||
# LSP
|
||||
{
|
||||
mode = "n";
|
||||
key = "<M-CR>";
|
||||
action = ":Lspsaga code_action<CR>";
|
||||
}
|
||||
];
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
FixCursorHold-nvim
|
||||
nvim-web-devicons
|
||||
nvim-nio
|
||||
nvim-surround
|
||||
];
|
||||
|
||||
extraConfigLua = "
|
||||
require('nvim-surround').setup()
|
||||
";
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
programs.nixvim =
|
||||
{ helpers, ... }:
|
||||
{
|
||||
enable = true;
|
||||
settings.flavour = "frappe";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
dap = {
|
||||
enable = true;
|
||||
};
|
||||
image = {
|
||||
enable = true;
|
||||
};
|
||||
web-devicons.enable = true;
|
||||
bufferline.enable = true;
|
||||
nix.enable = true;
|
||||
luasnip.enable = true;
|
||||
typst-vim.enable = true;
|
||||
startup = {
|
||||
enable = true;
|
||||
theme = "my_theme";
|
||||
};
|
||||
obsidian = {
|
||||
enable = true;
|
||||
settings = {
|
||||
new_notes_location = "notes_subdir";
|
||||
notes_subdir = "Unsorted";
|
||||
daily_notes = {
|
||||
folder = "Diary/Daily";
|
||||
};
|
||||
workspaces = [
|
||||
{
|
||||
name = "notes";
|
||||
path = "~/cloud/Notes";
|
||||
}
|
||||
];
|
||||
completion = {
|
||||
min_chars = 2;
|
||||
nvim_cmp = true;
|
||||
};
|
||||
picker.name = "telescope.nvim";
|
||||
note_id_func = ''
|
||||
function(title)
|
||||
-- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
|
||||
-- In this case a note with the title 'My new note' will be given an ID that looks
|
||||
-- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
|
||||
local suffix = ""
|
||||
if title ~= nil then
|
||||
-- If title is given, transform it into valid file name.
|
||||
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
|
||||
else
|
||||
-- If title is nil, just add 4 random uppercase letters to the suffix.
|
||||
for _ = 1, 4 do
|
||||
suffix = suffix .. string.char(math.random(65, 90))
|
||||
end
|
||||
end
|
||||
return tostring(os.time()) .. "-" .. suffix
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
fidget = {
|
||||
enable = true;
|
||||
progress = {
|
||||
ignoreDoneAlready = true;
|
||||
ignore = [ "ltex" ];
|
||||
display.doneTtl = 5;
|
||||
};
|
||||
notification = {
|
||||
overrideVimNotify = true;
|
||||
};
|
||||
};
|
||||
neotest = {
|
||||
enable = true;
|
||||
adapters = {
|
||||
plenary.enable = true;
|
||||
python.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
settings.args = [ "--no-capture" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
settings.highlight.enable = true;
|
||||
};
|
||||
# surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
# gitgutter.enable = true;
|
||||
imports = [
|
||||
./keybinds.nix
|
||||
./lsp.nix
|
||||
];
|
||||
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings.options.theme = "catppuccin";
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
luaLoader.enable = true;
|
||||
|
||||
performance = {
|
||||
byteCompileLua.enable = true;
|
||||
combinePlugins.enable = true;
|
||||
};
|
||||
|
||||
telescope = {
|
||||
globals.mapleader = " ";
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
conceallevel = 2;
|
||||
expandtab = true;
|
||||
tabstop = 2;
|
||||
|
||||
shiftwidth = 2;
|
||||
smartindent = true;
|
||||
};
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
FixCursorHold-nvim
|
||||
];
|
||||
|
||||
extraConfigLua = "";
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.defaults.preview.ls_short = true;
|
||||
extensions.file-browser = {
|
||||
settings.flavour = "frappe";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
nvim-surround.enable = true;
|
||||
dap.enable = true;
|
||||
image.enable = true;
|
||||
web-devicons.enable = true;
|
||||
bufferline.enable = true;
|
||||
nix.enable = true;
|
||||
luasnip.enable = true;
|
||||
typst-vim.enable = true;
|
||||
startup = {
|
||||
enable = true;
|
||||
theme = "my_theme";
|
||||
};
|
||||
obsidian = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hijack_netrw = true;
|
||||
dir_icon = "";
|
||||
new_notes_location = "notes_subdir";
|
||||
notes_subdir = "Unsorted";
|
||||
daily_notes = {
|
||||
folder = "Diary/Daily";
|
||||
};
|
||||
workspaces = [
|
||||
{
|
||||
name = "notes";
|
||||
path = "~/cloud/Notes";
|
||||
}
|
||||
];
|
||||
completion = {
|
||||
min_chars = 2;
|
||||
nvim_cmp = true;
|
||||
};
|
||||
picker.name = "telescope.nvim";
|
||||
# note_id_func = ''
|
||||
# function(title)
|
||||
# -- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
|
||||
# -- In this case a note with the title 'My new note' will be given an ID that looks
|
||||
# -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
|
||||
# local suffix = ""
|
||||
# if title ~= nil then
|
||||
# -- If title is given, transform it into valid file name.
|
||||
# suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
|
||||
# else
|
||||
# -- If title is nil, just add 4 random uppercase letters to the suffix.
|
||||
# for _ = 1, 4 do
|
||||
# suffix = suffix .. string.char(math.random(65, 90))
|
||||
# end
|
||||
# end
|
||||
# return tostring(os.time()) .. "-" .. suffix
|
||||
# end
|
||||
# '';
|
||||
};
|
||||
};
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.settings.fuzzy = true;
|
||||
extensions.frecency.enable = true;
|
||||
};
|
||||
comment.enable = true;
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
formatting = {
|
||||
nixfmt = {
|
||||
fidget = {
|
||||
enable = true;
|
||||
progress = {
|
||||
ignoreDoneAlready = true;
|
||||
ignore = [ "ltex" ];
|
||||
display.doneTtl = 5;
|
||||
};
|
||||
notification = {
|
||||
overrideVimNotify = true;
|
||||
};
|
||||
};
|
||||
neotest = {
|
||||
enable = true;
|
||||
adapters = {
|
||||
plenary.enable = true;
|
||||
python.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
settings.args = [ "--no-capture" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
lspBuf = {
|
||||
K = "hover";
|
||||
gD = "references";
|
||||
gd = "definition";
|
||||
gi = "implementation";
|
||||
gt = "type_definition";
|
||||
"g=" = "format";
|
||||
};
|
||||
diagnostic = {
|
||||
"<leader>j" = "goto_next";
|
||||
"<leader>k" = "goto_prev";
|
||||
};
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
settings.highlight.enable = true;
|
||||
};
|
||||
servers = {
|
||||
cssls.enable = true;
|
||||
nil_ls.enable = true; #NixOS
|
||||
dockerls.enable = true;
|
||||
rust_analyzer = {
|
||||
|
||||
fugitive.enable = true;
|
||||
committia.enable = true;
|
||||
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings.options.theme = "catppuccin";
|
||||
};
|
||||
|
||||
telescope = {
|
||||
enable = true;
|
||||
settings.defaults.preview.ls_short = true;
|
||||
extensions.file-browser = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
pyright.enable = true;
|
||||
pylsp = {
|
||||
enable = true;
|
||||
settings.plugins = {
|
||||
black = {
|
||||
enabled = true;
|
||||
cache_config = true;
|
||||
};
|
||||
pycodestyle = {
|
||||
maxLineLength = 100;
|
||||
};
|
||||
settings = {
|
||||
hijack_netrw = true;
|
||||
dir_icon = "";
|
||||
};
|
||||
};
|
||||
elixirls.enable = true;
|
||||
clangd.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.settings.fuzzy = true;
|
||||
extensions.frecency.enable = true;
|
||||
};
|
||||
};
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
lspsaga = {
|
||||
enable = true;
|
||||
lightbulb.enable = false;
|
||||
};
|
||||
nvim-lightbulb = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autocmd.enabled = true;
|
||||
number.enabled = true;
|
||||
};
|
||||
};
|
||||
vimtex.enable = true;
|
||||
floaterm.enable = true;
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
cmdline.":".sources = [ { name = "path"; } ];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
mapping = {
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
comment.enable = true;
|
||||
vimtex.enable = true;
|
||||
floaterm.enable = true;
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
cmdline.":".sources = [ { name = "path"; } ];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
mapping = {
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
};
|
||||
sources = [
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{
|
||||
name = "buffer";
|
||||
# Words from other open buffers can also be suggested.
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
}
|
||||
];
|
||||
};
|
||||
sources = [
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{
|
||||
name = "buffer";
|
||||
# Words from other open buffers can also be suggested.
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
146
common/hm-modules/nvim/keybinds.nix
Normal file
146
common/hm-modules/nvim/keybinds.nix
Normal file
|
@ -0,0 +1,146 @@
|
|||
{ helpers, ... }:
|
||||
{
|
||||
keymaps = with helpers; [
|
||||
# General
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>";
|
||||
action = ":noh<CR>";
|
||||
}
|
||||
# Telescope
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action = ":Telescope find_files<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fs";
|
||||
action = ":Telescope file_browser<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fg";
|
||||
action = mkRaw "require('telescope.builtin').live_grep";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fb";
|
||||
action = ":Telescope buffers<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fo";
|
||||
action = ":Telescope oldfiles<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fr";
|
||||
action = ":Telescope frecency<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ob";
|
||||
action = mkRaw "require('obsidian_picker').obsidian_picker";
|
||||
}
|
||||
# Commenting
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-/>";
|
||||
action = mkRaw "require('Comment.api').toggle.linewise.current";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<C-/>";
|
||||
action = mkRaw ''
|
||||
function()
|
||||
local esc = vim.api.nvim_replace_termcodes(
|
||||
'<ESC>', true, false, true
|
||||
)
|
||||
vim.api.nvim_feedkeys(esc, 'nx', false)
|
||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||
end
|
||||
'';
|
||||
}
|
||||
# Float Term
|
||||
{
|
||||
mode = "n";
|
||||
key = "t";
|
||||
action = ":FloatermToggle myfloat<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<ESC>";
|
||||
action = mkRaw "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||
}
|
||||
# Switch buffers
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>q";
|
||||
action = ":bd<CR>"; # Delete buffer
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>s";
|
||||
action = ":bn<CR>"; # Buffer next
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>a";
|
||||
action = ":bp<CR>"; # Buffer previous
|
||||
}
|
||||
# Change Indenting
|
||||
{
|
||||
mode = "i";
|
||||
key = "<S-Tab>";
|
||||
action = "<C-o><<";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<<_";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = ">>_";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<Tab>";
|
||||
action = ">gv";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<S-Tab>";
|
||||
action = "<gv";
|
||||
}
|
||||
# Neotest
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>nr";
|
||||
action = mkRaw "require('neotest').run.run";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>no";
|
||||
action = mkRaw "require('neotest').output.open";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ns";
|
||||
action = mkRaw "require('neotest').run.stop";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>nf";
|
||||
action = mkRaw "function() require('neotest').run.run(vim.fn.expand('%')) end";
|
||||
}
|
||||
# LSP
|
||||
{
|
||||
mode = "n";
|
||||
key = "<M-CR>";
|
||||
action = ":Lspsaga code_action<CR>";
|
||||
}
|
||||
];
|
||||
}
|
76
common/hm-modules/nvim/lsp.nix
Normal file
76
common/hm-modules/nvim/lsp.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
lspBuf = {
|
||||
K = "hover";
|
||||
gD = "references";
|
||||
gd = "definition";
|
||||
gi = "implementation";
|
||||
gt = "type_definition";
|
||||
"<leader>rn" = "rename";
|
||||
"g=" = "format";
|
||||
};
|
||||
diagnostic = {
|
||||
"<leader>j" = "goto_next";
|
||||
"<leader>k" = "goto_prev";
|
||||
};
|
||||
};
|
||||
servers = {
|
||||
cssls.enable = true;
|
||||
nil_ls.enable = true; # NixOS
|
||||
dockerls.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
pyright.enable = true;
|
||||
pylsp = {
|
||||
enable = true;
|
||||
settings.plugins = {
|
||||
black = {
|
||||
enabled = true;
|
||||
cache_config = true;
|
||||
};
|
||||
pycodestyle = {
|
||||
maxLineLength = 100;
|
||||
};
|
||||
};
|
||||
};
|
||||
elixirls.enable = true;
|
||||
clangd.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
lspsaga = {
|
||||
enable = true;
|
||||
lightbulb.enable = false;
|
||||
};
|
||||
nvim-lightbulb = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autocmd.enabled = true;
|
||||
number.enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
formatting = {
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue