Compare commits

..

140 Commits

Author SHA1 Message Date
Ryan
f24ddba0df chore(dictionary): Add dictionary 2024-07-04 20:17:12 +08:00
Ryan
f874c12118 fix(nvim-cmp): Remove jump_or expand for better predictability 2024-07-04 19:43:45 +08:00
Ryan
b23f8983c8 docs(README): Update docs 2024-06-30 12:16:48 +08:00
Ryan
bbf2e34a2c update color scheme settings 2024-06-30 12:15:49 +08:00
Ryan
d7b68ec917 fix cmp logic, and use better autopair plugin 2024-06-28 16:28:27 +08:00
Ryan
1ba830f6fd use outline.nvim, and fix TS repeat 2024-06-11 11:23:10 +08:00
Ryan
d9e05c344c fix(cmp): Fix cmp sources 2024-06-04 13:39:56 +08:00
Ryan
b0a650ef66 update luasnip 2024-05-26 13:38:42 +08:00
Ryan
e54bdaa524 fix: remove unused completion 2024-05-09 14:32:32 +08:00
Ryan
fa186c0c09 feat(cmp): Better tab completion 2024-05-06 11:29:00 +08:00
Ryan
8dffe57526 Use vim-fugitive 2024-04-28 15:54:18 +08:00
Ryan
d5883f0aff update plugin selections
some unused plugins are removed.
2024-04-27 14:39:42 +08:00
Ryan
5b8a3c6fc9 fix(intro): Get nvim intro back 2024-04-27 14:25:22 +08:00
Ryan
e4c35ffecb fix(cmp): cargo plugin 2024-04-27 14:02:29 +08:00
Ryan
fa5aa0c576 feat(plugins): Remove markdown preview 2024-04-13 21:10:44 +08:00
Ryan
632a9026e9 fix(ts-context): Limit max. number of lines 2024-04-13 09:56:51 +08:00
Ryan
78ce88e894
update deps
Signed-off-by: Ryan <ryan@alien.gov>
2024-04-01 17:32:23 +08:00
Ryan
4fd5fd0e0c
remove spell_suggest
Signed-off-by: Ryan <ryan@alien.gov>
2024-03-21 10:42:17 +08:00
Ryan
fd3bdba06f docs(core): Update comment 2024-03-04 20:21:35 +08:00
Ryan
2c98923861 fix(lualine): workaround lualine font rendering 2024-01-17 12:46:29 +08:00
Ryan
ba2ff0b63e feat(lsp): Rust and cargo support 2024-01-17 12:34:05 +08:00
Ryan
41a62d0c8b fix: matchup & colorizer 2024-01-13 11:51:46 +08:00
Ryan
86113be7e9 fix(telescope): update flip_columns threshold 2024-01-11 21:09:13 +08:00
Ryan
472144f0d0 remove symbols-outline 2024-01-11 12:35:44 +08:00
Ryan
1145f64b93
Update default gitsigns source 2024-01-03 13:16:08 +08:00
Ryan
68a06dc0ea
Optimize fzf picker and better keybind 2024-01-03 13:01:42 +08:00
Ryan
c74d12ea68
update pairs, and update vscode integration 2023-12-29 14:20:01 +08:00
Ryan
ff55646e96
add comments and change tabline theme 2023-12-17 20:28:01 +08:00
Ryan
f928cf1daf Update Telescope mappings 2023-12-15 12:01:32 +08:00
Ryan
082705f561
feat(lsp): better telescope and lsp
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-12 17:05:29 +08:00
Ryan
43219b32cb
fix(sandwich): add diffview, and lazy install
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-12 13:07:24 +08:00
Ryan
686a1f43b8
docs(README): Use readme auto-generated by dotfyle
also fix vim-sandwich

Signed-off-by: Ryan <ryan@alien.gov>
2023-12-12 11:56:09 +08:00
Ryan
85f883864a
Treesitter and better diff
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-10 15:25:39 +08:00
Ryan
6d0cbe06cc
Update treesitter
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-10 11:05:26 +08:00
Ryan
8cd7b081ad
Update snippets
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-09 20:07:47 +08:00
Ryan
d73c69d8ff
chore(quickfix): Clean up, use nvim-bqf
Use nvim-bqf instead of trouble

Signed-off-by: Ryan <ryan@alien.gov>
2023-12-09 18:05:53 +08:00
Ryan
7ea7eaac8d
Add keybind for going to changed lines
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-07 13:23:19 +08:00
Ryan
fb0a07f68f
Update netrw
Signed-off-by: Ryan <ryan@alien.gov>
2023-12-05 21:47:57 +08:00
Ryan
48473f5a68
🧑💻 Use gruvbox-material
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 20:53:07 +08:00
Ryan
1cda15e20b
🏷️ Update(lualine): Update lualine
also clean up code
2023-11-30 16:08:32 +08:00
Ryan
828431ef70
Add spell
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 15:44:15 +08:00
Ryan
d39f6a98db
Update lualine
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 15:21:17 +08:00
Ryan
b1f6665d59
keybind(lsp): update keybind for lsp and trouble
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 14:33:05 +08:00
Ryan
4372d8a2b0
Update
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 12:55:27 +08:00
Ryan
b40ceec09d
feat(all): Update telescope plugin and mappings
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-30 10:08:56 +08:00
Ryan
e894eba359
🍱 Update neogit
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-28 13:09:15 +08:00
Ryan
95765a5087 🐛 Neogit and more optimizations
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-28 13:02:36 +08:00
Ryan
5efca0c97c Add trouble
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-28 11:10:12 +08:00
Ryan
aa3191de6a
Update netrw and games 2023-11-23 15:24:50 +08:00
Ryan
00d144e1e3 nvim-autopairs 2023-11-20 22:15:47 +08:00
Ryan
49081f4dfb
🐛 Use lazy loading and fix completeopt in cmdline 2023-11-11 17:11:57 +08:00
Ryan
68f4a6595e
Use Vscode style completion 2023-11-11 16:53:57 +08:00
Ryan
df79641853 🔧 Update Cmp and lsp
Signed-off-by: Ryan <ryan@alien.gov>
2023-11-11 15:04:42 +08:00
Ryan
beca3b8c5b
Update docs 2023-11-11 12:12:57 +08:00
Ryan
284511be86
Update UI 2023-11-11 11:45:14 +08:00
Ryan
33f5805bee
Better lsp keybinds 2023-11-11 10:22:57 +08:00
Ryan
9140244aa2
Docs update 2023-10-31 14:25:33 +08:00
Ryan
4ba1a1e303
Use lazy 2023-10-31 14:21:12 +08:00
Ryan
573ea78839
Add vscode fixes and general improvements 2023-10-13 20:04:56 +08:00
Ryan
8c02d4ea84
Settings for tagbar and neotags 2023-07-16 10:43:50 +08:00
Ryan
785cd1471f
Added ctags support 2023-07-16 10:21:52 +08:00
Ryan
fd80eaf644
Delete obselete keymaps 2023-07-08 17:39:22 +08:00
Ryan
56409a7f8e Remove yadm support 2023-06-09 15:56:41 +08:00
juan
448c00ee1d
Fix lsp 2023-05-11 20:43:31 +08:00
juan
0d7bcd581d
Fix null-ls 2023-04-13 10:54:07 +08:00
juan
a267b027d6
nvim-autopairs 2023-03-09 17:54:51 +08:00
juan
7223a95766
null-ls functionality 2023-03-09 17:25:09 +08:00
juan
43456e196f
Add proper support for snippets, and tab width 2023-03-09 16:26:45 +08:00
juan
0ce6e0e6ed
Remove dependency for sumneko_lua 2023-03-09 15:47:32 +08:00
juan
e91f726e93
Change colorscheme to gruvbox 2023-02-10 15:27:48 +08:00
juan
8a990acc0e
Conf update 2022-12-30 14:01:25 +08:00
juan
e3ab77ea2d
Remove nvim-tree 2022-11-30 16:06:37 +08:00
juan
1d76f7f666
Fix a bug that lsp server doesn't attach 2022-11-21 10:46:22 +08:00
juan
3e2ea4e66c
Remove indent blankline 2022-11-21 10:26:10 +08:00
juan
f94ba6234b
Use null-ls and mason 2022-09-16 17:36:17 +08:00
juan
a4f9ba5719
Chore | Update colors in ts-rainbow, and optimize startup 2022-09-04 17:05:23 +08:00
juan
fb723b6f06
Feat | Use my forked colorscheme instead. 2022-09-04 15:40:12 +08:00
juan
304a143c03
Update packer because I don't know why cond doesn
't work
 Please enter the commit message for your changes. Lines starting
2022-09-03 21:52:49 +08:00
juan
f4ad81a263
Add optional everforest theme 2022-09-03 18:03:14 +08:00
juan
8f826f1f6f
Update zk mappings 2022-08-08 16:40:00 +08:00
juan
65baac297f
️ (loading times): Optimize loading sequences 2022-08-07 22:57:52 +08:00
juan
9087e563d8
Feat | Plugin update, speed optimizations.
coq is bloated and does not play well with other plugins, nvim-cmp
is a better solution despite it is slightly slower.

I optimized the startup sequence, start time: 80ms -> 120ms -> 65ms

Next up, I will try to work on my zk workflow.
2022-08-07 21:00:11 +08:00
juan
8ce8e942ba
Fix | Update zk support.
last version of using coq_nvim
2022-08-07 16:53:29 +08:00
juan
51c8fa7853
Fix | Update telescope integration for zk 2022-08-07 16:08:25 +08:00
juan
5e51f8ed36
Feat | Add zk-nvim, remove glow.nvim 2022-08-07 15:04:57 +08:00
juan
5977609f47
Chore | Change commenter plugin 2022-07-12 14:03:08 +08:00
juan
9897c9665a
Fix | Update nvim-tree configuration 2022-06-27 15:47:14 +08:00
juan
e23fff9b7d
Remove vimwiki and truezen 2022-06-12 21:07:03 +08:00
juan
a821a26183
Config changes
- replaced tabstop with softtabstop
- add autoindent
- modeline for lua
2022-05-31 11:33:28 +08:00
juan
864818059c
Various optimizations 2022-05-28 23:54:46 +08:00
juan
f0396d0fb3
Add plugins and bug fix
Added:
  - tabout
  - ts-context

Fixed:
  - coq's preview window
2022-05-26 10:10:36 +08:00
juan
89b0deb75b
Update lsp_signature for better visibility 2022-05-14 20:55:43 +08:00
juan
8306889081
Update lualine, add lsp_signature 2022-05-12 21:36:31 +08:00
juan
d64ee35bc8
Add glow: the markdown previewer
Currently using my own fork, will change to upstream once
the PR is accepted.
2022-05-09 11:28:46 +08:00
juan
931400b709
add mapping for tabs 2022-05-09 11:23:42 +08:00
juan
455eae1522
Fix gitsigns in ~ 2022-05-04 21:58:26 +08:00
juan
42489a70f2
Update lsp and git integration 2022-05-03 14:36:40 +08:00
juan
88e753ee4c
remove retab format 2022-04-17 20:57:18 +08:00
juan
7180057334
removed base16 colors 2022-04-11 13:18:47 +08:00
juan
b91841c0a6
Add key to hop in line. 2022-04-09 21:42:39 +08:00
juan
aa1aacc793
update readme because why not 2022-04-09 21:20:53 +08:00
juan
1f5e687a60
Huge update. various bug fixes 2022-04-03 23:22:30 +08:00
juan
3d2df263a3
Change to serenade and add more opts. 2022-03-26 12:16:23 +08:00
juan
9f4da7b88f
Change the colour to serenade 2022-03-26 11:17:30 +08:00
juan
12fc94bde4
update colorscheme to everforest 2022-03-26 11:12:30 +08:00
juan
9654a8c42b
enable emmet on markdown 2022-01-21 10:46:39 +08:00
juan
29508ee945
I don't need snippets 2021-12-06 11:23:13 +08:00
juan
0aafb8a2ab
update nvim-lspinstall to nvim-lsp-installer 2021-12-01 21:21:16 +08:00
juan
3054e03fca
fix a bug where the lualine fails 2021-11-13 16:33:24 +08:00
juan
96ce0dbbae
add truezen and misc. update 2021-11-13 16:10:05 +08:00
juan
9f58d7de20
update mappings remove and add tagbar 2021-11-13 15:29:17 +08:00
juan
2870de965f
remove unneeded kap mappings and remove cursorline 2021-11-11 11:35:17 +08:00
juan
2b56227858
add cursorline 2021-11-11 10:46:45 +08:00
juan
ae91bba3cf
minor coq changes and add keybind for gitsigns 2021-11-01 19:29:14 +08:00
juan
223357b591
various color change, remove dap 2021-10-25 12:10:08 +08:00
juan
b9f4d3efda
update neoformat and indent-blankline 2021-10-25 10:53:37 +08:00
juan
473162175c
Removed dap since we dont need that anymore 2021-09-30 08:52:44 +08:00
juan
55c232f0d7
fix indent-blankline 2021-09-28 20:12:29 +08:00
juan
d0acc29331
index change and tree changes 2021-09-27 13:00:44 +08:00
juan
97c865358f
add dap and lsp now works properly 2021-09-27 11:56:17 +08:00
juan
8b8a626c12
add Telescope buffers and Telescope quickfix 2021-09-26 16:56:35 +08:00
juan
e039c0fb90
add comments because why not 2021-09-26 11:57:39 +08:00
juan
c436ad984f
update coq and autopairs settings 2021-09-26 11:43:07 +08:00
juan
7a4cdd6922
sign with gpg and update autopairs things. 2021-09-26 11:35:15 +08:00
juan
ce1e687737 add gitignore and remove cow in coq 2021-09-24 23:22:16 +08:00
juan
7ce7a710c2 remove gitignore 2021-09-21 19:36:27 +08:00
juan
2b541bdcb4 remove test scripts since its stable now 2021-09-21 11:56:18 +08:00
juan
3a6c1c2c3b tex live preview(actually entr is better) 2021-09-21 11:54:09 +08:00
juan
65df9c000b Add coq 3rd party for nvim-lua, sheel repl & more 2021-09-18 08:55:36 +08:00
juan
892f76f591 modify gitignore, keybinds shade config 2021-09-15 15:40:34 +08:00
juan
6d31cfec51 Fix the color a little bit. 2021-09-14 22:30:16 +08:00
juan
d15fd20333 silent coq startup, base16 color update. 2021-09-14 20:41:42 +08:00
juan
196f60f638 TabNine now works properly with the commit 2021-09-14 20:32:11 +08:00
juan
bff6f5e613 update blankline and formatter. 2021-09-14 19:58:30 +08:00
juan
44eda22d9b coq now works properly. 2021-09-14 19:31:14 +08:00
juan
ab1619a9d1 add spellsitter, hop, sniprun, fugitive and remove 2021-09-09 19:55:32 +08:00
juan
598c726359 add colorizer and update lsp load time 2021-09-09 19:09:56 +08:00
juan
89b00f62be Merge branch 'master' of git.juancord.xyz:juan/config.nvim 2021-09-09 19:02:48 +08:00
juan
3ec09fa157 Plugin added: ts-rainbow range-highlight firenvim 2021-09-09 19:02:33 +08:00
juan
b269db00c0 Plugin added: ts-rainbow range-highlight firenvim 2021-09-09 19:01:36 +08:00
28 changed files with 811 additions and 551 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
#exclude precomplied things
/plugin/*

View File

@ -1,3 +1,28 @@
## Nvim.config
# config.nvim/
### This is my neovim config
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/plugins?style=flat" /></a>
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/leaderkey?style=flat" /></a>
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/plugin-manager?style=flat" /></a>
Minimalistic but fully functional neovim config, with full LSP and TS support and completion
Use lua plugins when possible, lazy load and byte-compile when possible, use neovim builtin features when possible.
Never override default keymap with different functionality.
## Install Instructions
> Install requires Neovim 0.9+. Always review the code before installing a configuration.
Clone the repository and install the plugins:
```sh
git clone git@github.com:rywng/config.nvim ~/.config/rywng/config.nvim
NVIM_APPNAME=rywng/config.nvim/ nvim --headless +"Lazy! sync" +qa
```
Open Neovim with this config:
```sh
NVIM_APPNAME=rywng/config.nvim/ nvim
```

View File

@ -1,3 +1,2 @@
require('core')
require('pluginList')
require('mappings')
require('lazy-plugins')

41
lazy-lock.json Normal file
View File

@ -0,0 +1,41 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" },
"gruvbox-material": { "branch": "master", "commit": "23371661bac2b7fdd9769c685e4224990c3b9ab8" },
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
"lazy.nvim": { "branch": "main", "commit": "a9d7ade203b3f3ee3058c082c62afdf8e4bcb416" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"mini.surround": { "branch": "main", "commit": "7098744c8d4573a4b32cb172965f6b2ba03465d2" },
"neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" },
"none-ls.nvim": { "branch": "main", "commit": "0d1b3fa2ad0b371b94cb4b9a27ba6e5a1a915c91" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lspconfig": { "branch": "master", "commit": "53a3c6444ec5006b567071614c83edc8ad651f6d" },
"nvim-treesitter": { "branch": "master", "commit": "ffd7725102f47e7391d7a5e7621d178689602a52" },
"nvim-treesitter-context": { "branch": "master", "commit": "1b9c756c0cad415f0a2661c858448189dd120c15" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"outline.nvim": { "branch": "main", "commit": "028e0bc8ad3d511e9fc1f0678594a608eb908ee5" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
"rustaceanvim": { "branch": "master", "commit": "af4de6a35d128ce71c75a9a7846bf089aea76f50" },
"tabout.nvim": { "branch": "master", "commit": "3d7fbc7f5e91ef0f96b4d787c78ad9f8820de3ec" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "935bedf39c440de2f97ce58dbbb44a40402057c1" },
"telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
"vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" },
"vim-matchup": { "branch": "master", "commit": "1535a769d5dca851fe7d41b0be95f7c7203a4bef" }
}

5
lua/.luarc.json Normal file
View File

@ -0,0 +1,5 @@
{
"diagnostics.disable": [
"undefined-global"
]
}

View File

@ -1,21 +1,67 @@
-- Core Settings
local opt = vim.o
-- CORE SETTINGS
local o = vim.o
local g = vim.g
local map = vim.keymap.set
-- look and feel
opt.relativenumber = true
opt.number = true
opt.showmode = false
opt.scrolloff = 10
opt.ruler = true
opt.termguicolors = true
opt.shiftwidth = 2
g.netrw_banner = 0
g.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
g.netrw_liststyle = 3
g.netrw_winsize = 25
o.number = true
o.relativenumber = true
o.ruler = true
o.scrolloff = 10
o.showmode = false
o.termguicolors = true -- Remove this line when updated to neovim v10 TODO
o.title = true
vim.opt.diffopt = { "internal", "filler", "closeoff", "iwhite" }
-- controlling
opt.ignorecase = true
opt.smartcase = true
opt.smartindent = true
opt.mouse = "i"
g.mapleader = ' '
o.autoindent = true
o.breakindent = true
o.complete = nil
o.ignorecase = true
o.smartcase = true
o.smartindent = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
-- completion for lua
opt.completeopt = 'menuone,noselect'
-- vscode
if vim.g.vscode then
vim.opt.syntax = "OFF"
g.clipboard = g.vscode_clipboard
-- undo/REDO via vscode
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
map({ "i", "n" }, " ", "<Cmd>call VSCodeCall('editor.action.triggerParameterHints')<CR>", { noremap = true })
end
-- generic mappings
map('v', '<', '<gv', { noremap = true })
map('v', '>', '>gv', { noremap = true })
map('n', 'Y', 'y$', { noremap = true })
map('n', 'n', 'nzzzv', { noremap = true })
map('n', 'N', 'Nzzzv', { noremap = true })
-- Shortcutting split navigation
map('', '<A-h>', '<C-w>h')
map('', '<A-j>', '<C-w>j')
map('', '<A-k>', '<C-w>k')
map('', '<A-l>', '<C-w>l')
map('', '<A-H>', '<C-w>H')
map('', '<A-J>', '<C-w>J')
map('', '<A-K>', '<C-w>K')
map('', '<A-L>', '<C-w>L')
map('', '<M-S-.>', '<C-w>>')
map('', '<M-S-,>', '<C-w><')
map('', '<M-S-=>', '<C-w>+')
map('', '<M-->', '<C-w>-')
map('', '<A-T>', '<C-w>T')
-- undo to the last , . or !
map('i', ',', ',<c-g>u', { noremap = true })
map('i', '.', '.<c-g>u', { noremap = true })
map('i', '!', '!<c-g>u', { noremap = true })
map('i', '?', '?<c-g>u', { noremap = true })

351
lua/lazy-plugins.lua Normal file
View File

@ -0,0 +1,351 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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)
local opts = {
defaults = {
lazy = true,
},
dev = {
path = "~/.local/src"
},
install = {
-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "gruvbox-material", "habamax" },
},
}
local plugins = {
-- main UI
{
"sainnhe/gruvbox-material",
lazy = false,
priority = 1000,
config = function()
vim.g.gruvbox_material_better_performance = true
vim.g.gruvbox_material_enable_bold = true
vim.g.gruvbox_material_enable_italic = true
vim.cmd([[colorscheme gruvbox-material]])
end
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("plugins.statusline")
end,
event = "UIEnter"
},
-- TS, LSP, Completion
{
"williamboman/mason.nvim",
},
{
"nvim-treesitter/nvim-treesitter",
config = function()
require("plugins.treesitter")
end,
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-context",
"nvim-treesitter/nvim-treesitter-textobjects"
}
},
{
"nvim-treesitter/nvim-treesitter-context",
config = function()
require("treesitter-context").setup {
multiline_threshold = 4,
max_lines = 8
}
end
},
{
"L3MON4D3/LuaSnip",
dependencies = { "rafamadriz/friendly-snippets" },
config = function()
require("luasnip").setup()
require("luasnip.loaders.from_vscode").lazy_load()
end,
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"FelipeLema/cmp-async-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
{
"saadparwaiz1/cmp_luasnip",
dependencies = {
"L3MON4D3/LuaSnip"
}
},
},
event = { "InsertEnter", "CmdlineEnter" },
config = function()
require("plugins/nvim-cmp")
end
},
{
"hrsh7th/cmp-nvim-lsp",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"neovim/nvim-lspconfig",
},
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{
"williamboman/mason-lspconfig.nvim",
dependencies = {
"williamboman/mason.nvim",
}
},
},
config = function()
require("plugins.lsp")
end,
},
{
"jay-babu/mason-null-ls.nvim",
config = function()
require("plugins.null-ls")
end,
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"williamboman/mason.nvim",
"nvimtools/none-ls.nvim"
}
},
-- rust lsp support
{
'mrcjkb/rustaceanvim',
ft = { 'rust' },
key = {
vim.keymap.set('n', '<leader>rr', ':RustLsp runnables<cr>'),
}
},
-- Code editing
{
"echasnovski/mini.surround",
event = "ModeChanged",
keys = "s",
config = function()
require('mini.surround').setup()
end
},
{
"numToStr/Comment.nvim",
event = "ModeChanged",
keys = "g",
config = function()
require("Comment").setup()
end
},
{
"andymass/vim-matchup",
event = { "BufReadPre", "BufNewFile" },
},
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'CFLAGS=-march=native make',
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-fzf-native.nvim'
},
event = "CmdlineEnter",
keys = {
vim.keymap.set('n', '<leader>f/', ':Telescope lsp_dynamic_workspace_symbols<cr>'),
vim.keymap.set('n', '<leader>f?', ':Telescope lsp_document_symbols<cr>'),
vim.keymap.set('n', '<leader>fg', ':Telescope live_grep<cr>'),
vim.keymap.set('n', '<leader>fb', ':Telescope buffers<cr>'),
vim.keymap.set('n', '<leader>ff', ':Telescope find_files<cr>'),
vim.keymap.set('n', '<leader>fd', ':Telescope diagnostics<cr>'),
},
config = function()
require("telescope").setup {
defaults = {
layout_strategy = 'flex',
layout_config = {
flex = { flip_columns = 160 }
},
},
}
require('telescope').load_extension('fzf')
end
},
{
'kevinhwang91/nvim-bqf',
ft = 'qf',
opts = {
-- disable fugitive in preview: https://github.com/kevinhwang91/nvim-bqf?tab=readme-ov-file#customize-configuration
preview = {
should_preview_cb = function(bufnr, qwinid)
local ret = true
local bufname = vim.api.nvim_buf_get_name(bufnr)
local fsize = vim.fn.getfsize(bufname)
if fsize > 100 * 1024 then
-- skip file size greater than 100k
ret = false
elseif bufname:match('^fugitive://') then
-- skip fugitive buffer
ret = false
end
return ret
end
},
}
},
{
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
cmd = "Neogen",
opts = {
snippet_engine = "luasnip"
},
config = true,
},
{
'abecodes/tabout.nvim',
event = 'InsertCharPre',
opts = {
tabkey = '<C-l>',
backwards_tabkey = '<C-h>',
act_as_tab = false
},
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true,
opts = {
check_ts = true,
ts_config = {
lua = { 'string' },
javascript = { 'template_string' },
java = false,
}
}
},
-- Eye candy UI
{
"NvChad/nvim-colorizer.lua",
cmd = { "ColorizerAttachToBuffer",
"ColorizerToggle"
},
event = "BufRead",
config = function()
require 'colorizer'.setup {
filetypes = {
'*',
css = { rgb_fn = true, },
html = { names = false, }
},
}
end
},
{
"winston0410/range-highlight.nvim",
event = "CmdlineEnter"
},
{
'stevearc/dressing.nvim',
event = "UIEnter"
},
{
"tpope/vim-fugitive",
event = "CmdlineEnter"
},
{
"hedyhli/outline.nvim",
cmd = { "Outline", "OutlineOpen" },
keys = {
vim.keymap.set('n', '<leader>o', ':Outline<cr>'),
},
config = function()
require("outline").setup({})
end
},
{
"lewis6991/gitsigns.nvim",
event = "BufEnter",
keys = {
-- View changed in git
vim.keymap.set('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function()
require("gitsigns").next_hunk()
end)
return '<Ignore>'
end, { expr = true }),
vim.keymap.set('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function()
require("gitsigns").prev_hunk()
end)
return '<Ignore>'
end, { expr = true }),
vim.keymap.set("n", "<leader>hp",
function() require("gitsigns").preview_hunk() end)
},
opts = {
signcolumn = false,
numhl = true,
current_line_blame_opts = {
delay = 300,
ignore_whitespace = false,
virt_text_priority = 100,
},
},
},
-- misc and games
{
"seandewar/killersheep.nvim",
cmd = "KillKillKill"
},
}
local vscode_plugins = {
{ 'echasnovski/mini.surround', version = false, lazy = false },
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end
},
}
if vim.g.vscode then
-- VSCode extension
require("lazy").setup(vscode_plugins, opts)
else
-- ordinary Neovim
require("lazy").setup(plugins, opts)
end

View File

@ -1,23 +0,0 @@
-- generic mappings
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true})
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true})
vim.api.nvim_set_keymap('n', 'Y', 'y$', {noremap = true})
vim.api.nvim_set_keymap('n', 'n', 'nzzzv', {noremap = true})
vim.api.nvim_set_keymap('n', 'N', 'Nzzzv', {noremap = true})
-- Shortcutting split navigation
vim.api.nvim_set_keymap('', '<A-h>', '<C-w>h', {})
vim.api.nvim_set_keymap('', '<A-j>', '<C-w>j', {})
vim.api.nvim_set_keymap('', '<A-k>', '<C-w>k', {})
vim.api.nvim_set_keymap('', '<A-l>', '<C-w>l', {})
vim.api.nvim_set_keymap('', '<A-H>', '<C-w>H', {})
vim.api.nvim_set_keymap('', '<A-J>', '<C-w>J', {})
vim.api.nvim_set_keymap('', '<A-K>', '<C-w>K', {})
vim.api.nvim_set_keymap('', '<A-L>', '<C-w>L', {})
vim.api.nvim_set_keymap('', '<A->>', '<C-w>>', {})
vim.api.nvim_set_keymap('', '<A-<>', '<C-w><', {})
-- undo to the last , . or !
vim.api.nvim_set_keymap('i', ',', ',<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '.', '.<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '!', '!<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '?', '?<c-g>u', {noremap = true})

View File

@ -1,113 +0,0 @@
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
require('packer').init {
display = {
open_fn = function()
return require("packer.util").float {border = "single"}
end,
prompt_border = "single"
},
git = {
clone_timeout = 600 -- Timeout, in seconds, for git clones
},
auto_clean = true,
compile_on_sync = true
-- auto_reload_compiled = true
}
return require('packer').startup(function(use)
use {'wbthomason/packer.nvim', event = 'VimEnter'}
-- core UI
use {'kyazdani42/nvim-web-devicons', after = 'packer.nvim'}
use {
'hoob3rt/lualine.nvim',
after = 'nvim-web-devicons',
config = function() require "plugins.statusline" end
}
use {
'RRethy/nvim-base16',
event = 'VimEnter',
config = function() require "plugins.base16" end
}
-- lsp stuff
use {
'nvim-treesitter/nvim-treesitter',
event = 'BufRead',
config = function() require "plugins.treesitter" end,
run = ':TSUpdate'
}
use {'neovim/nvim-lspconfig', event = 'BufRead'}
use {
'kabouzeid/nvim-lspinstall',
config = function() require "plugins.lspinstall" end,
after = 'nvim-lspconfig'
}
use {'onsails/lspkind-nvim', after = 'nvim-lspconfig'}
use {"ray-x/lsp_signature.nvim", after = 'nvim-lspconfig'}
-- packer
use {
'ms-jpq/coq_nvim',
branch = 'coq',
event = 'InsertEnter',
config = function() require "plugins.coq" end
}
use {'ms-jpq/coq.artifacts', after = 'coq_nvim', branch = 'artifacts'}
-- formating and editing
use {"sbdchd/neoformat", cmd = "Neoformat"}
use {
"mattn/emmet-vim",
event = "FileType html,css",
setup = function() require "plugins.emmet" end
}
use {"machakann/vim-sandwich", event = "BufRead"}
use {
"terrortylor/nvim-comment",
config = function() require('nvim_comment').setup() end,
cmd = "CommentToggle"
}
-- navigation
use {
'kyazdani42/nvim-tree.lua',
cmd = 'NvimTreeToggle',
requires = 'kyazdani42/nvim-web-devicons'
}
use {
"vimwiki/vimwiki",
cmd = "VimwikiIndex",
setup = function() require "plugins.vimwiki" end
}
use {
'andymass/vim-matchup',
after = 'nvim-treesitter',
config = function() require "plugins.matchup" end
}
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}},
cmd = 'Telescope'
}
-- eye-candy
use {
'sunjon/shade.nvim',
event = "BufAdd",
config = function() require "plugins.shade" end
}
use {
"lukas-reineke/indent-blankline.nvim",
after = {"nvim-treesitter", "nvim-base16"},
config = function() require "plugins.indent-blankline" end
}
use {
'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'},
config = function() require('gitsigns').setup() end
}
end)

View File

@ -1,19 +0,0 @@
require('base16-colorscheme').setup({
base00 = "#161821",
base01 = "#1e2132",
base02 = "#818596",
base03 = "#6b7089",
base04 = "#161821",
base05 = "#c6c8d1",
base06 = "#e2a478",
base07 = "#e9b189",
base08 = "#89b8c2",
base09 = "#e98989",
base0A = "#e2a478",
base0B = "#b4be82",
base0C = "#91acd1",
base0D = "#84a0c6",
base0E = "#a093c7",
base0F = "#e27878"
})

View File

@ -1,3 +0,0 @@
vim.g.coq_settings = {auto_start = true, clients = {tabnine = {enabled = true}}}
local coq = require('coq')
vim.cmd('COQnow')

View File

@ -1 +0,0 @@
vim.g.emmet_html5 = 1

View File

@ -1,9 +0,0 @@
require("indent_blankline").setup {
buftype_exclude = {"terminal", "help","packer"},
indent_blankline_buftype_exclude = {"terminal"},
indentLine_enabled = 1,
indent_blankline_char = "",
show_current_context = true,
indent_blankline_show_trailing_blankline_indent = false,
indent_blankline_show_first_indent_level = false
}

60
lua/plugins/lsp.lua Normal file
View File

@ -0,0 +1,60 @@
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
-- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<leader>fm', function()
vim.lsp.buf.format { async = true }
end, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>ci', vim.lsp.buf.incoming_calls, opts)
vim.keymap.set('n', '<leader>co', vim.lsp.buf.outgoing_calls, opts)
vim.keymap.set('n', '<leader>gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set({ 'n', 'i' }, '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
end,
})
require("mason").setup { ui = { icons = { package_installed = "" } } }
require("mason-lspconfig").setup {}
-- Dynamic loading of lsp servers
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {}
end,
-- Next, you can provide targeted overrides for specific servers.
-- For example, a handler override for the `rust_analyzer`:
["rust_analyzer"] = function() require("rust-tools").setup {} end
}
-- customize lsp symbols
local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = nil })
end

View File

@ -1,15 +0,0 @@
local function setup_servers()
require'lspinstall'.setup()
local servers = require'lspinstall'.installed_servers()
for _, server in pairs(servers) do
require'lspconfig'[server].setup{}
end
end
setup_servers()
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
require'lspinstall'.post_install_hook = function ()
setup_servers() -- reload installed servers
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server
end

View File

@ -1,5 +0,0 @@
require'nvim-treesitter.configs'.setup {
matchup = {
enable = true -- mandatory, false will disable the whole extension
}
}

15
lua/plugins/null-ls.lua Normal file
View File

@ -0,0 +1,15 @@
require("mason").setup()
require("mason-null-ls").setup({
ensure_installed = {
-- Opt to list sources here, when available in mason.
},
automatic_installation = false,
handlers = {},
})
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.code_actions.gitsigns,
}
})

87
lua/plugins/nvim-cmp.lua Normal file
View File

@ -0,0 +1,87 @@
require("luasnip.loaders.from_vscode").lazy_load()
local luasnip = require("luasnip")
local cmp = require("cmp")
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end),
["<C-p>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-l>'] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, { "i", "s" }),
['<C-h>'] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
sources = cmp.config.sources({
{ name = "async_path" },
{ name = "luasnip" }, -- For luasnip users.
{ name = "nvim_lsp" },
{ name = 'buffer' },
{ name = 'nvim_lua' },
}),
completion = {
completeopt = 'menu,menuone,noinsert'
}
})
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
completion = {
completeopt = 'menu,menuone,noselect'
},
sources = {
{ name = 'buffer' }
},
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
completion = {
completeopt = 'menu,menuone,noselect'
},
sources = cmp.config.sources({
{ name = 'path' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = {}
}
}
})
})

View File

@ -1,7 +0,0 @@
require'shade'.setup({
overlay_opacity = 50,
opacity_step = 1,
keys = {
toggle = '<Leader>s',
}
})

View File

@ -1,16 +1,23 @@
require'lualine'.setup {
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'iceberg_dark',
component_separators = {'|', '|'},
section_separators = {'', ''},
disabled_filetypes = {}
theme = 'auto',
component_separators = "",
section_separators = "",
},
sections = {
lualine_a = { 'mode' },
lualine_b = {'branch'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_b = {
'branch',
},
lualine_c = {
{ 'filename', path = 1 },
'diff',
},
lualine_x = { 'encoding', 'fileformat', {
'filetype',
icon_only = true
} },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
@ -22,6 +29,5 @@ require'lualine'.setup {
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
}

View File

@ -0,0 +1 @@
require("symbols-outline").setup(opts)

View File

@ -1,15 +1,107 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {"lua"}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua",
"gitignore",
"gitattributes",
"gitcommit",
"git_config",
"git_rebase",
"vim",
"vimdoc",
"query"
}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
matchup = {
enable = true, -- mandatory, false will disable the whole extension
},
highlight = {
enable = true, -- false will disable the whole extension
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
use_languagetree = true
additional_vim_regex_highlighting = true, -- git commit, etc.
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
indent = {
enable = true
}
}
indent = { enable = true },
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
-- You can optionally set descriptions to the mappings (used in the desc parameter of
-- nvim_buf_set_keymap) which plugins like which-key display
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
-- You can also use captures from other query groups like `locals.scm`
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
},
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
-- If you set this to `true` (default is `false`) then any textobject is
-- extended to include preceding or succeeding whitespace. Succeeding
-- whitespace has priority in order to act similarly to eg the built-in
-- `ap`.
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * selection_mode: eg 'v'
-- and should return true of false
include_surrounding_whitespace = true,
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = { query = "@class.outer", desc = "Next class start" },
["]o"] = "@loop.*",
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
["[o"] = "@loop.*",
["[z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
lsp_interop = {
enable = true,
border = 'none',
floating_preview_opts = {},
peek_definition_code = {
["<leader>df"] = "@function.outer",
["<leader>dF"] = "@class.outer",
},
},
},
})
local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
-- Repeat movement with ; and ,
-- vim way: ; goes to the direction you were moving.
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true })

View File

@ -1,4 +0,0 @@
vim.api.nvim_set_var('vimwiki_global_ext', 0)
vim.cmd([[
let g:vimwiki_list = [{'path': '~/Documents/Personal/Wiki/', 'syntax': 'markdown', 'ext': '.md'}]
]])

View File

@ -1,274 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/juan/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s))
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["coq.artifacts"] = {
load_after = {
coq_nvim = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/coq.artifacts"
},
coq_nvim = {
after = { "coq.artifacts" },
config = { "\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins.coq\frequire\0" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/coq_nvim"
},
["emmet-vim"] = {
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/emmet-vim"
},
["gitsigns.nvim"] = {
config = { "\27LJ\1\0026\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\rgitsigns\frequire\0" },
loaded = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/start/gitsigns.nvim"
},
["indent-blankline.nvim"] = {
config = { "\27LJ\1\0028\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\29plugins.indent-blankline\frequire\0" },
load_after = {
["nvim-base16"] = true,
["nvim-treesitter"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim"
},
["lsp_signature.nvim"] = {
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lsp_signature.nvim"
},
["lspkind-nvim"] = {
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lspkind-nvim"
},
["lualine.nvim"] = {
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.statusline\frequire\0" },
load_after = {
["nvim-web-devicons"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lualine.nvim"
},
neoformat = {
commands = { "Neoformat" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/neoformat"
},
["nvim-base16"] = {
after = { "indent-blankline.nvim" },
config = { "\27LJ\1\2.\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\19plugins.base16\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-base16"
},
["nvim-comment"] = {
commands = { "CommentToggle" },
config = { "\27LJ\1\2:\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\17nvim_comment\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-comment"
},
["nvim-lspconfig"] = {
after = { "lsp_signature.nvim", "lspkind-nvim", "nvim-lspinstall" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig"
},
["nvim-lspinstall"] = {
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.lspinstall\frequire\0" },
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-lspinstall"
},
["nvim-tree.lua"] = {
commands = { "NvimTreeToggle" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua"
},
["nvim-treesitter"] = {
after = { "indent-blankline.nvim", "vim-matchup" },
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.treesitter\frequire\0" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-treesitter"
},
["nvim-web-devicons"] = {
after = { "lualine.nvim" },
load_after = {
["packer.nvim"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons"
},
["packer.nvim"] = {
after = { "nvim-web-devicons" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/start/plenary.nvim"
},
["shade.nvim"] = {
config = { "\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins.shade\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/shade.nvim"
},
["telescope.nvim"] = {
commands = { "Telescope" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/telescope.nvim"
},
["vim-matchup"] = {
after_files = { "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" },
config = { "\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins.matchup\frequire\0" },
load_after = {
["nvim-treesitter"] = true
},
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-matchup"
},
["vim-sandwich"] = {
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-sandwich"
},
vimwiki = {
commands = { "VimwikiIndex" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vimwiki"
}
}
time([[Defining packer_plugins]], false)
-- Setup for: emmet-vim
time([[Setup for emmet-vim]], true)
try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins.emmet\frequire\0", "setup", "emmet-vim")
time([[Setup for emmet-vim]], false)
-- Setup for: vimwiki
time([[Setup for vimwiki]], true)
try_loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins.vimwiki\frequire\0", "setup", "vimwiki")
time([[Setup for vimwiki]], false)
-- Config for: gitsigns.nvim
time([[Config for gitsigns.nvim]], true)
try_loadstring("\27LJ\1\0026\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim")
time([[Config for gitsigns.nvim]], false)
-- Command lazy-loads
time([[Defining lazy-load commands]], true)
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neoformat lua require("packer.load")({'neoformat'}, { cmd = "Neoformat", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Telescope lua require("packer.load")({'telescope.nvim'}, { cmd = "Telescope", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeToggle lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file VimwikiIndex lua require("packer.load")({'vimwiki'}, { cmd = "VimwikiIndex", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file CommentToggle lua require("packer.load")({'nvim-comment'}, { cmd = "CommentToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
time([[Defining lazy-load commands]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au BufRead * ++once lua require("packer.load")({'nvim-treesitter', 'vim-sandwich', 'nvim-lspconfig'}, { event = "BufRead *" }, _G.packer_plugins)]]
vim.cmd [[au FileType html,css ++once lua require("packer.load")({'emmet-vim'}, { event = "FileType html,css" }, _G.packer_plugins)]]
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'packer.nvim', 'nvim-base16'}, { event = "VimEnter *" }, _G.packer_plugins)]]
vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'coq_nvim'}, { event = "InsertEnter *" }, _G.packer_plugins)]]
vim.cmd [[au BufAdd * ++once lua require("packer.load")({'shade.nvim'}, { event = "BufAdd *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")
if should_profile then save_profiles() end
end)
if not no_errors then
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

View File

@ -1,5 +0,0 @@
mv nvim nvim.new
mv nvim.bak nvim
mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.new
mv /home/juan/.local/share/nvim/site/pack.bak /home/juan/.local/share/nvim/site/pack

20
spell/en.utf-8.add Normal file
View File

@ -0,0 +1,20 @@
Backend
GL
HDR
HiDPI
Inferrence
Nvidia
TODO
XWayland
args
ascii
backend
config
configs
elster
shiftwidth
tty
tw
udev
v1
winit

BIN
spell/en.utf-8.add.spl Normal file

Binary file not shown.

12
test.sh
View File

@ -1,12 +0,0 @@
#!/bin/sh
cd ~/.config/
mv nvim nvim.bak
mv nvim.new nvim
mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.bak
mv /home/juan/.local/share/nvim/site/pack.new /home/juan/.local/share/nvim/site/pack
# nvim
# mv nvim nvim.new
# mv nvim.bak nvim
# mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.new
# mv /home/juan/.local/share/nvim/site/pack.bak /home/juan/.local/share/nvim/site/pack