1
0
Fork 0

nvim: Update configuration
All checks were successful
Build / build-amd64-linux (push) Successful in 42s
Build / build-arm64-linux (push) Successful in 1m58s

This commit is contained in:
Daniel Kempkens 2023-12-12 20:05:42 +01:00
parent c8dcea4e77
commit a5930c5393
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
7 changed files with 62 additions and 36 deletions

View file

@ -549,11 +549,11 @@
]
},
"locked": {
"lastModified": 1702281974,
"narHash": "sha256-OX6umqmLlRKKX0yEfQBmMx8pDNHtxp+sGTLyFh8kLG8=",
"lastModified": 1702396052,
"narHash": "sha256-mN/PF3B3/L+nTQWhq0cC4+RFS4zIDN/o4v7j7flV8uM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5ff2cdbe0db6a6f3445f7d878cb87d121d914d83",
"rev": "8af5563aa9971a96af7fbbf8830be602869278f3",
"type": "github"
},
"original": {

View file

@ -48,6 +48,8 @@
(highlight :CmpItemAbbrMatch {:fg mod.colors.cyan :bg :NONE :bold true})
(highlight :CmpItemAbbrMatchFuzzy
{: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})
(let [cmp-groups [:CmpItemKindField
:CmpItemKindProperty

View file

@ -7,9 +7,7 @@
[{:name :cmp_tabnine}]
[])]
(vim.list_extend (vim.list_extend [{:name :nvim_lsp}] maybe-tabnine)
[{:name :async_path}
{:name :luasnip}
{:name :cmp_yanky :option {:minLength 3}}])))
[{:name :async_path} {:name :luasnip}])))
(fn comparator-list []
(let [compare (require :cmp.config.compare)

View file

@ -7,14 +7,32 @@
:auto_install false
:highlight {: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}
:autopairs {:enable true :disable disable-parsers}
:playground {: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"}}}}}))

View file

@ -56,15 +56,21 @@ in
treesitter-parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
p.angular
p.bash
#p.comment # slow
p.css
p.diff
p.dockerfile
p.eex
p.elixir
p.erlang
p.fennel
p.fish
p.git_rebase
p.gitattributes
p.gitcommit
p.gitignore
p.graphql
p.heex
p.html
@ -77,8 +83,9 @@ in
p.lua
p.make
p.markdown
p.markdown-inline
p.markdown_inline
p.nix
p.python
p.query
p.regex
p.ruby
@ -244,7 +251,6 @@ in
cmp-buffer
cmp-cmdline
cmp-nvim-lsp-document-symbol
cmp_yanky
# Formatting
@ -268,6 +274,8 @@ in
}
# Textobjects
nvim-treesitter-textobjects
{
plugin = nvim-surround;
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;

View file

@ -117,12 +117,12 @@ in
};
nvim-treesitter = buildVimPlugin {
pname = "nvim-treesitter";
version = "2023-12-11";
version = "2023-12-12";
src = fetchFromGitHub {
owner = "nvim-treesitter";
repo = "nvim-treesitter";
rev = "a6c655629cad421e432aa84af32cbfe35375113a";
sha256 = "0cpnn155y1ygqkk18929mn7iq4hd0naxxdb8nh5z7621w0w8nanf";
rev = "78d75bce03f218ee30aedb6e24e3ec1189a3e9ff";
sha256 = "0c8ybynj7z7z88nlw15rq7vzqzv5vnx83cyf0rksy8xlkz5vrsdv";
fetchSubmodules = false;
};
};
@ -230,12 +230,12 @@ in
};
nvim-lspconfig = buildVimPlugin {
pname = "nvim-lspconfig";
version = "2023-12-10";
version = "2023-12-12";
src = fetchFromGitHub {
owner = "neovim";
repo = "nvim-lspconfig";
rev = "bd405e45c5fb122c16af8f87fa2dd7ab1981b243";
sha256 = "1jfjy8j91b66i2kkzikkybl56b62ybj8kshxyjjwlvlz9vaqd06j";
rev = "f451052bd6804e9e5ccd0ac874d7df8d3d4c55b9";
sha256 = "1cf0vzdk2jmj63x7cg9p5m2lhi5ch7p8mrsidclx9h4qpf4vl0ns";
fetchSubmodules = false;
};
};
@ -404,17 +404,6 @@ in
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 {
pname = "conform.nvim";
version = "2023-12-11";
@ -448,6 +437,17 @@ in
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 {
pname = "nvim-surround";
version = "2023-12-04";
@ -516,12 +516,12 @@ in
};
gitsigns-nvim = buildVimPlugin {
pname = "gitsigns.nvim";
version = "2023-12-10";
version = "2023-12-12";
src = fetchFromGitHub {
owner = "lewis6991";
repo = "gitsigns.nvim";
rev = "6e05045fb1a4845fe44f5c54aafe024444c422ba";
sha256 = "0wj7cbh9rf77zzzylnx6fahvs7ygnjmqpkm95vaixbg5v5f0hdwj";
rev = "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9";
sha256 = "0n1pdil0di93sfmlxnw80xvwxgz36m3hllhzg16bmlcjwgagwclp";
fetchSubmodules = false;
};
};

View file

@ -46,13 +46,13 @@
- src: hrsh7th/cmp-buffer
- src: hrsh7th/cmp-cmdline
- src: hrsh7th/cmp-nvim-lsp-document-symbol
- src: chrisgrieser/cmp_yanky
# Formatting
- src: stevearc/conform.nvim
# Pairs
- src: windwp/nvim-autopairs
- src: andymass/vim-matchup
# Textobjects
- src: nvim-treesitter/nvim-treesitter-textobjects
- src: kylechui/nvim-surround
# UI
- src: stevearc/oil.nvim