1
0

Compare commits

...

162 Commits
lazy ... master

Author SHA1 Message Date
7f9cc9490c Remove treesitter-context plugin 2025-05-10 17:09:02 +02:00
31033ddc21 Make autocompletion toggleable 2025-04-13 20:18:30 +02:00
c7b1bc4648 Use opts instead of config for neogit 2025-04-05 22:19:47 +02:00
56e02498f9 Update plugins 2025-04-05 19:13:16 +02:00
88a311f59c Make nvim-cmp only complete on demand 2025-04-05 19:12:29 +02:00
0bb35e5e8d Update plugins 2025-03-18 01:02:42 +01:00
f0a071b71b Update plugins 2025-02-25 14:32:55 +01:00
3c116413e4 Do not checkout git commit on lazy.nvim setup 2025-02-14 14:46:58 +01:00
7a7b38bce3 Update plugins 2025-02-14 14:40:35 +01:00
b288f0dbc3 Update trouble config 2025-02-14 14:39:57 +01:00
f2cf882a45 Remove more plugins that are mostly unused 2025-01-06 20:10:02 +01:00
be951efd02 Change keymapping for inlay hints toggle 2025-01-04 18:46:31 +01:00
f01dc6d9f0 Remove wakatime plugin 2025-01-01 15:37:11 +01:00
38203fbe76 Categorize plugins into core, extra, and colorschemes 2024-12-06 19:42:17 +01:00
18af4a2620 Remove some unused plugins 2024-12-06 19:18:38 +01:00
e4ba67ec8f Add keybindings for clipboard paste 2024-12-06 19:15:42 +01:00
b83af9b595 Update plugins 2024-12-06 14:27:29 +01:00
587c68e0fd plugin/noice: Disable notifications 2024-12-06 14:27:10 +01:00
8168c4bf04 plugin/resession: Handle errors with pcall and fix session name 2024-12-06 14:27:06 +01:00
472bfc9bcf Update plugins 2024-11-27 16:17:19 +01:00
13e4216fb4 plugin/noice: Use mini view for normal messages 2024-11-27 16:15:07 +01:00
ee8b983777 Update plugins 2024-11-23 20:07:23 +01:00
a3151f43c8 plugins/lsp: use clippy if available 2024-10-20 17:03:27 +02:00
4528deddc2 plugins/neorepl: add lua repl for neovim 2024-10-14 16:54:02 +02:00
70dc20bd74 Update plugins 2024-10-14 13:47:25 +02:00
7b45ac6ae8 Unbind Meta+F1 for help 2024-10-12 16:23:58 +02:00
d680871a34 plugins/treesitter: ensure that most common parsers are installed 2024-10-07 02:51:41 +02:00
74f0bcaf2f plugins/lsp: enable nushell lsp 2024-10-07 01:12:47 +02:00
c26b298fc1 plugins/treesitter: add nushell language parser 2024-10-07 00:47:36 +02:00
edfedf2f2f plugins/catppuccin: disable transparency and enable integrations 2024-10-06 17:49:34 +02:00
a6954a76c8 plugins/treesitter: add textobjects extension 2024-10-06 14:28:39 +02:00
75213c2c4e plugins/neogit: disable signs 2024-10-05 21:12:27 +02:00
4ebf5a91aa Only load plugins when using supported editor version 2024-10-05 21:02:59 +02:00
96d373a895 Update plugins 2024-10-05 20:53:07 +02:00
81b14a6b08 Suppress some lua lsp warnings 2024-10-04 11:41:31 +02:00
15a7611549 plugins/wakatime: check if path exists before loading 2024-10-04 10:34:17 +02:00
64b2a61360 Add setup for deno lsp 2024-10-03 02:17:20 +02:00
d016fead7f Add keymap to duplicate the current line 2024-09-30 20:45:29 +02:00
e4c6d76b72 Replace notification popups 2024-09-30 19:40:26 +02:00
9195a341f5 Open help in a vertical split 2024-09-30 19:19:02 +02:00
775a1b54fa Update plugins 2024-09-30 17:04:18 +02:00
55ac079ff0 Prune some plugins 2024-09-30 17:03:31 +02:00
11e76be35f plugins/harpoon: change telescope keybind 2024-09-29 11:06:16 +02:00
025e292d68 Update plugins 2024-09-28 23:33:50 +02:00
0f17d6f466 plugins/harpoon: add mappings for telescope list 2024-09-28 23:32:59 +02:00
abfa098281 keybinds: disable F1 for help in insert mode 2024-09-25 22:14:59 +02:00
01c830d8ed plugins/harpoon: switch to harpoon2 branch and update keybinds 2024-09-25 22:12:36 +02:00
6cff9c18aa Unbind default keymap for man pages 2024-09-24 00:53:58 +02:00
7600e16f43 Change keymap for more consistency 2024-09-24 00:49:59 +02:00
05a8e3f533 plugins/zen-mode: add plugin 2024-09-23 15:58:56 +02:00
735f28b62d plugin/telescope: add keymap to show hidden files 2024-09-23 15:38:53 +02:00
dd81949f0a plugin/telescope: update version
The 0.1.x branch wasn't properly updated
2024-09-23 15:38:38 +02:00
e8eb13207d Update plugins 2024-09-23 13:16:54 +02:00
510e05e955 plugin/render-markdown: change header position to inline 2024-09-09 04:39:47 +02:00
7a30a27a7d Add render-markdown plugin 2024-09-07 21:30:35 +02:00
3ba1bf49cf plugin/neogit: add keybind to open push dialog 2024-09-07 21:30:35 +02:00
a9cbdad4a6 plugin/neogit: add keybind to push local commits 2024-09-07 21:30:30 +02:00
e0f4b9bb0c plugin/tree-sitter: make installation asyncronous 2024-09-04 16:00:47 +02:00
8bf457ecd4 Update plugins 2024-09-04 15:50:15 +02:00
653083493f Update plugins 2024-08-30 16:50:08 +02:00
ab64fc60ee Update plugins 2024-08-23 23:17:21 +02:00
ee88eb7705 Update plugins 2024-08-19 21:37:27 +02:00
9aced65e10 Configure ruby lsp 2024-08-17 22:39:17 +02:00
a9f3c37f07 Update plugins 2024-08-15 21:56:33 +02:00
b618428276 Update plugins 2024-08-10 17:30:37 +02:00
77dfaabaef Update plugin config for trouble 2024-08-10 17:30:25 +02:00
c15b1ae88f Update plugins 2024-08-05 18:32:41 +02:00
d084949ec3 Add macro recording info to statusline 2024-07-26 18:37:54 +02:00
0b83e97bcb Update plugins 2024-07-26 16:36:23 +02:00
125233d20f Update plugins 2024-07-18 20:22:43 +02:00
fe367cf5a1 Update plugins 2024-07-07 12:07:52 +02:00
c480408d54 Update plugins 2024-06-27 23:23:39 +02:00
ded6ea0440 Update plugins 2024-06-23 17:58:08 +02:00
9f3288eaf4 Update plugins 2024-06-20 13:14:35 +02:00
7f6ebe0c5d Update plugins 2024-06-11 16:34:56 +02:00
8166db5823 Add telescope keybind for git_status 2024-06-11 16:32:16 +02:00
df3c5508a3 Add descriptions to most key mappings 2024-06-11 16:30:00 +02:00
527884d396 Update plugins 2024-06-05 16:18:38 +02:00
ad09e704e8 Yank to clipboard explicitly
Prevents the clipboard from being spammed with yanked content
2024-06-05 16:04:27 +02:00
b60f0c8457 Update plugins 2024-05-31 23:22:59 +02:00
0191b108ec Update plugins 2024-05-25 23:28:13 +02:00
b264ee47ef plugin/neogit: Define keymaps with lazy only 2024-05-24 14:24:24 +02:00
a14af6d590 Restructure colorschemes and other visual plugins 2024-05-24 14:12:01 +02:00
871a816d5c Fix or disable some lua linter complaints 2024-05-24 14:03:16 +02:00
35e5df4e19 Update plugins 2024-05-24 13:48:16 +02:00
c1e4554577 Add keybind to toggle inlay hints 2024-05-20 18:18:14 +02:00
ca4f69f5a5 Update config for neovim 0.10 2024-05-20 18:01:01 +02:00
e5ae8a2995 plugin/oil: Eagerly load plugin to replace netrw 2024-05-15 18:41:22 +02:00
7fdc488e57 Update plugins 2024-05-15 18:25:36 +02:00
26a4661475 plugin/oil: Show hidden files by default 2024-05-15 13:30:02 +02:00
68e05e29ec Update plugins 2024-05-12 13:41:32 +02:00
60064aa16d Move some lsp configuration into functions 2024-05-06 23:18:42 +02:00
c581c9ff00 Update plugins 2024-05-06 23:11:01 +02:00
511ff73dc2 Add directory insertion keybind for oil 2024-05-02 13:02:33 +02:00
e3d6c1db6d Update plugins and remove hardtime 2024-05-01 23:06:31 +02:00
a68ce68ec9 Update plugins 2024-04-20 16:43:57 +02:00
0ef219b200 Put notifications on top
Bottom conflicts with lsp status output and gets in the way too often.
2024-04-20 16:40:55 +02:00
67924c654d Update ufo configuration 2024-04-19 17:37:31 +02:00
e1fdcb1145 Update plugins 2024-04-16 16:29:24 +02:00
33b64462fd Update plugins 2024-04-02 16:35:39 +02:00
793d33e952 Remove discord presence plugin again
It's disabled by default, and I'm not really using it, so no real point
in keeping it around.
2024-03-27 23:30:18 +01:00
839cbd80fe Exclude neogit status from hardtime filetypes 2024-03-21 16:15:11 +01:00
d5a95342b0 Hard times 2024-03-18 18:16:44 +01:00
9dddd1aecd Update plugins 2024-03-18 14:46:29 +01:00
36261800c0 Add back presence plugin
Restrict activity status with neoconf
2024-03-05 19:04:28 +01:00
4ea16fa3f0 Configure neoconf explicitly before lspconfig
Because lazy's dependency resolution is unreliable
2024-03-05 18:50:10 +01:00
ab4f565cb5 Change completion keymap
<CR> get in the way too often
2024-03-03 17:08:06 +01:00
00550d0e16 Add which-key plugin 2024-03-03 02:28:53 +01:00
4b06ebd1d7 Install regex and markdown treesitter parsers 2024-02-28 15:28:35 +01:00
519fb4bfb6 Show permissions in oil 2024-02-28 04:30:23 +01:00
1dd4feb44d Update plugins 2024-02-27 05:12:03 +01:00
36f171e562 Use presets for lsp doc border and command prompt 2024-02-27 05:11:09 +01:00
bb19d85b65 Add border for lsp documentation hover 2024-02-27 01:59:06 +01:00
e79bc5ab24 Set transparent background for catppuccin theme 2024-02-27 01:43:31 +01:00
f0bdbb11a3 Move noice config into submodule 2024-02-12 03:40:22 +01:00
73b53d408a Update rust-analyzer config 2024-02-11 21:32:21 +01:00
42f8655dbc Update plugins 2024-02-11 21:17:07 +01:00
7ae4f7eac2 Update plugins 2024-02-09 23:56:02 +01:00
1429815e27 Add nil_ls lsp config 2024-02-09 23:55:24 +01:00
07763873c6 Add neoconf for project local settings 2024-02-04 17:48:21 +01:00
0558e8d786 Split harpoon and telescope configs 2024-01-31 22:01:18 +01:00
07322e2636 Keep prompt when switching find file and buffer 2024-01-31 16:14:36 +01:00
75e56fead9 Add keymaping to dismiss noice messages 2024-01-30 19:44:54 +01:00
eabe6335b3 Add telescope binding to swap file finder and bufs 2024-01-30 19:39:03 +01:00
2988dc3cb5 Add catppuccin theme and update plugins 2024-01-30 15:34:30 +01:00
dcf462d26f Update plugins 2024-01-29 20:44:19 +01:00
b4ed22609a Update crates.nvim to use main branch 2024-01-24 13:41:20 +01:00
f02f751efb Update plugins
Updates crates.nvim to v0.4
2024-01-24 13:36:54 +01:00
abc344eacf Update plugins 2024-01-13 17:07:14 +01:00
2c22b186c7 Add noice.nvim 2024-01-13 17:06:05 +01:00
33a2e8aaa1 Make sure diagnostic signs have the correct color
Hope this is the last time I have to mess with those damn icons...
2024-01-07 01:00:52 +01:00
2eb9979462 Fix status column error icon 2024-01-07 00:53:55 +01:00
02d2f4066e Add back format on save functionality 2024-01-06 23:51:54 +01:00
a6e93a6d76 Remove lsp-zero and merge configs into one file 2024-01-06 21:45:24 +01:00
0cdaba658f Remove unused snippet plugins 2024-01-06 20:37:56 +01:00
4b212bf384 Update plugins
Actuall remove overseer plugin
Replace nvim-tree with oil.nvim
2024-01-06 14:24:41 +01:00
12fadfcac6 Remove some unused plugins 2023-12-31 17:54:51 +01:00
fe56acdbe2 Show notification window at the bottom
Probably less intrusive this way, we'll see...
2023-12-31 17:54:51 +01:00
13564f5517 Add autocommand for yank highlighting 2023-12-31 17:54:51 +01:00
f6b53b4956 Update plugins 2023-12-31 17:54:51 +01:00
8af3f6724f Add keymap to toggle the ui 2023-12-31 17:54:51 +01:00
c4a9c95473 Add neodev for better completion within lua config 2023-12-31 17:54:51 +01:00
13e1004eb4 Add dap plugins 2023-12-31 17:54:51 +01:00
4485d12309 Update plugins 2023-12-31 17:54:45 +01:00
6402f28de8 Update plugins 2023-10-12 18:23:25 +02:00
778159492b Update plugins 2023-10-10 16:02:14 +02:00
88c2022eb6 Try lazy loading more plugins 2023-09-14 17:03:19 +02:00
83479990d0 Add trouble plugin 2023-09-13 20:52:15 +02:00
b8a83927ab Add borders to lazy ui 2023-09-09 18:32:40 +02:00
3b48153637 Use event instead of cond for wakatime
cond doesn't work as expected
2023-09-09 18:32:25 +02:00
c89e372140 Update plugins 2023-09-08 13:52:45 +02:00
b680a88e0d Switch to fork of ayu theme 2023-09-08 13:51:58 +02:00
e002342c7f Show normal line numbers in insert mode 2023-09-08 13:42:25 +02:00
a71534ee68 Add statuscol plugin 2023-09-07 18:43:20 +02:00
34d17c0db9 Lazy load some of the plugins 2023-09-07 16:46:55 +02:00
1a645ecd7d Split up lsp config 2023-09-07 15:59:57 +02:00
60e3dce6f3 Make sure some plugins have opts set 2023-09-07 15:01:21 +02:00
7d31d71431 Update plugins 2023-09-03 23:49:27 +02:00
c18ee3cd1b Make sure lazy setup is using the locked commit 2023-09-03 23:41:31 +02:00
c0039f4a4c Add nvim-notify plugin 2023-09-02 03:16:12 +02:00
f4f5351df3 Add some keybindings for overseer 2023-09-02 03:10:49 +02:00
22ecb7eb3e Add dressing.nvim for better lsp prompts 2023-09-02 02:40:36 +02:00
41 changed files with 1121 additions and 527 deletions

View File

@ -1,23 +1,6 @@
require("valeth.options") require("valeth.options")
require("valeth.keymaps") require("valeth.keymaps")
local function lazy_setup() if vim.version().minor >= 10 then
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" require("valeth.lazy")
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("valeth.plugins")
end end
lazy_setup()

View File

@ -1,41 +1,42 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" }, "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
"ayu-nvim": { "branch": "main", "commit": "4418a0c07d45026b05cfd948fd11644d3adb8ac6" }, "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" },
"cloak.nvim": { "branch": "main", "commit": "ff5e746e787de14675396beb642bf5010b8bc96d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "crates.nvim": { "branch": "main", "commit": "fd2bbca7aa588f24ffc3517831934b4c4a9588e9" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, "formatter.nvim": { "branch": "master", "commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598" },
"formatter.nvim": { "branch": "master", "commit": "44c89f09dcc220dc2a9b056e93c3a87c86e79804" }, "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" },
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" }, "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"gitsigns.nvim": { "branch": "main", "commit": "44adf808ace6cb65a3353bd61fa585a2d8fe0db3" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, "lualine.nvim": { "branch": "master", "commit": "482ae358c67aec2a4939d68a1a4fe4c8064ccd16" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "f084f4a6a716f55bf9c4026e73027bb24a0325a3" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, "neoconf.nvim": { "branch": "main", "commit": "498eed9e00677e4f1a8259db43b0e90f8662f38b" },
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogit": { "branch": "master", "commit": "08d23c7ae1e7c3c66802990d5aa16269bdd996a7" }, "neogit": { "branch": "master", "commit": "6d1bd94f7fca92a50a892f494920696b5defa8c8" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" },
"nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" }, "nvim-lspconfig": { "branch": "master", "commit": "cb33dea610b7eff240985be9f6fe219920e630ef" },
"nvim-tree.lua": { "branch": "master", "commit": "00741206c2df9c4b538055def19b99790f0c95c8" }, "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
"nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, "nvim-treesitter": { "branch": "master", "commit": "523a9e148919f58eb5a013f76787e57696e00c93" },
"nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "63a8f855c6b6019ef9f7f63b5c59b8a00c215d0d" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "9298b3ac8fd6d0d8f9e321194c6d3fd37e417cf9" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
"nvim-ufo": { "branch": "main", "commit": "890b94870f052773d77175d07a51f2e083210632" }, "nvim-ufo": { "branch": "main", "commit": "c15fed422506a130a62e5e79c2d754392231d7d8" },
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
"overseer.nvim": { "branch": "master", "commit": "d8c5be15ff0f7ccecbaa8f3612a6764b22fc07ff" }, "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" },
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" }, "render-markdown.nvim": { "branch": "main", "commit": "0ed141a60ca4befcaf923b21c36f6f2971d61b9e" },
"rainbow_csv.nvim": { "branch": "main", "commit": "763994066877cebae2d5159a46f8b423c50f82da" }, "resession.nvim": { "branch": "master", "commit": "fd08e476c4e2f826905c384a3a301a821758764b" },
"resession.nvim": { "branch": "master", "commit": "635e83a204b6800ec501a80f867a524a14cfce51" }, "statuscol.nvim": { "branch": "main", "commit": "c399884e8f64019ec9bb581251f9710915b7f996" },
"telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
"undotree": { "branch": "main", "commit": "2685ce282702ab0b79c65916f352db2265b245dd" }, "tree-sitter-nu": { "branch": "main", "commit": "d5c71a10b4d1b02e38967b05f8de70e847448dd1" },
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" } "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
} "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

3
lua/.luarc.json Normal file
View File

@ -0,0 +1,3 @@
{
"workspace.checkThirdParty": false
}

View File

@ -1,27 +1,44 @@
local map = vim.keymap.set local maps = {
{ "n", "<Leader><CR>", "<cmd>noh<CR>", { desc = "Clear search highlighting" } },
{ "n", "U", "<cmd>redo<CR>", { desc = "Redo the last action" } },
{ "n", "Y", "y$", { desc = "Yank until the end of the line" } },
{ { "n", "v", "i" }, "<C-s>", "<cmd>w<CR>", { desc = "Write current file" } },
{ "n", "s", "<NOP>" },
map("n", "<Leader><CR>", "<cmd>noh<CR>") -- Yank to clipboard
map("n", "U", "<cmd>redo<CR>") { { "n", "v" }, "<Leader>y", [["+y]], { desc = "Yank to clipboard" } },
map("n", "Y", "y$") { { "n", "v" }, "<Leader>Y", [["+Y]], { desc = "Yank line to clipboard" } },
map("n", "j", "gj") { { "n", "v" }, "<Leader>p", [["+p]], { desc = "Paste clipboard after cursor" } },
map("n", "k", "gk") { { "n", "v" }, "<Leader>P", [["+P]], { desc = "Paste clipboard before cursor" } },
map({"n", "v"}, "H", "^")
map({"n", "v"}, "L", "$")
map({"n", "v", "i"}, "<C-s>", "<cmd>w<CR>") -- Move up and down visual lines for the few times I need wrapping
map("n", "s", "<NOP>") { "n", "j", "gj" },
{ "n", "k", "gk" },
-- Exit insert mode by quickly pressing jk { { "n", "v" }, "H", "0", { desc = "Move to start of line" } },
map("i", "jk", "<ESC>l", { silent = true }) { { "n", "v" }, "L", "$", { desc = "Move to end of line" } },
-- This avoids accidentially recording a macro { "i", "jk", "<ESC>l", { desc = "Exit insert mode", silent = true } },
map({"n", "v"}, "<F1>", "q")
map({"n", "v"}, "q", "<NOP>")
-- Move selected lines up or down -- If I need help I'll use the :help command
map("v", "J", ":move '>+1<CR>gv=gv") { { "i" }, "<F1>", "<NOP>" },
map("v", "K", ":move '<-2<CR>gv=gv") { { "n", "i" }, "<D-F1>", "<NOP>" },
-- Join lines without moving the cursor -- Replace default macro binding
map("n", "J", "mzJ`z") { { "n", "v" }, "<F1>", "q", { desc = "Record a macro" } },
{ { "n", "v" }, "q", "<NOP>" },
-- No manpages, LSP only
{ { "n" }, "K", "<NOP>" },
{ "v", "J", ":move '>+1<CR>gv=gv", { desc = "Move selected lines down" } },
{ "v", "K", ":move '<-2<CR>gv=gv", { desc = "Move selected lines up" } },
{ "n", "J", "mzJ`z", { desc = "Join lines without moving the cursor" } },
{ "n", "<C-p>", "mzyyp`zj", { desc = "Duplicate current line" } },
}
for _, m in pairs(maps) do
vim.keymap.set(m[1], m[2], m[3], m[4])
end

34
lua/valeth/lazy.lua Normal file
View File

@ -0,0 +1,34 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
local output = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
if vim.v.shell_error ~= 0 then
vim.notify("Failed to clone lazy.nvim", vim.log.levels.ERROR)
vim.notify(output, vim.log.levels.ERROR)
vim.fn.getchar()
os.exit(1)
end
vim.notify("Installed lazy.nvim")
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
ui = {
border = "rounded",
},
spec = {
{ import = "valeth.plugins.colorschemes" },
{ import = "valeth.plugins.core" },
{ import = "valeth.plugins.extra" },
}
})

View File

@ -1,3 +1,6 @@
local augroup = vim.api.nvim_create_augroup
local aucmd = vim.api.nvim_create_autocmd
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
@ -10,22 +13,45 @@ vim.opt.incsearch = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.scrolloff = 8 vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.colorcolumn = "100" vim.opt.colorcolumn = "100"
vim.opt.foldcolumn = "0"
vim.opt.foldlevel = 99 vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99 vim.opt.foldlevelstart = 99
vim.opt.foldenable = true
vim.api.nvim_create_autocmd({"InsertEnter", "InsertLeave", "BufEnter"}, { vim.opt.fillchars:append({ eob = "·" })
vim.g.mapleader = " "
vim.diagnostic.config({
virtual_text = false,
})
augroup("valeth", { clear = true })
-- Temporarily highlight yanked text
aucmd("TextYankPost", {
group = "valeth",
callback = function()
vim.highlight.on_yank({ timeout = 500 })
end
})
-- Hide cursor line while in insert mode
aucmd({ "InsertEnter", "InsertLeave", "BufEnter" }, {
group = "valeth",
callback = function(args) callback = function(args)
local entered_insert_mode = args.event == "InsertEnter" local entered_insert_mode = args.event == "InsertEnter"
vim.opt.cursorline = not entered_insert_mode vim.opt.cursorline = not entered_insert_mode
end end
}) })
-- yank to clipboard, requires wl-copy command or equivalent -- Open help window in a vertical split
vim.opt.clipboard:append("unnamedplus") aucmd("BufWinEnter", {
group = "valeth",
vim.g.mapleader = " " pattern = "*/doc/*",
callback = function()
if vim.bo.filetype == "help" then
vim.cmd.wincmd("H")
end
end
})

1
lua/valeth/plugins/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
tmp-*.lua

View File

@ -1,14 +0,0 @@
local spec = {
"windwp/nvim-autopairs",
}
spec.config = function()
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
require("nvim-autopairs").setup()
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
return spec

View File

@ -0,0 +1,16 @@
local spec = {
"valeth/ayu-nvim",
branch = "fold-column-fg",
enabled = false,
lazy = false,
priority = 1000,
}
spec.config = function()
vim.g.ayu_mirage = true
vim.cmd.colorscheme("ayu")
end
return spec

View File

@ -0,0 +1,31 @@
local spec = {
"catppuccin/nvim",
name = "catppuccin",
enabled = true,
lazy = false,
priority = 1000,
};
spec.config = function()
require("catppuccin").setup({
custom_highlights = function(colors)
return {
Folded = { bg = colors.none },
UfoFoldedEllipsis = { fg = colors.blue, bg = colors.none },
}
end,
integrations = {
mason = true,
noice = true,
harpoon = true,
lsp_trouble = true,
which_key = true,
}
})
vim.cmd.colorscheme("catppuccin")
end
return spec

View File

@ -0,0 +1,70 @@
local keymap = vim.keymap.set
local spec = {
"hrsh7th/nvim-cmp",
}
spec.dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"onsails/lspkind.nvim",
"L3MON4D3/LuaSnip", -- just here so snippets returned from LSP servers don't throw errors
}
local function autocompletion_enabled()
local cmp = require("cmp")
local trigger_event = cmp.TriggerEvent.TextChanged
return vim.tbl_contains(cmp.get_config().completion.autocomplete or {}, trigger_event)
end
local function toggle_autocompletion()
local cmp = require("cmp")
if autocompletion_enabled() then
cmp.get_config().completion.autocomplete = false
else
cmp.get_config().completion.autocomplete = { cmp.TriggerEvent.TextChanged }
end
end
spec.config = function()
local cmp = require("cmp")
local lspk = require("lspkind")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
-- Only trigger completion explicitly through keymapping, or when toggled
completion = {
autocomplete = false
},
---@diagnostic disable-next-line:missing-fields
formatting = {
format = lspk.cmp_format({
mode = "symbol_text",
})
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end
},
window = {
completion = cmp.config.window.bordered()
},
mapping = {
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-Space>"] = cmp.mapping.complete(),
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "path" },
})
})
keymap("n", "<Leader>cc", toggle_autocompletion, { desc = "Toggle autocompletion" })
end
return spec

View File

@ -0,0 +1,147 @@
local spec = {
"neovim/nvim-lspconfig",
}
spec.dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"nvim-telescope/telescope.nvim",
"folke/neodev.nvim",
"folke/neoconf.nvim",
}
local function rust_analyzer_setup(lsp_config)
local rust_analyzer_settings = {
cargo = {
features = "all"
},
checkOnSave = true,
}
if vim.fn.executable("cargo-clippy") == 1 then
rust_analyzer_settings.check = { command = "clippy" }
end
-- Don't have rustup available if using nix shell
if vim.fn.executable("rustup") == 1 then
rust_analyzer_settings = vim.tbl_extend("keep", rust_analyzer_settings, {
rustfmt = { extraArgs = { "+nightly" } }
})
end
lsp_config.rust_analyzer.setup({
settings = {
["rust-analyzer"] = rust_analyzer_settings
}
})
end
local function lua_ls_setup(lsp_config)
lsp_config.lua_ls.setup({
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false
}
}
}
}
})
end
local function toggle_inlay_hints()
-- the docs suggest this, so this should be fine
---@diagnostic disable-next-line: missing-parameter
local to_enable = not vim.lsp.inlay_hint.is_enabled()
vim.lsp.inlay_hint.enable(to_enable)
local status = to_enable and "enabled" or "disabled"
vim.notify("Inlay hints " .. status, vim.log.levels.INFO)
end
---@param buf buffer
---@param mode string | string[]
---@param rhs string
---@param lhs string | function
---@param desc? string
local function bufmap(buf, mode, rhs, lhs, desc)
local opts = {
buffer = buf,
remap = false,
desc = desc
}
vim.keymap.set(mode, rhs, lhs, opts)
end
spec.config = function()
local neoconf = require("neoconf")
neoconf.setup({
import = {
vscode = false,
coc = false,
nlsp = false,
}
})
local mason = require("mason")
local mason_lspconfig = require("mason-lspconfig")
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
mason_lspconfig.setup({
ensure_installed = {
"lua_ls",
"rust_analyzer",
}
})
local lsp_config = require("lspconfig")
local autocmd = vim.api.nvim_create_autocmd
local autogroup = vim.api.nvim_create_augroup
autocmd("LspAttach", {
group = autogroup("LspAttachConfig", {}),
callback = function(event)
local tsb = require("telescope.builtin")
local buf = event.buf
bufmap(buf, "n", "gd", tsb.lsp_definitions, "Go to definition")
bufmap(buf, "n", "gr", tsb.lsp_references, "Go to reference")
bufmap(buf, "n", "K", vim.lsp.buf.hover, "Show documentation in hover")
bufmap(buf, "n", "<Leader>ca", vim.lsp.buf.code_action, "Run a code action")
bufmap(buf, "n", "<Leader>ci", vim.diagnostic.open_float, "Show diagnostics")
bufmap(buf, "n", "<Leader>re", vim.lsp.buf.rename, "Rename item under cursor")
bufmap(buf, { "n", "i" }, "<C-h>", vim.lsp.buf.signature_help, "Open signature help")
bufmap(buf, "n", "<Leader>ch", toggle_inlay_hints, "Toggle LSP inlay hints")
end
})
require("neodev").setup()
lua_ls_setup(lsp_config)
rust_analyzer_setup(lsp_config)
lsp_config.sqlls.setup({})
lsp_config.nil_ls.setup({})
lsp_config.ruby_lsp.setup({})
lsp_config.denols.setup({})
-- lsp_config.ts_ls.setup({})
lsp_config.nushell.setup({})
end
return spec

View File

@ -0,0 +1,25 @@
local spec = {
"NeogitOrg/neogit",
}
spec.dependencies = {
"nvim-lua/plenary.nvim",
}
spec.keys = {
{ "<Leader>vs", "<cmd>Neogit<CR>", desc = "Open NeoGit" },
{ "<Leader>vc", "<cmd>Neogit commit<CR>", desc = "Open NeoGit commit" },
{ "<Leader>vpp", "<cmd>Neogit push<CR>", desc = "Open NeoGit push" },
{ "<Leader>vpup", "<cmd>!git push<CR>", desc = "Push local commits to upstream" },
}
spec.opts = {
-- handled by statuscol
signs = {
hunk = { "", "" },
item = { "", "" },
section = { "", "" },
}
}
return spec

View File

@ -0,0 +1,77 @@
local function get_directory_name(buf, line)
local oil = require("oil")
local entry = oil.get_entry_on_line(buf, line)
if entry == nil then
return
end
if entry.type == "directory" then
return entry.name .. "/"
else
local dirname = entry.name:match("^(.*/).*$")
if dirname == nil then
return
end
return dirname
end
end
local function insert_directory(direction)
local cur_buf = vim.api.nvim_get_current_buf()
local cur_win = vim.api.nvim_get_current_win()
local cursor = vim.api.nvim_win_get_cursor(cur_win)
local dir = get_directory_name(cur_buf, cursor[1])
if dir == nil then
return
end
if direction == "below" then
local line = cursor[1]
vim.api.nvim_buf_set_lines(cur_buf, line, line, false, { dir })
vim.api.nvim_win_set_cursor(cur_win, { line + 1, cursor[2] })
else
local line = cursor[1] - 1
vim.api.nvim_buf_set_lines(cur_buf, line, line, false, { dir })
vim.api.nvim_win_set_cursor(cur_win, { cursor[1], cursor[2] })
end
end
local spec = {
"stevearc/oil.nvim",
}
spec.dependencies = {
"nvim-lua/plenary.nvim"
}
spec.opts = {
view_options = {
show_hidden = true,
},
columns = { "icon", "permissions" },
keymaps = {
["J"] = function()
insert_directory("below")
end,
["K"] = function()
insert_directory("above")
end,
}
}
-- Will not replace netrw if we lazy load sadly
spec.lazy = false
spec.cmd = { "Oil" }
spec.keys = {
{ "<Leader>ft", "<cmd>Oil<CR>", mode = "n", desc = "Open oil file table" }
}
return spec

View File

@ -0,0 +1,52 @@
local function started_without_args()
return vim.fn.argc(-1) == 0
end
local function session_name()
local working_dir = vim.fn.getcwd()
local git_branch = vim.fn.systemlist("git branch --show-current")[1]
if vim.v.shell_error == 0 then
return working_dir .. "-" .. git_branch .. ".git"
else
return working_dir
end
end
local function load_session()
if not started_without_args() then
return
end
local ok = pcall(require("resession").load, session_name(), { dir = "dirsession", silence_errors = true })
if not ok then
vim.notify("Failed to load session", vim.log.levels.WARN)
end
end
local function save_session()
if not started_without_args() then
return
end
local ok = pcall(require("resession").save, session_name(), { dir = "dirsession", notify = false })
if not ok then
vim.notify("Failed to save session", vim.log.levels.WARN)
end
end
local spec = {
"stevearc/resession.nvim",
}
spec.config = function()
local resession = require("resession")
vim.api.nvim_create_autocmd("VimEnter", { callback = load_session, })
vim.api.nvim_create_autocmd("VimLeavePre", { callback = save_session })
resession.setup({})
end
return spec

View File

@ -0,0 +1,92 @@
local spec = {
"nvim-telescope/telescope.nvim",
}
spec.dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
}
spec.keys = {
{ "<Leader>ff", "<cmd>Telescope find_files<CR>", desc = "Find in files" },
{ "<Leader>fb", "<cmd>Telescope buffers<CR>", desc = "Find in buffers" },
{ "<Leader>fg", "<cmd>Telescope live_grep<CR>", desc = "Find by grepping" },
{ "<Leader>fc", "<cmd>Telescope git_status<CR>", desc = "Find changed files" },
}
-- Not sure where in the state this is stored, so just track it here
local find_files_show_hidden = false
spec.config = function()
local telescope = require("telescope")
local builtin = require("telescope.builtin")
local actions = require("telescope.actions")
local function get_current_prompt(picker)
local win = picker.prompt_win
local bufnr = picker.prompt_bufnr
local prefix = picker.prompt_prefix
local lines = vim.api.nvim_win_get_cursor(win)
local line_start = lines[1] - 1
local line_end = line_start + 1
local buf_line = vim.api.nvim_buf_get_lines(bufnr, line_start, line_end, false)[1]
return buf_line:sub(#prefix + 1)
end
local function cycle_picker(bufnr)
local state = require("telescope.actions.state")
local current_picker = state.get_current_picker(bufnr)
local title = current_picker.prompt_title
local current_prompt = get_current_prompt(current_picker)
if title == "Buffers" then
builtin.find_files({ default_text = current_prompt })
elseif title == "Find Files" then
builtin.buffers({ default_text = current_prompt })
end
end
-- Very primitive solution, but good enough for now
local function toggle_hidden(bufnr)
local state = require("telescope.actions.state")
local current_picker = state.get_current_picker(bufnr)
local current_prompt = get_current_prompt(current_picker)
find_files_show_hidden = not find_files_show_hidden
builtin.find_files({ default_text = current_prompt, hidden = find_files_show_hidden })
end
local find_prompt_prefix = "🔍";
telescope.setup({
defaults = {
initial_mode = "insert"
},
pickers = {
buffers = {
prompt_prefix = find_prompt_prefix,
mappings = {
i = {
["<C-d>"] = actions.delete_buffer + actions.move_to_top,
["<C-f>"] = cycle_picker,
},
n = {
["dd"] = actions.delete_buffer,
}
}
},
find_files = {
prompt_prefix = find_prompt_prefix,
mappings = {
i = {
["<C-f>"] = cycle_picker,
["<C-h>"] = toggle_hidden,
}
}
}
}
})
end
return spec

View File

@ -0,0 +1,94 @@
local spec = {
"nvim-treesitter/nvim-treesitter",
}
spec.dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
"RRethy/nvim-treesitter-endwise",
"nushell/tree-sitter-nu",
}
spec.build = ":TSUpdate"
spec.config = function()
---@diagnostic disable-next-line:missing-fields
require("nvim-treesitter.configs").setup({
ensure_installed = {
-- programming languages
"rust",
"lua",
"ruby",
"python",
"elixir",
"javascript",
"typescript",
-- markup and config languages
"html",
"css",
"json",
"yaml",
"toml",
"regex",
"markdown",
"markdown_inline",
-- shell scripting and system configuration
"bash",
"nu",
"nix",
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
endwise = { enable = true },
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["am"] = { query = "@function.outer", desc = "Select outer function" },
["im"] = { query = "@function.inner", desc = "Select inner function" },
["ab"] = { query = "@block.outer", desc = "Select outer block" },
["ib"] = { query = "@block.inner", desc = "Select inner block" },
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
["]m"] = { query = "@function.outer", desc = "Go to start of next function" },
["]b"] = { query = "@block.outer", desc = "Go to start of next block" },
["]s"] = { query = "@class.outer", desc = "Go to start of next struct-like" },
},
goto_next_end = {
["]M"] = { query = "@function.outer", desc = "Go to end of next function" },
["]B"] = { query = "@block.outer", desc = "Go to end of next block" },
["]S"] = { query = "@class.outer", desc = "Go to end of next struct-like" },
},
goto_previous_start = {
["[m"] = { query = "@function.outer", desc = "Go to start of previous function" },
["[b"] = { query = "@block.outer", desc = "Go to start of previous block" },
["[s"] = { query = "@class.outer", desc = "Go to start of previous struct-like" },
},
goto_previous_end = {
["[M"] = { query = "@function.outer", desc = "Go to end of previous function" },
["[B"] = { query = "@block.outer", desc = "Go to end of previous block" },
["[S"] = { query = "@class.outer", desc = "Go to end of previous struct-like" },
},
},
},
})
end
return spec

View File

@ -1,6 +1,6 @@
local spec = { local spec = {
"saecki/crates.nvim", "saecki/crates.nvim",
tag = "v0.3.0", -- tag = "v0.4.0", -- non-main branches and tags lock up UI
} }
spec.dependencies = { spec.dependencies = {
@ -9,7 +9,7 @@ spec.dependencies = {
} }
spec.config = function() spec.config = function()
require("crates").setup() require("crates").setup({})
local cmp = require("cmp") local cmp = require("cmp")

View File

@ -0,0 +1,4 @@
return {
"stevearc/dressing.nvim",
opts = {},
}

View File

@ -0,0 +1,39 @@
local autocmd = vim.api.nvim_create_autocmd
local autogroup = vim.api.nvim_create_augroup
local spec = {
"mhartington/formatter.nvim",
}
spec.config = function()
local formatter = require("formatter")
formatter.setup({
filetype = {
c = {
require("formatter.filetypes.c").clangformat
},
}
})
end
local function format_file()
local bufnr = vim.api.nvim_get_current_buf()
local lsp_client = vim.lsp.get_clients({ bufnr = bufnr })
if #lsp_client ~= 0 then
vim.lsp.buf.format({ async = false, timeout_ms = 5000 })
else
vim.cmd(":FormatWrite")
end
end
vim.keymap.set("n", "<Leader>fmt", format_file, { desc = "Format the current buffer" })
-- Format on save
autocmd("BufWritePost", {
group = autogroup("FormatOnSave", {}),
callback = format_file,
})
return spec

View File

@ -0,0 +1,98 @@
local spec = {
"ThePrimeagen/harpoon",
branch = "harpoon2",
}
spec.dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
}
--- @param harpoon Harpoon
local function toggle_telescope(harpoon)
local file_paths = {}
for idx, item in pairs(harpoon:list().items) do
table.insert(file_paths, { idx, item.value })
end
local config = require("telescope.config").values
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local action_state = require("telescope.actions.state")
local function mappings(prompt_bufnr, map)
map("i", "<C-d>", function()
local cur_picker = action_state.get_current_picker(prompt_bufnr)
local sel_entry = action_state.get_selected_entry().value[2]
local sel_item = harpoon:list():get_by_value(sel_entry)
if sel_item == nil then
return
end
cur_picker:delete_selection(function(sel)
harpoon:list():remove(sel_item)
end)
end)
return true
end
local finder = finders.new_table({
results = file_paths,
entry_maker = function(entry)
return {
value = entry,
display = entry[1] .. ": " .. entry[2],
ordinal = entry[2],
path = entry[2],
}
end
})
local picker = pickers.new({}, {
prompt_title = "Harpoon",
finder = finder,
previewer = config.file_previewer({}),
sorter = config.generic_sorter({}),
attach_mappings = mappings,
})
picker:find()
end
spec.config = function()
local harpoon = require("harpoon")
local keymap = vim.keymap.set
harpoon:setup()
keymap("n", "<Leader>fh", function()
toggle_telescope(harpoon)
end, { desc = "Show list of harpoon marks" })
keymap("n", "<Leader>ha", function()
harpoon:list():add()
end, { desc = "Add current file to marks" })
keymap("n", "<Leader>hr", function()
harpoon:list():remove()
end, { desc = "Remove current file from marks" })
keymap("n", "<Leader>hn", function()
harpoon:list():next()
end, { desc = "Go to next mark" })
keymap("n", "<Leader>hp", function()
harpoon:list():prev()
end, { desc = "Go to previous mark" })
for i = 1, 5 do
keymap("n", "<Leader>h" .. i, function()
harpoon:list():select(i)
end, { desc = "Go to marked file " .. i })
end
end
return spec

View File

@ -0,0 +1,13 @@
return {
"lukas-reineke/indent-blankline.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
main = "ibl",
opts = {
scope = {
show_start = false,
}
}
}

View File

@ -1,28 +1,29 @@
local spec = { local spec = {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
}
} }
spec.dependencies = {
"nvim-tree/nvim-web-devicons", local function macro_recording()
"stevearc/overseer.nvim", local reg = vim.fn.reg_recording()
}
if reg == "" then
return ""
end
return "REC @ " .. reg
end
spec.config = function() spec.config = function()
local overseer = require("overseer")
local task_status = {
"overseer",
colored = true,
symbols = {
[overseer.STATUS.FAILURE] = "",
[overseer.STATUS.CANCELED] = "o ",
[overseer.STATUS.SUCCESS] = "",
[overseer.STATUS.RUNNING] = "",
},
}
require("lualine").setup({ require("lualine").setup({
sections = { sections = {
lualine_a = {
macro_recording,
"mode",
},
lualine_b = { lualine_b = {
"branch", "branch",
"diff", "diff",
@ -32,7 +33,6 @@ spec.config = function()
}, },
}, },
lualine_x = { lualine_x = {
task_status,
"encoding", "encoding",
{ "fileformat", icons_enabled = false }, { "fileformat", icons_enabled = false },
"filetype" "filetype"
@ -41,4 +41,5 @@ spec.config = function()
}) })
end end
return spec return spec

View File

@ -0,0 +1,36 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
notify = {
-- keep this disabled until I find a solution to make it less obnoxious
enabled = false
},
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
command_palette = true,
lsp_doc_border = true,
},
messages = {
view = "mini",
},
views = {
notify = {
replace = true,
},
},
},
keys = {
{ "<leader>nd", "<cmd>NoiceDismiss<CR>", desc = "Dismiss all noice messages" },
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
}

View File

@ -0,0 +1,29 @@
local spec = {
"MeanderingProgrammer/render-markdown.nvim",
}
spec.dependencies = {
"nvim-treesitter/nvim-treesitter",
"echasnovski/mini.icons"
}
spec.config = function()
local render_md = require("render-markdown")
vim.api.nvim_set_hl(0, "RenderMarkdownHdNoBg", { bg = "NONE" })
render_md.setup({
heading = {
-- Disable the background for heading lines
backgrounds = { "RenderMarkdownHdNoBg" },
position = "inline",
},
-- just extra clutter
sign = {
enabled = false
},
})
end
return spec

View File

@ -0,0 +1,58 @@
local spec = {
"luukvbaal/statuscol.nvim",
lazy = true,
}
spec.dependencies = {
{ "lewis6991/gitsigns.nvim", opts = {} },
}
spec.config = function()
local statuscol = require("statuscol")
local builtin = require("statuscol.builtin")
-- Give me fancy diagnostic signs
for level, text in pairs({ Error = "", Warn = "", Info = "»", Hint = "" }) do
local name = "DiagnosticSign" .. level
vim.fn.sign_define(name, { text = text, texthl = name })
end
vim.opt.signcolumn = "yes"
vim.opt.foldcolumn = "1"
-- This seems to work just fine
---@diagnostic disable-next-line:param-type-mismatch
vim.opt.fillchars:append({
fold = " ",
foldopen = "",
foldsep = " ",
foldclose = "",
})
local function line_numbers(args, fa)
if vim.api.nvim_get_mode().mode == "n" then
return builtin.lnumfunc(args, fa)
else
return "%l"
end
end
local signs = {
text = { "%s" },
}
local folds = {
text = { builtin.foldfunc, " " },
condition = { builtin.not_empty },
}
local numbers = {
text = { line_numbers, " " },
condition = { true, builtin.not_empty },
}
statuscol.setup({
relculright = true,
segments = { signs, folds, numbers }
})
end
return spec

View File

@ -0,0 +1,19 @@
local spec = {
"folke/trouble.nvim",
}
spec.dependencies = {
"nvim-tree/nvim-web-devicons",
}
spec.opts = {
focus = true
}
spec.cmd = "Trouble"
spec.keys = {
{ "<Leader>ct", "<cmd>Trouble diagnostics toggle<CR>", desc = "Toggle trouble window" },
}
return spec

View File

@ -0,0 +1,33 @@
local spec = {
"kevinhwang91/nvim-ufo",
}
spec.dependencies = {
"kevinhwang91/promise-async",
"luukvbaal/statuscol.nvim",
}
spec.event = "LspAttach"
spec.config = function()
local ufo = require("ufo")
local autocmd = vim.api.nvim_create_autocmd
local autogroup = vim.api.nvim_create_augroup
vim.opt.foldenable = true
autocmd("LspAttach", {
group = autogroup("LspUfo", {}),
callback = function(event)
ufo.attach(event.buf)
end
})
ufo.setup({
close_fold_kinds_for_ft = {
default = { "comment", "imports" },
},
})
end
return spec

View File

@ -0,0 +1,15 @@
local spec = {
"folke/which-key.nvim"
}
spec.init = function()
vim.opt.timeout = true
-- the keybinds help is shown after this timeout
vim.opt.timeoutlen = 500
end
spec.opts = {
show_help = false
}
return spec

View File

@ -1,21 +0,0 @@
return {
{
"CantoroMC/ayu-nvim",
priority = 1000, -- make sure this is loaded first
config = function()
vim.g.ayu_mirage = true
vim.cmd.colorscheme("ayu")
end
},
{
"lukas-reineke/indent-blankline.nvim",
opts = {
space_char_blankline = " ",
show_current_context = true,
show_current_context_start = false,
}
},
"lewis6991/gitsigns.nvim",
}

View File

@ -1,6 +0,0 @@
return {
"cameron-wags/rainbow_csv.nvim",
"LhKipp/nvim-nu",
"stevearc/overseer.nvim",
"numToStr/Comment.nvim",
}

View File

@ -1,118 +0,0 @@
local spec = {
"VonHeikemen/lsp-zero.nvim",
branch = "v2.x",
}
spec.dependencies = {
"neovim/nvim-lspconfig",
-- completion
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"onsails/lspkind.nvim",
-- formatting
"mhartington/formatter.nvim",
-- snippets
"saadparwaiz1/cmp_luasnip",
"L3MON4D3/LuaSnip",
"rafamadriz/friendly-snippets",
-- lsp manager
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
-- code folding
"kevinhwang91/nvim-ufo",
"kevinhwang91/promise-async",
}
spec.config = function()
local lsp_zero = require("lsp-zero").preset({})
local ufo = require("ufo")
local tsb = require("telescope.builtin")
lsp_zero.ensure_installed {
"lua_ls",
"rust_analyzer",
}
lsp_zero.on_attach(function(_, buffnr)
local opts = { buffer = buffnr, remap = false }
ufo.attach(buffnr)
vim.keymap.set("n", "gd", tsb.lsp_definitions, opts)
vim.keymap.set("n", "gr", tsb.lsp_references, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<Leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<Leader>ci", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "<Leader>re", vim.lsp.buf.rename, opts)
vim.keymap.set({ "n", "i" }, "<C-h>", vim.lsp.buf.signature_help, opts)
vim.keymap.set("n", "<Leader>fmt", function()
vim.lsp.buf.format({ async = false, timeout_ms = 5000 })
end)
end)
-- NOTE: Format on save does not support async formatting
lsp_zero.format_on_save({
servers = {
["rust_analyzer"] = { "rust" }
}
})
local lsp_config = require("lspconfig")
lsp_config.lua_ls.setup(lsp_zero.nvim_lua_ls())
lsp_config.rust_analyzer.setup {
settings = {
["rust-analyzer"] = {
cargo = {
features = "all"
},
rustfmt = {
-- needs to use nightly channel to use unstable options
extraArgs = { "+nightly" }
}
}
}
}
ufo.setup {
close_fold_kinds = {"comment", "imports"},
}
lsp_zero.setup()
local cmp = require("cmp")
local lspk = require("lspkind")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup {
formatting = {
format = lspk.cmp_format({}),
},
mapping = {
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-Space>"] = cmp.mapping.complete(),
["<Tab>"] = nil,
["<S-Tab>"] = nil,
}
}
vim.diagnostic.config({
virtual_text = false,
})
-- Gimme pretty icons
lsp_zero.set_sign_icons({
error = '',
warn = '',
hint = '',
info = '»'
})
end
return spec

View File

@ -1,26 +0,0 @@
local spec = {
"NeogitOrg/neogit",
}
spec.dependencies = {
"nvim-lua/plenary.nvim",
}
spec.config = function()
local neogit = require("neogit")
local function git_status()
neogit.open()
end
local function git_commit()
neogit.open({ "commit" })
end
vim.keymap.set("n", "<Leader>vs", git_status)
vim.keymap.set("n", "<Leader>vc", git_commit)
neogit.setup()
end
return spec

View File

@ -1,41 +0,0 @@
local spec = {
"nvim-tree/nvim-tree.lua",
}
spec.dependencies = {
"nvim-tree/nvim-web-devicons"
}
spec.config = function()
local nvim_tree = require("nvim-tree")
local nvim_tree_api = require("nvim-tree.api")
vim.keymap.set("n", "<Leader>ft", nvim_tree_api.tree.open)
local function kmap_opts(bufnr, desc)
return {
desc = "nvim-tree: " .. desc,
buffer = bufnr,
noremap = true,
silent = true,
nowait = true
}
end
local function on_attach(bufnr)
nvim_tree_api.config.mappings.default_on_attach(bufnr)
vim.keymap.set("n", "<ESC>", nvim_tree_api.tree.close, kmap_opts(bufnr, "Close"))
end
nvim_tree.setup({
view = {
float = {
enable = true
}
},
on_attach = on_attach,
})
end
return spec

View File

@ -1,51 +0,0 @@
local spec = {
"andweeb/presence.nvim",
}
spec.config = function()
local presence = require("presence")
local presence_disabled = true
local presence_augroup = vim.api.nvim_create_augroup("PresenceEvents", { clear = true })
local presence_autocmds = {
{ "FocusGained", "handle_focus_gained" },
{ "TextChanged", "handle_text_changed" },
{ "VimLeavePre", "handle_vim_leave_pre" },
{ "WinEnter", "handle_win_enter" },
{ "WinLeave", "handle_win_leave" },
{ "BufEnter", "handle_buf_enter" },
{ "BufAdd", "handle_buf_add" },
}
for _, item in ipairs(presence_autocmds) do
local event = item[1]
local callback_fn = item[2]
vim.api.nvim_create_autocmd(event, {
group = presence_augroup,
callback = function()
if not presence_disabled then
presence[callback_fn](presence)
end
end
})
end
vim.api.nvim_create_user_command("DiscordToggle",
function()
if presence_disabled then
presence_disabled = false
presence:handle_win_enter()
else
presence_disabled = true
presence:cancel()
end
end,
{ nargs = 0 }
)
presence.setup({
auto_update = false,
show_time = false,
})
end
return spec

View File

@ -1,42 +0,0 @@
local spec = {
"stevearc/resession.nvim",
}
spec.config = function()
local resession = require("resession")
local function session_name()
local working_dir = vim.fn.getcwd()
local git_branch = vim.fn.system("git branch --show-current")
if vim.v.shell_error == 0 then
return working_dir .. git_branch
else
return working_dir
end
end
local function started_without_args()
return vim.fn.argc(-1) == 0
end
-- Only restore and save session if NeoVim was started without any arguments
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if started_without_args() then
resession.load(session_name(), { dir = "dirsession", silence_errors = true })
end
end
})
vim.api.nvim_create_autocmd("VimLeavePre", {
callback = function()
if started_without_args() then
resession.save(session_name(), { dir = "dirsession", notify = false })
end
end
})
resession.setup()
end
return spec

View File

@ -1,52 +0,0 @@
local spec = {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
}
spec.dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"ThePrimeagen/harpoon",
}
spec.config = function()
local telescope = require("telescope")
local actions = require("telescope.actions")
telescope.load_extension("harpoon")
telescope.setup {
defaults = {
initial_mode = "insert"
},
pickers = {
buffers = {
mappings = {
i = {
["<C-d>"] = actions.delete_buffer + actions.move_to_top,
},
n = {
["dd"] = actions.delete_buffer,
}
}
},
}
}
local telescope_builtin = require("telescope.builtin")
vim.keymap.set("n", "<Leader>ff", telescope_builtin.find_files)
vim.keymap.set("n", "<Leader>fb", telescope_builtin.buffers)
vim.keymap.set("n", "<Leader>fg", telescope_builtin.live_grep)
local telescope_ext = require("telescope").extensions
local harpoon_mark = require("harpoon.mark")
local harpoon_ui = require("harpoon.ui")
vim.keymap.set("n", "<Leader>fh", telescope_ext.harpoon.marks)
vim.keymap.set("n", "<Leader>am", harpoon_mark.add_file)
vim.keymap.set("n", "<Leader>gn", harpoon_ui.nav_next)
vim.keymap.set("n", "<Leader>gp", harpoon_ui.nav_prev)
end
return spec

View File

@ -1,30 +0,0 @@
local spec = {
"nvim-treesitter/nvim-treesitter",
tag = "v0.9.1",
}
spec.dependencies = {
"nvim-treesitter/nvim-treesitter-context",
"RRethy/nvim-treesitter-endwise",
}
spec.config = function()
require("nvim-treesitter.configs").setup {
ensure_installed = { "rust", "lua", "javascript", "typescript" },
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
endwise = { enable = true }
}
require("treesitter-context").setup()
require("nvim-treesitter.install").update({ with_sync = true })()
end
return spec

View File

@ -1,13 +0,0 @@
local spec = {
"jiaoshijie/undotree",
}
spec.config = function()
local undotree = require("undotree")
vim.keymap.set("n", "<Leader>u", undotree.toggle, { noremap = true, silent = true })
undotree.setup()
end
return spec

View File

@ -1,6 +0,0 @@
return {
"wakatime/vim-wakatime",
cond = function()
return not (os.getenv("WAKATIME_HOME") == nil)
end
}