[fix] neovim: reduce closure size

Also re-enable all grammars
This commit is contained in:
Jalil David Salamé Messina 2024-05-04 22:02:13 +02:00
parent 3f0a49d46b
commit da21f7a14c
Signed by: jalil
GPG key ID: F016B9E770737A0B
3 changed files with 29 additions and 77 deletions

View file

@ -74,7 +74,7 @@
end end
-- Enable formatting if supported -- Enable formatting if supported
if capabilities.documentFormattingProvider then if capabilities.documentFormattingProvider then
vim.keymap.set('n', '<leader>w', function() vim.lsp.buf.format { async = true } end, { desc = 'Format Buffer', ${opts} }) vim.keymap.set('n', '<leader>w', function() require("conform").format({ lsp_fallback = true }) end, { desc = 'Format Buffer', ${opts} })
end end
-- Other keybinds -- Other keybinds
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = '[G]o to [D]efinition', ${opts} }) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = '[G]o to [D]efinition', ${opts} })

View file

@ -51,22 +51,23 @@ in {
keymaps = import ./mappings.nix; keymaps = import ./mappings.nix;
inherit (import ./augroups.nix) autoGroups autoCmd; inherit (import ./augroups.nix) autoGroups autoCmd;
extraPlugins = let extraPlugins = let
plugins = pkgs.vimPlugins;
jjdescription = pkgs.callPackage ./vim-jjdescription.nix {}; jjdescription = pkgs.callPackage ./vim-jjdescription.nix {};
in in [
with pkgs.vimPlugins; [ plugins.nui-nvim
nvim-web-devicons plugins.nvim-web-devicons
jjdescription jjdescription
]; ];
# Formatting # Formatting
extraPackages = with pkgs; [ extraPackages = [
stylua pkgs.stylua
shfmt pkgs.shfmt
taplo pkgs.taplo
yamlfmt pkgs.yamlfmt
nixpkgs-fmt pkgs.nixpkgs-fmt
alejandra pkgs.alejandra
nixfmt-classic pkgs.nixfmt-classic
rust-analyzer pkgs.luajitPackages.jsregexp
]; ];
extraConfigLuaPre = '' extraConfigLuaPre = ''
-- Lua Pre Config -- Lua Pre Config

View file

@ -124,7 +124,7 @@
c = ["clang_format"]; c = ["clang_format"];
cpp = ["clang_format"]; cpp = ["clang_format"];
lua = ["stylua"]; lua = ["stylua"];
nix = ["nixpkgs_fmt"]; nix = ["alejandra"];
rust = ["rustfmt"]; rust = ["rustfmt"];
sh = ["shfmt"]; sh = ["shfmt"];
toml = ["taplo"]; toml = ["taplo"];
@ -137,7 +137,7 @@
enable = true; enable = true;
servers = { servers = {
bashls.enable = true; bashls.enable = true;
clangd.enable = true; # clangd.enable = true;
html.enable = true; html.enable = true;
jsonls.enable = true; jsonls.enable = true;
nil_ls.enable = true; nil_ls.enable = true;
@ -166,19 +166,28 @@
}; };
noice = { noice = {
enable = true; enable = true;
lsp.override = {
"vim.lsp.util.convert_input_to_markdown_lines" = true;
"vim.lsp.util.stylize_markdown" = true;
"cmp.entry.get_documentation" = true;
};
presets = { presets = {
# use a classic bottom cmdline for search # use a classic bottom cmdline for search
bottom_search = true; bottom_search = true;
# position the cmdline and popupmenu together # position the cmdline and popupmenu together
command_palette = true; command_palette = false;
# long messages will be sent to a split # long messages will be sent to a split
long_message_to_split = true; long_message_to_split = true;
# enables an input dialog for inc-rename.nvim # enables an input dialog for inc-rename.nvim
inc_rename = false; inc_rename = false;
# add a border to hover docs and signature help # add a border to hover docs and signature help
lsp_doc_border = false; lsp_doc_border = true;
}; };
}; };
notify = {
enable = true;
backgroundColour = "#000000";
};
nvim-colorizer = { nvim-colorizer = {
enable = true; enable = true;
userDefaultOptions = { userDefaultOptions = {
@ -198,64 +207,6 @@
enable = true; enable = true;
indent = true; indent = true;
incrementalSelection.enable = true; incrementalSelection.enable = true;
grammarPackages = let
parsers = pkgs.vimPlugins.nvim-treesitter-parsers;
in [
parsers.asm
parsers.bash
# parsers.bibtex
parsers.c
parsers.comment
parsers.commonlisp
parsers.cpp
parsers.css
parsers.csv
# parsers.d
parsers.diff
parsers.dockerfile
parsers.dot
parsers.doxygen
parsers.git_config
parsers.git_rebase
parsers.gitattributes
parsers.gitcommit
parsers.gitignore
parsers.go
parsers.gomod
parsers.gosum
parsers.gowork
parsers.html
parsers.ini
parsers.json
parsers.json5
parsers.jsonc
# parsers.latex
parsers.lua
parsers.luadoc
parsers.luap
parsers.luau
parsers.make
parsers.markdown
parsers.markdown_inline
parsers.meson
parsers.nix
parsers.ocaml
parsers.ocaml_interface
parsers.pem
parsers.python
parsers.rust
parsers.scheme
parsers.sql
parsers.ssh_config
parsers.toml
parsers.tsv
parsers.vim
parsers.vimdoc
parsers.wgsl
parsers.wgsl_bevy
parsers.yaml
parsers.zig
];
}; };
trouble = { trouble = {
enable = true; enable = true;