nvim: Update configuration
This commit is contained in:
parent
c8dcea4e77
commit
a5930c5393
7 changed files with 62 additions and 36 deletions
|
@ -549,11 +549,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1702281974,
|
"lastModified": 1702396052,
|
||||||
"narHash": "sha256-OX6umqmLlRKKX0yEfQBmMx8pDNHtxp+sGTLyFh8kLG8=",
|
"narHash": "sha256-mN/PF3B3/L+nTQWhq0cC4+RFS4zIDN/o4v7j7flV8uM=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "5ff2cdbe0db6a6f3445f7d878cb87d121d914d83",
|
"rev": "8af5563aa9971a96af7fbbf8830be602869278f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
(highlight :CmpItemAbbrMatch {:fg mod.colors.cyan :bg :NONE :bold true})
|
(highlight :CmpItemAbbrMatch {:fg mod.colors.cyan :bg :NONE :bold true})
|
||||||
(highlight :CmpItemAbbrMatchFuzzy
|
(highlight :CmpItemAbbrMatchFuzzy
|
||||||
{:fg mod.colors.cyan :bg :NONE :bold true})
|
{:fg mod.colors.cyan :bg :NONE :bold true})
|
||||||
|
(highlight :CmpItemAbbrDeprecated
|
||||||
|
{:fg mod.colors.white :bg :NONE :strikethrough true})
|
||||||
(highlight :CmpItemMenu {:fg mod.colors.purple :bg :NONE :italic true})
|
(highlight :CmpItemMenu {:fg mod.colors.purple :bg :NONE :italic true})
|
||||||
(let [cmp-groups [:CmpItemKindField
|
(let [cmp-groups [:CmpItemKindField
|
||||||
:CmpItemKindProperty
|
:CmpItemKindProperty
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
[{:name :cmp_tabnine}]
|
[{:name :cmp_tabnine}]
|
||||||
[])]
|
[])]
|
||||||
(vim.list_extend (vim.list_extend [{:name :nvim_lsp}] maybe-tabnine)
|
(vim.list_extend (vim.list_extend [{:name :nvim_lsp}] maybe-tabnine)
|
||||||
[{:name :async_path}
|
[{:name :async_path} {:name :luasnip}])))
|
||||||
{:name :luasnip}
|
|
||||||
{:name :cmp_yanky :option {:minLength 3}}])))
|
|
||||||
|
|
||||||
(fn comparator-list []
|
(fn comparator-list []
|
||||||
(let [compare (require :cmp.config.compare)
|
(let [compare (require :cmp.config.compare)
|
||||||
|
|
|
@ -7,14 +7,32 @@
|
||||||
:auto_install false
|
:auto_install false
|
||||||
:highlight {:enable true :disable disable-parsers}
|
:highlight {:enable true :disable disable-parsers}
|
||||||
:indent {:enable true :disable disable-parsers}
|
:indent {:enable true :disable disable-parsers}
|
||||||
:textobjects {:select {:enable true
|
|
||||||
:disable disable-parsers
|
|
||||||
:keymaps {:af "@function.outer"
|
|
||||||
:if "@function.inner"
|
|
||||||
:ac "@conditional.outer"
|
|
||||||
:ic "@conditional.inner"}}}
|
|
||||||
:matchup {:enable true :disable disable-parsers}
|
:matchup {:enable true :disable disable-parsers}
|
||||||
:autopairs {:enable true :disable disable-parsers}
|
:autopairs {:enable true :disable disable-parsers}
|
||||||
:playground {:enable true}
|
:playground {:enable true}
|
||||||
:nifoc_hooks {:enable true
|
:nifoc_hooks {:enable true
|
||||||
:disable disable-parsers}}))
|
:disable disable-parsers}
|
||||||
|
:textobjects {:select {:enable true
|
||||||
|
:lookahead true
|
||||||
|
:keymaps {:af {:query "@function.outer"
|
||||||
|
:desc "Select outer part of a function"}
|
||||||
|
:if {:query "@function.inner"
|
||||||
|
:desc "Select inner part of a function"}
|
||||||
|
:ac {:query "@class.outer"
|
||||||
|
:desc "Select outer part of a class"}
|
||||||
|
:ic {:query "@class.inner"
|
||||||
|
:desc "Select inner part of a class"}
|
||||||
|
:as {:query "@scope"
|
||||||
|
:desc "Select language scope"}}}
|
||||||
|
:swap {:enable true
|
||||||
|
:swap_next {:<leader>a {:query "@parameter.inner"
|
||||||
|
:desc "Swap function parameter with the next one"}}
|
||||||
|
:swap_previous {:<leader>A {:query "@parameter.inner"
|
||||||
|
:desc "Swap function parameter with the previous one"}}}
|
||||||
|
:lsp_interop {:enable true
|
||||||
|
:border :rounded
|
||||||
|
:floating_preview_opts {}
|
||||||
|
:peek_definition_code {:<leader>lpf {:query "@function.outer"
|
||||||
|
:desc "Peek outer function definition"}
|
||||||
|
:<leader>lpF {:query "@class.outer"
|
||||||
|
:desc "Peek outer class definition"}}}}}))
|
||||||
|
|
|
@ -56,15 +56,21 @@ in
|
||||||
treesitter-parsers = pkgs.symlinkJoin {
|
treesitter-parsers = pkgs.symlinkJoin {
|
||||||
name = "treesitter-parsers";
|
name = "treesitter-parsers";
|
||||||
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
||||||
|
p.angular
|
||||||
p.bash
|
p.bash
|
||||||
#p.comment # slow
|
#p.comment # slow
|
||||||
p.css
|
p.css
|
||||||
|
p.diff
|
||||||
p.dockerfile
|
p.dockerfile
|
||||||
p.eex
|
p.eex
|
||||||
p.elixir
|
p.elixir
|
||||||
p.erlang
|
p.erlang
|
||||||
p.fennel
|
p.fennel
|
||||||
p.fish
|
p.fish
|
||||||
|
p.git_rebase
|
||||||
|
p.gitattributes
|
||||||
|
p.gitcommit
|
||||||
|
p.gitignore
|
||||||
p.graphql
|
p.graphql
|
||||||
p.heex
|
p.heex
|
||||||
p.html
|
p.html
|
||||||
|
@ -77,8 +83,9 @@ in
|
||||||
p.lua
|
p.lua
|
||||||
p.make
|
p.make
|
||||||
p.markdown
|
p.markdown
|
||||||
p.markdown-inline
|
p.markdown_inline
|
||||||
p.nix
|
p.nix
|
||||||
|
p.python
|
||||||
p.query
|
p.query
|
||||||
p.regex
|
p.regex
|
||||||
p.ruby
|
p.ruby
|
||||||
|
@ -244,7 +251,6 @@ in
|
||||||
cmp-buffer
|
cmp-buffer
|
||||||
cmp-cmdline
|
cmp-cmdline
|
||||||
cmp-nvim-lsp-document-symbol
|
cmp-nvim-lsp-document-symbol
|
||||||
cmp_yanky
|
|
||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
|
|
||||||
|
@ -268,6 +274,8 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
# Textobjects
|
# Textobjects
|
||||||
|
nvim-treesitter-textobjects
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-surround;
|
plugin = nvim-surround;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;
|
||||||
|
|
|
@ -117,12 +117,12 @@ in
|
||||||
};
|
};
|
||||||
nvim-treesitter = buildVimPlugin {
|
nvim-treesitter = buildVimPlugin {
|
||||||
pname = "nvim-treesitter";
|
pname = "nvim-treesitter";
|
||||||
version = "2023-12-11";
|
version = "2023-12-12";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nvim-treesitter";
|
owner = "nvim-treesitter";
|
||||||
repo = "nvim-treesitter";
|
repo = "nvim-treesitter";
|
||||||
rev = "a6c655629cad421e432aa84af32cbfe35375113a";
|
rev = "78d75bce03f218ee30aedb6e24e3ec1189a3e9ff";
|
||||||
sha256 = "0cpnn155y1ygqkk18929mn7iq4hd0naxxdb8nh5z7621w0w8nanf";
|
sha256 = "0c8ybynj7z7z88nlw15rq7vzqzv5vnx83cyf0rksy8xlkz5vrsdv";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -230,12 +230,12 @@ in
|
||||||
};
|
};
|
||||||
nvim-lspconfig = buildVimPlugin {
|
nvim-lspconfig = buildVimPlugin {
|
||||||
pname = "nvim-lspconfig";
|
pname = "nvim-lspconfig";
|
||||||
version = "2023-12-10";
|
version = "2023-12-12";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "neovim";
|
owner = "neovim";
|
||||||
repo = "nvim-lspconfig";
|
repo = "nvim-lspconfig";
|
||||||
rev = "bd405e45c5fb122c16af8f87fa2dd7ab1981b243";
|
rev = "f451052bd6804e9e5ccd0ac874d7df8d3d4c55b9";
|
||||||
sha256 = "1jfjy8j91b66i2kkzikkybl56b62ybj8kshxyjjwlvlz9vaqd06j";
|
sha256 = "1cf0vzdk2jmj63x7cg9p5m2lhi5ch7p8mrsidclx9h4qpf4vl0ns";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -404,17 +404,6 @@ in
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
cmp_yanky = buildVimPlugin {
|
|
||||||
pname = "cmp_yanky";
|
|
||||||
version = "2023-11-16";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "chrisgrieser";
|
|
||||||
repo = "cmp_yanky";
|
|
||||||
rev = "c3d089186ccead26eba01023502f3eeadd7a92d2";
|
|
||||||
sha256 = "19197b4all82qzm80ms9h7aj1a4yp04b3jgy2j7r3irl6qmnhqwd";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
conform-nvim = buildVimPlugin {
|
conform-nvim = buildVimPlugin {
|
||||||
pname = "conform.nvim";
|
pname = "conform.nvim";
|
||||||
version = "2023-12-11";
|
version = "2023-12-11";
|
||||||
|
@ -448,6 +437,17 @@ in
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
nvim-treesitter-textobjects = buildVimPlugin {
|
||||||
|
pname = "nvim-treesitter-textobjects";
|
||||||
|
version = "2023-12-01";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nvim-treesitter";
|
||||||
|
repo = "nvim-treesitter-textobjects";
|
||||||
|
rev = "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a";
|
||||||
|
sha256 = "1kdfwihk8ci827aq4w6xv7vn2740qpmh6dk892cd6yi0ab4zxvxn";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
nvim-surround = buildVimPlugin {
|
nvim-surround = buildVimPlugin {
|
||||||
pname = "nvim-surround";
|
pname = "nvim-surround";
|
||||||
version = "2023-12-04";
|
version = "2023-12-04";
|
||||||
|
@ -516,12 +516,12 @@ in
|
||||||
};
|
};
|
||||||
gitsigns-nvim = buildVimPlugin {
|
gitsigns-nvim = buildVimPlugin {
|
||||||
pname = "gitsigns.nvim";
|
pname = "gitsigns.nvim";
|
||||||
version = "2023-12-10";
|
version = "2023-12-12";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lewis6991";
|
owner = "lewis6991";
|
||||||
repo = "gitsigns.nvim";
|
repo = "gitsigns.nvim";
|
||||||
rev = "6e05045fb1a4845fe44f5c54aafe024444c422ba";
|
rev = "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9";
|
||||||
sha256 = "0wj7cbh9rf77zzzylnx6fahvs7ygnjmqpkm95vaixbg5v5f0hdwj";
|
sha256 = "0n1pdil0di93sfmlxnw80xvwxgz36m3hllhzg16bmlcjwgagwclp";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,13 +46,13 @@
|
||||||
- src: hrsh7th/cmp-buffer
|
- src: hrsh7th/cmp-buffer
|
||||||
- src: hrsh7th/cmp-cmdline
|
- src: hrsh7th/cmp-cmdline
|
||||||
- src: hrsh7th/cmp-nvim-lsp-document-symbol
|
- src: hrsh7th/cmp-nvim-lsp-document-symbol
|
||||||
- src: chrisgrieser/cmp_yanky
|
|
||||||
# Formatting
|
# Formatting
|
||||||
- src: stevearc/conform.nvim
|
- src: stevearc/conform.nvim
|
||||||
# Pairs
|
# Pairs
|
||||||
- src: windwp/nvim-autopairs
|
- src: windwp/nvim-autopairs
|
||||||
- src: andymass/vim-matchup
|
- src: andymass/vim-matchup
|
||||||
# Textobjects
|
# Textobjects
|
||||||
|
- src: nvim-treesitter/nvim-treesitter-textobjects
|
||||||
- src: kylechui/nvim-surround
|
- src: kylechui/nvim-surround
|
||||||
# UI
|
# UI
|
||||||
- src: stevearc/oil.nvim
|
- src: stevearc/oil.nvim
|
||||||
|
|
Loading…
Reference in a new issue