nvim: Replace some plugins with mini.nvim
This commit is contained in:
parent
0178faaa6a
commit
d36853d3d7
11 changed files with 49 additions and 151 deletions
16
flake.lock
16
flake.lock
|
@ -13,11 +13,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695384796,
|
||||
"lastModified": 1696775529,
|
||||
"narHash": "sha256-TYlE4B0ktPtlJJF9IFxTWrEeq+XKG8Ny0gc2FGEAdj0=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "1f677b3e161d3bdbfd08a939e8f25de2568e0ef4",
|
||||
"rev": "daf42cb35b2dc614d1551e37f96406e4c4a2d3e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -417,11 +417,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696693680,
|
||||
"narHash": "sha256-PH0HQTkqyj7DmdPKPwrrXwVURLBqzZs4nqnDw9q8mhg=",
|
||||
"lastModified": 1696725822,
|
||||
"narHash": "sha256-B7uAOS7TkLlOg1aX01rQlYbydcyB6ZnLJSfaYbKVww8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "945559664c1dc5836173ee12896ba421d9b37181",
|
||||
"rev": "5aabb5780a11c500981993d49ee93cfa6df9307b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -492,11 +492,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696516544,
|
||||
"narHash": "sha256-8rKE8Je6twTNFRTGF63P9mE3lZIq917RAicdc4XJO80=",
|
||||
"lastModified": 1696773021,
|
||||
"narHash": "sha256-JzjKl1h96cM5iSrkNvZX7Fgo+e3lisv2tn+uIMnXmD4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "66c352d33e0907239e4a69416334f64af2c685cc",
|
||||
"rev": "8edf336c5ca85efe20004d076747f91b85a6d087",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -64,6 +64,8 @@
|
|||
(let [theme (require :nifoc.theme)]
|
||||
(theme.setup))
|
||||
;; Plugins
|
||||
(set g.mapleader " ") ; Some plugins need this, so set it before the keymap is loaded
|
||||
(set o.timeoutlen 400)
|
||||
(set g.loaded_python_provider 0) ; Disable built-in providers
|
||||
(set g.loaded_ruby_provider 0)
|
||||
(set g.loaded_node_provider 0)
|
||||
|
|
|
@ -7,14 +7,11 @@
|
|||
telescope-toggleterm (require :telescope-toggleterm)
|
||||
telescope-ivy (telescope-themes.get_ivy)
|
||||
telescope-dropdown (telescope-themes.get_dropdown)
|
||||
npairs (require :nvim-autopairs)
|
||||
gitsigns (require :gitsigns)
|
||||
repl (require :nifoc.repl)
|
||||
formatting (require :nifoc.formatting)]
|
||||
(fn mod.setup []
|
||||
(keymap.set :n :<space> :<nop> {:noremap true})
|
||||
(set vim.g.mapleader " ")
|
||||
(set vim.opt.timeoutlen 400)
|
||||
;; Leader Mappings
|
||||
(keymap.set :n :<leader>o telescope-nifoc.find-files {:desc "Find Files"})
|
||||
(keymap.set :n :<leader>s #(telescope-builtin.live_grep telescope-ivy)
|
||||
|
@ -58,8 +55,7 @@
|
|||
; (keymap.set :n :<leader>dn #(noice.cmd :telescope)
|
||||
; {:desc "Display Notifications"})
|
||||
;; Other Mappings
|
||||
(keymap.set :n :<CR> ":nohlsearch<CR><CR>" {:silent true})
|
||||
(keymap.set :i :<CR> npairs.autopairs_cr {:expr true :silent true})
|
||||
; (keymap.set :n :<CR> ":nohlsearch<CR><CR>" {:silent true})
|
||||
(keymap.set :n :F formatting.maybe-format-buffer {:desc "Format Buffer"})
|
||||
(keymap.set :n :<A-Left> :b)
|
||||
(keymap.set :n :<A-Right> :w)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
(let [npairs (require :nvim-autopairs)]
|
||||
(npairs.setup {:check_ts true
|
||||
:ts_config {:javascript [:string :template_string]
|
||||
:elixir [:string]
|
||||
:lua [:string :source]}}))
|
|
@ -1,2 +0,0 @@
|
|||
(let [cmt (require :Comment)]
|
||||
(cmt.setup {:padding true}))
|
17
home/config/nvim/plugins/mini.fnl
Normal file
17
home/config/nvim/plugins/mini.fnl
Normal file
|
@ -0,0 +1,17 @@
|
|||
(let [miniclue (require :mini.clue)]
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md
|
||||
(miniclue.setup {:triggers [; Leader
|
||||
{:mode :n :keys :<leader>}
|
||||
{:mode :x :keys :<leader>}
|
||||
; Built-in
|
||||
{:mode :i :keys :<C-x>}]
|
||||
:clues [(miniclue.gen_clues.builtin_completion)]})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md
|
||||
((. (require :mini.comment) :setup) {})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-jump2d.md
|
||||
((. (require :mini.jump2d) :setup) {:hooks {:before_start (fn []
|
||||
(vim.cmd :nohlsearch))}})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md
|
||||
((. (require :mini.surround) :setup) {})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pairs.md
|
||||
((. (require :mini.pairs) :setup) {}))
|
|
@ -1,3 +0,0 @@
|
|||
(let [surround (require :nvim-surround)]
|
||||
(surround.setup {}))
|
||||
|
|
@ -14,8 +14,6 @@
|
|||
:ac "@conditional.outer"
|
||||
:ic "@conditional.inner"}}}
|
||||
:matchup {:enable true :disable disable-parsers}
|
||||
:autopairs {:enable true :disable disable-parsers}
|
||||
:autotag {:enable true :disable disable-parsers}
|
||||
:playground {:enable true}
|
||||
:nifoc_hooks {:enable true
|
||||
:disable disable-parsers}}))
|
||||
|
|
|
@ -106,6 +106,13 @@ in
|
|||
# Utils
|
||||
popup-nvim
|
||||
plenary-nvim
|
||||
|
||||
{
|
||||
plugin = mini-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/mini.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
nvim-web-devicons
|
||||
|
||||
{
|
||||
|
@ -139,15 +146,6 @@ in
|
|||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = leap-nvim;
|
||||
config = /* fennel */ ''
|
||||
(let [leap (require :leap)]
|
||||
(leap.set_default_keymaps))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Themes
|
||||
dracula-nvim
|
||||
|
||||
|
@ -195,12 +193,12 @@ in
|
|||
|
||||
# Completion
|
||||
{
|
||||
plugin = coq_nvim;
|
||||
plugin = pkgs.vimPlugins.coq_nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/coq.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
coq-artifacts
|
||||
pkgs.vimPlugins.coq-artifacts
|
||||
|
||||
# LSP
|
||||
{
|
||||
|
@ -230,13 +228,6 @@ in
|
|||
type = "fennel";
|
||||
}
|
||||
|
||||
# Comments
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Formatting
|
||||
|
||||
core-nvim
|
||||
|
@ -248,21 +239,6 @@ in
|
|||
}
|
||||
|
||||
# Pairs
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
config = builtins.readFile ../../config/nvim/plugins/autopairs.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-ts-autotag;
|
||||
config = /* fennel */ ''
|
||||
(let [ts-autotag (require :nvim-ts-autotag)]
|
||||
(ts-autotag.setup))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vim-matchup;
|
||||
config = builtins.readFile ../../config/nvim/plugins/matchup.fnl;
|
||||
|
@ -272,12 +248,6 @@ in
|
|||
# Textobjects
|
||||
nvim-treesitter-textobjects
|
||||
|
||||
{
|
||||
plugin = nvim-surround;
|
||||
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# UI
|
||||
{
|
||||
plugin = heirline-nvim;
|
||||
|
|
|
@ -28,6 +28,17 @@ in
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
mini-nvim = buildVimPlugin {
|
||||
pname = "mini.nvim";
|
||||
version = "2023-10-03";
|
||||
src = fetchFromGitHub {
|
||||
owner = "echasnovski";
|
||||
repo = "mini.nvim";
|
||||
rev = "25c4bf4efac51aad5393e37949e68ac3e672a73c";
|
||||
sha256 = "115s6wjd7c0y2fcc0wnzdp2gp1qmwzy417jqzjmlb1rphj7kn2hz";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-web-devicons = buildVimPlugin {
|
||||
pname = "nvim-web-devicons";
|
||||
version = "2023-10-08";
|
||||
|
@ -94,17 +105,6 @@ in
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
leap-nvim = buildVimPlugin {
|
||||
pname = "leap.nvim";
|
||||
version = "2023-07-23";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ggandor";
|
||||
repo = "leap.nvim";
|
||||
rev = "5efe985cf68fac3b6a6dfe7a75fbfaca8db2af9c";
|
||||
sha256 = "093fzf1bki2ll3lrqbnrw9w7i7aajbma4zq83c2nkxwi5gj5jqgl";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
dracula-nvim = buildVimPlugin {
|
||||
pname = "dracula.nvim";
|
||||
version = "2023-07-29";
|
||||
|
@ -295,38 +295,6 @@ in
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
comment-nvim = buildVimPlugin {
|
||||
pname = "comment.nvim";
|
||||
version = "2023-08-07";
|
||||
src = fetchFromGitHub {
|
||||
owner = "numtostr";
|
||||
repo = "comment.nvim";
|
||||
rev = "0236521ea582747b58869cb72f70ccfa967d2e89";
|
||||
sha256 = "1mvi7c6n9ybgs6lfylzhkidifa6jkgsbj808knx57blvi5k7blgr";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
coq_nvim = pkgs.vimPlugins.coq_nvim.overrideAttrs (_: {
|
||||
version = "2023-10-07";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ms-jpq";
|
||||
repo = "coq_nvim";
|
||||
rev = "d4a58fa7ab20c928f88e416b3fcf6ada965bf314";
|
||||
sha256 = "0jk3gz1rbq1zwzly66gcxhkxqn2im45lr5q5vjg2idpvbn6y8zpf";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
});
|
||||
coq-artifacts = buildVimPlugin {
|
||||
pname = "coq.artifacts";
|
||||
version = "2023-09-07";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ms-jpq";
|
||||
repo = "coq.artifacts";
|
||||
rev = "469c27eb84a91fe2721b6c0af57703ffa1e785e9";
|
||||
sha256 = "0v902lf7l0590nif3g45c5ad0s1wr9v7bz0g733aji9hh3fcxl8i";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
core-nvim = buildVimPlugin {
|
||||
pname = "core.nvim";
|
||||
version = "2023-09-09";
|
||||
|
@ -349,28 +317,6 @@ in
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-autopairs = buildVimPlugin {
|
||||
pname = "nvim-autopairs";
|
||||
version = "2023-10-07";
|
||||
src = fetchFromGitHub {
|
||||
owner = "windwp";
|
||||
repo = "nvim-autopairs";
|
||||
rev = "748e72c05495a3d30e88a6ef04b21697019a9aa9";
|
||||
sha256 = "11hf5j4khafg1gddkd98xb94077vswlwxdm077gyrwa4pifc7cnw";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-ts-autotag = buildVimPlugin {
|
||||
pname = "nvim-ts-autotag";
|
||||
version = "2023-06-16";
|
||||
src = fetchFromGitHub {
|
||||
owner = "windwp";
|
||||
repo = "nvim-ts-autotag";
|
||||
rev = "6be1192965df35f94b8ea6d323354f7dc7a557e4";
|
||||
sha256 = "1j47gcybag2qk87qc4karwdvzhvi485x7m80n2sj27rrh1fyv972";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
vim-matchup = buildVimPlugin {
|
||||
pname = "vim-matchup";
|
||||
version = "2023-09-02";
|
||||
|
@ -393,17 +339,6 @@ in
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-surround = buildVimPlugin {
|
||||
pname = "nvim-surround";
|
||||
version = "2023-08-18";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kylechui";
|
||||
repo = "nvim-surround";
|
||||
rev = "1c2ef599abeeb98e40706830bcd27e90e259367a";
|
||||
sha256 = "06j190qns6fscxp7mnr6zl5bipzbc4w478z5x5g2awghc0iwzkcr";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
heirline-nvim = buildVimPlugin {
|
||||
pname = "heirline.nvim";
|
||||
version = "2023-09-03";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Utils
|
||||
- src: nvim-lua/popup.nvim
|
||||
- src: nvim-lua/plenary.nvim
|
||||
- src: echasnovski/mini.nvim
|
||||
- src: kyazdani42/nvim-web-devicons
|
||||
- src: willothy/wezterm.nvim
|
||||
# Keybindings
|
||||
|
@ -8,7 +9,6 @@
|
|||
- src: gbprod/yanky.nvim
|
||||
- src: gbprod/cutlass.nvim
|
||||
- src: gbprod/substitute.nvim
|
||||
- src: ggandor/leap.nvim
|
||||
# Themes
|
||||
- src: Mofiqul/dracula.nvim
|
||||
# Syntax
|
||||
|
@ -33,23 +33,13 @@
|
|||
- src: RRethy/vim-illuminate
|
||||
# Linter
|
||||
- src: mfussenegger/nvim-lint
|
||||
# Comments
|
||||
- src: numtostr/comment.nvim
|
||||
# Completion
|
||||
- src: ms-jpq/coq_nvim
|
||||
branch: coq
|
||||
- src: ms-jpq/coq.artifacts
|
||||
branch: artifacts
|
||||
# Formatting
|
||||
- src: niuiic/core.nvim
|
||||
- src: niuiic/format.nvim
|
||||
# Pairs
|
||||
- src: windwp/nvim-autopairs
|
||||
- src: windwp/nvim-ts-autotag
|
||||
- src: andymass/vim-matchup
|
||||
# Textobjects
|
||||
- src: nvim-treesitter/nvim-treesitter-textobjects
|
||||
- src: kylechui/nvim-surround
|
||||
# UI
|
||||
- src: rebelot/heirline.nvim
|
||||
- src: lukas-reineke/indent-blankline.nvim
|
||||
|
|
Loading…
Reference in a new issue