diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-06-17 17:40:16 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-06-17 17:40:16 -0400 |
| commit | 408009f8a4886efa3fa8919d2a8f64da41c3c754 (patch) | |
| tree | 0bc1570c23c342019ec63c202309daa3e522afc0 | |
| parent | 65ed153fcf56e41d081dd6f0d8fd2cd2b5b970e9 (diff) | |
| download | home-408009f8a4886efa3fa8919d2a8f64da41c3c754.tar.gz | |
modules/neovim: sync
| -rw-r--r-- | modules/neovim/default.nix | 49 | ||||
| -rw-r--r-- | modules/neovim/notes.md | 28 | ||||
| -rw-r--r-- | modules/neovim/nvim/lua/config/colorscheme.lua | 74 | ||||
| -rw-r--r-- | modules/neovim/nvim/lua/config/settings.lua | 12 |
4 files changed, 95 insertions, 68 deletions
diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 2f6f54d..f3200b3 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -9,6 +9,10 @@ let }; doCheck = false; }; + tsparsers = pkgs.symlinkJoin { + name = "tsparsers"; + paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies; + }; in { options.modules.neovim = { @@ -57,28 +61,28 @@ in } ''; } - (nvim-treesitter.withPlugins (p: with p; [ - tree-sitter-nix - tree-sitter-make - tree-sitter-cmake - tree-sitter-verilog - tree-sitter-scheme - tree-sitter-llvm - tree-sitter-html - tree-sitter-glsl - tree-sitter-devicetree - tree-sitter-cuda - tree-sitter-c - tree-sitter-cpp - tree-sitter-lua - tree-sitter-zig - tree-sitter-rust - tree-sitter-haskell - tree-sitter-toml - tree-sitter-markdown - tree-sitter-markdown-inline - tree-sitter-tablegen - ])) + # (nvim-treesitter.withPlugins (p: with p; [ + # tree-sitter-nix + # tree-sitter-make + # tree-sitter-cmake + # tree-sitter-verilog + # tree-sitter-scheme + # tree-sitter-llvm + # tree-sitter-html + # tree-sitter-glsl + # tree-sitter-devicetree + # tree-sitter-cuda + # tree-sitter-c + # tree-sitter-cpp + # tree-sitter-lua + # tree-sitter-zig + # tree-sitter-rust + # tree-sitter-haskell + # tree-sitter-toml + # tree-sitter-markdown + # tree-sitter-markdown-inline + # tree-sitter-tablegen + # ])) { plugin = lean-nvim; @@ -117,6 +121,7 @@ in ${builtins.readFile ./nvim/init.lua} vim.cmd[[${scheme.extraVimConfig}]] vim.cmd[[colorscheme ${scheme.name}]] + vim.opt.runtimepath:prepend('${tsparsers}') ''; }; }; diff --git a/modules/neovim/notes.md b/modules/neovim/notes.md new file mode 100644 index 0000000..6157f3a --- /dev/null +++ b/modules/neovim/notes.md @@ -0,0 +1,28 @@ +usage +===== + +- `van` `vin` lsp incremental selection now native via lsp (textDocument/selectionRange) +- `vim.lpeg` looks cool +- `:help diagnostic-signs` +- vim.ui_attach callbacks for ui-messages msg_show + +config +====== + +- new `pummaxwidth` +- `complete` was updated a bit +- `nvim_echo` +- `vim.diagnostic.setqflist` (and setloclist) + - check out `vim.lsp.listOpts` `on_list` option. (or just the loclist opt) +- `CommandLeavePre` +- `ui-messages` `msg_show` `append` param +- `vim.lsp.ClientConfig` + +to disable hover highlights: +```lua +vim.api.nvim_create_autocmd('ColorScheme', { + callback = function() + vim.api.nvim_set_hl(0, 'LspReferenceTarget', {}) + end, +}) +``` diff --git a/modules/neovim/nvim/lua/config/colorscheme.lua b/modules/neovim/nvim/lua/config/colorscheme.lua index 63a29be..6a426f0 100644 --- a/modules/neovim/nvim/lua/config/colorscheme.lua +++ b/modules/neovim/nvim/lua/config/colorscheme.lua @@ -10,46 +10,44 @@ vim.api.nvim_create_autocmd("ColorScheme", { callback = function(args) hi TabLineFill guibg=bg hi TabLineSel guibg=bg guifg=fg hi TabLine guibg=bg - hi Normal guibg=NONE - hi NormalNC guibg=NONE - hi NormalFloat guibg=NONE - hi StatusLine guibg=NONE guifg=fg - hi StatusLineNC guibg=NONE + hi NormalFloat guibg=bg + hi StatusLine guibg=bg guifg=fg + hi StatusLineNC guibg=bg ]] vim.api.nvim_set_hl(0, 'FzfLuaBorder', { fg = colors.base01 }) - -- i dislike syntax highlighting - -- vim.api.nvim_set_hl(0, 'Comment', {}) - vim.api.nvim_set_hl(0, 'Constant', {}) - -- vim.api.nvim_set_hl(0, 'String', {}) - vim.api.nvim_set_hl(0, 'Character', { link = "String" }) - vim.api.nvim_set_hl(0, 'Number', {}) - vim.api.nvim_set_hl(0, 'Boolean', {}) - vim.api.nvim_set_hl(0, 'Float', {}) - vim.api.nvim_set_hl(0, 'Identifier', {}) - vim.api.nvim_set_hl(0, 'Function', {}) - vim.api.nvim_set_hl(0, 'Statement', {}) - vim.api.nvim_set_hl(0, 'Conditional', {}) - vim.api.nvim_set_hl(0, 'Repeat', {}) - vim.api.nvim_set_hl(0, 'Label', {}) - vim.api.nvim_set_hl(0, 'Operator', {}) - vim.api.nvim_set_hl(0, 'Keyword', {}) - vim.api.nvim_set_hl(0, 'Exception', {}) - vim.api.nvim_set_hl(0, 'PreProc', {}) - vim.api.nvim_set_hl(0, 'Include', {}) - vim.api.nvim_set_hl(0, 'Define', {}) - vim.api.nvim_set_hl(0, 'Macro', {}) - vim.api.nvim_set_hl(0, 'PreCondit', {}) - vim.api.nvim_set_hl(0, 'Type', {}) - vim.api.nvim_set_hl(0, 'StorageClass', {}) - vim.api.nvim_set_hl(0, 'Structure', {}) - vim.api.nvim_set_hl(0, 'Typedef', {}) - vim.api.nvim_set_hl(0, 'Special', {}) - vim.api.nvim_set_hl(0, 'SpecialChar', { link = 'String' }) - vim.api.nvim_set_hl(0, 'Tag', {}) - vim.api.nvim_set_hl(0, 'Delimiter', {}) - -- vim.api.nvim_set_hl(0, 'SpecialComment', {}) - vim.api.nvim_set_hl(0, 'Debug', {}) - -- vim.api.nvim_set_hl(0, 'Underlined', {}) + -- -- i dislike syntax highlighting + -- -- vim.api.nvim_set_hl(0, 'Comment', {}) + -- vim.api.nvim_set_hl(0, 'Constant', {}) + -- -- vim.api.nvim_set_hl(0, 'String', {}) + -- vim.api.nvim_set_hl(0, 'Character', { link = "String" }) + -- vim.api.nvim_set_hl(0, 'Number', {}) + -- vim.api.nvim_set_hl(0, 'Boolean', {}) + -- vim.api.nvim_set_hl(0, 'Float', {}) + -- vim.api.nvim_set_hl(0, 'Identifier', {}) + -- vim.api.nvim_set_hl(0, 'Function', {}) + -- vim.api.nvim_set_hl(0, 'Statement', {}) + -- vim.api.nvim_set_hl(0, 'Conditional', {}) + -- vim.api.nvim_set_hl(0, 'Repeat', {}) + -- vim.api.nvim_set_hl(0, 'Label', {}) + -- vim.api.nvim_set_hl(0, 'Operator', {}) + -- vim.api.nvim_set_hl(0, 'Keyword', {}) + -- vim.api.nvim_set_hl(0, 'Exception', {}) + -- vim.api.nvim_set_hl(0, 'PreProc', {}) + -- vim.api.nvim_set_hl(0, 'Include', {}) + -- vim.api.nvim_set_hl(0, 'Define', {}) + -- vim.api.nvim_set_hl(0, 'Macro', {}) + -- vim.api.nvim_set_hl(0, 'PreCondit', {}) + -- vim.api.nvim_set_hl(0, 'Type', {}) + -- vim.api.nvim_set_hl(0, 'StorageClass', {}) + -- vim.api.nvim_set_hl(0, 'Structure', {}) + -- vim.api.nvim_set_hl(0, 'Typedef', {}) + -- vim.api.nvim_set_hl(0, 'Special', {}) + -- vim.api.nvim_set_hl(0, 'SpecialChar', { link = 'String' }) + -- vim.api.nvim_set_hl(0, 'Tag', {}) + -- vim.api.nvim_set_hl(0, 'Delimiter', {}) + -- -- vim.api.nvim_set_hl(0, 'SpecialComment', {}) + -- vim.api.nvim_set_hl(0, 'Debug', {}) + -- -- vim.api.nvim_set_hl(0, 'Underlined', {}) end}) diff --git a/modules/neovim/nvim/lua/config/settings.lua b/modules/neovim/nvim/lua/config/settings.lua index 2c24ee6..75f1c41 100644 --- a/modules/neovim/nvim/lua/config/settings.lua +++ b/modules/neovim/nvim/lua/config/settings.lua @@ -1,8 +1,7 @@ vim.g.mapleader = ' ' --- vim.o.number = true --- vim.o.relativenumber = true -vim.o.number = false +vim.o.relativenumber = true +vim.o.number = true vim.o.tabstop = 2 vim.o.shiftwidth = 2 vim.o.relativenumber = false @@ -17,13 +16,10 @@ vim.o.shortmess = "tToOCFIsWcCi" vim.o.termguicolors = true vim.opt.fillchars = {eob = " "} vim.o.smd = false ---vim.opt.laststatus = 3 -vim.opt.laststatus=1 +vim.opt.laststatus=2 vim.opt.cmdheight=0 ---%-0{minwid}.{maxwid}{item -- vim.opt.statusline="%=%f%=%r %p%% « %l, %c %y" -vim.opt.statusline="%f%=%p%% « %l, %c " -vim.cmd[[packadd! termdebug]] +-- vim.opt.statusline="%f%=%p%% « %l, %c " -- vim.opt.winbar="%!nvim_treesitter#statusline()" -- vim.cmd[[ -- hi StatusLineNC guibg=none |