71 lines
1.5 KiB
Nix
71 lines
1.5 KiB
Nix
|
{ pkgs, ... }:
|
||
|
{
|
||
|
programs.nixvim = {
|
||
|
plugins = {
|
||
|
treesitter-refactor = {
|
||
|
enable = true;
|
||
|
highlightCurrentScope.enable = true;
|
||
|
highlightDefinitions.enable = true;
|
||
|
navigation = {
|
||
|
enable = true;
|
||
|
keymaps = {
|
||
|
gotoDefinition = null;
|
||
|
gotoDefinitionLspFallback = "gnd";
|
||
|
gotoNextUsage = "<a-*>";
|
||
|
gotoPreviousUsage = "<a-#>";
|
||
|
listDefinitions = "gnD";
|
||
|
listDefinitionsToc = "gO";
|
||
|
};
|
||
|
};
|
||
|
smartRename = {
|
||
|
enable = true;
|
||
|
keymaps.smartRename = "grr";
|
||
|
};
|
||
|
};
|
||
|
treesitter-context = {
|
||
|
enable = true;
|
||
|
};
|
||
|
treesitter = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
indent.enable = true;
|
||
|
incremental_selection = {
|
||
|
enable = true;
|
||
|
keymaps = {
|
||
|
init_selection = "gnn";
|
||
|
node_incremental = "grn";
|
||
|
scope_incremental = "grc";
|
||
|
node_decremental = "grm";
|
||
|
};
|
||
|
};
|
||
|
highlight = {
|
||
|
enable = true;
|
||
|
};
|
||
|
};
|
||
|
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||
|
bash
|
||
|
c
|
||
|
cpp
|
||
|
css
|
||
|
dockerfile
|
||
|
go
|
||
|
graphql
|
||
|
html
|
||
|
javascript
|
||
|
json
|
||
|
jsonc
|
||
|
lua
|
||
|
python
|
||
|
regex
|
||
|
ruby
|
||
|
rust
|
||
|
svelte
|
||
|
toml
|
||
|
typescript
|
||
|
yaml
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|