mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): migrate to LazyVim
This commit is contained in:
9
.cspell.json
Normal file
9
.cspell.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2",
|
||||||
|
"dictionaryDefinitions": [
|
||||||
|
{ "addWords": true, "path": ".cspell/words.txt", "name": "words" }
|
||||||
|
],
|
||||||
|
"language": "en",
|
||||||
|
"dictionaries": ["words"],
|
||||||
|
"ignorePaths": ["nvim/dictionary", "nvim/spell", "nvim/thesaurus", "private"]
|
||||||
|
}
|
||||||
215
.cspell/words.txt
Normal file
215
.cspell/words.txt
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
afile
|
||||||
|
ahmedkhalf
|
||||||
|
akinsho
|
||||||
|
Astro
|
||||||
|
astro
|
||||||
|
autocmd
|
||||||
|
Autocmds
|
||||||
|
autocmds
|
||||||
|
autotag
|
||||||
|
autowrite
|
||||||
|
baleia
|
||||||
|
bdelete
|
||||||
|
Blankline
|
||||||
|
broot
|
||||||
|
bufdo
|
||||||
|
buftypes
|
||||||
|
builtins
|
||||||
|
Catppuccin
|
||||||
|
catppuccin
|
||||||
|
chafa
|
||||||
|
chdir
|
||||||
|
Cheatsheet
|
||||||
|
cheatsheet
|
||||||
|
chrisgrieser
|
||||||
|
chriskempson
|
||||||
|
christoomey
|
||||||
|
cmds
|
||||||
|
codewindow
|
||||||
|
colorschemes
|
||||||
|
committia
|
||||||
|
contranst
|
||||||
|
copyindent
|
||||||
|
crispgm
|
||||||
|
cssls
|
||||||
|
cssmodules
|
||||||
|
cursorcolumn
|
||||||
|
cursorline
|
||||||
|
cursorword
|
||||||
|
datapath
|
||||||
|
debugloop
|
||||||
|
despa
|
||||||
|
despe
|
||||||
|
devicons
|
||||||
|
dhruvasagar
|
||||||
|
dhruvmanila
|
||||||
|
diagnosticls
|
||||||
|
Diffview
|
||||||
|
diffview
|
||||||
|
elijahmanor
|
||||||
|
ellisonleao
|
||||||
|
extensionn
|
||||||
|
extention
|
||||||
|
foldcolumn
|
||||||
|
foldlevel
|
||||||
|
foldlevelstart
|
||||||
|
foldmethod
|
||||||
|
foldnestmax
|
||||||
|
folke
|
||||||
|
Frecency
|
||||||
|
frecency
|
||||||
|
gitmux
|
||||||
|
gitsigns
|
||||||
|
gitui
|
||||||
|
globalstatus
|
||||||
|
goolord
|
||||||
|
gorbit
|
||||||
|
grammarous
|
||||||
|
grepprg
|
||||||
|
Groeger
|
||||||
|
gruvbox
|
||||||
|
guibg
|
||||||
|
guifg
|
||||||
|
gvisual
|
||||||
|
habamax
|
||||||
|
hightlight
|
||||||
|
hllist
|
||||||
|
horz
|
||||||
|
hrsh
|
||||||
|
iskeyword
|
||||||
|
joshuto
|
||||||
|
jsonls
|
||||||
|
kartikp
|
||||||
|
keybinds
|
||||||
|
keymap
|
||||||
|
Keymaps
|
||||||
|
keymaps
|
||||||
|
kkharji
|
||||||
|
kspell
|
||||||
|
Kunz
|
||||||
|
Lazygit
|
||||||
|
lazygit
|
||||||
|
lazypath
|
||||||
|
lazyvim
|
||||||
|
linebreak
|
||||||
|
listchars
|
||||||
|
lmburns
|
||||||
|
lspconfig
|
||||||
|
lualine
|
||||||
|
luasnip
|
||||||
|
markdownlint
|
||||||
|
matchit
|
||||||
|
matchparen
|
||||||
|
mattn
|
||||||
|
mechatroner
|
||||||
|
monaqa
|
||||||
|
mrjones
|
||||||
|
mundo
|
||||||
|
Munif
|
||||||
|
navic
|
||||||
|
neoconf
|
||||||
|
neomutt
|
||||||
|
Neovim
|
||||||
|
neovim
|
||||||
|
netrw
|
||||||
|
noautocmd
|
||||||
|
Noctis
|
||||||
|
noctis
|
||||||
|
nofile
|
||||||
|
noice
|
||||||
|
nolist
|
||||||
|
norcalli
|
||||||
|
noremap
|
||||||
|
Nvim
|
||||||
|
nvim
|
||||||
|
Nzzzv
|
||||||
|
nzzzv
|
||||||
|
octo
|
||||||
|
oldfiles
|
||||||
|
openthesaurus
|
||||||
|
parcentage
|
||||||
|
Pmenu
|
||||||
|
preservim
|
||||||
|
prettierd
|
||||||
|
Primeagen
|
||||||
|
princejoogie
|
||||||
|
priorization
|
||||||
|
pwntester
|
||||||
|
pyright
|
||||||
|
quickfix
|
||||||
|
Quickmenu
|
||||||
|
rcarriga
|
||||||
|
relativenumber
|
||||||
|
rhysd
|
||||||
|
rktjmp
|
||||||
|
roobert
|
||||||
|
RRGGBB
|
||||||
|
rrggbb
|
||||||
|
RRGGBBAA
|
||||||
|
rstacruz
|
||||||
|
ruanyl
|
||||||
|
sepa
|
||||||
|
sepe
|
||||||
|
shadmansaleh
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
shiftwidth
|
||||||
|
showbreak
|
||||||
|
showcmd
|
||||||
|
signcolumn
|
||||||
|
simnalamburt
|
||||||
|
simrat
|
||||||
|
sindrets
|
||||||
|
skhd
|
||||||
|
skhdrc
|
||||||
|
softtabstop
|
||||||
|
spellfile
|
||||||
|
startinsert
|
||||||
|
statusline
|
||||||
|
stdpath
|
||||||
|
stylua
|
||||||
|
sudormrfbin
|
||||||
|
sumneko
|
||||||
|
supertab
|
||||||
|
swapfile
|
||||||
|
tabdo
|
||||||
|
tabedit
|
||||||
|
tabline
|
||||||
|
tailwindcss
|
||||||
|
Tanjim
|
||||||
|
taskwarrior
|
||||||
|
textobjs
|
||||||
|
toggleterm
|
||||||
|
tohtml
|
||||||
|
tokyonight
|
||||||
|
topleft
|
||||||
|
tpope
|
||||||
|
Treesitter
|
||||||
|
treesitter
|
||||||
|
unindexed
|
||||||
|
vifm
|
||||||
|
vimgrep
|
||||||
|
Vimux
|
||||||
|
vimux
|
||||||
|
virtualedit
|
||||||
|
Visuall
|
||||||
|
wakatime
|
||||||
|
weilbith
|
||||||
|
Wildignore
|
||||||
|
wildignore
|
||||||
|
williamboman
|
||||||
|
winbar
|
||||||
|
winblend
|
||||||
|
wincmd
|
||||||
|
windwp
|
||||||
|
wuelnerdotexe
|
||||||
|
xiyaowong
|
||||||
|
xplr
|
||||||
|
xtract
|
||||||
|
yabai
|
||||||
|
yabairc
|
||||||
|
yamatsum
|
||||||
|
yamlfmt
|
||||||
|
yamlls
|
||||||
|
zbirenbaum
|
||||||
|
Zelos
|
||||||
8
nvim/.gitignore
vendored
Normal file
8
nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
tt.*
|
||||||
|
.tests
|
||||||
|
doc/tags
|
||||||
|
debug
|
||||||
|
.repro
|
||||||
|
foo.*
|
||||||
|
*.log
|
||||||
|
data
|
||||||
15
nvim/.neoconf.json
Normal file
15
nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"sumneko_lua": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
201
nvim/LICENSE
Normal file
201
nvim/LICENSE
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
4
nvim/README.md
Normal file
4
nvim/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# 💤 LazyVim
|
||||||
|
|
||||||
|
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||||
|
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
-- https://github.com/tpope/vim-abolish
|
|
||||||
vim.api.nvim_command("Abolish teh the")
|
|
||||||
vim.api.nvim_command("Abolish {despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or} {despe,sepa}rat{}")
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
-- https://github.com/goolord/alpha-nvim
|
|
||||||
local alpha = require("alpha")
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
|
|
||||||
dashboard.section.header.val = {
|
|
||||||
" ▖ ",
|
|
||||||
"┌─╮╭─╮╭─╮▖ ▖▖▄▄▗▄ ",
|
|
||||||
"│ │├─┘│ │▝▖▞ ▌▌ ▌ ▌",
|
|
||||||
"╵ ╵╰─╯╰─╯ ▝ ▘▘ ▘ ▘",
|
|
||||||
}
|
|
||||||
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button("e", " New File", ":ene <BAR> startinsert<CR>"),
|
|
||||||
dashboard.button("f", " Find Files", ":Telescope find_files<CR>"),
|
|
||||||
dashboard.button("p", " Find Project", ":Telescope projects<CR>"),
|
|
||||||
dashboard.button("r", " Recently Used Files", ":Telescope oldfiles<CR>"),
|
|
||||||
dashboard.button("t", " Find Text", ":Telescope grep_string<CR>"),
|
|
||||||
dashboard.button("u", " Update Plugins", ":Lazy sync<CR>"),
|
|
||||||
dashboard.button("m", " Mason (LSP, DAP, Linter, Formatter)", ":Mason<CR>"),
|
|
||||||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
|
||||||
dashboard.padding,
|
|
||||||
}
|
|
||||||
|
|
||||||
dashboard.section.header.opts.hl = "String"
|
|
||||||
dashboard.section.buttons.opts.hl = "Keyword"
|
|
||||||
dashboard.section.footer.opts.hl = "String"
|
|
||||||
dashboard.opts.opts.noautocmd = true
|
|
||||||
|
|
||||||
alpha.setup(dashboard.opts)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/wuelnerdotexe/vim-astro
|
|
||||||
vim.g.astro_typescript = "enable"
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
-- https://github.com/windwp/nvim-autopairs
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
||||||
|
|
||||||
require("nvim-autopairs").setup({
|
|
||||||
check_ts = true,
|
|
||||||
ts_config = {
|
|
||||||
lua = { "string", "source" },
|
|
||||||
javascript = { "string", "template_string" },
|
|
||||||
java = false,
|
|
||||||
},
|
|
||||||
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
|
||||||
fast_wrap = {
|
|
||||||
map = "<C-l>",
|
|
||||||
chars = { "{", "[", "(", '"', "'" },
|
|
||||||
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
|
|
||||||
offset = 0, -- Offset from pattern match
|
|
||||||
end_key = "$",
|
|
||||||
keys = "qwertzuiopyxcvbnmasdfghjkl",
|
|
||||||
check_comma = true,
|
|
||||||
highlight = "PmenuSel",
|
|
||||||
highlight_grey = "LineNr",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- https://github.com/windwp/nvim-ts-autotag
|
|
||||||
require("nvim-ts-autotag").setup({
|
|
||||||
disable_filetype = { "TelescopePrompt", "vim" },
|
|
||||||
})
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
-- https://github.com/APZelos/blamer.nvim
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.g.blamer_enabled = 0
|
|
||||||
vim.g.blamer_relative_time = 1
|
|
||||||
vim.g.blamer_delay = 200
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>tb", [[<Cmd>BlamerToggle<CR>]], opts)
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
-- https://github.com/akinsho/bufferline.nvim
|
|
||||||
require("bufferline").setup({
|
|
||||||
highlights = {
|
|
||||||
fill = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
background = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
tab = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
tab_selected = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
tab_close = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
close_button = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
close_button_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
close_button_selected = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
buffer_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
buffer_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
numbers = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
numbers_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
numbers_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
diagnostic = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
diagnostic_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
diagnostic_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
hint = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
hint_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
hint_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
hint_diagnostic = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
hint_diagnostic_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
hint_diagnostic_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
info = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
info_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
info_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
info_diagnostic = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
info_diagnostic_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
info_diagnostic_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
warning = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
warning_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
warning_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
warning_diagnostic = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
warning_diagnostic_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
warning_diagnostic_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
error = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
error_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
error_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
error_diagnostic = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
error_diagnostic_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
error_diagnostic_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
},
|
|
||||||
modified = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
modified_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
modified_selected = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
duplicate_selected = {
|
|
||||||
bg = "None",
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
duplicate_visible = {
|
|
||||||
bg = "None",
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
duplicate = {
|
|
||||||
bg = "None",
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
separator_selected = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
separator_visible = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
separator = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
indicator_selected = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
pick_selected = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
pick_visible = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
pick = {
|
|
||||||
bg = "None",
|
|
||||||
bold = true,
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
offset_separator = {
|
|
||||||
bg = "None",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
options = {
|
|
||||||
modified_icon = "●",
|
|
||||||
left_trunc_marker = "",
|
|
||||||
right_trunc_marker = "",
|
|
||||||
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
|
||||||
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
|
||||||
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
|
|
||||||
max_name_length = 25,
|
|
||||||
max_prefix_length = 25,
|
|
||||||
enforce_regular_tabs = false,
|
|
||||||
view = "multiwindow",
|
|
||||||
show_buffer_close_icons = true,
|
|
||||||
show_close_icon = false,
|
|
||||||
separator_style = "thin",
|
|
||||||
diagnostics = "nvim_lsp",
|
|
||||||
diagnostics_update_in_insert = false,
|
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
|
||||||
return "(" .. count .. ")"
|
|
||||||
end,
|
|
||||||
offsets = {
|
|
||||||
{
|
|
||||||
filetype = "NvimTree",
|
|
||||||
text = "File Explorer",
|
|
||||||
highlight = "Directory",
|
|
||||||
text_align = "left",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
-- https://github.com/catppuccin/catppuccin
|
|
||||||
|
|
||||||
-- latte, frappe, macchiato, mocha
|
|
||||||
vim.g.catppuccin_flavour = "mocha"
|
|
||||||
|
|
||||||
require("catppuccin").setup()
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
-- https://github.com/princejoogie/chafa.nvim
|
|
||||||
require("chafa").setup({
|
|
||||||
render = {
|
|
||||||
min_padding = 5,
|
|
||||||
show_label = true,
|
|
||||||
},
|
|
||||||
events = {
|
|
||||||
update_on_nvim_resize = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
-- https://github.com/hrsh7th/nvim-cmp
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
|
|
||||||
require("luasnip/loaders/from_vscode").lazy_load()
|
|
||||||
|
|
||||||
local check_backspace = function()
|
|
||||||
local col = vim.fn.col(".") - 1
|
|
||||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
|
||||||
end
|
|
||||||
|
|
||||||
local kind_icons = {
|
|
||||||
Text = "",
|
|
||||||
Method = "m",
|
|
||||||
Function = "",
|
|
||||||
Constructor = "",
|
|
||||||
Field = "",
|
|
||||||
Variable = "",
|
|
||||||
Class = "",
|
|
||||||
Interface = "",
|
|
||||||
Module = "",
|
|
||||||
Property = "",
|
|
||||||
Unit = "",
|
|
||||||
Value = "",
|
|
||||||
Enum = "",
|
|
||||||
Keyword = "",
|
|
||||||
Snippet = "",
|
|
||||||
Color = "",
|
|
||||||
File = "",
|
|
||||||
Reference = "",
|
|
||||||
Folder = "",
|
|
||||||
EnumMember = "",
|
|
||||||
Constant = "",
|
|
||||||
Struct = "",
|
|
||||||
Event = "",
|
|
||||||
Operator = "",
|
|
||||||
TypeParameter = "",
|
|
||||||
Octoface = "",
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
|
||||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
|
||||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
|
||||||
["<C-x>"] = cmp.mapping.complete(),
|
|
||||||
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
["<C-e>"] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
}),
|
|
||||||
-- Accept currently selected item. If none selected, `select` first item.
|
|
||||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<M-l>"] = cmp.mapping.confirm({
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expandable() then
|
|
||||||
luasnip.expand()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
elseif check_backspace() then
|
|
||||||
fallback()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
-- Kind icons
|
|
||||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
|
||||||
|
|
||||||
vim_item.menu = ({
|
|
||||||
copilot = "[C]",
|
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
luasnip = "[Snippet]",
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
path = "[Path]",
|
|
||||||
spell = "[Spell]",
|
|
||||||
dictionary = "[Dictionary]",
|
|
||||||
omni = "[Omni]",
|
|
||||||
nvim_lua = "[Nvim Lua]",
|
|
||||||
npm = "[npm]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "copilot" },
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "nvim_lsp_signature_help" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "dictionary" },
|
|
||||||
{ name = "omni" },
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "spell" },
|
|
||||||
{ name = "npm", keyword_length = 4 },
|
|
||||||
},
|
|
||||||
confirm_opts = {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = false,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
experimental = {
|
|
||||||
ghost_text = true,
|
|
||||||
native_menu = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
-- https://github.com/gorbit99/codewindow.nvim
|
|
||||||
local codewindow = require("codewindow")
|
|
||||||
|
|
||||||
codewindow.setup()
|
|
||||||
|
|
||||||
-- <leader>mo - open the minimap
|
|
||||||
-- <leader>mc - close the minimap
|
|
||||||
-- <leader>mf - focus/unfocus the minimap
|
|
||||||
-- <leader>mm - toggle the minimap
|
|
||||||
codewindow.apply_default_keybinds()
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
-- https://github.com/norcalli/nvim-colorizer.lua
|
|
||||||
require("colorizer").setup({
|
|
||||||
"css",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact",
|
|
||||||
"yaml",
|
|
||||||
"conf",
|
|
||||||
"lua",
|
|
||||||
}, {
|
|
||||||
RGB = true,
|
|
||||||
RRGGBB = true,
|
|
||||||
names = true,
|
|
||||||
RRGGBBAA = true,
|
|
||||||
rgb_fn = true,
|
|
||||||
hsl_fn = true,
|
|
||||||
css = true,
|
|
||||||
css_fn = true,
|
|
||||||
mode = "background",
|
|
||||||
})
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
-- https://github.com/numToStr/comment.nvim
|
|
||||||
require("Comment").setup({
|
|
||||||
pre_hook = function(ctx)
|
|
||||||
local U = require("Comment.utils")
|
|
||||||
|
|
||||||
local location = nil
|
|
||||||
if ctx.ctype == U.ctype.block then
|
|
||||||
location = require("ts_context_commentstring.utils").get_cursor_location()
|
|
||||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
|
||||||
location = require("ts_context_commentstring.utils").get_visual_start_location()
|
|
||||||
end
|
|
||||||
|
|
||||||
return require("ts_context_commentstring.internal").calculate_commentstring({
|
|
||||||
key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
|
||||||
location = location,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
require("treesitter-context").setup({
|
|
||||||
patterns = {
|
|
||||||
default = {
|
|
||||||
"class",
|
|
||||||
"function",
|
|
||||||
"method",
|
|
||||||
"for",
|
|
||||||
"while",
|
|
||||||
"if",
|
|
||||||
"switch",
|
|
||||||
"case",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
-- https://github.com/yamatsum/nvim-cursorline
|
|
||||||
require("nvim-cursorline").setup({
|
|
||||||
cursorline = {
|
|
||||||
enable = true,
|
|
||||||
timeout = 1000,
|
|
||||||
number = false,
|
|
||||||
},
|
|
||||||
cursorword = {
|
|
||||||
enable = true,
|
|
||||||
min_length = 3,
|
|
||||||
hl = { underline = true },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
-- https://github.com/monaqa/dial.nvim
|
|
||||||
local augend = require("dial.augend")
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
require("dial.config").augends:register_group({
|
|
||||||
default = {
|
|
||||||
augend.constant.alias.bool,
|
|
||||||
augend.constant.alias.de_weekday,
|
|
||||||
augend.constant.alias.de_weekday_full,
|
|
||||||
augend.date.alias["%d.%m.%Y"],
|
|
||||||
augend.hexcolor.new({ case = "lower" }),
|
|
||||||
augend.integer.alias.decimal_int,
|
|
||||||
augend.semver.alias.semver,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-a>", require("dial.map").inc_normal(), opts)
|
|
||||||
vim.keymap.set("n", "<C-x>", require("dial.map").dec_normal(), opts)
|
|
||||||
vim.keymap.set("v", "<C-a>", require("dial.map").inc_visual(), opts)
|
|
||||||
vim.keymap.set("v", "<C-x>", require("dial.map").dec_visual(), opts)
|
|
||||||
vim.keymap.set("v", "g<C-a>", require("dial.map").inc_gvisual(), opts)
|
|
||||||
vim.keymap.set("v", "g<C-x>", require("dial.map").dec_gvisual(), opts)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/stevearc/dressing.nvim
|
|
||||||
require("dressing").setup()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
--- https://github.com/elijahmanor/export-to-vscode.nvim
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>code", [[<Cmd>lua require("export-to-vscode").launch()<CR>]], opts)
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
-- https://github.com/is0n/fm-nvim
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-g>", "<CMD>Lazygit<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<M-l>", "<CMD>Lf<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>lf", "<CMD>Lf<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>lg", "<CMD>Lazygit<CR>", opts)
|
|
||||||
|
|
||||||
require("fm-nvim").setup({
|
|
||||||
edit_cmd = "edit",
|
|
||||||
on_close = {},
|
|
||||||
on_open = {},
|
|
||||||
ui = {
|
|
||||||
default = "float",
|
|
||||||
float = {
|
|
||||||
border = "rounded",
|
|
||||||
float_hl = "Normal",
|
|
||||||
border_hl = "FloatBorder",
|
|
||||||
blend = 0,
|
|
||||||
height = 0.9,
|
|
||||||
width = 0.9,
|
|
||||||
x = 0.5,
|
|
||||||
y = 0.5,
|
|
||||||
},
|
|
||||||
split = {
|
|
||||||
direction = "topleft",
|
|
||||||
size = 24,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cmds = {
|
|
||||||
lf_cmd = "lf",
|
|
||||||
fm_cmd = "fm",
|
|
||||||
nnn_cmd = "nnn",
|
|
||||||
fff_cmd = "fff",
|
|
||||||
twf_cmd = "twf",
|
|
||||||
fzf_cmd = "fzf",
|
|
||||||
fzy_cmd = "find . | fzy",
|
|
||||||
xplr_cmd = "xplr",
|
|
||||||
vifm_cmd = "vifm",
|
|
||||||
skim_cmd = "sk",
|
|
||||||
broot_cmd = "broot",
|
|
||||||
gitui_cmd = "gitui",
|
|
||||||
ranger_cmd = "ranger",
|
|
||||||
joshuto_cmd = "joshuto",
|
|
||||||
lazygit_cmd = "lazygit",
|
|
||||||
neomutt_cmd = "neomutt",
|
|
||||||
taskwarrior_cmd = "taskwarrior-tui",
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
vert_split = "<C-v>",
|
|
||||||
horz_split = "<C-h>",
|
|
||||||
tabedit = "<C-t>",
|
|
||||||
edit = "<C-e>",
|
|
||||||
ESC = "<ESC>",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
-- https://github.com/ibhagwan/fzf-lua
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
require("fzf-lua").setup({
|
|
||||||
lsp = {
|
|
||||||
async_or_timeout = 3000, -- make lsp requests synchronous so they work with null-ls
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>zbl", [[<Cmd>FzfLua blines<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zf", [[<Cmd>FzfLua Files<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zg", [[<Cmd>FzfLua Grep<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgb", [[<Cmd>FzfLua git_branches<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgc", [[<Cmd>FzfLua git_commits<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgl", [[<Cmd>FzfLua grep_last<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgp", [[<Cmd>FzfLua grep_project<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgs", [[<Cmd>FzfLua git_status<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgst", [[<Cmd>FzfLua git_stash<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgv", [[<Cmd>FzfLua grep_visual<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zgw", [[<Cmd>FzfLua grep_cword<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zh", [[<Cmd>FzfLua oldfiles<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zl", [[<Cmd>FzfLua lines<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlca", [[<Cmd>FzfLua code_actions<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zld", [[<Cmd>FzfLua lsp_definitions<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlds", [[<Cmd>FzfLua lsp_document_symbols<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlg", [[<Cmd>FzfLua live_grep<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlgr", [[<Cmd>FzfLua live_grep_resume<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlr", [[<Cmd>FzfLua lsp_references<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zltd", [[<Cmd>FzfLua lsp_typedef<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zlws", [[<Cmd>FzfLua lsp_live_workspace_symbols<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zm", [[<Cmd>FzfLua marks<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zqfq", [[<Cmd>FzfLua quickfix<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zr", [[<Cmd>FzfLua resume<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>zss", [[<Cmd>FzfLua spell_suggest<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>ztg", [[<Cmd>FzfLua tabs<CR>]], opts)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- https://github.com/ThePrimeagen/git-worktree.nvim
|
|
||||||
vim.g.git_worktree_log_level = "error"
|
|
||||||
|
|
||||||
require("git-worktree").setup()
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
-- https://github.com/lewis6991/gitsigns.nvim
|
|
||||||
require("gitsigns").setup({
|
|
||||||
signs = {
|
|
||||||
add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
|
||||||
change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
|
||||||
delete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
|
||||||
topdelete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
|
||||||
changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
|
||||||
},
|
|
||||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
|
||||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
|
||||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
|
||||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
|
||||||
watch_gitdir = {
|
|
||||||
interval = 1000,
|
|
||||||
follow_files = true,
|
|
||||||
},
|
|
||||||
attach_to_untracked = true,
|
|
||||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
|
||||||
current_line_blame_opts = {
|
|
||||||
virt_text = true,
|
|
||||||
virt_text_pos = "eol", -- "eol" | "overlay" | "right_align"
|
|
||||||
delay = 1000,
|
|
||||||
ignore_whitespace = false,
|
|
||||||
},
|
|
||||||
current_line_blame_formatter_opts = {
|
|
||||||
relative_time = false,
|
|
||||||
},
|
|
||||||
sign_priority = 6,
|
|
||||||
update_debounce = 100,
|
|
||||||
status_formatter = nil, -- Use default
|
|
||||||
max_file_length = 40000,
|
|
||||||
preview_config = {
|
|
||||||
-- Options passed to nvim_open_win
|
|
||||||
border = "single",
|
|
||||||
style = "minimal",
|
|
||||||
relative = "cursor",
|
|
||||||
row = 0,
|
|
||||||
col = 1,
|
|
||||||
},
|
|
||||||
yadm = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-- https://github.com/DNLHC/glance.nvim
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gld", "<CMD>Glance definitions<CR>", opts)
|
|
||||||
vim.keymap.set("n", "gli", "<CMD>Glance implementations<CR>", opts)
|
|
||||||
vim.keymap.set("n", "glr", "<CMD>Glance references<CR>", opts)
|
|
||||||
vim.keymap.set("n", "glt", "<CMD>Glance type_definitions<CR>", opts)
|
|
||||||
|
|
||||||
require("glance").setup()
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
-- https://github.com/ThePrimeagen/harpoon
|
|
||||||
local harpoon = require("harpoon")
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", [[<Cmd>lua require("harpoon.mark").add_file()<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>,", [[<Cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>1", [[<Cmd>lua require("harpoon.ui").nav_file(1)<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>2", [[<Cmd>lua require("harpoon.ui").nav_file(2)<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>3", [[<Cmd>lua require("harpoon.ui").nav_file(3)<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>4", [[<Cmd>lua require("harpoon.ui").nav_file(4)<CR>]], opts)
|
|
||||||
|
|
||||||
harpoon.setup()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- https://github.com/lewis6991/impatient.nvim
|
|
||||||
local impatient = require("impatient")
|
|
||||||
|
|
||||||
impatient.enable_profile()
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
|
||||||
local indent_blankline = require("indent_blankline")
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent1", { bg = "#1f1f1f", nocombine = true })
|
|
||||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent2", { bg = "#1a1a1a", nocombine = true })
|
|
||||||
|
|
||||||
indent_blankline.setup({
|
|
||||||
char = "",
|
|
||||||
char_highlight_list = {
|
|
||||||
"IndentBlanklineIndent1",
|
|
||||||
"IndentBlanklineIndent2",
|
|
||||||
},
|
|
||||||
space_char_highlight_list = {
|
|
||||||
"IndentBlanklineIndent1",
|
|
||||||
"IndentBlanklineIndent2",
|
|
||||||
},
|
|
||||||
show_trailing_blankline_indent = false,
|
|
||||||
})
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
-- https://github.com/mrjones2014/legendary.nvim
|
|
||||||
local legendary = require("legendary")
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "LL", "<CMD>Legendary<CR>", opts)
|
|
||||||
|
|
||||||
legendary.setup({ which_key = { auto_register = true } })
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
-- https://github.com/nvim-lualine/lualine.nvim
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = "transparent",
|
|
||||||
component_separators = { left = "", right = "" },
|
|
||||||
section_separators = { left = "", right = "" },
|
|
||||||
disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline " },
|
|
||||||
always_divide_middle = true,
|
|
||||||
globalstatus = true,
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { "mode" },
|
|
||||||
lualine_b = { "branch", "diff", "diagnostics" },
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
|
||||||
lualine_y = { "progress" },
|
|
||||||
lualine_z = { "location" },
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "location" },
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
extensions = {},
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/echasnovski/mini.nvim
|
|
||||||
require("mini.align").setup()
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
-- https://github.com/neovide/neovide
|
|
||||||
if vim.fn.exists("g:neovide") then
|
|
||||||
vim.o.guifont = "FiraCode Nerd Font:h20"
|
|
||||||
|
|
||||||
vim.g.neovide_cursor_vfx_mode = "railgun"
|
|
||||||
vim.g.neovide_floating_blur_amount_x = 2.0
|
|
||||||
vim.g.neovide_floating_blur_amount_y = 2.0
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-- https://github.com/kyazdani42/nvim-tree.lua
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
update_focused_file = {
|
|
||||||
enable = true,
|
|
||||||
update_root = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/pwntester/octo.nvim
|
|
||||||
require("octo").setup()
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
-- https://github.com/ahmedkhalf/project.nvim
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>pm", [[<Cmd>:Telescope projects<CR>]], opts)
|
|
||||||
|
|
||||||
require("project_nvim").setup({
|
|
||||||
active = true,
|
|
||||||
on_config_done = nil,
|
|
||||||
manual_mode = false,
|
|
||||||
detection_methods = {
|
|
||||||
"pattern",
|
|
||||||
},
|
|
||||||
patterns = {
|
|
||||||
".git",
|
|
||||||
"Makefile",
|
|
||||||
".gitignore",
|
|
||||||
"package.json",
|
|
||||||
"!node_modules",
|
|
||||||
},
|
|
||||||
show_hidden = false,
|
|
||||||
silent_chdir = true,
|
|
||||||
ignore_lsp = {},
|
|
||||||
datapath = vim.fn.stdpath("data"),
|
|
||||||
})
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-- https://github.com/ray-x/sad.nvim
|
|
||||||
require("sad").setup({
|
|
||||||
diff = "delta", -- you can use `diff`, `diff-so-fancy`
|
|
||||||
ls_file = "fd", -- also git ls_file
|
|
||||||
exact = false, -- exact match
|
|
||||||
vsplit = true, -- split sad window the screen vertically, when set to number
|
|
||||||
height_ratio = 0.5, -- height ratio of sad window when split horizontally
|
|
||||||
width_ratio = 0.5, -- height ratio of sad window when split vertically
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/nvim-pack/nvim-spectre
|
|
||||||
require("spectre").setup()
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/kylechui/nvim-surround
|
|
||||||
require("nvim-surround").setup()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- https://github.com/simrat39/symbols-outline.nvim
|
|
||||||
require("symbols-outline").setup({
|
|
||||||
width = 25,
|
|
||||||
})
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
-- https://github.com/nvim-telescope/telescope.nvim/
|
|
||||||
local telescope = require("telescope")
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-p>", [[<Cmd>Telescope find_files<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<C-p>", [[<Cmd>Telescope find_files hidden=true<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>C", [[<Cmd>Cheatsheet<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>F", [[<Cmd>Telescope live_grep<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>H", [[<Cmd>Telescope headings<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>S", [[<Cmd>Telescope spell_suggest<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>b", [[<Cmd>Telescope buffers<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>bm", [[<Cmd>Telescope bookmarks<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>f", [[<Cmd>Telescope current_buffer_fuzzy_find<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>fa", [[<Cmd>Telescope find_files hidden=true<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>fb", [[<Cmd>Telescope file_browser<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>fd", [[<Cmd>Telescope dir live_grep<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>ff", [[<Cmd>Telescope dir find_files<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>gb", [[<Cmd>Telescope git_branches<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>gs", [[<Cmd>Telescope git_status<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>gwc", [[<Cmd>Telescope git_worktree create_git_worktree<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>gww", [[<Cmd>Telescope git_worktree git_worktrees<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>ht", [[<Cmd>Telescope help_tags<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>km", [[<Cmd>Telescope keymaps<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>m", [[<Cmd>Telescope marks<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>mru", [[<Cmd>Telescope frecency<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>nm", [[<Cmd>Telescope node_modules list<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>r", [[<Cmd>Telescope resume<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>tg", [[<Cmd>Telescope tags<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>ty", [[<Cmd>Telescope symbols<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>u", [[<Cmd>Telescope undo<CR>]], opts)
|
|
||||||
|
|
||||||
telescope.load_extension("bookmarks")
|
|
||||||
telescope.load_extension("node_modules")
|
|
||||||
telescope.load_extension("file_browser")
|
|
||||||
telescope.load_extension("frecency")
|
|
||||||
telescope.load_extension("lsp_handlers")
|
|
||||||
telescope.load_extension("fzy_native")
|
|
||||||
telescope.load_extension("harpoon")
|
|
||||||
telescope.load_extension("projects")
|
|
||||||
telescope.load_extension("heading")
|
|
||||||
telescope.load_extension("gh")
|
|
||||||
telescope.load_extension("git_worktree")
|
|
||||||
telescope.load_extension("dir")
|
|
||||||
telescope.load_extension("undo")
|
|
||||||
|
|
||||||
telescope.setup({
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = " ",
|
|
||||||
selection_caret = " ",
|
|
||||||
path_display = {
|
|
||||||
"smart",
|
|
||||||
},
|
|
||||||
file_ignore_pattern = {
|
|
||||||
"yarn.lock",
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
-- INSERT Mode
|
|
||||||
i = {
|
|
||||||
["<C-n>"] = actions.cycle_history_next,
|
|
||||||
["<C-p>"] = actions.cycle_history_prev,
|
|
||||||
|
|
||||||
["<C-j>"] = actions.move_selection_next,
|
|
||||||
["<C-k>"] = actions.move_selection_previous,
|
|
||||||
|
|
||||||
["<C-c>"] = actions.close,
|
|
||||||
|
|
||||||
["<Down>"] = actions.move_selection_next,
|
|
||||||
["<Up>"] = actions.move_selection_previous,
|
|
||||||
|
|
||||||
["<CR>"] = actions.select_default,
|
|
||||||
["<C-x>"] = actions.select_horizontal,
|
|
||||||
["<C-v>"] = actions.select_vertical,
|
|
||||||
["<C-t>"] = actions.select_tab,
|
|
||||||
|
|
||||||
["<C-u>"] = actions.preview_scrolling_up,
|
|
||||||
["<C-d>"] = actions.preview_scrolling_down,
|
|
||||||
|
|
||||||
["<PageUp>"] = actions.results_scrolling_up,
|
|
||||||
["<PageDown>"] = actions.results_scrolling_down,
|
|
||||||
|
|
||||||
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
|
||||||
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
|
||||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
|
||||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
||||||
["<C-l>"] = actions.complete_tag,
|
|
||||||
["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
|
|
||||||
},
|
|
||||||
-- NORMAL Mode
|
|
||||||
n = {
|
|
||||||
["<esc>"] = actions.close,
|
|
||||||
["<CR>"] = actions.select_default,
|
|
||||||
["<C-x>"] = actions.select_horizontal,
|
|
||||||
["<C-v>"] = actions.select_vertical,
|
|
||||||
["<C-t>"] = actions.select_tab,
|
|
||||||
|
|
||||||
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
|
||||||
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
|
||||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
|
||||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
||||||
|
|
||||||
["j"] = actions.move_selection_next,
|
|
||||||
["k"] = actions.move_selection_previous,
|
|
||||||
["H"] = actions.move_to_top,
|
|
||||||
["M"] = actions.move_to_middle,
|
|
||||||
["L"] = actions.move_to_bottom,
|
|
||||||
|
|
||||||
["<Down>"] = actions.move_selection_next,
|
|
||||||
["<Up>"] = actions.move_selection_previous,
|
|
||||||
["gg"] = actions.move_to_top,
|
|
||||||
["G"] = actions.move_to_bottom,
|
|
||||||
|
|
||||||
["<C-u>"] = actions.preview_scrolling_up,
|
|
||||||
["<C-d>"] = actions.preview_scrolling_down,
|
|
||||||
|
|
||||||
["<PageUp>"] = actions.results_scrolling_up,
|
|
||||||
["<PageDown>"] = actions.results_scrolling_down,
|
|
||||||
|
|
||||||
["?"] = actions.which_key,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
buffers = {
|
|
||||||
theme = "dropdown",
|
|
||||||
previewer = false,
|
|
||||||
show_all_buffers = true,
|
|
||||||
sort_lastused = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
fzy_native = {
|
|
||||||
fuzzy = true,
|
|
||||||
override_generic_sorter = true,
|
|
||||||
override_file_sorter = true,
|
|
||||||
case_mode = "smart_case",
|
|
||||||
},
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true,
|
|
||||||
override_generic_sorter = true,
|
|
||||||
override_file_sorter = true,
|
|
||||||
case_mode = "smart_case",
|
|
||||||
},
|
|
||||||
file_browser = {
|
|
||||||
theme = "ivy",
|
|
||||||
hijack_netrw = true,
|
|
||||||
},
|
|
||||||
frecency = {
|
|
||||||
show_scores = false,
|
|
||||||
show_unindexed = true,
|
|
||||||
ignore_patterns = {
|
|
||||||
"*.git/*",
|
|
||||||
"*/tmp/*",
|
|
||||||
},
|
|
||||||
disable_devicons = false,
|
|
||||||
},
|
|
||||||
bookmarks = {
|
|
||||||
selected_browser = "brave",
|
|
||||||
url_open_command = "open",
|
|
||||||
},
|
|
||||||
lsp_handlers = {
|
|
||||||
disable = {},
|
|
||||||
location = {
|
|
||||||
telescope = {},
|
|
||||||
no_results_message = "No references found",
|
|
||||||
},
|
|
||||||
symbol = {
|
|
||||||
telescope = {},
|
|
||||||
no_results_message = "No symbols found",
|
|
||||||
},
|
|
||||||
call_hierarchy = {
|
|
||||||
telescope = {},
|
|
||||||
no_results_message = "No calls found",
|
|
||||||
},
|
|
||||||
code_action = {
|
|
||||||
telescope = require("telescope.themes").get_dropdown({}),
|
|
||||||
no_results_message = "No code actions available",
|
|
||||||
prefix = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/folke/todo-comments.nvim
|
|
||||||
require("todo-comments").setup()
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
-- https://github.com/akinsho/toggleterm.nvim
|
|
||||||
local toggleterm = require("toggleterm")
|
|
||||||
local Terminal = require("toggleterm.terminal").Terminal
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
-- Keymaps
|
|
||||||
vim.keymap.set("n", "<leader>ncdu", "<cmd>lua _NCDU_TOGGLE()<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>node", "<cmd>lua _NODE_TOGGLE()<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>top", "<cmd>lua _HTOP_TOGGLE()<CR>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>y", "<cmd>lua _PYTHON_TOGGLE()<CR>", opts)
|
|
||||||
|
|
||||||
toggleterm.setup({
|
|
||||||
size = 20,
|
|
||||||
open_mapping = [[<C-t>]],
|
|
||||||
hide_numbers = true,
|
|
||||||
shade_filetypes = {},
|
|
||||||
shade_terminals = true,
|
|
||||||
shading_factor = 2,
|
|
||||||
start_in_insert = true,
|
|
||||||
insert_mappings = true,
|
|
||||||
persist_size = true,
|
|
||||||
direction = "float",
|
|
||||||
close_on_exit = true,
|
|
||||||
shell = vim.o.shell,
|
|
||||||
float_opts = {
|
|
||||||
border = "curved",
|
|
||||||
winblend = 0,
|
|
||||||
highlights = {
|
|
||||||
border = "Normal",
|
|
||||||
background = "Normal",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
function _G.set_terminal_keymaps()
|
|
||||||
local opts = {
|
|
||||||
noremap = true,
|
|
||||||
}
|
|
||||||
local keymap = vim.api.nvim_buf_set_keymap
|
|
||||||
|
|
||||||
keymap(0, "t", "<esc>", [[<C-\><C-n>]], opts)
|
|
||||||
keymap(0, "t", "<C-h>", [[<C-\><C-n><C-W>h]], opts)
|
|
||||||
keymap(0, "t", "<C-j>", [[<C-\><C-n><C-W>j]], opts)
|
|
||||||
keymap(0, "t", "<C-k>", [[<C-\><C-n><C-W>k]], opts)
|
|
||||||
keymap(0, "t", "<C-l>", [[<C-\><C-n><C-W>l]], opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")
|
|
||||||
|
|
||||||
local tig = Terminal:new({ cmd = "tig", hidden = true })
|
|
||||||
local node = Terminal:new({ cmd = "node", hidden = true })
|
|
||||||
local ncdu = Terminal:new({ cmd = "ncdu", hidden = true })
|
|
||||||
local htop = Terminal:new({ cmd = "htop", hidden = true })
|
|
||||||
local python = Terminal:new({ cmd = "python", hidden = true })
|
|
||||||
|
|
||||||
function _TIG_TOGGLE()
|
|
||||||
tig:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
function _NODE_TOGGLE()
|
|
||||||
node:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
function _NCDU_TOGGLE()
|
|
||||||
ncdu:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
function _HTOP_TOGGLE()
|
|
||||||
htop:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
function _PYTHON_TOGGLE()
|
|
||||||
python:toggle()
|
|
||||||
end
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
-- https://github.com/xiyaowong/nvim-transparent
|
|
||||||
require("transparent").setup({
|
|
||||||
enable = true,
|
|
||||||
extra_groups = {
|
|
||||||
"BufferLineBackground",
|
|
||||||
"BufferLineBufferSelected",
|
|
||||||
"BufferLineBufferVisible",
|
|
||||||
"BufferLineCloseButton",
|
|
||||||
"BufferLineCloseButtonSelected",
|
|
||||||
"BufferLineCloseButtonVisible",
|
|
||||||
"BufferLineDiagnostic",
|
|
||||||
"BufferLineDiagnosticSelected",
|
|
||||||
"BufferLineDiagnosticVisible",
|
|
||||||
"BufferLineDuplicate",
|
|
||||||
"BufferLineDuplicateSelected",
|
|
||||||
"BufferLineDuplicateVisible",
|
|
||||||
"BufferLineError",
|
|
||||||
"BufferLineErrorDiagnostic",
|
|
||||||
"BufferLineErrorDiagnosticSelected",
|
|
||||||
"BufferLineErrorDiagnosticVisible",
|
|
||||||
"BufferLineErrorSelected",
|
|
||||||
"BufferLineErrorVisible",
|
|
||||||
"BufferLineFill",
|
|
||||||
"BufferLineHint",
|
|
||||||
"BufferLineHintDiagnostic",
|
|
||||||
"BufferLineHintDiagnosticSelected",
|
|
||||||
"BufferLineHintDiagnosticVisible",
|
|
||||||
"BufferLineHintSelected",
|
|
||||||
"BufferLineHintVisible",
|
|
||||||
"BufferLineIndicatorSelected",
|
|
||||||
"BufferLineIndicatorSelected",
|
|
||||||
"BufferLineInfo",
|
|
||||||
"BufferLineInfoDiagnostic",
|
|
||||||
"BufferLineInfoDiagnosticSelected",
|
|
||||||
"BufferLineInfoDiagnosticVisible",
|
|
||||||
"BufferLineInfoSelected",
|
|
||||||
"BufferLineInfoVisible",
|
|
||||||
"BufferLineModfied",
|
|
||||||
"BufferLineModfiedSelected",
|
|
||||||
"BufferLineModfiedVisible",
|
|
||||||
"BufferLineNumbers",
|
|
||||||
"BufferLineNumbersSelected",
|
|
||||||
"BufferLineNumbersVisible",
|
|
||||||
"BufferLinePick",
|
|
||||||
"BufferLinePickSelected",
|
|
||||||
"BufferLinePickVisible",
|
|
||||||
"BufferLineSeparator",
|
|
||||||
"BufferLineSeparatorSelected",
|
|
||||||
"BufferLineSeparatorVisible",
|
|
||||||
"BufferLineTabClose",
|
|
||||||
"BufferLineWarning",
|
|
||||||
"BufferLineWarningDiagnostic",
|
|
||||||
"BufferLineWarningDiagnosticSelected",
|
|
||||||
"BufferLineWarningDiagnosticVisible",
|
|
||||||
"BufferLineWarningSelected",
|
|
||||||
"BufferLineWarningVisible",
|
|
||||||
"BufferlineBufferSelected",
|
|
||||||
"BufferlineInactive",
|
|
||||||
"BufferlineTab",
|
|
||||||
"BufferlineTabSelected",
|
|
||||||
"BufferlineOffsetSeparator",
|
|
||||||
"FloatBorder",
|
|
||||||
"IndentBlanklineIndent1",
|
|
||||||
"Pmenu",
|
|
||||||
"IndentBlanklineIndent2",
|
|
||||||
"NvimTreeNormal",
|
|
||||||
"TelescopeNormal",
|
|
||||||
"TabLine",
|
|
||||||
"Normal",
|
|
||||||
"TelescopeBorder",
|
|
||||||
"FoldColumn",
|
|
||||||
"CursorLine",
|
|
||||||
"CursorWord",
|
|
||||||
"WhichKey",
|
|
||||||
"WhichKeyGroup",
|
|
||||||
"WhichKeySeparator",
|
|
||||||
"WhichKeyDesc",
|
|
||||||
"WhichKeyFloat",
|
|
||||||
"WhichKeyBorder",
|
|
||||||
"WhichKeyValue",
|
|
||||||
},
|
|
||||||
exclude = {}, -- table: groups you don't want to clear
|
|
||||||
})
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
-- https://github.com/nvim-treesitter/nvim-treesitter/
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
ensure_installed = "all",
|
|
||||||
sync_install = false,
|
|
||||||
ignore_install = { "" }, -- List of parsers to ignore installing
|
|
||||||
autopairs = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
highlight = {
|
|
||||||
enable = true, -- false will disable the whole extension
|
|
||||||
disable = { "" }, -- list of language that will be disabled
|
|
||||||
additional_vim_regex_highlighting = true,
|
|
||||||
},
|
|
||||||
indent = { enable = true, disable = { "yaml", "css" } },
|
|
||||||
context_commentstring = {
|
|
||||||
enable = true,
|
|
||||||
enable_autocmd = false,
|
|
||||||
},
|
|
||||||
rainbow = {
|
|
||||||
enable = true,
|
|
||||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
|
||||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
|
||||||
},
|
|
||||||
playground = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
-- https://github.com/kevinhwang91/nvim-ufo
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.o.foldcolumn = "1"
|
|
||||||
vim.o.foldlevel = 99
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.foldenable = true
|
|
||||||
|
|
||||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds, opts)
|
|
||||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds, opts)
|
|
||||||
|
|
||||||
require("ufo").setup()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- https://github.com/chrisgrieser/nvim-various-textobjs
|
|
||||||
require("various-textobjs").setup({
|
|
||||||
useDefaultKeymaps = true,
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- https://github.com/ruanyl/vim-gh-line
|
|
||||||
vim.g.gh_github_domain = "source.xing.com"
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
-- https://github.com/preservim/vimux
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.g.VimuxHeight = "30"
|
|
||||||
vim.g.VimuxOrientation = "h"
|
|
||||||
vim.g.VimuxUseNearestPane = 0
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>vt", [[<cmd>VimuxTogglePane<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>vp", [[<cmd>VimuxPromptCommand<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>vl", [[<cmd>VimuxRunLastCommand<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>vj", [[<cmd>RunJest<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>vjb", [[<cmd>RunJestOnBuffer<CR>]], opts)
|
|
||||||
vim.keymap.set("n", "<leader>vjf", [[<cmd>RunJestFocused<CR>]], opts)
|
|
||||||
@@ -1,240 +0,0 @@
|
|||||||
-- https://github.com/folke/which-key.nvim
|
|
||||||
local which_key = require("which-key")
|
|
||||||
|
|
||||||
local mappings = {
|
|
||||||
b = { "<CMD>Telescope buffers<CR>", "Buffers" },
|
|
||||||
c = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "Code Action" },
|
|
||||||
d = { "<CMD>TroubleToggle<CR>", "Diagnostics" },
|
|
||||||
e = { "<CMD>NvimTreeToggle<CR>", "Explorer" },
|
|
||||||
f = { "<CMD>Telescope current_buffer_fuzzy_find<CR>", "Find Files" },
|
|
||||||
h = { "<CMD>nohlsearch<CR>", "No Highlight" },
|
|
||||||
i = { "<CMD>silent !open -a iA\\ Writer.app '%:p'<CR>", "iA Writer" },
|
|
||||||
j = { "<CMD>b#<CR>", "Toggle Buffers" },
|
|
||||||
o = { "<CMD>SymbolsOutline<CR>", "Symbols Outline" },
|
|
||||||
p = { "<CMD>Telescope projects<CR>", "Projects" },
|
|
||||||
q = { "<CMD>Bdelete!<CR>", "Close Buffer" },
|
|
||||||
s = {
|
|
||||||
"<CMD>lua require('spectre').open_file_search()<CR>",
|
|
||||||
"Spectre",
|
|
||||||
},
|
|
||||||
t = { "<CMD>TodoTelescope<CR>", "Todo" },
|
|
||||||
v = { "<CMD>lua require('export-to-vscode').launch()<CR>", "Visual Studio Code" },
|
|
||||||
w = { "<CMD>w!<CR>", "Save" },
|
|
||||||
x = {
|
|
||||||
name = "Text Editing",
|
|
||||||
c = { "<CMD>call ToggleColorColumn()<CR>", "Show/Hide Colorcolumn" },
|
|
||||||
d = { "<CMD>call SpellEn()<CR>", "Set Spelling Language to English" },
|
|
||||||
e = { "<CMD>call SpellDe()<CR>", "Set Spelling Languate to German" },
|
|
||||||
l = { "<CMD>set list!<CR>", "List" },
|
|
||||||
m = { "<CMD>MarkdownPreviewToggle<CR>", "Markdown Preview" },
|
|
||||||
s = { "<CMD>set spell!<CR>", "Spell Checking" },
|
|
||||||
w = { "<CMD>call ToggleWrap()<CR>", "Soft wrap/No wrap" },
|
|
||||||
},
|
|
||||||
z = { "<CMD>ZenMode<CR>", "Zen Mode" },
|
|
||||||
A = { "<CMD>Alpha<CR>", "Alpha" },
|
|
||||||
B = {
|
|
||||||
name = "Bufferline",
|
|
||||||
p = { "<CMD>BufferLinePick<CR>", "Pick" },
|
|
||||||
x = { "<CMD>BufferLinePickClose<CR>", "Pick to Close" },
|
|
||||||
},
|
|
||||||
E = {
|
|
||||||
name = "Explorer",
|
|
||||||
a = { "<CMD>NvimTreeFocus<CR>", "Focus" },
|
|
||||||
c = { "<CMD>NvimTreeCollapse<CR>", "Collapse Folders" },
|
|
||||||
f = { "<CMD>NvimTreeFindFile<CR>", "Find File" },
|
|
||||||
r = { "<CMD>NvimTreeRefresh<CR>", "Refresh" },
|
|
||||||
},
|
|
||||||
F = { "<CMD>Telescope live_grep<CR>", "Find Text" },
|
|
||||||
G = {
|
|
||||||
name = "Git & GitHub",
|
|
||||||
b = { "<CMD>BlamerToggle<CR>", "Blame Line" },
|
|
||||||
g = { "<CMD>GBInteractive<CR>", "Git Blame in GitHub" },
|
|
||||||
h = { "<CMD>GHInteractive<CR>", "Open in GitHub" },
|
|
||||||
},
|
|
||||||
L = {
|
|
||||||
name = "LSP, FZF & Telescope",
|
|
||||||
L = {
|
|
||||||
name = "LSP",
|
|
||||||
a = { "<CMD>lua vim.lsp.buf.add_workspace_folder()<CR>", "Add Workspace" },
|
|
||||||
c = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "LSP Code Action" },
|
|
||||||
d = { "<Cmd>Telescope lsp_definitions<CR>", "LSP Definitions" },
|
|
||||||
l = { "<CMD>lua vim.diagnostic.setloclist<CR>", "Set Loclist" },
|
|
||||||
r = { "<Cmd>Telescope lsp_references<CR>", "LSP References" },
|
|
||||||
s = { "<Cmd>Telescope lsp_document_symbols<CR>", "LSP Document Symbols" },
|
|
||||||
t = { "<Cmd>Telescope lsp_type_definitions<CR>", "LSP Type Definition" },
|
|
||||||
v = { "<CMD>lua vim.lsp.buf.remove_workspace_folder()<CR>", "Remove Workspace" },
|
|
||||||
w = { "<Cmd>Telescope lsp_workspace_symbols<CR>", "LSP Live Workspace Symbols" },
|
|
||||||
},
|
|
||||||
F = {
|
|
||||||
name = "FZF",
|
|
||||||
b = { "<Cmd>FzfLua blines<CR>", "Bufferlines" },
|
|
||||||
f = { "<Cmd>FzfLua files<CR>", "Files" },
|
|
||||||
h = { "<Cmd>FzfLua oldfiles<CR>", "Open Files History" },
|
|
||||||
i = { "<Cmd>FzfLua spell_suggest<CR>", "Spelling Suggestions" },
|
|
||||||
m = { "<Cmd>FzfLua marks<CR>", "Marks" },
|
|
||||||
o = { "<Cmd>FzfLua lines<CR>", "Open Buffer Lines" },
|
|
||||||
q = { "<Cmd>FzfLua quickfix<CR>", "Quickfix" },
|
|
||||||
r = { "<Cmd>FzfLua resume<CR>", "Resume last command" },
|
|
||||||
t = { "<Cmd>FzfLua tabs<CR>", "Tabs" },
|
|
||||||
g = {
|
|
||||||
name = "Git",
|
|
||||||
b = { "<Cmd>FzfLua git_branches<CR>", "Git Branches" },
|
|
||||||
c = { "<Cmd>FzfLua git_commits<CR>", "Git Commits" },
|
|
||||||
s = { "<Cmd>FzfLua git_stash<CR>", "Git Stashes" },
|
|
||||||
t = { "<Cmd>FzfLua git_status<CR>", "Git Status" },
|
|
||||||
},
|
|
||||||
s = {
|
|
||||||
name = "Search",
|
|
||||||
s = { "<Cmd>FzfLua grep<CR>", "Grep Search" },
|
|
||||||
i = { "<Cmd>FzfLua live_grep<CR>", "Live Grep" },
|
|
||||||
l = { "<Cmd>FzfLua grep_last<CR>", "Last Grep Search" },
|
|
||||||
r = { "<Cmd>FzfLua live_grep_resume<CR>", "Resume Last Search" },
|
|
||||||
c = { "<Cmd>FzfLua grep_cword<CR>", "Search Word Under Cursor" },
|
|
||||||
v = { "<Cmd>FzfLua grep_visual<CR>", "Search Visual Selection" },
|
|
||||||
p = { "<Cmd>FzfLua grep_project<CR>", "Grep Search in Project" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
T = {
|
|
||||||
name = "Telescope",
|
|
||||||
b = { "<Cmd>Telescope bookmarks<CR>", "Browser Bookmarks" },
|
|
||||||
f = {
|
|
||||||
name = "Find",
|
|
||||||
s = { "<Cmd>Telescope find_files<CR>", "Find Files" },
|
|
||||||
a = { "<Cmd>Telescope find_files hidden=true<CR>", "Find all files" },
|
|
||||||
f = { "<Cmd>Telescope file_browser<CR>", "File Browser" },
|
|
||||||
l = { "<Cmd>Telescope live_grep<CR>", "Live Grep" },
|
|
||||||
},
|
|
||||||
g = {
|
|
||||||
name = "Git",
|
|
||||||
b = { "<Cmd>Telescope git_branches<CR>", "Git Branches" },
|
|
||||||
s = { "<Cmd>Telescope git_status<CR>", "Git Status" },
|
|
||||||
},
|
|
||||||
h = { "<Cmd>Telescope help_tags<CR>", "Help Tags" },
|
|
||||||
k = { "<Cmd>Telescope keymaps<CR>", "Keymaps" },
|
|
||||||
m = { "<Cmd>Telescope marks<CR>", "Marks" },
|
|
||||||
n = { "<Cmd>Telescope node_modules list<CR>", "Node Modules" },
|
|
||||||
p = { "<CMD>Telescope projects<CR>", "Projects" },
|
|
||||||
r = { "<Cmd>Telescope resume<CR>", "Resume last search" },
|
|
||||||
t = { "<Cmd>Telescope tags<CR>", "Tags" },
|
|
||||||
u = { "<Cmd>Telescope frecency<CR>", "MRU (Frequency)" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
P = { "<CMD>Prettier<CR>", "Format with Prettier" },
|
|
||||||
Q = { "<CMD>q!<CR>", "Quit" },
|
|
||||||
R = { "<CMD>lua vim.lsp.buf.rename()<CR>", "Rename" },
|
|
||||||
S = { "<CMD>lua require('spectre').open_visual({select_word=true})<CR>", "Spectre Current Word" },
|
|
||||||
T = {
|
|
||||||
name = "Terminal",
|
|
||||||
f = { "<CMD>ToggleTerm direction=float<CR>", "Float" },
|
|
||||||
g = { "<CMD>lua _TIG_TOGGLE()<CR>", "TIG" },
|
|
||||||
h = { "<CMD>ToggleTerm size=10 direction=horizontal<CR>", "Horizontal" },
|
|
||||||
l = { "<CMD>lua _LAZYGIT_TOGGLE()<CR>", "LazyGit" },
|
|
||||||
n = { "<CMD>lua _NODE plugin_TOGGLE()<CR>", "Node" },
|
|
||||||
p = { "<CMD>lua _PYTHON_TOGGLE()<CR>", "Python" },
|
|
||||||
t = { "<CMD>lua _HTOP_TOGGLE()<CR>", "Htop" },
|
|
||||||
u = { "<CMD>lua _NCDU_TOGGLE()<CR>", "NCDU" },
|
|
||||||
v = { "<CMD>ToggleTerm size=80 direction=vertical<CR>", "Vertical" },
|
|
||||||
},
|
|
||||||
V = {
|
|
||||||
name = "Vimux",
|
|
||||||
p = { "<CMD>VimuxPromptCommand<CR>", "Run Prompt Command" },
|
|
||||||
l = { "<CMD>VimuxRunLastCommand<CR>", "Run Last Command" },
|
|
||||||
t = { "<CMD>VimuxTogglePane<CR>", "Toggle Pane" },
|
|
||||||
j = { "<CMD>RunJest<CR>", "Run Jest" },
|
|
||||||
b = { "<CMD>RunJestOnBuffer<CR>", "Run Jest on Buffer" },
|
|
||||||
f = { "<CMD>RunJestFocused<CR>", "Run Jest on Focused" },
|
|
||||||
},
|
|
||||||
W = { "<CMD>wa!<CR>", "Save All" },
|
|
||||||
}
|
|
||||||
|
|
||||||
local setup = {
|
|
||||||
plugins = {
|
|
||||||
marks = true, -- shows a list of your marks on ' and `
|
|
||||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
|
||||||
spelling = {
|
|
||||||
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
|
||||||
suggestions = 20, -- how many suggestions should be shown in the list?
|
|
||||||
},
|
|
||||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
|
||||||
-- No actual key bindings are created
|
|
||||||
presets = {
|
|
||||||
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
|
|
||||||
motions = true, -- adds help for motions
|
|
||||||
text_objects = true, -- help for text objects triggered after entering an operator
|
|
||||||
windows = true, -- default bindings on <c-w>
|
|
||||||
nav = true, -- misc bindings to work with windows
|
|
||||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
|
||||||
g = true, -- bindings for prefixed with g
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- add operators that will trigger motion and text object completion
|
|
||||||
-- to enable all native operators, set the preset / operators plugin above
|
|
||||||
-- operators = { gc = "Comments" },
|
|
||||||
key_labels = {
|
|
||||||
-- override the label used to display some keys. It doesn’t effect WK in any other way.
|
|
||||||
-- For example:
|
|
||||||
-- ["<space>"] = "SPC",
|
|
||||||
-- ["<CR>"] = "RET",
|
|
||||||
-- ["<tab>"] = "TAB",
|
|
||||||
},
|
|
||||||
icons = {
|
|
||||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
|
||||||
separator = "➜", -- symbol used between a key and it’s label
|
|
||||||
group = "+", -- symbol prepended to a group
|
|
||||||
},
|
|
||||||
popup_mappings = {
|
|
||||||
scroll_down = "<c-d>", -- binding to scroll down inside the popup
|
|
||||||
scroll_up = "<c-u>", -- binding to scroll up inside the popup
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
border = "rounded", -- none, single, double, shadow
|
|
||||||
position = "bottom", -- bottom, top
|
|
||||||
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
|
|
||||||
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
|
|
||||||
winblend = 0,
|
|
||||||
},
|
|
||||||
layout = {
|
|
||||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
|
||||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
|
||||||
spacing = 3, -- spacing between columns
|
|
||||||
align = "left", -- align columns left, center or right
|
|
||||||
},
|
|
||||||
ignore_missing = true, -- enable this to hide mappings for which you didn’t specify a label
|
|
||||||
hidden = { "<silent>", "<CMD>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
|
|
||||||
show_help = true, -- show help message on the command line when the popup is visible
|
|
||||||
triggers = "auto", -- automatically setup triggers
|
|
||||||
-- triggers = {"<leader>"} -- or specify a list manually
|
|
||||||
triggers_blacklist = {
|
|
||||||
-- list of mode / prefixes that should never be hooked by WhichKey
|
|
||||||
-- this is mostly relevant for key maps that start with a native binding
|
|
||||||
-- most people should not need to change this
|
|
||||||
i = { "j", "k" },
|
|
||||||
v = { "j", "k" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
mode = "n", -- NORMAL mode
|
|
||||||
prefix = "<leader>",
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = true, -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
local vopts = {
|
|
||||||
mode = "v", -- VISUAL mode
|
|
||||||
prefix = "<leader>",
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = true, -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
local vmappings = {
|
|
||||||
["/"] = { '<ESC><CMD>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<CR>', "Comment" },
|
|
||||||
}
|
|
||||||
|
|
||||||
which_key.setup(setup)
|
|
||||||
which_key.register(mappings, opts)
|
|
||||||
which_key.register(vmappings, vopts)
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
-- https://github.com/folke/zen-mode.nvim
|
|
||||||
require("zen-mode").setup({
|
|
||||||
window = {
|
|
||||||
backdrop = 0.98,
|
|
||||||
width = 80,
|
|
||||||
height = 0.85,
|
|
||||||
options = {
|
|
||||||
signcolumn = "no", -- disable signcolumn
|
|
||||||
number = false, -- disable number column
|
|
||||||
relativenumber = false, -- disable relative numbers
|
|
||||||
cursorline = false, -- disable cursorline
|
|
||||||
cursorcolumn = false, -- disable cursor column
|
|
||||||
foldcolumn = "0", -- disable fold column
|
|
||||||
list = false, -- disable whitespace characters
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins = {
|
|
||||||
options = {
|
|
||||||
enabled = true,
|
|
||||||
ruler = true, -- disables the ruler text in the cmd line area
|
|
||||||
showcmd = false, -- disables the command in the last line of the screen
|
|
||||||
},
|
|
||||||
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
|
||||||
gitsigns = { enabled = false }, -- disables git signs
|
|
||||||
tmux = { enabled = false }, -- disables the tmux statusline
|
|
||||||
kitty = {
|
|
||||||
enabled = true,
|
|
||||||
font = "+2", -- font size increment
|
|
||||||
},
|
|
||||||
},
|
|
||||||
on_open = function()
|
|
||||||
vim.cmd([[:IndentBlanklineDisable]])
|
|
||||||
end,
|
|
||||||
on_close = function()
|
|
||||||
vim.cmd([[:IndentBlanklineEnable]])
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
require("kogakure.options")
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
require("kogakure.keymaps")
|
require("config.lazy")
|
||||||
require("kogakure.functions")
|
|
||||||
require("kogakure.autocommands")
|
|
||||||
require("kogakure.plugins")
|
|
||||||
require("kogakure.lsp")
|
|
||||||
require("kogakure.colorscheme")
|
|
||||||
|
|
||||||
require("kogakure/text-objects").basic_text_objects()
|
-- Custom Highlight
|
||||||
|
vim.api.nvim_set_hl(0, "WinSeparator", { fg = "#1F2334" })
|
||||||
|
|||||||
@@ -1,142 +1,115 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" },
|
"LazyVim": { "branch": "main", "commit": "24cb9a90e529279dd4da84e7262a6c434e733b72" },
|
||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" },
|
"LuaSnip": { "branch": "master", "commit": "9bff06b570df29434a88f9c6a9cea3b21ca17208" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" },
|
"SchemaStore.nvim": { "branch": "main", "commit": "b37874a63ceac681a15b83d5c8e67f58fe571341" },
|
||||||
"VisIncr": { "branch": "master", "commit": "13e8538cf332fd131ebb60422b4a01d69078794b" },
|
"alpha-nvim": { "branch": "main", "commit": "0349fc0aa0c1d940ec3be395cb110483b416bc84" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" },
|
|
||||||
"baleia.nvim": { "branch": "main", "commit": "8ba437c2da2c917529e1c3952412a2780cecf6c6" },
|
"baleia.nvim": { "branch": "main", "commit": "8ba437c2da2c917529e1c3952412a2780cecf6c6" },
|
||||||
"base16-vim": { "branch": "master", "commit": "3be3cd82cd31acfcab9a41bad853d9c68d30478d" },
|
"base16-vim": { "branch": "master", "commit": "3be3cd82cd31acfcab9a41bad853d9c68d30478d" },
|
||||||
"blamer.nvim": { "branch": "master", "commit": "f4eb22a9013642c411725fdda945ae45f8d93181" },
|
"blamer.nvim": { "branch": "master", "commit": "f4eb22a9013642c411725fdda945ae45f8d93181" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "c7492a76ce8218e3335f027af44930576b561013" },
|
"bufferline.nvim": { "branch": "main", "commit": "c7492a76ce8218e3335f027af44930576b561013" },
|
||||||
"catppuccin": { "branch": "main", "commit": "8769e767f12f5bf0b7d1250ee067088e7054809a" },
|
"catppuccin": { "branch": "main", "commit": "c5ed88194ae1d581d3083725a0dc7c90dd3446be" },
|
||||||
"chafa.nvim": { "branch": "main", "commit": "792c8f4f0e86b5e27c3602be4614f886f3a12a5a" },
|
"chafa.nvim": { "branch": "main", "commit": "792c8f4f0e86b5e27c3602be4614f886f3a12a5a" },
|
||||||
"cheat.sh-vim": { "branch": "master", "commit": "e0fe468d872025477462ac5d96432f5c1aee3a0d" },
|
|
||||||
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
|
||||||
"cmp-copilot": { "branch": "main", "commit": "1f3f31c54bd71e41ed157430702bc2837ea582ab" },
|
|
||||||
"cmp-dictionary": { "branch": "main", "commit": "8b5acfbc79eea0bfe2c08ffeb8f137f13449ab56" },
|
|
||||||
"cmp-npm": { "branch": "main", "commit": "4b6166c3feeaf8dae162e33ee319dc5880e44a29" },
|
"cmp-npm": { "branch": "main", "commit": "4b6166c3feeaf8dae162e33ee319dc5880e44a29" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "60f2bef098299ede079638eaad645faf87737a3a" },
|
|
||||||
"codewindow.nvim": { "branch": "master", "commit": "94d84e1a15b94248f205b854e70cb95f0b615b38" },
|
"codewindow.nvim": { "branch": "master", "commit": "94d84e1a15b94248f205b854e70cb95f0b615b38" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "c7d166ebda265370f38cec374e33f02eeec2f857" },
|
"committia.vim": { "branch": "master", "commit": "0b4df1a7f48ffbc23b009bd14d58ee1be541917c" },
|
||||||
"diagnosticls-configs-nvim": { "branch": "main", "commit": "c1c243cf8b98d0dd2d57f55f35c84adfc7509005" },
|
"copilot-cmp": { "branch": "master", "commit": "b732a58ac8b7287b981cd9f0d9c0f61e5e9d5760" },
|
||||||
|
"copilot.lua": { "branch": "master", "commit": "a54e7b11a2c6efc9ddd3f42e56cf7d9eed1a9683" },
|
||||||
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
||||||
"dir-telescope.nvim": { "branch": "main", "commit": "4189a781397a973496b14a9db26b80b7fd764cbc" },
|
"diffview.nvim": { "branch": "main", "commit": "11827d46e939b4748dbdb7e0df4982a63bd59d26" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
"dressing.nvim": { "branch": "master", "commit": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe" },
|
||||||
"editorconfig-vim": { "branch": "master", "commit": "ee6e91ca09d59043d365bd96a32e989bd75abe84" },
|
"editorconfig-vim": { "branch": "master", "commit": "1d54632f7fcad38df8e428f349bc58b15af4b206" },
|
||||||
"emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" },
|
"emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" },
|
||||||
"export-to-vscode.nvim": { "branch": "main", "commit": "7746bb67d03f6a6891cdedc8c760c95a5714fe8c" },
|
"export-to-vscode.nvim": { "branch": "main", "commit": "7746bb67d03f6a6891cdedc8c760c95a5714fe8c" },
|
||||||
"file-line": { "branch": "main", "commit": "559088afaf10124ea663ee0f4f73b1de48fb1632" },
|
"flit.nvim": { "branch": "main", "commit": "be110f9814a45788d10537fd59b3c76d956bb7ad" },
|
||||||
"fm-nvim": { "branch": "master", "commit": "8e6a77049330e7c797eb9e63affd75eb796fe75e" },
|
"fm-nvim": { "branch": "master", "commit": "8e6a77049330e7c797eb9e63affd75eb796fe75e" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" },
|
"friendly-snippets": { "branch": "main", "commit": "80597f3ea824946c87fd29f82b5ed4f24ef473f3" },
|
||||||
"fzf": { "branch": "master", "commit": "f7447aece12f9b95133b803d5c4f71815bee8ca6" },
|
"gitsigns.nvim": { "branch": "main", "commit": "f29f0b22fd66c910b892aae3bc18a4872c002738" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "5ad5771eb77d233ec7a4352240d2780dde8034d1" },
|
|
||||||
"git-worktree.nvim": { "branch": "master", "commit": "d7f4e2584e81670154f07ca9fa5dd791d9c1b458" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" },
|
|
||||||
"glance.nvim": { "branch": "master", "commit": "3b7fbbe4e785bedbdaa1a9573dcd800261a7e32b" },
|
|
||||||
"guihua.lua": { "branch": "master", "commit": "da889f7da0185471c67429f258dab366bf081688" },
|
|
||||||
"harpoon": { "branch": "master", "commit": "8c0bb0a328e57278f4783bb0e2ea32f296d36db1" },
|
"harpoon": { "branch": "master", "commit": "8c0bb0a328e57278f4783bb0e2ea32f296d36db1" },
|
||||||
"impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" },
|
||||||
"jupyter_ascending.vim": { "branch": "master", "commit": "8b0f533fbf7f48d12feddedc10b78c53afa41bc2" },
|
"lazy.nvim": { "branch": "main", "commit": "d13fe9353594bce58a5b9fc6d7166d183e0fc035" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "3d2dcb2d5ef99106c5ff412da88c6f59a9f8a693" },
|
"leap.nvim": { "branch": "main", "commit": "35eb6b9518392e0ed83214c3b4a08f59929b0716" },
|
||||||
"legendary.nvim": { "branch": "master", "commit": "3008ed68c8f309ced07587684c8af53884791d35" },
|
"legendary.nvim": { "branch": "master", "commit": "3008ed68c8f309ced07587684c8af53884791d35" },
|
||||||
|
"lf.nvim": { "branch": "master", "commit": "383429497292dd8a84271e74a81c6db6993ca7ab" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||||
"lush.nvim": { "branch": "main", "commit": "b1e8eb1da3fee95ef31515a73c9eff9bf251088d" },
|
"lush.nvim": { "branch": "main", "commit": "b1e8eb1da3fee95ef31515a73c9eff9bf251088d" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "53f3a8bdcb77d4a95b082fd57e12173f353c6c3e" },
|
"mason.nvim": { "branch": "main", "commit": "14ae1ca58440b158a0a35cf90773013caddf788a" },
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "13c6ab4a4f810cbbb1799a9cf4d4a27fd862d885" },
|
"mini.ai": { "branch": "main", "commit": "2188cb1be3e9133fb1fe52374705b94630492401" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "dc48faeeb6fcd5834fd3f7a78d5e760f30ef6b00" },
|
"mini.animate": { "branch": "main", "commit": "54002f54e2bb61f4834bd5442a19ddc4fa2e4ac0" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "8e007cf3ae8db59bd926a9fbaf7f0d25a7fe67ca" },
|
"mini.bufremove": { "branch": "main", "commit": "5823104665ec3394c379c7cee790bd7b4798a94b" },
|
||||||
"nlsp-settings.nvim": { "branch": "main", "commit": "5541d073b93a404445907e0aec3ebd9cf8914e53" },
|
"mini.comment": { "branch": "main", "commit": "de539cac52a8df702758c6a026b63323130be596" },
|
||||||
|
"mini.indentscope": { "branch": "main", "commit": "cbabbf3be4a59c7f23725b74ed15e0fba951e328" },
|
||||||
|
"mini.pairs": { "branch": "main", "commit": "50f07af5e47a67e74ec1a9b25bfb2eec93783d44" },
|
||||||
|
"mini.surround": { "branch": "main", "commit": "4613a60d87fa2d5b718be44283387cfc0446051f" },
|
||||||
|
"neo-tree.nvim": { "branch": "v2.x", "commit": "8238865e1d9c61f1a260c290653f2c419503e0a9" },
|
||||||
|
"neoconf.nvim": { "branch": "main", "commit": "f67013cf18d9db5cc6c3ce2d5a4051bad75fe628" },
|
||||||
|
"neodev.nvim": { "branch": "main", "commit": "bb70e41640238b989bb6c2f94802851ff260f68d" },
|
||||||
"noctis.nvim": { "branch": "main", "commit": "0b9336e39c686a7e58de06e4dd38c2bd862a7b33" },
|
"noctis.nvim": { "branch": "main", "commit": "0b9336e39c686a7e58de06e4dd38c2bd862a7b33" },
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "8f5d730021497233c39d3adbf4b8043d4be163f8" },
|
"noice.nvim": { "branch": "main", "commit": "d8a1f3056ad713b5d471048f8d029264828e22c0" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "5a3523ddb573804752de6c021c5cb82e267b79ca" },
|
"nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" },
|
||||||
"nvim-bqf": { "branch": "main", "commit": "da1cd2557a16386829a213330e0fd46b61db7632" },
|
"null-ls.nvim": { "branch": "main", "commit": "60b4a7167c79c7d04d1ff48b55f2235bf58158a7" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b" },
|
"nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" },
|
||||||
|
"nvim-code-action-menu": { "branch": "main", "commit": "e4399dbaf6eabff998d3d5f1cbcd8d9933710027" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||||
"nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" },
|
"nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "0e376f00e7fac143e29e1017d2ac2cc3df13d185" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b5bb6e3d7c775c241726d1ef564902263e93e2cd" },
|
||||||
"nvim-lightbulb": { "branch": "master", "commit": "56b9ce31ec9d09d560fe8787c0920f76bc208297" },
|
"nvim-navic": { "branch": "master", "commit": "7e9d2b2b601149fecdccd11b516acb721e571fe6" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8" },
|
"nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "11e08391eeed00effa85ca24ff9d1e0472cbcd6a" },
|
"nvim-spectre": { "branch": "master", "commit": "1d8b7a40677fd87da7648d246c4675c3612a7582" },
|
||||||
"nvim-spectre": { "branch": "master", "commit": "24275beae382e6bd0180b3064cf5729548641a02" },
|
|
||||||
"nvim-surround": { "branch": "main", "commit": "ad56e6234bf42fb7f7e4dccc7752e25abd5ec80e" },
|
|
||||||
"nvim-transparent": { "branch": "main", "commit": "6816751e3d595b3209aa475a83b6fbaa3a5ccc98" },
|
"nvim-transparent": { "branch": "main", "commit": "6816751e3d595b3209aa475a83b6fbaa3a5ccc98" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "215b29bfad74518442621b9d0483a621483b066b" },
|
"nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "588cdb6c0652356dacc7d29bb4bb2b273df2df86" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "420cbfea10b93d6b38c72c5a6c8f9fee3dca80c9" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "249d90a84df63f3ffff65fcc06a45d58415672de" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
||||||
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
"nvim-various-textobjs": { "branch": "main", "commit": "521a9845a7ab241ce919068138d31253418d2dae" },
|
||||||
"nvim-ufo": { "branch": "main", "commit": "b70c9ef0f8e2673a11387a39185ff249e00df19f" },
|
"nvim-web-devicons": { "branch": "master", "commit": "ade34ca7d19543904b28b903e606be8930fb9ee3" },
|
||||||
"nvim-various-textobjs": { "branch": "main", "commit": "a5c8ca4d274fc1b159e3340c2b187da6e8ca28c9" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" },
|
|
||||||
"octo.nvim": { "branch": "master", "commit": "7900dc0cd37e7bb5d4175a37c9c4c3dfb94a1f7b" },
|
"octo.nvim": { "branch": "master", "commit": "7900dc0cd37e7bb5d4175a37c9c4c3dfb94a1f7b" },
|
||||||
|
"persistence.nvim": { "branch": "main", "commit": "d8a3eda0e19b4d5f3180fc832c25baab1709f2a1" },
|
||||||
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" },
|
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
|
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
|
||||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
"prettier.nvim": { "branch": "main", "commit": "918b99f5ddd7a56395fd393767ab6a3c15a50789" },
|
"prettier.nvim": { "branch": "main", "commit": "918b99f5ddd7a56395fd393767ab6a3c15a50789" },
|
||||||
"project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" },
|
"project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" },
|
||||||
"promise-async": { "branch": "main", "commit": "7fa127fa80e7d4d447e0e2c78e99af4355f4247b" },
|
|
||||||
"rainbow_csv": { "branch": "master", "commit": "7453a3f9679f0c753ec9d77f9ea8588778f35aeb" },
|
"rainbow_csv": { "branch": "master", "commit": "7453a3f9679f0c753ec9d77f9ea8588778f35aeb" },
|
||||||
"sad.nvim": { "branch": "master", "commit": "1cdf3f25589dc92854913004443ba0e53bd103ad" },
|
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "fdd158ce7554dc830fb86e0fe952cd9476cdf726" },
|
"smart-splits.nvim": { "branch": "master", "commit": "fdd158ce7554dc830fb86e0fe952cd9476cdf726" },
|
||||||
"sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" },
|
"sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" },
|
||||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||||
|
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "67772de1e1301b2d4f915adf7a4de717daf0ad3e" },
|
||||||
"telescope-bookmarks.nvim": { "branch": "main", "commit": "2a7b848cfce1b944da2470bb1979e10877e865e5" },
|
"telescope-bookmarks.nvim": { "branch": "main", "commit": "2a7b848cfce1b944da2470bb1979e10877e865e5" },
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" },
|
||||||
"telescope-frecency.nvim": { "branch": "master", "commit": "62cbd4e7f55fb6de2b8081087ce97026022ffcd2" },
|
"telescope-frecency.nvim": { "branch": "master", "commit": "62cbd4e7f55fb6de2b8081087ce97026022ffcd2" },
|
||||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||||
"telescope-github.nvim": { "branch": "master", "commit": "ee95c509901c3357679e9f2f9eaac3561c811736" },
|
"telescope-github.nvim": { "branch": "master", "commit": "ee95c509901c3357679e9f2f9eaac3561c811736" },
|
||||||
"telescope-heading.nvim": { "branch": "main", "commit": "b1969c1b1b3de52c45b4c440e0784c33b5814954" },
|
"telescope-heading.nvim": { "branch": "main", "commit": "b1969c1b1b3de52c45b4c440e0784c33b5814954" },
|
||||||
"telescope-lsp-handlers.nvim": { "branch": "trunk", "commit": "d6d5983b0131ee2c386ca9e349f6621e12d971cb" },
|
|
||||||
"telescope-node-modules.nvim": { "branch": "main", "commit": "b846d33ff5763176dc14fc74c30941a2067c82fd" },
|
"telescope-node-modules.nvim": { "branch": "main", "commit": "b846d33ff5763176dc14fc74c30941a2067c82fd" },
|
||||||
"telescope-symbols.nvim": { "branch": "master", "commit": "f7d7c84873c95c7bd5682783dd66f84170231704" },
|
|
||||||
"telescope-undo.nvim": { "branch": "main", "commit": "b5e31b358095074b60d87690bd1dc0a020a2afab" },
|
"telescope-undo.nvim": { "branch": "main", "commit": "b5e31b358095074b60d87690bd1dc0a020a2afab" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
|
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "74c7d28cb50b0713c881ef69bcb6cdd77d8907d1" },
|
"todo-comments.nvim": { "branch": "main", "commit": "74c7d28cb50b0713c881ef69bcb6cdd77d8907d1" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
|
"toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "affb21a81e6d7de073378eb86d02864c594104d9" },
|
"tokyonight.nvim": { "branch": "main", "commit": "a0abe53df53616d13da327636cb0bcac3ea7f5af" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "490f7fe6d227f4f7a64f00be8c7dcd7a508ed271" },
|
"trouble.nvim": { "branch": "main", "commit": "fc003424b02109f1453af6b40dadff6019b97187" },
|
||||||
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" },
|
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" },
|
||||||
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
|
"typescript.nvim": { "branch": "main", "commit": "f66d4472606cb24615dfb7dbc6557e779d177624" },
|
||||||
"vim-abolish": { "branch": "master", "commit": "d55c90d6c9995ccb79d2152564a4939cd84d73e9" },
|
"vim-abolish": { "branch": "master", "commit": "d55c90d6c9995ccb79d2152564a4939cd84d73e9" },
|
||||||
"vim-astro": { "branch": "main", "commit": "34732be5e9a5c28c2409f4490edf92d46d8b55a9" },
|
"vim-astro": { "branch": "main", "commit": "34732be5e9a5c28c2409f4490edf92d46d8b55a9" },
|
||||||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
|
|
||||||
"vim-bookmarks": { "branch": "master", "commit": "9cc5fa7ecc23b052bd524d07c85356c64b92aeef" },
|
"vim-bookmarks": { "branch": "master", "commit": "9cc5fa7ecc23b052bd524d07c85356c64b92aeef" },
|
||||||
"vim-easymotion": { "branch": "master", "commit": "b3cfab2a6302b3b39f53d9fd2cd997e1127d7878" },
|
|
||||||
"vim-eunuch": { "branch": "master", "commit": "291ef1f8c8996ca7715df1032a35a27b12d7b5cf" },
|
|
||||||
"vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "2febbe1f00be04f16daa6464cb39214a8566ec4b" },
|
|
||||||
"vim-gh-line": { "branch": "master", "commit": "fbf368bdfad7e5478009a6dc62559e6b2c72d603" },
|
"vim-gh-line": { "branch": "master", "commit": "fbf368bdfad7e5478009a6dc62559e6b2c72d603" },
|
||||||
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
|
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
|
||||||
"vim-matchup": { "branch": "master", "commit": "959e0e79ea240cdee29efbdd0d2e2e718931ccec" },
|
"vim-illuminate": { "branch": "master", "commit": "49062ab1dd8fec91833a69f0a1344223dd59d643" },
|
||||||
"vim-polyglot": { "branch": "master", "commit": "bc8a81d3592dab86334f27d1d43c080ebf680d42" },
|
"vim-mundo": { "branch": "master", "commit": "b53d35fb5ca9923302b9ef29e618ab2db4cc675e" },
|
||||||
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||||
|
"vim-startuptime": { "branch": "master", "commit": "6580cf539c33a212f4f5542068a3b4dd2b3ad834" },
|
||||||
"vim-table-mode": { "branch": "master", "commit": "9555a3e6e5bcf285ec181b7fc983eea90500feb4" },
|
"vim-table-mode": { "branch": "master", "commit": "9555a3e6e5bcf285ec181b7fc983eea90500feb4" },
|
||||||
"vim-textobj-comment": { "branch": "master", "commit": "58ae4571b76a5bf74850698f23d235eef991dd4b" },
|
|
||||||
"vim-textobj-datetime": { "branch": "master", "commit": "be2db6717e91bd14b99ab364ea09347903a6dce4" },
|
|
||||||
"vim-textobj-indent": { "branch": "master", "commit": "deb76867c302f933c8f21753806cbf2d8461b548" },
|
|
||||||
"vim-textobj-uri": { "branch": "master", "commit": "867eaff298d020881766508948da4a19faca554d" },
|
|
||||||
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
|
||||||
"vim-textobj-xmlattr": { "branch": "master", "commit": "694a297f1d75fd527e87da9769f3c6519a87ebb1" },
|
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
|
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
|
||||||
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" },
|
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" },
|
||||||
"vim-wakatime": { "branch": "master", "commit": "b67957731086466ed5d967cd1dac7f6981603156" },
|
"vim-wakatime": { "branch": "master", "commit": "ee4ab57adf62a309aeef383a2da23b6e48e5ae50" },
|
||||||
"vim-xtract": { "branch": "master", "commit": "65e47be935080f112f219b5f0bc1bf411c783f27" },
|
"vim-xtract": { "branch": "master", "commit": "65e47be935080f112f219b5f0bc1bf411c783f27" },
|
||||||
"vimux": { "branch": "master", "commit": "616fcb4799674a7a809b14ca2dc155bb6ba25788" },
|
"vimux": { "branch": "master", "commit": "616fcb4799674a7a809b14ca2dc155bb6ba25788" },
|
||||||
"vimux-cargo": { "branch": "main", "commit": "ca2d99573d367a59f77f4e6d0b45e7e94a461769" },
|
|
||||||
"vimux-jest-test": { "branch": "master", "commit": "30fdc7935610adc000d9965d4031d73d11747256" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "2c8f9f3758a4c430ff867e547741424ac16208bb" },
|
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" }
|
||||||
"zoxide.vim": { "branch": "master", "commit": "f247421ca0c1934b8bb29abe06d334f0adc93d14" }
|
|
||||||
}
|
}
|
||||||
46
nvim/lua/config/autocmds.lua
Normal file
46
nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
-- Add any additional autocmds here
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = { "*tmux.conf" },
|
||||||
|
command = "execute 'silent !tmux source <afile> --silent'",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = { ".yabairc" },
|
||||||
|
command = "!brew services restart yabai",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = { ".skhdrc" },
|
||||||
|
command = "!brew services restart skhd",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufFilePre", "BufRead" }, {
|
||||||
|
pattern = { "*.mdx", "*.md" },
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[set filetype=markdown wrap linebreak nolist]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
||||||
|
pattern = { "gitmux.conf" },
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[set filetype=sh]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||||
|
pattern = { "*" },
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[tabdo wincmd =]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||||
|
pattern = { "*.rss" },
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[set filetype=xml]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
34
nvim/lua/config/keymaps.lua
Normal file
34
nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
||||||
|
vim.keymap.set("n", "<leader>j", ":b#<CR>", { desc = "Toggle between buffers", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", ";;", "A;<ESC>", { desc = "Add semicolon to the end of the line", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", ",,", "A,<ESC>", { desc = "Add comma to the end of the line", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("v", "y", "myy`y", { desc = "Maintain the cursor position when yanking a visual selection", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "+", "<C-a>", { desc = "Increment", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "-", "<C-x>", { desc = "Decrement", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "<leader>bx", ":bufdo bdelete<CR>", { desc = "Delete all buffers", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "<leader>ut", ":set list!<CR>", { desc = "Toggle list", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "Y", "yg$", { desc = "Copy to the end of the line", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("n", "n", "nzzzv", { desc = "Keep the window centered (next search result)", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv", { desc = "Keep the window centered (previous search result)", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("n", "<expr> j", "(v:count == 0 ? 'gj' : 'j')", { desc = "Move by rows in wrapped mode (down)", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("n", "<expr> k", "(v:count == 0 ? 'gk' : 'k')", { desc = "Move by rows in wrapped mode (up)", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "gP", "`[v`]", { desc = "Visuall select of just pasted content", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n", "gy", "`[v`]y", { desc = "Visuall select of just pasted content", noremap = true, silent = true })
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set("n", "<leader>wi", ":silent !open -a iA\\ Writer.app '%:p'<CR>", { desc = "Open in iA Writer", noremap = true, silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", require("smart-splits").move_cursor_left)
|
||||||
|
vim.keymap.set("n", "<C-j>", require("smart-splits").move_cursor_down)
|
||||||
|
vim.keymap.set("n", "<C-k>", require("smart-splits").move_cursor_up)
|
||||||
|
vim.keymap.set("n", "<C-l>", require("smart-splits").move_cursor_right)
|
||||||
|
|
||||||
|
-- Visual Mode
|
||||||
|
vim.keymap.set("v", "<", "<gv", { desc = "Stay in indent mode (left)", noremap = true, silent = true })
|
||||||
|
vim.keymap.set("v", ">", ">gv", { desc = "Stay in indent mode (right)", noremap = true, silent = true })
|
||||||
46
nvim/lua/config/lazy.lua
Normal file
46
nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
-- bootstrap lazy.nvim
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
38
nvim/lua/config/options.lua
Normal file
38
nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
||||||
|
vim.opt.autowrite = true
|
||||||
|
vim.opt.backspace = { "indent", "eol", "start" } -- Intuitive backspacing
|
||||||
|
vim.opt.copyindent = true
|
||||||
|
vim.opt.foldlevel = 2
|
||||||
|
vim.opt.foldlevelstart = 99
|
||||||
|
vim.opt.foldmethod = "indent"
|
||||||
|
vim.opt.foldnestmax = 10
|
||||||
|
vim.opt.grepprg = "rg --vimgrep --no-heading --smart-case"
|
||||||
|
vim.opt.listchars = { tab = "↦ ", trail = "·", nbsp = ".", extends = "❯", precedes = "❮" }
|
||||||
|
vim.opt.showbreak = "↪"
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.title = true
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
vim.opt.virtualedit = "all"
|
||||||
|
|
||||||
|
vim.opt.iskeyword:append("-") -- Add dashes to words
|
||||||
|
vim.opt.wildignore:append({ "*/node_modules/*" }) -- Wildignore
|
||||||
|
vim.opt.complete:append({ "i", "k", "s", "kspell" })
|
||||||
|
|
||||||
|
-- FIXME: When using "vim.opt.spellfile:append("~/.config/…) the file is not writable"
|
||||||
|
vim.cmd([[
|
||||||
|
" Spell Checker
|
||||||
|
set spellfile+=~/.config/nvim/spell/en.utf-8.add
|
||||||
|
|
||||||
|
" Custom Dictionaries (<C-x> <C-k>)
|
||||||
|
set dictionary+=~/.config/nvim/dictionary/de_user.txt
|
||||||
|
set dictionary+=~/.config/nvim/dictionary/de_neu.txt
|
||||||
|
set dictionary+=~/.config/nvim/dictionary/en_us.txt
|
||||||
|
|
||||||
|
" Custom Thesauri (Synonyms) (<C-x> <C-t>)
|
||||||
|
set thesaurus+=~/.config/nvim/thesaurus/de_user.txt
|
||||||
|
set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt
|
||||||
|
]])
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
vim.cmd([[
|
|
||||||
augroup general_settings
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>
|
|
||||||
autocmd BufWinEnter * :set formatoptions-=cro
|
|
||||||
autocmd FileType qf set nobuflisted
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
" Automatically highlight yanked content
|
|
||||||
augroup highlight_yank
|
|
||||||
autocmd!
|
|
||||||
autocmd TextYankPost * silent! lua vim.highlight.on_yank({higroup = 'Visual', timeout = 700})
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
" Remember cursor position
|
|
||||||
augroup line_return
|
|
||||||
autocmd!
|
|
||||||
autocmd BufReadPost *
|
|
||||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
|
||||||
\ exe "normal! g`\"" |
|
|
||||||
\ endif
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup git
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType gitcommit setlocal wrap
|
|
||||||
autocmd FileType gitcommit setlocal spell
|
|
||||||
autocmd BufRead,BufNewFile COMMIT_EDITMSG setfiletype git
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
augroup markdown
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType markdown setlocal wrap
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
augroup ft_html
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType html,eruby,njk setlocal foldmethod=indent
|
|
||||||
autocmd FileType html,eruby,njk setlocal omnifunc=htmlcomplete#CompleteTags
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_css
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType css setlocal foldmethod=marker
|
|
||||||
autocmd FileType scss,sass,less,stylus setlocal foldmethod=indent
|
|
||||||
autocmd FileType css setlocal foldmarker={,}
|
|
||||||
autocmd FileType css,scss,sass,less,stylus setlocal omnifunc=csscomplete#CompleteCSS
|
|
||||||
autocmd Filetype css,scss,sass,less,stylus setlocal iskeyword+=-
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_xml
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType xml setlocal foldmethod=indent
|
|
||||||
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_javascript
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType javascript setlocal foldmethod=indent
|
|
||||||
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
|
||||||
autocmd BufRead,BufNewFile *.es6 setfiletype javascript
|
|
||||||
autocmd BufRead,BufNewFile *.jsx setfiletype javascript.jsx
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_json
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType json syntax match Comment +\/\/.\+$+
|
|
||||||
autocmd Filetype json setlocal ts=2 sts=2 sw=2
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_ruby
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType ruby setlocal foldmethod=syntax
|
|
||||||
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
|
|
||||||
autocmd FileType ruby let g:rubycomplete_buffer_loading = 1
|
|
||||||
autocmd FileType ruby let g:rubycomplete_rails = 1
|
|
||||||
autocmd FileType ruby let g:rubycomplete_classes_in_global = 1
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_vim
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType vim setlocal foldmethod=marker
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup ft_misc
|
|
||||||
autocmd!
|
|
||||||
autocmd BufNewFile,BufRead *.handlebars set filetype=html syntax=handlebars
|
|
||||||
autocmd BufNewFile,BufRead *.hb set filetype=html syntax=handlebars
|
|
||||||
autocmd BufNewFile,BufRead *.hbs set filetype=html syntax=handlebars
|
|
||||||
autocmd BufNewFile,BufRead *.njk set filetype=html syntax=handlebars
|
|
||||||
autocmd BufNewFile,BufRead *.json set filetype=json
|
|
||||||
autocmd BufNewFile,BufRead *.pcss set filetype=css syntax=scss
|
|
||||||
autocmd BufNewFile,BufRead *.postcss set filetype=css syntax=scss
|
|
||||||
autocmd BufNewFile,BufRead *.rss set filetype=xml
|
|
||||||
autocmd BufEnter *.{js,jsx,ts,tsx} :syntax sync fromstart
|
|
||||||
autocmd BufLeave *.{js,jsx,ts,tsx} :syntax sync clear
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup auto_resize
|
|
||||||
autocmd!
|
|
||||||
autocmd VimResized * tabdo wincmd =
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
augroup alpha
|
|
||||||
autocmd!
|
|
||||||
autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
augroup lsp
|
|
||||||
autocmd!
|
|
||||||
autocmd BufWritePre * lua vim.lsp.buf.format()
|
|
||||||
augroup end
|
|
||||||
]])
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
-- Colorschemes
|
|
||||||
|
|
||||||
-- Base16 Theme
|
|
||||||
local source = "~/.vimrc_background"
|
|
||||||
local status_ok, _ = pcall(vim.cmd, "source " .. source)
|
|
||||||
|
|
||||||
if not status_ok then
|
|
||||||
vim.notify("Error sourcing " .. source)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
silent! colorscheme tokyonight-night
|
|
||||||
highlight ColorColumn guibg=#202224
|
|
||||||
highlight SpellBad guifg=red
|
|
||||||
highlight Winseparator guifg=#1F2335 guibg=None
|
|
||||||
]])
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
-- Toggle between soft wrap and no wrap
|
|
||||||
vim.keymap.set("n", "<leader>tw", [[<cmd>call ToggleWrap()<CR>]], opts)
|
|
||||||
|
|
||||||
-- Toggle between soft wrap and no wrap
|
|
||||||
vim.keymap.set("n", "<leader>cc", [[<cmd>call ToggleColorColumn()<CR>]], opts)
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
function! ToggleWrap()
|
|
||||||
if &wrap
|
|
||||||
echo "Wrap OFF"
|
|
||||||
set nowrap
|
|
||||||
set nolinebreak
|
|
||||||
set virtualedit=all
|
|
||||||
else
|
|
||||||
echo "Wrap ON"
|
|
||||||
set wrap
|
|
||||||
set linebreak
|
|
||||||
set virtualedit=
|
|
||||||
setlocal display+=lastline
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ToggleColorColumn()
|
|
||||||
if &colorcolumn == "80"
|
|
||||||
echo "Textwidth OFF"
|
|
||||||
set colorcolumn=0
|
|
||||||
set textwidth=0
|
|
||||||
else
|
|
||||||
echo "Textwidth ON"
|
|
||||||
set colorcolumn=80
|
|
||||||
set textwidth=80
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SpellEn()
|
|
||||||
set spell
|
|
||||||
set spelllang=en_us
|
|
||||||
set spellfile=~/.config/nvim/spell/en.utf-8.add
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SpellDe()
|
|
||||||
set spell
|
|
||||||
set spelllang=de_de
|
|
||||||
set spellfile=~/.config/nvim/spell/de.utf-8.add
|
|
||||||
endfunction
|
|
||||||
]])
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
vim.keymap.set("", "<space>", "<Nop>", { desc = "Remap space as leader key", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>j", ":b#<CR>", { desc = "Quick toggle between buffers", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", ";;", "A;<ESC>", { desc = "Add semicolon to the end of the line", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", ",,", "A,<ESC>", { desc = "Add comma to the end of the line", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("v", "y", "myy`y", { desc = "Maintain the cursor position when yanking a visual selection", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>x", "$x", { desc = "Delete last character of line", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "x", '"_x', { desc = "Do not yank with x", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "+", "<C-a>", { desc = "Increment", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "-", "<C-x>", { desc = "Decrement", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "ss", ":split<CR><C-w>w", { desc = "Open horizontal split", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "sv", ":vsplit<CR><C-w>w", { desc = "Open vertical split", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>q", ":Bdelete<CR>", { desc = "Delete current buffer", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>X", ":bufdo bdelete<CR>", { desc = "Delete all buffers", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("v", "<", "<gv", { desc = "Reselect visual selection after indenting left", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("v", ">", ">gv", { desc = "Reselect visual selection after indenting right", noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- zg (good), zG (good temp), zw (wrong), zW (wrong temp)
|
|
||||||
vim.keymap.set("n", "<leader>rs", ":set spell!<CR>", { desc = "Activate spell checking", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>", { desc = "Switch off highlighting", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>l", ":set list!<CR>", { desc = "Toggle list", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>pf", "gg=G''", { desc = "Indent the whole source code", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "'", "`", { desc = "Reverse the mark mapping", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "`", "'", { desc = "Reverse the mark mapping", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gP", "`[v`]", { desc = "Visuall select of just pasted content", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "gy", "`[v`]y", { desc = "Visuall select of just pasted content", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<expr> j", "(v:count == 0 ? 'gj' : 'j')", { desc = "Move by rows in wrapped mode (down)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<expr> k", "(v:count == 0 ? 'gk' : 'k')", { desc = "Move by rows in wrapped mode (up)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>?", ":execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>", { desc = "Open a quickfix window for the last search", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-e>", "3<C-e>", { desc = "Faster linewise scrolling (up)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-y>", "3<C-y>", { desc = "Faster linewise scrolling (down)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "G", "Gzzzv", { desc = "Keep the window centered (end)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "n", "nzzzv", { desc = "Keep the window centered (next search result)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "N", "Nzzzv", { desc = "Keep the window centered (previous search result)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Keep the window centered (page down)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Keep the window centered (page up)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "Y", "yg$", { desc = "Copy to the end of the line", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "XX", ":qa<CR>", { desc = "Close all buffers", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gN", "o<ESC>k", { desc = "Add lines in NORMAL Mode (below)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "gNN", "O<ESC>j", { desc = "Add lines in NORMAL Mode (above)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>cf", ":cd %:p:h<CR>:pwd<CR>", { desc = "Change to the folder of the current file", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>rq", "gqip", { desc = "Reformat a line into a block", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>rqq", "vipJ", { desc = "Reformat a block into a line", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-J>", "<C-W><C-K>", { desc = "Easier split navigation (down)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-K>", "<C-W><C-L>", { desc = "Easier split navigation (up)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-L>", "<C-W><C-H>", { desc = "Easier split navigation (right)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<C-H>", "<C-W><C-H>", { desc = "Easier split navigation (left)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>kw", ":SmartResizeMode<CR>", { desc = "Activate Smart Resize Mode", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("v", "<", "<gv", { desc = "Stay in indent mode (left)", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("v", ">", ">gv", { desc = "Stay in indent mode (right)", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("v", "<S-k>", ":m .-2<CR>==", { desc = "Move text up", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("v", "<S-j>", ":m .+1<CR>==", { desc = "Move text down", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ia", ":silent !open -a iA\\ Writer.app '%:p'<CR>", { desc = "Open in iA Writer", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>o", "<cmd>lua vim.lsp.buf.format()<CR>", { desc = "Format buffer with LSP", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>P", "<cmd>Prettier<CR>", { desc = "Format with Prettier", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>kn", ":let @+=@%<CR>", { desc = "Get the filename and path of current file", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>kc", ":g/console.log/d<CR>", { desc = "Remove console.log statements", noremap = true, silent = true })
|
|
||||||
vim.keymap.set("v", "<leader>kp", ":'<,'> w !pandoc --no-highlight --wrap=none | pbcopy <CR>", { desc = "Convert Markdown to HTML and copy to Clipboard", noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gsii", "<CMD>lua Select_indent()<CR>:sort<CR>", { desc = "Sort lines by indentation", noremap = true, silent = true })
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local navic = require("nvim-navic")
|
|
||||||
|
|
||||||
vim.g.navic_silence = true
|
|
||||||
|
|
||||||
M.setup = function()
|
|
||||||
local signs = {
|
|
||||||
{ name = "DiagnosticSignError", text = "" },
|
|
||||||
{ name = "DiagnosticSignWarn", text = "" },
|
|
||||||
{ name = "DiagnosticSignHint", text = "" },
|
|
||||||
{ name = "DiagnosticSignInfo", text = "" },
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, sign in ipairs(signs) do
|
|
||||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
|
||||||
end
|
|
||||||
|
|
||||||
local config = {
|
|
||||||
virtual_text = false, -- disable virtual text
|
|
||||||
signs = {
|
|
||||||
active = signs, -- show signs
|
|
||||||
},
|
|
||||||
update_in_insert = true,
|
|
||||||
underline = true,
|
|
||||||
severity_sort = true,
|
|
||||||
float = {
|
|
||||||
focusable = false,
|
|
||||||
style = "minimal",
|
|
||||||
border = "rounded",
|
|
||||||
source = "always",
|
|
||||||
header = "",
|
|
||||||
prefix = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.diagnostic.config(config)
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
|
||||||
border = "rounded",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
|
||||||
border = "rounded",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local function lsp_highlight_document(client, bufnr)
|
|
||||||
-- Set autocommands conditional on server_capabilities
|
|
||||||
if client.server_capabilities.documentHighlightProvider then
|
|
||||||
vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true })
|
|
||||||
vim.api.nvim_clear_autocmds({ buffer = bufnr, group = "lsp_document_highlight" })
|
|
||||||
vim.api.nvim_create_autocmd("CursorHold", {
|
|
||||||
callback = vim.lsp.buf.document_highlight,
|
|
||||||
buffer = bufnr,
|
|
||||||
group = "lsp_document_highlight",
|
|
||||||
desc = "Document Highlight",
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
|
||||||
callback = vim.lsp.buf.clear_references,
|
|
||||||
buffer = bufnr,
|
|
||||||
group = "lsp_document_highlight",
|
|
||||||
desc = "Clear All the References",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function lsp_keymaps(bufnr)
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
local keymap = vim.api.nvim_buf_set_keymap
|
|
||||||
|
|
||||||
keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "g0", "<cmd>Telescope lsp_document_symbols<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gF", "<cmd>Telescope lsp_dynamic_workspace_symbols<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gr", "<cmd>Telescope lsp_references<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gD", "<cmd>FzfLua lsp_declarations<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gc", "<cmd>FzfLua lsp_code_actions<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gd", "<cmd>FzfLua lsp_definitions<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gt", "<cmd>FzfLua lsp_typedefs<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gR", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "Ä", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts)
|
|
||||||
keymap(bufnr, "n", "ä", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Formatting-on-save
|
|
||||||
local lsp_formatting = function(bufnr)
|
|
||||||
vim.lsp.buf.format({
|
|
||||||
timeout_ms = 2000,
|
|
||||||
bufnr = bufnr,
|
|
||||||
filter = function(client)
|
|
||||||
return client.name == "null-ls"
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
|
||||||
|
|
||||||
M.on_attach = function(client, bufnr)
|
|
||||||
-- Autosave
|
|
||||||
if client.supports_method("textDocument/formatting") then
|
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
group = augroup,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
|
||||||
lsp_formatting(bufnr)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
|
||||||
navic.attach(client, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TypeScript
|
|
||||||
if client.name == "tsserver" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- HTML
|
|
||||||
if client.name == "html" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Stylelint
|
|
||||||
if client.name == "stylelint_lsp" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- JSON
|
|
||||||
if client.name == "jsonls" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Lua
|
|
||||||
if client.name == "sumneko_lua" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
client.server_capabilities.documentRangeFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Rust
|
|
||||||
if client.name == "rust_analyzer" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Astro
|
|
||||||
if client.name == "astro" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Diagnostic
|
|
||||||
if client.name == "diagnosticls" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
lsp_keymaps(bufnr)
|
|
||||||
lsp_highlight_document(client, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
|
|
||||||
-- nvim-ufo - better folding
|
|
||||||
capabilities.textDocument.foldingRange = {
|
|
||||||
dynamicRegistration = false,
|
|
||||||
lineFoldingOnly = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set Winbar to nvim-static
|
|
||||||
vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}"
|
|
||||||
|
|
||||||
M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
local status_ok, _ = pcall(require, "lspconfig")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
require("kogakure.lsp.mason")
|
|
||||||
require("kogakure.lsp.handlers").setup()
|
|
||||||
require("kogakure.lsp.null-ls")
|
|
||||||
require("kogakure.lsp.trouble")
|
|
||||||
require("kogakure.lsp.lightbulb")
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
-- nvim-lightbulb – https://github.com/kosayoda/nvim-lightbulb
|
|
||||||
local status, lightbulb = pcall(require, "nvim-lightbulb")
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
lightbulb.setup({
|
|
||||||
autocmd = {
|
|
||||||
enabled = true
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
local mason_status_ok, mason = pcall(require, "mason")
|
|
||||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
|
||||||
local mason_lsp_config_status_ok, mason_lspconfig = pcall(require, "mason-lspconfig")
|
|
||||||
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
|
||||||
|
|
||||||
if not mason_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not lspconfig_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not mason_lsp_config_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not mason_null_ls_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local servers = {
|
|
||||||
"astro",
|
|
||||||
"cssls",
|
|
||||||
"cssmodules_ls",
|
|
||||||
"diagnosticls",
|
|
||||||
"emmet_ls",
|
|
||||||
"golangci_lint_ls",
|
|
||||||
"gopls",
|
|
||||||
"graphql",
|
|
||||||
"html",
|
|
||||||
"jsonls",
|
|
||||||
"pyright",
|
|
||||||
"rust_analyzer",
|
|
||||||
"sourcery",
|
|
||||||
"sumneko_lua",
|
|
||||||
"svelte",
|
|
||||||
"tsserver",
|
|
||||||
"vuels",
|
|
||||||
}
|
|
||||||
|
|
||||||
mason.setup({
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
max_concurrent_installers = 4,
|
|
||||||
})
|
|
||||||
|
|
||||||
mason_null_ls.setup({
|
|
||||||
ensure_installed = nil,
|
|
||||||
automatic_installation = true,
|
|
||||||
automatic_setup = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
|
||||||
ensure_installed = servers,
|
|
||||||
})
|
|
||||||
|
|
||||||
for _, server in pairs(servers) do
|
|
||||||
local opts = {
|
|
||||||
on_attach = require("kogakure.lsp.handlers").on_attach,
|
|
||||||
capabilities = require("kogakure.lsp.handlers").capabilities,
|
|
||||||
}
|
|
||||||
|
|
||||||
local has_custom_opts, server_custom_opts = pcall(require, "kogakure.lsp.settings." .. server)
|
|
||||||
if has_custom_opts then
|
|
||||||
opts = vim.tbl_deep_extend("force", opts, server_custom_opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
lspconfig[server].setup(opts)
|
|
||||||
end
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
-- null-ls.nvim – https://github.com/jose-elias-alvarez/null-ls.nvim
|
|
||||||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
|
||||||
if not null_ls_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/
|
|
||||||
local formatting = null_ls.builtins.formatting
|
|
||||||
local diagnostics = null_ls.builtins.diagnostics
|
|
||||||
local completion = null_ls.builtins.completion
|
|
||||||
local hover = null_ls.builtins.hover
|
|
||||||
local code_actions = null_ls.builtins.code_actions
|
|
||||||
|
|
||||||
null_ls.setup({
|
|
||||||
debug = false,
|
|
||||||
sources = {
|
|
||||||
code_actions.eslint_d.with({ diagnostics_format = "[eslint] #{m}\n(#{c})" }),
|
|
||||||
code_actions.gitrebase,
|
|
||||||
code_actions.gitsigns,
|
|
||||||
completion.luasnip,
|
|
||||||
diagnostics.eslint_d,
|
|
||||||
diagnostics.gitlint,
|
|
||||||
diagnostics.golangci_lint,
|
|
||||||
diagnostics.stylelint,
|
|
||||||
diagnostics.tsc,
|
|
||||||
diagnostics.vale,
|
|
||||||
diagnostics.zsh,
|
|
||||||
formatting.autopep8, -- Python
|
|
||||||
formatting.black.with({ extra_args = { "--fast" } }), -- Python
|
|
||||||
formatting.eslint_d,
|
|
||||||
formatting.gofmt,
|
|
||||||
formatting.goimports,
|
|
||||||
formatting.goimports_reviser,
|
|
||||||
formatting.prettierd,
|
|
||||||
formatting.stylelint,
|
|
||||||
formatting.trim_newlines,
|
|
||||||
formatting.trim_whitespace,
|
|
||||||
formatting.rustfmt,
|
|
||||||
hover.dictionary,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
-- Find more schemas here: https://www.schemastore.org/json/
|
|
||||||
local default_schemas = nil
|
|
||||||
local status_ok, jsonls_settings = pcall(require, 'nlspsettings.jsonls')
|
|
||||||
if status_ok then
|
|
||||||
default_schemas = jsonls_settings.get_default_schemas()
|
|
||||||
end
|
|
||||||
|
|
||||||
local schemas = {
|
|
||||||
{
|
|
||||||
description = 'TypeScript compiler configuration file',
|
|
||||||
fileMatch = {
|
|
||||||
'tsconfig.json',
|
|
||||||
'tsconfig.*.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/tsconfig.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Lerna config',
|
|
||||||
fileMatch = {
|
|
||||||
'lerna.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/lerna.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Babel configuration',
|
|
||||||
fileMatch = {
|
|
||||||
'.babelrc.json',
|
|
||||||
'.babelrc',
|
|
||||||
'babel.config.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/babelrc.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'ESLint config',
|
|
||||||
fileMatch = {
|
|
||||||
'.eslintrc.json',
|
|
||||||
'.eslintrc',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/eslintrc.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Bucklescript config',
|
|
||||||
fileMatch = {
|
|
||||||
'bsconfig.json',
|
|
||||||
},
|
|
||||||
url = 'https://raw.githubusercontent.com/rescript-lang/rescript-compiler/8.2.0/docs/docson/build-schema.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Prettier config',
|
|
||||||
fileMatch = {
|
|
||||||
'.prettierrc',
|
|
||||||
'.prettierrc.json',
|
|
||||||
'prettier.config.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/prettierrc',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Vercel Now config',
|
|
||||||
fileMatch = {
|
|
||||||
'now.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/now',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Stylelint config',
|
|
||||||
fileMatch = {
|
|
||||||
'.stylelintrc',
|
|
||||||
'.stylelintrc.json',
|
|
||||||
'stylelint.config.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/stylelintrc',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'A JSON schema for the ASP.NET LaunchSettings.json files',
|
|
||||||
fileMatch = {
|
|
||||||
'launchsettings.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/launchsettings.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Schema for CMake Presets',
|
|
||||||
fileMatch = {
|
|
||||||
'CMakePresets.json',
|
|
||||||
'CMakeUserPresets.json',
|
|
||||||
},
|
|
||||||
url = 'https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Configuration file as an alternative for configuring your repository in the settings page.',
|
|
||||||
fileMatch = {
|
|
||||||
'.codeclimate.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/codeclimate.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'LLVM compilation database',
|
|
||||||
fileMatch = {
|
|
||||||
'compile_commands.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/compile-commands.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Config file for Command Task Runner',
|
|
||||||
fileMatch = {
|
|
||||||
'commands.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/commands.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.',
|
|
||||||
fileMatch = {
|
|
||||||
'*.cf.json',
|
|
||||||
'cloudformation.json',
|
|
||||||
},
|
|
||||||
url = 'https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/cloudformation.schema.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.',
|
|
||||||
fileMatch = {
|
|
||||||
'serverless.template',
|
|
||||||
'*.sam.json',
|
|
||||||
'sam.json',
|
|
||||||
},
|
|
||||||
url = 'https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/sam.schema.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Json schema for properties json file for a GitHub Workflow template',
|
|
||||||
fileMatch = {
|
|
||||||
'.github/workflow-templates/**.properties.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/github-workflow-template-properties.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'golangci-lint configuration file',
|
|
||||||
fileMatch = {
|
|
||||||
'.golangci.toml',
|
|
||||||
'.golangci.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/golangci-lint.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'JSON schema for the JSON Feed format',
|
|
||||||
fileMatch = {
|
|
||||||
'feed.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/feed.json',
|
|
||||||
versions = {
|
|
||||||
['1'] = 'https://json.schemastore.org/feed-1.json',
|
|
||||||
['1.1'] = 'https://json.schemastore.org/feed.json',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Packer template JSON configuration',
|
|
||||||
fileMatch = {
|
|
||||||
'packer.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/packer.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'NPM configuration file',
|
|
||||||
fileMatch = {
|
|
||||||
'package.json',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/package.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'JSON schema for Visual Studio component configuration files',
|
|
||||||
fileMatch = {
|
|
||||||
'*.vsconfig',
|
|
||||||
},
|
|
||||||
url = 'https://json.schemastore.org/vsconfig.json',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = 'Resume json',
|
|
||||||
fileMatch = {
|
|
||||||
'resume.json',
|
|
||||||
},
|
|
||||||
url = 'https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local function extend(tab1, tab2)
|
|
||||||
if tab2 == nil then
|
|
||||||
return tab2
|
|
||||||
end
|
|
||||||
for _, value in ipairs(tab2) do
|
|
||||||
table.insert(tab1, value)
|
|
||||||
end
|
|
||||||
return tab1
|
|
||||||
end
|
|
||||||
|
|
||||||
local extended_schemas = extend(schemas, default_schemas)
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
settings = {
|
|
||||||
json = {
|
|
||||||
schemas = extended_schemas,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
setup = {
|
|
||||||
commands = {
|
|
||||||
Format = {
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.range_formatting({}, { 0, 0, }, { vim.fn.line '$', 0 })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return opts
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
python = {
|
|
||||||
analysis = {
|
|
||||||
typeCheckingMode = 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim", "hs", "window", "pcall" },
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
library = {
|
|
||||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
|
||||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
-- Trouble – https://github.com/folke/trouble.nvim
|
|
||||||
local status, trouble = pcall(require, 'trouble')
|
|
||||||
if (not status) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
trouble.setup()
|
|
||||||
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
-- :help options
|
|
||||||
local options = {
|
|
||||||
autowrite = true,
|
|
||||||
backspace = { "indent", "eol", "start" }, -- Intuitive backspacing
|
|
||||||
backup = false,
|
|
||||||
clipboard = "unnamedplus",
|
|
||||||
completeopt = { "menu", "menuone", "preview" },
|
|
||||||
confirm = true,
|
|
||||||
copyindent = true,
|
|
||||||
cursorline = false,
|
|
||||||
expandtab = true,
|
|
||||||
foldlevel = 2,
|
|
||||||
foldlevelstart = 99,
|
|
||||||
foldmethod = "syntax",
|
|
||||||
foldnestmax = 10,
|
|
||||||
grepformat = "%f:%l:%c:%m",
|
|
||||||
grepprg = "rg\\ --vimgrep\\ --no-heading\\ --smart-case",
|
|
||||||
hidden = true,
|
|
||||||
ignorecase = true,
|
|
||||||
laststatus = 3,
|
|
||||||
list = false,
|
|
||||||
listchars = {
|
|
||||||
tab = "↦ ",
|
|
||||||
trail = "·",
|
|
||||||
nbsp = ".",
|
|
||||||
extends = "❯",
|
|
||||||
precedes = "❮",
|
|
||||||
},
|
|
||||||
mouse = "a",
|
|
||||||
number = true,
|
|
||||||
omnifunc = "syntaxcomplete#Complete",
|
|
||||||
redrawtime = 10000, -- Allow more time for loading syntax on large files
|
|
||||||
relativenumber = true,
|
|
||||||
scrolloff = 8,
|
|
||||||
shiftround = true,
|
|
||||||
shiftwidth = 4,
|
|
||||||
shortmess = "caoOtI", -- Welcome screen
|
|
||||||
showbreak = "↪",
|
|
||||||
sidescrolloff = 8,
|
|
||||||
signcolumn = "yes:2",
|
|
||||||
smartcase = true,
|
|
||||||
softtabstop = 4,
|
|
||||||
spelllang = "en_us",
|
|
||||||
splitbelow = true,
|
|
||||||
splitright = true,
|
|
||||||
swapfile = false,
|
|
||||||
tabstop = 4,
|
|
||||||
termguicolors = true,
|
|
||||||
timeoutlen = 300,
|
|
||||||
title = true,
|
|
||||||
undofile = true,
|
|
||||||
virtualedit = "all",
|
|
||||||
visualbell = true,
|
|
||||||
wildmode = { "longest:full", "full" },
|
|
||||||
wrap = false,
|
|
||||||
writebackup = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
for k, v in pairs(options) do
|
|
||||||
vim.opt[k] = v
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Add dashes to words
|
|
||||||
vim.opt.iskeyword:append("-")
|
|
||||||
|
|
||||||
-- Don’t delete the word, but put a $ to the end till exit the mode
|
|
||||||
vim.opt.cpoptions:append("$")
|
|
||||||
|
|
||||||
-- Wildignore
|
|
||||||
vim.opt.wildignore:append({ "*/node_modules/*" })
|
|
||||||
|
|
||||||
vim.opt.path:append("**")
|
|
||||||
vim.opt.complete:append({ "i", "k", "s", "kspell" })
|
|
||||||
|
|
||||||
-- FIXME: When using "vim.opt.spellfile:append("~/.config/…) the file is not writable"
|
|
||||||
vim.cmd([[
|
|
||||||
" Spell Checker
|
|
||||||
set spellfile+=~/.config/nvim/spell/en.utf-8.add
|
|
||||||
|
|
||||||
" Custom Dictionaries (<C-x> <C-k>)
|
|
||||||
set dictionary+=~/.config/nvim/dictionary/de_user.txt
|
|
||||||
set dictionary+=~/.config/nvim/dictionary/de_neu.txt
|
|
||||||
set dictionary+=~/.config/nvim/dictionary/en_us.txt
|
|
||||||
|
|
||||||
" Custom Thesauri (Synonyms) (<C-x> <C-t>)
|
|
||||||
set thesaurus+=~/.config/nvim/thesaurus/de_user.txt
|
|
||||||
set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt
|
|
||||||
]])
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
-- Lazy.nvim - https://github.com/folke/lazy.nvim
|
|
||||||
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",
|
|
||||||
"--single-branch",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.runtimepath:prepend(lazypath)
|
|
||||||
|
|
||||||
local plugins = {
|
|
||||||
"nvim-lua/popup.nvim", -- An implementation of the Popup API from vim in Neovim
|
|
||||||
"nvim-lua/plenary.nvim", -- Useful lua functions used ny lots of plugins
|
|
||||||
|
|
||||||
-- Colorscheme
|
|
||||||
"chriskempson/base16-vim", -- Base16 colorschemes
|
|
||||||
"folke/tokyonight.nvim", -- Tokyo Night color scheme
|
|
||||||
{ "kartikp10/noctis.nvim", dependencies = "rktjmp/lush.nvim" }, -- Noctis color scheme
|
|
||||||
{ "catppuccin/nvim", name = "catppuccin" }, -- Catppuccin color scheme
|
|
||||||
|
|
||||||
-- CMP
|
|
||||||
"hrsh7th/nvim-cmp", -- The completion plugin
|
|
||||||
"hrsh7th/cmp-buffer", -- Buffer completions
|
|
||||||
"hrsh7th/cmp-path", -- Path completions
|
|
||||||
"hrsh7th/cmp-cmdline", -- Cmdline completions
|
|
||||||
"hrsh7th/cmp-nvim-lua", -- Lua API completions
|
|
||||||
"hrsh7th/cmp-copilot", -- GitHub Copilot completions
|
|
||||||
"saadparwaiz1/cmp_luasnip", -- Snippet completions
|
|
||||||
"uga-rosa/cmp-dictionary", -- Dictionary completions
|
|
||||||
"f3fora/cmp-spell", -- Spell completions
|
|
||||||
"David-Kunz/cmp-npm", -- NPM package completions
|
|
||||||
"hrsh7th/cmp-nvim-lsp", -- LSP completions
|
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help", -- LSP Signature Help
|
|
||||||
|
|
||||||
-- Snippets
|
|
||||||
"L3MON4D3/LuaSnip", -- Snippet Engine
|
|
||||||
"rafamadriz/friendly-snippets", -- A bunch of snippets
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
"neovim/nvim-lspconfig", -- Enable LSP
|
|
||||||
"williamboman/mason.nvim", -- Manage LSP servers, DAP servers, linters, and formatters
|
|
||||||
"williamboman/mason-lspconfig.nvim", -- Bridge betwen Mason and lspconfig
|
|
||||||
"jay-babu/mason-null-ls.nvim", -- Bridge between Mason and null-ls
|
|
||||||
"jose-elias-alvarez/null-ls.nvim", -- Inject LSP diagnostics, code actions, and more
|
|
||||||
"folke/trouble.nvim", -- Diagnostics
|
|
||||||
"creativenull/diagnosticls-configs-nvim", -- Collection of linters and formatters
|
|
||||||
"tamago324/nlsp-settings.nvim", -- LSP for json/yaml
|
|
||||||
{ "kosayoda/nvim-lightbulb", dependencies = "antoinemadec/FixCursorHold.nvim" },
|
|
||||||
|
|
||||||
-- FZF
|
|
||||||
{ "junegunn/fzf", build = "./install --bin" },
|
|
||||||
"ibhagwan/fzf-lua",
|
|
||||||
|
|
||||||
-- Telescope
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
"dhruvmanila/telescope-bookmarks.nvim", -- Open browser bookmarks
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim", -- File and folder actions
|
|
||||||
"sudormrfbin/cheatsheet.nvim", -- Searchable cheatsheet
|
|
||||||
"nvim-telescope/telescope-node-modules.nvim", -- node_modules packages
|
|
||||||
"gbrlsnchs/telescope-lsp-handlers.nvim", -- LSP handlers
|
|
||||||
"crispgm/telescope-heading.nvim", -- Jump between headings
|
|
||||||
"nvim-telescope/telescope-fzy-native.nvim", -- FZY style sorter that is compiled
|
|
||||||
{ "nvim-telescope/telescope-frecency.nvim", dependencies = { "tami5/sqlite.lua" } }, -- Frequency and recency
|
|
||||||
"nvim-telescope/telescope-github.nvim", -- GitHub CLI
|
|
||||||
"nvim-telescope/telescope-symbols.nvim", -- Symbols
|
|
||||||
"princejoogie/dir-telescope.nvim", -- Perform functions in selected directory
|
|
||||||
|
|
||||||
-- Treesitter
|
|
||||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
|
||||||
"p00f/nvim-ts-rainbow", -- Rainbox parentheses
|
|
||||||
"nvim-treesitter/playground", -- Treesitter information in Neovim
|
|
||||||
"nvim-treesitter/nvim-treesitter-context", -- Show context
|
|
||||||
|
|
||||||
-- DAP
|
|
||||||
"mfussenegger/nvim-dap", -- Debug Adapter Protocol
|
|
||||||
|
|
||||||
-- File/Window Management
|
|
||||||
"ThePrimeagen/harpoon", -- Getting you where you want
|
|
||||||
"ThePrimeagen/git-worktree.nvim", -- Git Worktree
|
|
||||||
"lewis6991/gitsigns.nvim", -- Git decorations
|
|
||||||
"kyazdani42/nvim-web-devicons", -- Icons and colors for file types
|
|
||||||
"kyazdani42/nvim-tree.lua", -- A File Explorer
|
|
||||||
"akinsho/bufferline.nvim", -- Emulate tabs for buffers
|
|
||||||
"moll/vim-bbye", -- Delete buffers without closing the window
|
|
||||||
"akinsho/toggleterm.nvim", -- Terminal in Neovim
|
|
||||||
"nvim-lualine/lualine.nvim", -- Statusline
|
|
||||||
"norcalli/nvim-colorizer.lua", -- Highlight colors
|
|
||||||
"ahmedkhalf/project.nvim", -- Project Management
|
|
||||||
"lewis6991/impatient.nvim", -- Speed Up Startup
|
|
||||||
"lukas-reineke/indent-blankline.nvim", -- Indentation guides
|
|
||||||
"goolord/alpha-nvim", -- Customizable Greeter
|
|
||||||
"antoinemadec/FixCursorHold.nvim", -- This is needed to fix lsp doc highlight
|
|
||||||
"MattesGroeger/vim-bookmarks", -- Bookmarks
|
|
||||||
"folke/which-key.nvim", -- Display possible keybindings
|
|
||||||
"mrjones2014/legendary.nvim", -- Legend for keymaps, commands, and autocommands
|
|
||||||
"APZelos/blamer.nvim", -- Git Blame
|
|
||||||
"tpope/vim-fugitive", -- Git plugin
|
|
||||||
"elijahmanor/export-to-vscode.nvim", -- Export active Buffers to Visual Studio Code
|
|
||||||
"bogado/file-line", -- Jump directly to line in file with 'nvim index.html:20'
|
|
||||||
"ruanyl/vim-gh-line", -- Open current line in GitHub
|
|
||||||
"pwntester/octo.nvim", -- GitHub in Neovim
|
|
||||||
"nvim-pack/nvim-spectre", -- Search and replace
|
|
||||||
"stevearc/dressing.nvim", -- Improve the default vim.ui interfaces
|
|
||||||
"folke/zen-mode.nvim", -- Zen Mode
|
|
||||||
"tpope/vim-eunuch", -- UNIX Shell commands
|
|
||||||
"folke/twilight.nvim", -- Dim inactive code
|
|
||||||
"ray-x/guihua.lua", -- Lua GUI lib
|
|
||||||
"ray-x/sad.nvim", -- Find & Replace
|
|
||||||
"gorbit99/codewindow.nvim", -- Minimap
|
|
||||||
"simrat39/symbols-outline.nvim", -- Symbols Outline
|
|
||||||
"SmiteshP/nvim-navic", -- Statusline current context
|
|
||||||
"kevinhwang91/nvim-bqf", -- Better Quickfix
|
|
||||||
{ "kevinhwang91/nvim-ufo", dependencies = "kevinhwang91/promise-async" }, -- Better folds
|
|
||||||
"debugloop/telescope-undo.nvim", -- Undo history
|
|
||||||
"mbbill/undotree", -- Undo tree
|
|
||||||
"mrjones2014/smart-splits.nvim", -- Smart splits
|
|
||||||
"xiyaowong/nvim-transparent", -- Remove all background colors
|
|
||||||
"nanotee/zoxide.vim", -- zoxide integration
|
|
||||||
"is0n/fm-nvim", -- terminal file managers
|
|
||||||
|
|
||||||
-- Editing Files
|
|
||||||
"windwp/nvim-autopairs", -- Autopairs, integrates with both cmp and treesitter
|
|
||||||
"windwp/nvim-ts-autotag", -- Autoclose and autorename html tags
|
|
||||||
"numToStr/Comment.nvim", -- Easily comment stuff
|
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring", -- Comment based on cursor location of file
|
|
||||||
{ "iamcco/markdown-preview.nvim", build = "cd app && yarn install", cmd = "MarkdownPreview" },
|
|
||||||
"yamatsum/nvim-cursorline", -- Highlight words and lines on the cursor
|
|
||||||
"mattn/emmet-vim", -- Emmet
|
|
||||||
"editorconfig/editorconfig-vim", -- Editorconfig
|
|
||||||
"sheerun/vim-polyglot", -- A collection of language packs (?,
|
|
||||||
"tpope/vim-abolish", -- Autofix spelling mistakes
|
|
||||||
"mg979/vim-visual-multi", -- Multi cursor mode
|
|
||||||
"vim-scripts/VisIncr", -- Increase and decreasing numbers, dates, daynames etc.
|
|
||||||
"monaqa/dial.nvim", -- Increase and decrease numbers, dates, times, etc
|
|
||||||
"rstacruz/vim-xtract", -- Extract code into new file
|
|
||||||
"tpope/vim-repeat", -- Repeat plugins
|
|
||||||
"kylechui/nvim-surround", -- Surround selections, stylishly
|
|
||||||
"wuelnerdotexe/vim-astro", -- Astro support
|
|
||||||
"MunifTanjim/prettier.nvim", -- Prettier
|
|
||||||
"untitled-ai/jupyter_ascending.vim", -- Interact with jupyter_ascending
|
|
||||||
"rhysd/vim-grammarous", -- A powerful grammar checker for Vim using LanguageTool
|
|
||||||
"mechatroner/rainbow_csv", -- Rainbow CSV
|
|
||||||
"dbeniamine/cheat.sh-vim", -- Cheat.sh
|
|
||||||
"wakatime/vim-wakatime", -- Wakatime
|
|
||||||
"github/copilot.vim", -- GitHub Copilot
|
|
||||||
"Exafunction/codeium.vim", -- Codeium
|
|
||||||
"folke/todo-comments.nvim", -- Highlight TODO
|
|
||||||
"DNLHC/glance.nvim", -- Pretty preview of LSP locations
|
|
||||||
"echasnovski/mini.nvim", -- Library with 20+ plugins
|
|
||||||
"dhruvasagar/vim-table-mode", -- Markdown table mode
|
|
||||||
{ "princejoogie/chafa.nvim", dependencies = { "nvim-lua/plenary.nvim", "m00qek/baleia.nvim" } }, -- Preview images in terminal
|
|
||||||
|
|
||||||
-- Custom Text Objects
|
|
||||||
"chrisgrieser/nvim-various-textobjs", -- Various text objects
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects", -- Syntax aware text-objects
|
|
||||||
{ "glts/vim-textobj-comment", dependencies = { "kana/vim-textobj-user" } }, -- ac, ic, aC
|
|
||||||
{ "jceb/vim-textobj-uri", dependencies = { "kana/vim-textobj-user" } }, -- au, iu, go
|
|
||||||
{ "kana/vim-textobj-datetime", dependencies = { "kana/vim-textobj-user" } }, -- ada, add, adf, adt, adz, ida, …
|
|
||||||
{ "kana/vim-textobj-indent", dependencies = { "kana/vim-textobj-user" } }, -- Text objects for indentation
|
|
||||||
{ "whatyouhide/vim-textobj-xmlattr", dependencies = { "kana/vim-textobj-user" } }, -- ax, ix
|
|
||||||
|
|
||||||
-- Custom Motions
|
|
||||||
"tommcdo/vim-exchange", -- cx, cxx, X, cxc
|
|
||||||
"easymotion/vim-easymotion", -- <Leader><Leader>f/L
|
|
||||||
"andymass/vim-matchup", -- Better % matching
|
|
||||||
|
|
||||||
-- TMUX
|
|
||||||
"christoomey/vim-tmux-navigator",
|
|
||||||
"preservim/vimux",
|
|
||||||
"tyewang/vimux-jest-test", -- JavaScript tests
|
|
||||||
"jtdowney/vimux-cargo", -- Rust tests
|
|
||||||
}
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
install = {
|
|
||||||
colorscheme = {
|
|
||||||
"tokyonight-night",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lazy").setup(plugins, opts)
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
local keymap = vim.keymap.set
|
|
||||||
|
|
||||||
-- Basic Text Objects
|
|
||||||
function Basic_text_objects()
|
|
||||||
local chars = { "_", ".", ":", ",", ";", "|", "/", "\\", "*", "+", "%", "`", "?" }
|
|
||||||
for _, char in ipairs(chars) do
|
|
||||||
for _, mode in ipairs({ "x", "o" }) do
|
|
||||||
keymap(mode, "i" .. char, string.format(":<C-u>normal! T%svt%s<CR>", char, char), {
|
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
|
||||||
})
|
|
||||||
keymap(mode, "a" .. char, string.format(":<C-u>normal! F%svf%s<CR>", char, char), {
|
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Select_indent(around)
|
|
||||||
local start_indent = vim.fn.indent(vim.fn.line("."))
|
|
||||||
local blank_line_pattern = "^%s*$"
|
|
||||||
|
|
||||||
if string.match(vim.fn.getline("."), blank_line_pattern) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if vim.v.count > 0 then
|
|
||||||
start_indent = start_indent - vim.o.shiftwidth * (vim.v.count - 1)
|
|
||||||
if start_indent < 0 then
|
|
||||||
start_indent = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local prev_line = vim.fn.line(".") - 1
|
|
||||||
local prev_blank_line = function(line)
|
|
||||||
return string.match(vim.fn.getline(line), blank_line_pattern)
|
|
||||||
end
|
|
||||||
while prev_line > 0 and (prev_blank_line(prev_line) or vim.fn.indent(prev_line) >= start_indent) do
|
|
||||||
vim.cmd("-")
|
|
||||||
prev_line = vim.fn.line(".") - 1
|
|
||||||
end
|
|
||||||
if around then
|
|
||||||
vim.cmd("-")
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd("normal! 0V")
|
|
||||||
|
|
||||||
local next_line = vim.fn.line(".") + 1
|
|
||||||
local next_blank_line = function(line)
|
|
||||||
return string.match(vim.fn.getline(line), blank_line_pattern)
|
|
||||||
end
|
|
||||||
local last_line = vim.fn.line("$")
|
|
||||||
while next_line <= last_line and (next_blank_line(next_line) or vim.fn.indent(next_line) >= start_indent) do
|
|
||||||
vim.cmd("+")
|
|
||||||
next_line = vim.fn.line(".") + 1
|
|
||||||
end
|
|
||||||
if around then
|
|
||||||
vim.cmd("+")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
basic_text_objects = Basic_text_objects,
|
|
||||||
}
|
|
||||||
9
nvim/lua/plugins/abolish.lua
Normal file
9
nvim/lua/plugins/abolish.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
-- Automatically fix spelling mistakes
|
||||||
|
-- https://github.com/tpope/vim-abolish
|
||||||
|
return {
|
||||||
|
"tpope/vim-abolish",
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_command("Abolish teh the")
|
||||||
|
vim.api.nvim_command("Abolish {despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or} {despe,sepa}rat{}")
|
||||||
|
end,
|
||||||
|
}
|
||||||
29
nvim/lua/plugins/alpha.lua
Normal file
29
nvim/lua/plugins/alpha.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
-- Dashboard
|
||||||
|
-- https://github.com/goolord/alpha-nvim
|
||||||
|
return {
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.section.header.val = {
|
||||||
|
" ▖ ",
|
||||||
|
"┌─╮╭─╮╭─╮▖ ▖▖▄▄▗▄ ",
|
||||||
|
"│ │├─┘│ │▝▖▞ ▌▌ ▌ ▌",
|
||||||
|
"╵ ╵╰─╯╰─╯ ▝ ▘▘ ▘ ▘",
|
||||||
|
}
|
||||||
|
opts.section.buttons.val = {
|
||||||
|
opts.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
||||||
|
opts.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||||
|
opts.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||||
|
opts.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
||||||
|
opts.button("p", " " .. " Find Project", ":Telescope projects<CR>"),
|
||||||
|
opts.button("s", "勒" .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
|
||||||
|
opts.button("l", "鈴" .. " Lazy (Plugins)", ":Lazy<CR>"),
|
||||||
|
opts.button("m", " " .. " Mason (LSP, DAP, Linter, Formatter)", ":Mason<CR>"),
|
||||||
|
opts.button("q", " " .. " Quit", ":qa<CR>"),
|
||||||
|
opts.padding,
|
||||||
|
}
|
||||||
|
opts.section.header.opts.hl = "String"
|
||||||
|
opts.section.buttons.opts.hl = "Keyword"
|
||||||
|
opts.section.footer.opts.hl = "String"
|
||||||
|
opts.opts.opts.noautocmd = true
|
||||||
|
end,
|
||||||
|
}
|
||||||
8
nvim/lua/plugins/astro.lua
Normal file
8
nvim/lua/plugins/astro.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
-- Astro support
|
||||||
|
-- https://github.com/wuelnerdotexe/vim-astro
|
||||||
|
return {
|
||||||
|
"wuelnerdotexe/vim-astro",
|
||||||
|
config = function()
|
||||||
|
vim.g.astro_typescript = "enable"
|
||||||
|
end,
|
||||||
|
}
|
||||||
10
nvim/lua/plugins/autotag.lua
Normal file
10
nvim/lua/plugins/autotag.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Use treesitter to auto close and auto rename HTML tags
|
||||||
|
-- https://github.com/windwp/nvim-ts-autotag
|
||||||
|
return {
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
config = function()
|
||||||
|
require("nvim-ts-autotag").setup({
|
||||||
|
disable_filetype = { "TelescopePrompt", "vim" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
14
nvim/lua/plugins/blamer.lua
Normal file
14
nvim/lua/plugins/blamer.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-- Show Git blame inline
|
||||||
|
-- https://github.com/APZelos/blamer.nvim
|
||||||
|
return {
|
||||||
|
"APZelos/blamer.nvim",
|
||||||
|
keys = {
|
||||||
|
-- stylua: ignore
|
||||||
|
{ "<leader>gB", "<cmd>BlamerToggle<cr>", desc = "Git Blame" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.g.blamer_enabled = 0
|
||||||
|
vim.g.blamer_relative_time = 1
|
||||||
|
vim.g.blamer_delay = 200
|
||||||
|
end,
|
||||||
|
}
|
||||||
5
nvim/lua/plugins/bookmark.lua
Normal file
5
nvim/lua/plugins/bookmark.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- Vim bookmark plugin
|
||||||
|
-- https://github.com/MattesGroeger/vim-bookmarks
|
||||||
|
return {
|
||||||
|
"MattesGroeger/vim-bookmarks",
|
||||||
|
}
|
||||||
20
nvim/lua/plugins/chafa.lua
Normal file
20
nvim/lua/plugins/chafa.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- View images in Neovim
|
||||||
|
-- https://github.com/princejoogie/chafa.nvim
|
||||||
|
return {
|
||||||
|
"princejoogie/chafa.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"m00qek/baleia.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("chafa").setup({
|
||||||
|
render = {
|
||||||
|
min_padding = 5,
|
||||||
|
show_label = true,
|
||||||
|
},
|
||||||
|
events = {
|
||||||
|
update_on_nvim_resize = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
16
nvim/lua/plugins/cheatsheet.lua
Normal file
16
nvim/lua/plugins/cheatsheet.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-- Searchable Cheatsheet
|
||||||
|
-- https://github.com/sudormrfbin/cheatsheet.nvim
|
||||||
|
return {
|
||||||
|
"sudormrfbin/cheatsheet.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-lua/popup.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>C", "<cmd>Cheatsheet<cr>", desc = "Cheatsheet" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("cheatsheet").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
48
nvim/lua/plugins/cmp.lua
Normal file
48
nvim/lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
return {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
"David-Kunz/cmp-npm",
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, {
|
||||||
|
{ name = "copilot" },
|
||||||
|
{ name = "npm", keyword_length = 4 },
|
||||||
|
}))
|
||||||
|
opts.formatting = {
|
||||||
|
fields = { "kind", "abbr", "menu" },
|
||||||
|
format = function(_, item)
|
||||||
|
local icons = require("lazyvim.config").icons.kinds
|
||||||
|
if icons[item.kind] then
|
||||||
|
item.kind = icons[item.kind]
|
||||||
|
end
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" })
|
||||||
|
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "NONE", bg = "#000000" })
|
||||||
|
|
||||||
|
vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]])
|
||||||
|
vim.cmd([[highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080]])
|
||||||
|
vim.cmd([[highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6]])
|
||||||
|
vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]])
|
||||||
|
vim.cmd([[highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE]])
|
||||||
|
vim.cmd([[highlight! link CmpItemKindInterface CmpItemKindVariable]])
|
||||||
|
vim.cmd([[highlight! link CmpItemKindText CmpItemKindVariable]])
|
||||||
|
vim.cmd([[highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0]])
|
||||||
|
vim.cmd([[highlight! link CmpItemKindMethod CmpItemKindFunction]])
|
||||||
|
vim.cmd([[highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4]])
|
||||||
|
vim.cmd([[highlight! link CmpItemKindProperty CmpItemKindKeyword]])
|
||||||
|
vim.cmd([[highlight! link CmpItemKindUnit CmpItemKindKeyword]])
|
||||||
|
|
||||||
|
-- Original LazyVim kind icon formatter
|
||||||
|
local format_kinds = opts.formatting.format
|
||||||
|
opts.formatting.format = function(entry, item)
|
||||||
|
format_kinds(entry, item) -- add icons
|
||||||
|
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
10
nvim/lua/plugins/code-action-menu.lua
Normal file
10
nvim/lua/plugins/code-action-menu.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Pop-up menu for code actions
|
||||||
|
-- https://github.com/weilbith/nvim-code-action-menu
|
||||||
|
return {
|
||||||
|
"weilbith/nvim-code-action-menu",
|
||||||
|
cmd = "CodeActionMenu",
|
||||||
|
keys = {
|
||||||
|
-- stylua: ignore
|
||||||
|
{ "<leader>cc", "<cmd>CodeActionMenu<cr>", desc = "Code Action Menu" },
|
||||||
|
},
|
||||||
|
}
|
||||||
10
nvim/lua/plugins/codewindow.lua
Normal file
10
nvim/lua/plugins/codewindow.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Minimap
|
||||||
|
-- https://github.com/gorbit99/codewindow.nvim
|
||||||
|
return {
|
||||||
|
"gorbit99/codewindow.nvim",
|
||||||
|
config = function()
|
||||||
|
local codewindow = require("codewindow")
|
||||||
|
codewindow.setup()
|
||||||
|
codewindow.apply_default_keybinds()
|
||||||
|
end,
|
||||||
|
}
|
||||||
29
nvim/lua/plugins/colorizer.lua
Normal file
29
nvim/lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
-- The fastest Neovim colorizer
|
||||||
|
-- https://github.com/norcalli/nvim-colorizer.lua
|
||||||
|
return {
|
||||||
|
"norcalli/nvim-colorizer.lua",
|
||||||
|
config = function()
|
||||||
|
require("colorizer").setup({
|
||||||
|
"css",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"yaml",
|
||||||
|
"conf",
|
||||||
|
"lua",
|
||||||
|
}, {
|
||||||
|
RGB = true,
|
||||||
|
RRGGBB = true,
|
||||||
|
names = true,
|
||||||
|
RRGGBBAA = true,
|
||||||
|
rgb_fn = true,
|
||||||
|
hsl_fn = true,
|
||||||
|
css = true,
|
||||||
|
css_fn = true,
|
||||||
|
mode = "background",
|
||||||
|
tailwind = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
18
nvim/lua/plugins/colorschemes.lua
Normal file
18
nvim/lua/plugins/colorschemes.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-- https://github.com/folke/tokyonight.nvim
|
||||||
|
-- https://github.com/chriskempson/base16-vim
|
||||||
|
-- https://github.com/kartikp10/noctis.nvim
|
||||||
|
-- https://github.com/catppuccin/nvim
|
||||||
|
return {
|
||||||
|
"folke/tokyonight.nvim", -- Tokyo Night color scheme
|
||||||
|
"chriskempson/base16-vim", -- Base16 colorschemes
|
||||||
|
{ "kartikp10/noctis.nvim", dependencies = "rktjmp/lush.nvim" }, -- Noctis color scheme
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin" }, -- Catppuccin color scheme
|
||||||
|
|
||||||
|
-- Configure LazyVim to load Tokyo Night
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "tokyonight-night",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
5
nvim/lua/plugins/committia.lua
Normal file
5
nvim/lua/plugins/committia.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- More pleasant editing on commit messages
|
||||||
|
-- https://github.com/rhysd/committia.vim
|
||||||
|
return {
|
||||||
|
"rhysd/committia.vim",
|
||||||
|
}
|
||||||
10
nvim/lua/plugins/copilot.lua
Normal file
10
nvim/lua/plugins/copilot.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Copilot replacement
|
||||||
|
-- https://github.com/zbirenbaum/copilot.lua
|
||||||
|
-- https://github.com/zbirenbaum/copilot-cmp
|
||||||
|
return {
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
dependencies = "zbirenbaum/copilot.lua",
|
||||||
|
opts = function()
|
||||||
|
require("copilot").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
19
nvim/lua/plugins/cursorline.lua
Normal file
19
nvim/lua/plugins/cursorline.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- Highlight cursor words and lines
|
||||||
|
-- https://github.com/yamatsum/nvim-cursorline
|
||||||
|
return {
|
||||||
|
"yamatsum/nvim-cursorline",
|
||||||
|
config = function()
|
||||||
|
require("nvim-cursorline").setup({
|
||||||
|
cursorline = {
|
||||||
|
enable = true,
|
||||||
|
timeout = 1000,
|
||||||
|
number = false,
|
||||||
|
},
|
||||||
|
cursorword = {
|
||||||
|
enable = true,
|
||||||
|
min_length = 3,
|
||||||
|
hl = { underline = true },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
28
nvim/lua/plugins/dial.lua
Normal file
28
nvim/lua/plugins/dial.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Enhanced increment/decrement
|
||||||
|
-- https://github.com/monaqa/dial.nvim
|
||||||
|
return {
|
||||||
|
"monaqa/dial.nvim",
|
||||||
|
config = function()
|
||||||
|
local augend = require("dial.augend")
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
require("dial.config").augends:register_group({
|
||||||
|
default = {
|
||||||
|
augend.constant.alias.bool,
|
||||||
|
augend.constant.alias.de_weekday,
|
||||||
|
augend.constant.alias.de_weekday_full,
|
||||||
|
augend.date.alias["%d.%m.%Y"],
|
||||||
|
augend.hexcolor.new({ case = "lower" }),
|
||||||
|
augend.integer.alias.decimal_int,
|
||||||
|
augend.semver.alias.semver,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-a>", require("dial.map").inc_normal(), opts)
|
||||||
|
vim.keymap.set("n", "<C-x>", require("dial.map").dec_normal(), opts)
|
||||||
|
vim.keymap.set("v", "<C-a>", require("dial.map").inc_visual(), opts)
|
||||||
|
vim.keymap.set("v", "<C-x>", require("dial.map").dec_visual(), opts)
|
||||||
|
vim.keymap.set("v", "g<C-a>", require("dial.map").inc_gvisual(), opts)
|
||||||
|
vim.keymap.set("v", "g<C-x>", require("dial.map").dec_gvisual(), opts)
|
||||||
|
end,
|
||||||
|
}
|
||||||
20
nvim/lua/plugins/diffview.lua
Normal file
20
nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- Easily cycle through diffs
|
||||||
|
-- https://github.com/sindrets/diffview.nvim
|
||||||
|
return {
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gdo", "<cmd>DiffviewOpen<cr>", desc = "Diffview Open" },
|
||||||
|
{ "<leader>gdx", "<cmd>DiffviewClose<cr>", desc = "Diffview Close" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
view = {
|
||||||
|
use_icons = true,
|
||||||
|
default = {
|
||||||
|
layout = "diff2_horizontal",
|
||||||
|
winbar_info = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
5
nvim/lua/plugins/editorconfig.lua
Normal file
5
nvim/lua/plugins/editorconfig.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- Editorconfig
|
||||||
|
-- https://github.com/editorconfig/editorconfig-vim
|
||||||
|
return {
|
||||||
|
"editorconfig/editorconfig-vim",
|
||||||
|
}
|
||||||
6
nvim/lua/plugins/emmet.lua
Normal file
6
nvim/lua/plugins/emmet.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- Emmet
|
||||||
|
-- https://github.com/mattn/emmet-vim
|
||||||
|
-- <c-y>, to extend
|
||||||
|
return {
|
||||||
|
"mattn/emmet-vim",
|
||||||
|
}
|
||||||
267
nvim/lua/plugins/example.lua
Normal file
267
nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||||
|
-- stylua: ignore
|
||||||
|
if true then return {} end
|
||||||
|
|
||||||
|
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
-- add gruvbox
|
||||||
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
|
|
||||||
|
-- Configure LazyVim to load gruvbox
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "gruvbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change trouble config
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
-- opts will be merged with the parent spec
|
||||||
|
opts = { use_diagnostic_signs = true },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- disable trouble
|
||||||
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
|
-- add symbols-outline
|
||||||
|
{
|
||||||
|
"simrat39/symbols-outline.nvim",
|
||||||
|
cmd = "SymbolsOutline",
|
||||||
|
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- override nvim-cmp and add cmp-emoji
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
local cmp = require("cmp")
|
||||||
|
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change some telescope options and a keymap to browse plugin files
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
keys = {
|
||||||
|
-- add a keymap to browse plugin files
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||||
|
desc = "Find Plugin File",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- change some options
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_config = { prompt_position = "top" },
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add telescope-fzf-native
|
||||||
|
{
|
||||||
|
"telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "make",
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add pyright to lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||||
|
pyright = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
|
init = function()
|
||||||
|
require("lazyvim.util").on_attach(function(_, buffer)
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||||
|
tsserver = {},
|
||||||
|
},
|
||||||
|
-- you can do any additional lsp server setup here
|
||||||
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
|
setup = {
|
||||||
|
-- example to setup with typescript.nvim
|
||||||
|
tsserver = function(_, opts)
|
||||||
|
require("typescript").setup({ server = opts })
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
-- Specify * to use this function as a fallback for any server
|
||||||
|
-- ["*"] = function(server, opts) end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||||
|
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
|
||||||
|
-- add more treesitter parsers
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"help",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||||
|
-- would overwrite `ensure_installed` with the new value.
|
||||||
|
-- If you'd rather extend the default config, use the code below instead:
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- add tsx and treesitter
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- the opts function can also be used to change the default opts:
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, "😄")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- or you can return new options to override all the defaults
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
--[[add your custom lualine config here]]
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use mini.starter instead of alpha
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||||
|
|
||||||
|
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|
||||||
|
-- add any tools you want to have installed below
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"stylua",
|
||||||
|
"shellcheck",
|
||||||
|
"shfmt",
|
||||||
|
"flake8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Use <tab> for completion and snippets (supertab)
|
||||||
|
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
keys = function()
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- then: setup supertab in cmp
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-emoji",
|
||||||
|
},
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
local has_words_before = function()
|
||||||
|
unpack = unpack or table.unpack
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||||
|
-- they way you will only jump inside the snippet region
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
9
nvim/lua/plugins/export-to-vscode.lua
Normal file
9
nvim/lua/plugins/export-to-vscode.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
-- Export active buffers to VS Code
|
||||||
|
-- https://github.com/elijahmanor/export-to-vscode.nvim
|
||||||
|
return {
|
||||||
|
"elijahmanor/export-to-vscode.nvim",
|
||||||
|
keys = {
|
||||||
|
-- stylua: ignore
|
||||||
|
{ "<leader>code", function() require("export-to-vscode").launch() end, desc = "Export to VS Code" },
|
||||||
|
},
|
||||||
|
}
|
||||||
60
nvim/lua/plugins/fm.lua
Normal file
60
nvim/lua/plugins/fm.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
-- Use favorite terminal file managers in Neovim
|
||||||
|
-- https://github.com/is0n/fm-nvim
|
||||||
|
return {
|
||||||
|
"is0n/fm-nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<M-g>", "<cmd>Lazygit<cr>", desc = "Lazygit" },
|
||||||
|
{ "<M-l>", "<cmd>Lf<cr>", desc = "Lf" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
edit_cmd = "edit",
|
||||||
|
on_close = {},
|
||||||
|
on_open = {},
|
||||||
|
ui = {
|
||||||
|
default = "float",
|
||||||
|
float = {
|
||||||
|
border = "rounded",
|
||||||
|
float_hl = "Normal",
|
||||||
|
border_hl = "FloatBorder",
|
||||||
|
blend = 0,
|
||||||
|
height = 0.9,
|
||||||
|
width = 0.9,
|
||||||
|
x = 0.5,
|
||||||
|
y = 0.5,
|
||||||
|
},
|
||||||
|
split = {
|
||||||
|
direction = "topleft",
|
||||||
|
size = 24,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmds = {
|
||||||
|
lf_cmd = "lf",
|
||||||
|
fm_cmd = "fm",
|
||||||
|
nnn_cmd = "nnn",
|
||||||
|
fff_cmd = "fff",
|
||||||
|
twf_cmd = "twf",
|
||||||
|
fzf_cmd = "fzf",
|
||||||
|
fzy_cmd = "find . | fzy",
|
||||||
|
xplr_cmd = "xplr",
|
||||||
|
vifm_cmd = "vifm",
|
||||||
|
skim_cmd = "sk",
|
||||||
|
broot_cmd = "broot",
|
||||||
|
gitui_cmd = "gitui",
|
||||||
|
ranger_cmd = "ranger",
|
||||||
|
joshuto_cmd = "joshuto",
|
||||||
|
lazygit_cmd = "lazygit",
|
||||||
|
neomutt_cmd = "neomutt",
|
||||||
|
taskwarrior_cmd = "taskwarrior-tui",
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
vert_split = "<C-v>",
|
||||||
|
horz_split = "<C-h>",
|
||||||
|
tabedit = "<C-t>",
|
||||||
|
edit = "<C-e>",
|
||||||
|
ESC = "<ESC>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("fm-nvim").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
8
nvim/lua/plugins/gh-line.lua
Normal file
8
nvim/lua/plugins/gh-line.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
-- Open the link of current line on GitHub
|
||||||
|
-- https://github.com/ruanyl/vim-gh-line
|
||||||
|
return {
|
||||||
|
"ruanyl/vim-gh-line",
|
||||||
|
config = function()
|
||||||
|
vim.g.gh_github_domain = "source.xing.com"
|
||||||
|
end,
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user