mirror of
https://github.com/tiyn/dotfiles.git
synced 2026-03-19 14:44:46 +01:00
updated neovim to use modern lazy
This commit is contained in:
8
.config/nvim/after/ftplugin/c.lua
Normal file
8
.config/nvim/after/ftplugin/c.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
vim.api.nvim_create_autocmd({ "VimLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
os.execute("cclear")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
3
.config/nvim/after/ftplugin/css.lua
Normal file
3
.config/nvim/after/ftplugin/css.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
7
.config/nvim/after/ftplugin/csv.lua
Normal file
7
.config/nvim/after/ftplugin/csv.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
|
callback = function()
|
||||||
|
require("csvview").enable()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.textwidth = 0
|
||||||
3
.config/nvim/after/ftplugin/html.lua
Normal file
3
.config/nvim/after/ftplugin/html.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
3
.config/nvim/after/ftplugin/java.lua
Normal file
3
.config/nvim/after/ftplugin/java.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
3
.config/nvim/after/ftplugin/javascript.lua
Normal file
3
.config/nvim/after/ftplugin/javascript.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
3
.config/nvim/after/ftplugin/lua.lua
Normal file
3
.config/nvim/after/ftplugin/lua.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
29
.config/nvim/after/ftplugin/markdown.lua
Normal file
29
.config/nvim/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
|
callback = function()
|
||||||
|
require("tidy").opts.enabled_on_save = false
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||||
|
callback = function()
|
||||||
|
vim.o.foldenable = false
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
if vim.o.ma then
|
||||||
|
require("tidy").run()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "VimLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
os.execute("mdclear " .. vim.fn.expand("%"))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
3
.config/nvim/after/ftplugin/python.lua
Normal file
3
.config/nvim/after/ftplugin/python.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 100
|
||||||
23
.config/nvim/after/ftplugin/tex.lua
Normal file
23
.config/nvim/after/ftplugin/tex.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
|
callback = function()
|
||||||
|
require("tidy").opts.enabled_on_save = false
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
if vim.o.ma then
|
||||||
|
require("tidy").run()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "VimLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
os.execute("texclear " .. vim.fn.expand("%"))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.textwidth = 80
|
||||||
138
.config/nvim/init.lua
Normal file
138
.config/nvim/init.lua
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
-- vim.o.go = "a"
|
||||||
|
vim.o.showmode = false
|
||||||
|
|
||||||
|
-- disable netrw
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
-- enable mouse for all modes
|
||||||
|
vim.o.mouse = "a"
|
||||||
|
vim.o.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
-- basic color settings
|
||||||
|
vim.o.background = "dark"
|
||||||
|
|
||||||
|
-- setting Tab-length
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.softtabstop = 4
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
|
||||||
|
-- splits open at the bottom and right
|
||||||
|
vim.o.splitbelow = true
|
||||||
|
vim.o.splitright = true
|
||||||
|
|
||||||
|
-- disable case sensitive matching
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- enable nocompatible mode
|
||||||
|
-- vim.o.nocompatible = true
|
||||||
|
|
||||||
|
-- enable syntax highlighting
|
||||||
|
vim.o.syntax = "true"
|
||||||
|
|
||||||
|
-- enable true colors
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
-- set utf-8 encoding
|
||||||
|
vim.o.encoding = "utf-8"
|
||||||
|
|
||||||
|
-- show relative numbers on left side
|
||||||
|
vim.o.number = true
|
||||||
|
vim.o.relativenumber = true
|
||||||
|
|
||||||
|
-- speedup vim with long lines
|
||||||
|
vim.o.ttyfast = true
|
||||||
|
-- vim.o.lazyredraw = true
|
||||||
|
|
||||||
|
-- decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
|
-- enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
|
||||||
|
-- textedit might fail without hidden
|
||||||
|
vim.o.hidden = true
|
||||||
|
|
||||||
|
-- disable backupfiles
|
||||||
|
-- vim.o.nobackup = true
|
||||||
|
-- vim.o.nowritebackup = true
|
||||||
|
|
||||||
|
-- set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
|
||||||
|
-- set completion option for command mode
|
||||||
|
vim.o.wildmode = "longest:full,full"
|
||||||
|
|
||||||
|
-- minimum number of lines around the cursor
|
||||||
|
vim.o.scrolloff = 10
|
||||||
|
vim.o.sidescrolloff = 8
|
||||||
|
|
||||||
|
-- always show the signcolumn
|
||||||
|
vim.o.signcolumn = "yes"
|
||||||
|
|
||||||
|
-- enable persistent undo
|
||||||
|
vim.o.undofile = true
|
||||||
|
vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
|
||||||
|
|
||||||
|
-- python programs to use
|
||||||
|
vim.g.python_host_prog = "/usr/bin/python2"
|
||||||
|
vim.g.python3_host_prog = "/usr/bin/python3"
|
||||||
|
|
||||||
|
-- folding
|
||||||
|
vim.o.foldcolumn = "0"
|
||||||
|
vim.o.foldlevel = 99
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
vim.o.foldexpr = "expr"
|
||||||
|
vim.o.foldenable = true
|
||||||
|
vim.o.conceallevel = 0
|
||||||
|
vim.g.markdown_folding = 1
|
||||||
|
|
||||||
|
-- standard settings for colorcolumn and tabbing
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
vim.o.softtabstop = 4
|
||||||
|
vim.o.textwidth = 80
|
||||||
|
|
||||||
|
-- read files correctly
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
c = "c",
|
||||||
|
h = "c",
|
||||||
|
html = "html",
|
||||||
|
java = "java",
|
||||||
|
js = "javascript",
|
||||||
|
lua = "lua",
|
||||||
|
md = "markdown",
|
||||||
|
nim = "nim",
|
||||||
|
py = "python",
|
||||||
|
sage = "python",
|
||||||
|
sh = "bash",
|
||||||
|
tex = "tex",
|
||||||
|
vpr = "viper",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- set mapleader for hotkeys
|
||||||
|
vim.g.mapleader = ","
|
||||||
|
|
||||||
|
-- load general mapped keys
|
||||||
|
require("style")
|
||||||
|
|
||||||
|
-- load plugins (autoload all files in plugin folder)
|
||||||
|
require("loadplugins")
|
||||||
|
|
||||||
|
-- load commands to be run automatically
|
||||||
|
require("autocmd")
|
||||||
|
|
||||||
|
-- load general mapped keys
|
||||||
|
require("keymap")
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
set foldopen-=hor
|
||||||
|
set foldclose-=hor
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Save localoptions to session file
|
||||||
|
vim.opt.sessionoptions:append("localoptions")
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
let mapleader = ","
|
|
||||||
|
|
||||||
" begin plugin section
|
|
||||||
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
|
|
||||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
|
||||||
silent !mkdir -p ~/.config/nvim/autoload/
|
|
||||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
|
||||||
Plug 'qpkorr/vim-renamer'
|
|
||||||
Plug 'tomasiser/vim-code-dark'
|
|
||||||
call plug#end()
|
|
||||||
" end plugin section
|
|
||||||
|
|
||||||
set go=a
|
|
||||||
|
|
||||||
" enable mouse for all modes
|
|
||||||
set mouse=a
|
|
||||||
set clipboard+=unnamedplus
|
|
||||||
|
|
||||||
" enable command completion
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
|
|
||||||
" setting Tab-length
|
|
||||||
set expandtab
|
|
||||||
set softtabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
|
|
||||||
" splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
|
||||||
set splitbelow splitright
|
|
||||||
|
|
||||||
" disable case sensitive matching
|
|
||||||
set ignorecase
|
|
||||||
|
|
||||||
" enable nocompatible mode
|
|
||||||
set nocompatible
|
|
||||||
|
|
||||||
" enable Plugins
|
|
||||||
filetype plugin on
|
|
||||||
|
|
||||||
" enable syntax highlighting
|
|
||||||
syntax on
|
|
||||||
|
|
||||||
" enable true colors
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
" set utf-8 encoding
|
|
||||||
set encoding=utf-8
|
|
||||||
|
|
||||||
" show relative numbers on left side
|
|
||||||
set number relativenumber
|
|
||||||
|
|
||||||
" speedup vim with long lines
|
|
||||||
set ttyfast
|
|
||||||
set lazyredraw
|
|
||||||
|
|
||||||
" textEdit might fail without hidden
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" disable Backupfiles for Lsp
|
|
||||||
set nobackup
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" dont pass messages to ins-completion-menu
|
|
||||||
set shortmess+=c
|
|
||||||
|
|
||||||
" always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
" diagnostics appear/become resolved.
|
|
||||||
if has("patch-8.1.1564")
|
|
||||||
" Recently vim can merge signcolumn and number column into one
|
|
||||||
set signcolumn=number
|
|
||||||
else
|
|
||||||
set signcolumn=yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
" enable persistent undo
|
|
||||||
if has('persistent_undo')
|
|
||||||
set undofile
|
|
||||||
set undodir="$XDG_CACHE_HOME/vim/undo"
|
|
||||||
endif
|
|
||||||
|
|
||||||
" unmap unwanted commands
|
|
||||||
nnoremap <F1> <NOP>
|
|
||||||
nnoremap <F2> <NOP>
|
|
||||||
nnoremap <F3> <NOP>
|
|
||||||
nnoremap <F4> <NOP>
|
|
||||||
nnoremap <F5> <NOP>
|
|
||||||
nnoremap <F8> <NOP>
|
|
||||||
nnoremap <F9> <NOP>
|
|
||||||
nnoremap <F10> <NOP>
|
|
||||||
nnoremap <F11> <NOP>
|
|
||||||
nnoremap <F12> <NOP>
|
|
||||||
|
|
||||||
inoremap <F1> <NOP>
|
|
||||||
inoremap <F2> <NOP>
|
|
||||||
inoremap <F3> <NOP>
|
|
||||||
inoremap <F4> <NOP>
|
|
||||||
inoremap <F5> <NOP>
|
|
||||||
inoremap <F6> <NOP>
|
|
||||||
inoremap <F7> <NOP>
|
|
||||||
inoremap <F8> <NOP>
|
|
||||||
inoremap <F9> <NOP>
|
|
||||||
inoremap <F10> <NOP>
|
|
||||||
inoremap <F11> <NOP>
|
|
||||||
inoremap <F12> <NOP>
|
|
||||||
|
|
||||||
" mapping Dictionaries
|
|
||||||
nnoremap <F6> :setlocal spell! spelllang=de_de<CR>
|
|
||||||
nnoremap <F7> :setlocal spell! spelllang=en_us<CR>
|
|
||||||
|
|
||||||
" compiler for languages
|
|
||||||
nnoremap <leader>c :w! \| !compiler <c-r>%<CR>
|
|
||||||
|
|
||||||
" open corresponding file (pdf/html/...)
|
|
||||||
nnoremap <leader>p :!opout <c-r>%<CR><CR>
|
|
||||||
|
|
||||||
" shortcut for split navigation
|
|
||||||
nnoremap <C-h> <C-w>h
|
|
||||||
nnoremap <C-j> <C-w>j
|
|
||||||
nnoremap <C-k> <C-w>k
|
|
||||||
nnoremap <C-l> <C-w>l
|
|
||||||
|
|
||||||
" save file as sudo on files that require root permission
|
|
||||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
|
||||||
|
|
||||||
" alias for replacing
|
|
||||||
nnoremap <leader>ss :%s//gI<Left><Left><Left>
|
|
||||||
|
|
||||||
" delete trailing whitespaces on save
|
|
||||||
fun! TrimWhitespace()
|
|
||||||
let l:save = winsaveview()
|
|
||||||
keeppatterns %s/\s\+$//e
|
|
||||||
call winrestview(l:save)
|
|
||||||
endfun
|
|
||||||
autocmd BufWritePre * :call TrimWhitespace()
|
|
||||||
|
|
||||||
" read files correctly
|
|
||||||
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
|
||||||
autocmd BufRead,BufNewFile *.h set filetype=c
|
|
||||||
|
|
||||||
" formatting
|
|
||||||
autocmd FileType c setlocal formatprg=astyle\ --mode=c
|
|
||||||
autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google
|
|
||||||
autocmd FileType java setlocal shiftwidth=2 softtabstop=2
|
|
||||||
autocmd FileType markdown noremap <F8> :silent %!prettier --stdin-filepath % <CR>
|
|
||||||
autocmd FileType python setlocal formatprg=autopep8\ -
|
|
||||||
autocmd FileType tex,latex setlocal formatprg=latexindent\ -
|
|
||||||
autocmd FileType c,java,python,tex,latex noremap <F8> gggqG
|
|
||||||
|
|
||||||
" cleanup certain files after leaving the editor
|
|
||||||
autocmd VimLeave *.tex !texclear %
|
|
||||||
autocmd VimLeave *.c !cclear
|
|
||||||
|
|
||||||
" highlighting break line
|
|
||||||
autocmd BufEnter,FileType c set colorcolumn=80
|
|
||||||
autocmd BufEnter,FileType java set colorcolumn=100
|
|
||||||
autocmd BufEnter,FileType markdown set colorcolumn=80
|
|
||||||
|
|
||||||
" colorscheme
|
|
||||||
colorscheme codedark
|
|
||||||
highlight colorcolumn guibg=#772222
|
|
||||||
87
.config/nvim/lazy-lock.json
Normal file
87
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"action-hints.nvim": { "branch": "main", "commit": "ac72c23c2e901084e0c08a743942d8d7b8c560de" },
|
||||||
|
"barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
|
||||||
|
"blink.download": { "branch": "main", "commit": "86361b98f3c8317904a08e3bd12cf3cdcbe3e925" },
|
||||||
|
"blink.pairs": { "branch": "main", "commit": "5a34bf6ea72340a70083548e186d745ac4882899" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-dictionary": { "branch": "main", "commit": "fecc3ef2435c2be35818f8fcac4a6c5655f3a8f0" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
|
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||||
|
"cpsm": { "branch": "master", "commit": "c32a9b7dc9d5b516505bc8ab58ceb15f64735830" },
|
||||||
|
"csvview.nvim": { "branch": "main", "commit": "7022e18a0fbae9aecf99a3ba02b2a541edc2b8a1" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"edgy.nvim": { "branch": "main", "commit": "8bfd2808994a988c975694122f68624b8a219f5f" },
|
||||||
|
"fterm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
||||||
|
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
|
||||||
|
"git-blame.nvim": { "branch": "main", "commit": "93d983806a0c76692bebd6f804c8eaa2a3844452" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
||||||
|
"goto-preview": { "branch": "main", "commit": "d2d6923c9b9e0e43f0b9b566f261a8b1ae016540" },
|
||||||
|
"image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||||
|
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
|
||||||
|
"knap": { "branch": "main", "commit": "7db44d0bb760120142cc1e8f43e44976de59c2f6" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
|
"leap.nvim": { "branch": "main", "commit": "774c452da3521d4434f912b6ca6dd97318aca4b0" },
|
||||||
|
"logger.nvim": { "branch": "main", "commit": "63dd10c9b9a159fd6cfe08435d9606384ff103c5" },
|
||||||
|
"lsp_signature.nvim": { "branch": "master", "commit": "af7e4074d85d785cf6614352ba9ad3b28a1f8a56" },
|
||||||
|
"lspkind-nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
|
"luasnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||||
|
"mason-null-ls.nvim": { "branch": "main", "commit": "8e7806acaa87fae64f0bfde25bb4b87c18bd19b4" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
|
"mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" },
|
||||||
|
"modes.nvim": { "branch": "main", "commit": "0932ba4e0bdc3457ac89a8aeed4d56ca0b36977a" },
|
||||||
|
"molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" },
|
||||||
|
"none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "6ed09146ee637006367b5e225be6208a1ea02579" },
|
||||||
|
"nvim-docs-view": { "branch": "master", "commit": "5676cc094d426edd39134b1eefca2cab441cca8a" },
|
||||||
|
"nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" },
|
||||||
|
"nvim-lilypond-suite": { "branch": "main", "commit": "a1a313fd6028a196cc9aaa8c8501838fe8cc8e2a" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "dd261ad5266ab5bbec249d21efeceda98ff3e1a6" },
|
||||||
|
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
|
||||||
|
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "b3772adec8db61ba9098c5624a0823a77be3a23d" },
|
||||||
|
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||||
|
"nvim-yarp": { "branch": "master", "commit": "bb5f5e038bfe119d3b777845a76b0b919b35ebc8" },
|
||||||
|
"ogpt.nvim": { "branch": "main", "commit": "0fae02db8cb07391f86c3dbe807f62190a2d997f" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
|
||||||
|
"otter.nvim": { "branch": "main", "commit": "4796602953348e19fb24916557af7b89e188751f" },
|
||||||
|
"outline.nvim": { "branch": "main", "commit": "ead1820d49c8e79ce89cab1c2c318981b695c9d2" },
|
||||||
|
"papis.nvim": { "branch": "main", "commit": "25e69f25e51b2d46178a213356adbc28b0f918ef" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"popup-menu.nvim": { "branch": "master", "commit": "b618bd0c824a20417d845fa0022327228e6988a2" },
|
||||||
|
"projections.nvim": { "branch": "pre_release", "commit": "889914169fa1f5c00fb8659653b5a8330fb223e6" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"quarto-nvim": { "branch": "main", "commit": "d923bb7cfc2bde41143e1c531c28190f0fade3a2" },
|
||||||
|
"renamer.nvim": { "branch": "master", "commit": "1614d466df53899f11dd5395eaac3c09a275c384" },
|
||||||
|
"rustaceanvim": { "branch": "master", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
|
||||||
|
"spelunker.vim": { "branch": "master", "commit": "a0bc530f62798bbe053905555a4aa9ed713485eb" },
|
||||||
|
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||||
|
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||||
|
"tccs.nvim": { "branch": "master", "commit": "06df4330266bb4b85458745b5090b29386722512" },
|
||||||
|
"telescope-words.nvim": { "branch": "main", "commit": "295d51fe1e525fee18c0c164ad0ae5fb23273aa0" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
|
||||||
|
"tidy.nvim": { "branch": "main", "commit": "8b6921150b16f38f48a2459a844a0c2b4c916914" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
|
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
||||||
|
"vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" },
|
||||||
|
"vim-hug-neovim-rpc": { "branch": "master", "commit": "93ae38792bc197c3bdffa2716ae493c67a5e7957" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||||
|
"vim-markdown": { "branch": "master", "commit": "1bc9d0cd8e1cc3e901b0a49c2b50a843f1c89397" },
|
||||||
|
"viper.nvim": { "branch": "master", "commit": "738bf63d98aca63d7def93181eb16d648a6c0edb" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||||
|
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" },
|
||||||
|
"winshift.nvim": { "branch": "main", "commit": "37468ed6f385dfb50402368669766504c0e15583" }
|
||||||
|
}
|
||||||
32
.config/nvim/lua/autocmd.lua
Normal file
32
.config/nvim/lua/autocmd.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
-- highlighting yanked regions
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank({ higroup = "YankHighlight" })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- -- gnikdroy/projections.nvim
|
||||||
|
-- local Session = require("projections.session")
|
||||||
|
-- vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||||
|
-- callback = function()
|
||||||
|
-- Session.store(vim.loop.cwd())
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
--
|
||||||
|
-- vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
|
-- callback = function()
|
||||||
|
-- if vim.fn.argc() ~= 0 then
|
||||||
|
-- return
|
||||||
|
-- end
|
||||||
|
-- local session_info = Session.info(vim.loop.cwd())
|
||||||
|
-- if session_info ~= nil then
|
||||||
|
-- Session.restore(vim.loop.cwd())
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- desc = "Restore last session automatically",
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- stevearc/oil.nvim
|
||||||
|
vim.api.nvim_create_user_command("Renamer", function(opts)
|
||||||
|
vim.cmd("Oil " .. opts.args)
|
||||||
|
end, { nargs = "*" })
|
||||||
346
.config/nvim/lua/keymap.lua
Normal file
346
.config/nvim/lua/keymap.lua
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
-- setup keymap function
|
||||||
|
local lazygit = require("FTerm"):new({ cmd = "lazygit" })
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
wk.add({
|
||||||
|
-- setup keymap groups
|
||||||
|
{ mode = "n", "g", desc = "LSP: goto" },
|
||||||
|
{ mode = "n", "gp", desc = "LSP: preview" },
|
||||||
|
{ mode = "c", "w", desc = "Write" },
|
||||||
|
{ mode = "c", "w!", desc = "Write: overwrite" },
|
||||||
|
{ mode = "n", "<leader>a", desc = "AI" },
|
||||||
|
{ mode = "n", "<leader>g", desc = "Git" },
|
||||||
|
{ mode = "n", "<leader>f", desc = "Telescope: find" },
|
||||||
|
{ mode = "n", "<leader>gd", desc = "Git: diff" },
|
||||||
|
{ mode = "n", "<leader>s", desc = "Substitute" },
|
||||||
|
{ mode = "n", "<leader>t", desc = "Terminal" },
|
||||||
|
{ mode = "n", "<C-W>", desc = "Navigation" },
|
||||||
|
-- unmap unwanted commands
|
||||||
|
{ mode = "n", "Zt", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "ZT", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<Space>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F1>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F2>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F3>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F4>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F5>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F6>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F7>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F8>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F9>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F10>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F11>", "<NOP>", noremap = true },
|
||||||
|
{ mode = "n", "<F12>", "<NOP>", noremap = true },
|
||||||
|
-- shortcuts for quitting
|
||||||
|
{ mode = "n", "ZA", ":xa<CR>", desc = "Exit: write and quit all buffers", noremap = true },
|
||||||
|
{ mode = "n", "ZQ", ":conf q<CR>", desc = "Exit: quit current buffer", noremap = true },
|
||||||
|
{ mode = "n", "ZZ", ":x<CR>", desc = "Exit: write and quit current buffer", noremap = true },
|
||||||
|
-- shortcut for split navigation
|
||||||
|
{ mode = "n", "<C-h>", "<C-w>h", desc = "Navigation: go to left window", noremap = true },
|
||||||
|
{ mode = "n", "<C-j>", "<C-w>j", desc = "Navigation: go to lower window", noremap = true },
|
||||||
|
{ mode = "n", "<C-k>", "<C-w>k", desc = "Navigation: go to upper window", noremap = true },
|
||||||
|
{ mode = "n", "<C-l>", "<C-w>l", desc = "Navigation: go to right window", noremap = true },
|
||||||
|
-- remap for dealing with word wrap
|
||||||
|
{ mode = "n", "j", "gj", desc = "Navigation: go down in wrapped lines", silent = true },
|
||||||
|
{ mode = "n", "k", "gk", desc = "Navigation: go up in wrapped lines", silent = true },
|
||||||
|
-- compiler for languages
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>c",
|
||||||
|
":w! | !compiler <c-r>%<CR>",
|
||||||
|
desc = "Compile: current file",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"w!!",
|
||||||
|
'execute "silent! write !sudo tee % >/dev/null" <bar> edit!',
|
||||||
|
desc = "Write: overwrite file over with sudo",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- tpope/vim-abolish
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>sa",
|
||||||
|
":%S//g<Left><Left>",
|
||||||
|
desc = "Substitute: free form",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>ss",
|
||||||
|
":%S/\\<<C-r><C-w>\\>//g<Left><Left>",
|
||||||
|
desc = "Substitute: word under cursor",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- simrat39/symbols-outline.nvim
|
||||||
|
{ mode = "n", "<F3>", ":Outline<CR>", desc = "CTags: toggle" },
|
||||||
|
-- nvim-tree/nvim-tree.lua
|
||||||
|
{ mode = "n", "<F2>", ":NvimTreeToggle toggle<CR>", desc = "File tree: toggle" },
|
||||||
|
-- mbbill/undotree
|
||||||
|
{ mode = "n", "<F1>", ":UndotreeToggle<CR>", desc = "Undo tree: toggle" },
|
||||||
|
-- amrbashir/nvim-docs-view
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"go",
|
||||||
|
":DocsViewToggle<CR>",
|
||||||
|
desc = "LSP: toggle documentation window",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- numtostr/fterm.nvim
|
||||||
|
{ mode = "n", "<leader>tt", require("FTerm").toggle, desc = "Terminal: open", noremap = true },
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>gt",
|
||||||
|
function()
|
||||||
|
lazygit:toggle()
|
||||||
|
end,
|
||||||
|
desc = "Git: open lazygit",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>tg",
|
||||||
|
function()
|
||||||
|
lazygit:toggle()
|
||||||
|
end,
|
||||||
|
desc = "Terminal: open lazygit",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- sindrets/diffview.nvim
|
||||||
|
{ mode = "n", "<leader>gdo", ":DiffviewOpen<CR>", desc = "Git: open diff" },
|
||||||
|
{ mode = "n", "<leader>gdc", ":DiffviewClose<CR>", desc = "Git: close diff" },
|
||||||
|
-- folke/trouble.nvim
|
||||||
|
{ mode = "n", "<F4>", ":Trouble diagnostics toggle<CR>", desc = "LSP: toggle error list" },
|
||||||
|
-- hrsh7th/nvim-cmp
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gd",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.definition()
|
||||||
|
end,
|
||||||
|
desc = "LSP: goto definition",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gD",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.declaration()
|
||||||
|
end,
|
||||||
|
desc = "LSP: goto declaration",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gT",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.type_definition()
|
||||||
|
end,
|
||||||
|
desc = "LSP: goto type definition",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gi",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.implementation()
|
||||||
|
end,
|
||||||
|
desc = "LSP: list implementation",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gr",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.references()
|
||||||
|
end,
|
||||||
|
desc = "LSP: list references",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{ mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true },
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<F8>",
|
||||||
|
function()
|
||||||
|
require("conform").format({ async = true, lsp_fallback = true })
|
||||||
|
end,
|
||||||
|
desc = "LSP: format",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- rmagatti/goto-preview
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpd",
|
||||||
|
function()
|
||||||
|
require("goto-preview").goto_preview_definition()
|
||||||
|
end,
|
||||||
|
desc = "LSP: preview definition",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpy",
|
||||||
|
function()
|
||||||
|
require("goto-preview").goto_preview_type_definition()
|
||||||
|
end,
|
||||||
|
desc = "LSP: preview type definition",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpi",
|
||||||
|
function()
|
||||||
|
require("goto-preview").goto_preview_implementation()
|
||||||
|
end,
|
||||||
|
desc = "LSP: list preview implementation",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpD",
|
||||||
|
function()
|
||||||
|
require("goto-preview").goto_preview_declaration()
|
||||||
|
end,
|
||||||
|
desc = "LSP: preview declaration",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpr",
|
||||||
|
function()
|
||||||
|
require("goto-preview").goto_preview_references()
|
||||||
|
end,
|
||||||
|
desc = "LSP: list preview references",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gpc",
|
||||||
|
function()
|
||||||
|
require("goto-preview").close_all_win()
|
||||||
|
end,
|
||||||
|
desc = "LSP: close all preview windows",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- filipdutescu/renamer.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<F5>",
|
||||||
|
function()
|
||||||
|
require("renamer").rename()
|
||||||
|
end,
|
||||||
|
desc = "LSP: rename",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- nvim-telescope/telescope.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>ff",
|
||||||
|
":Telescope find_files<CR>",
|
||||||
|
desc = "Telescope: find files",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>ff",
|
||||||
|
":Telescope find_files<CR>",
|
||||||
|
desc = "Telescope: find files",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- archie-judd/telescope-words.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>wd",
|
||||||
|
telescope.extensions.telescope_words.search_dictionary,
|
||||||
|
desc = "Telescope: search dictionary",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>wt",
|
||||||
|
telescope.extensions.telescope_words.search_thesaurus,
|
||||||
|
desc = "Telescope: search thesaurus",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- gnikdroy/projections.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<leader>fp",
|
||||||
|
function()
|
||||||
|
vim.cmd("Telescope projections")
|
||||||
|
end,
|
||||||
|
desc = "Telescope: find projects",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- kamykn/spelunker.vim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<F10>t",
|
||||||
|
":call spelunker#toggle()<CR>",
|
||||||
|
desc = "Spelunker: toggle spell check",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{ mode = "n", "<F10>s", "z=", desc = "Spell: display suggestions" },
|
||||||
|
-- kevinhwang91/nvim-ufo
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"K",
|
||||||
|
function()
|
||||||
|
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||||
|
if not winid then
|
||||||
|
vim.lsp.buf.hover()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "LSP: peek folded section",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- kevinhwang91/nvim-hlslens
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"n",
|
||||||
|
[[<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require('hlslens').start()<CR>]],
|
||||||
|
desc = "Search: search forward",
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"N",
|
||||||
|
[[<Cmd>execute('normal! ' . v:count1 . 'N')<CR><Cmd>lua require('hlslens').start()<CR>]],
|
||||||
|
desc = "Search: search backwards",
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
-- sindrets/winshift.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"<C-W>m",
|
||||||
|
":WinShift<CR>",
|
||||||
|
desc = "Navigation: enter window shift mode",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
-- ggandor/leap.nvim
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"f",
|
||||||
|
"<Plug>(leap-forward)",
|
||||||
|
desc = "Navigation: enter leap mode for forward movement",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"F",
|
||||||
|
"<Plug>(leap-backward)",
|
||||||
|
desc = "Navigation: enter leap mode for backwards movement",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "n",
|
||||||
|
"gf",
|
||||||
|
"<Plug>(leap-from-window)",
|
||||||
|
desc = "Navigation: enter leap mode for other windows",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
26
.config/nvim/lua/loadplugins.lua
Normal file
26
.config/nvim/lua/loadplugins.lua
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
-- bootstrap lazy
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable",
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
return require("lazy").setup(
|
||||||
|
{
|
||||||
|
-- import plugins from the plugins directory
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
-- lazy.nvim configuration
|
||||||
|
{
|
||||||
|
ui = {
|
||||||
|
icons = Lazy_signs,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
15
.config/nvim/lua/plugins/barbecue.lua
Normal file
15
.config/nvim/lua/plugins/barbecue.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
-- vs code like topbar
|
||||||
|
"utilyre/barbecue.nvim",
|
||||||
|
name = "barbecue",
|
||||||
|
version = "*",
|
||||||
|
dependencies = {
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- optional dependency
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
theme = {
|
||||||
|
normal = { bg = "#272727" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
33
.config/nvim/lua/plugins/blink-pairs.lua
Normal file
33
.config/nvim/lua/plugins/blink-pairs.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
-- rainbow auto-pairs
|
||||||
|
"saghen/blink.pairs",
|
||||||
|
version = "*", -- (recommended) only required with prebuilt binaries
|
||||||
|
-- download prebuilt binaries from github releases
|
||||||
|
dependencies = "saghen/blink.download",
|
||||||
|
--- @module 'blink.pairs'
|
||||||
|
--- @type blink.pairs.Config
|
||||||
|
opts = {
|
||||||
|
mappings = {
|
||||||
|
enabled = true,
|
||||||
|
pairs = {
|
||||||
|
["("] = ")",
|
||||||
|
["["] = "]",
|
||||||
|
["{"] = "}",
|
||||||
|
["'"] = "'",
|
||||||
|
['"'] = '"',
|
||||||
|
["`"] = "`",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
highlights = {
|
||||||
|
enabled = true,
|
||||||
|
groups = {
|
||||||
|
"BlinkPairsOrange",
|
||||||
|
"BlinkPairsPurple",
|
||||||
|
"BlinkPairsBlue",
|
||||||
|
},
|
||||||
|
priority = 200,
|
||||||
|
ns = vim.api.nvim_create_namespace("blink.pairs"),
|
||||||
|
},
|
||||||
|
debug = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/comment.lua
Normal file
5
.config/nvim/lua/plugins/comment.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- commenting improvements
|
||||||
|
"numtostr/comment.nvim",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
18
.config/nvim/lua/plugins/conform.lua
Normal file
18
.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
-- improved refactoring
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
markdown = { "mdformat" },
|
||||||
|
python = { "isort", "yapf" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
bash = { "shfmt" },
|
||||||
|
zsh = { "shfmt" },
|
||||||
|
tex = { "latexindent" },
|
||||||
|
yaml = { "yamlfmt" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
16
.config/nvim/lua/plugins/csvview.lua
Normal file
16
.config/nvim/lua/plugins/csvview.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
-- improved csv handling
|
||||||
|
"hat0uma/csvview.nvim",
|
||||||
|
opts = {
|
||||||
|
parser = { comments = { "#", "//" } },
|
||||||
|
keymaps = {
|
||||||
|
textobject_field_inner = { "if", mode = { "o", "x" } },
|
||||||
|
textobject_field_outer = { "af", mode = { "o", "x" } },
|
||||||
|
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
|
||||||
|
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
|
||||||
|
jump_next_row = { "<Enter>", mode = { "n", "v" } },
|
||||||
|
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/diffview.lua
Normal file
5
.config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- side by side git diffs for merge conflicts
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/fterm.lua
Normal file
5
.config/nvim/lua/plugins/fterm.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- floating terminal to toggle
|
||||||
|
"numtostr/fterm.nvim",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/gitsigns.lua
Normal file
5
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- display git status per line
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
8
.config/nvim/lua/plugins/goto-preview.lua
Normal file
8
.config/nvim/lua/plugins/goto-preview.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
-- preview definitions using floating windows
|
||||||
|
"rmagatti/goto-preview",
|
||||||
|
dependencies = "rmagatti/logger.nvim",
|
||||||
|
config = function()
|
||||||
|
require("goto-preview").setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
7
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- show indentation lines
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
main = "ibl",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
13
.config/nvim/lua/plugins/leap.lua
Normal file
13
.config/nvim/lua/plugins/leap.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
-- improved movement
|
||||||
|
url = "https://codeberg.org/andyg/leap.nvim",
|
||||||
|
config = function()
|
||||||
|
require("leap").opts.highlight_unlabeled_phase_one_targets = true
|
||||||
|
require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" }
|
||||||
|
require("leap").opts.special_keys.prev_target = "<backspace>"
|
||||||
|
require("leap").opts.special_keys.prev_group = "<backspace>"
|
||||||
|
require("leap.user").set_repeat_keys("<enter>", "<backspace>")
|
||||||
|
require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?"
|
||||||
|
require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?"
|
||||||
|
end,
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/lsp_signature.lua
Normal file
12
.config/nvim/lua/plugins/lsp_signature.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
-- show function signature while typing
|
||||||
|
"ray-x/lsp_signature.nvim",
|
||||||
|
opts = {
|
||||||
|
bind = true,
|
||||||
|
handler_opts = {
|
||||||
|
border = "none",
|
||||||
|
},
|
||||||
|
hint_prefix = Hint_sign,
|
||||||
|
hint_scheme = "DiagnosticSignHint",
|
||||||
|
},
|
||||||
|
}
|
||||||
80
.config/nvim/lua/plugins/lualine.lua
Normal file
80
.config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
return {
|
||||||
|
-- statusline
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.g.gitblame_display_virtual_text = 0
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "tiyn/tccs.nvim" },
|
||||||
|
{
|
||||||
|
"tiyn/action-hints.nvim",
|
||||||
|
config = function()
|
||||||
|
require("action-hints").setup({
|
||||||
|
template = {
|
||||||
|
-- definition = { text = "D", color = "#add8e6" },
|
||||||
|
-- references = { text = "R%s", color = "#ff6666" },
|
||||||
|
definition = { text = Definition_sign, color = "#add8e6" },
|
||||||
|
references = { text = Reference_sign, color = "#ff6666" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
globalstatus = true,
|
||||||
|
symbols = {
|
||||||
|
error = Error_sign,
|
||||||
|
warn = Warn_sign,
|
||||||
|
hint = Hint_sign,
|
||||||
|
info = Info_sign,
|
||||||
|
},
|
||||||
|
theme = "tccs",
|
||||||
|
component_separators = { left = "", right = "" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_b = {
|
||||||
|
{
|
||||||
|
require("gitblame").get_current_blame_text,
|
||||||
|
cond = require("gitblame").is_blame_text_available,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {
|
||||||
|
require("action-hints").statusline,
|
||||||
|
"encoding",
|
||||||
|
"fileformat",
|
||||||
|
{
|
||||||
|
"filetype",
|
||||||
|
icon_only = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_y = {
|
||||||
|
{
|
||||||
|
"filename",
|
||||||
|
file_status = true,
|
||||||
|
newfile_status = true,
|
||||||
|
path = 1,
|
||||||
|
shorting_target = 50,
|
||||||
|
symbols = {
|
||||||
|
modified = Lualine_signs["modified"],
|
||||||
|
readonly = Lualine_signs["readonly"],
|
||||||
|
unnamed = Lualine_signs["unnamed"],
|
||||||
|
newfile = Lualine_signs["newfile"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_z = { "progress", "location" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
50
.config/nvim/lua/plugins/mason.lua
Normal file
50
.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
return {
|
||||||
|
-- lang server installations
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
config = function()
|
||||||
|
require("null-ls").setup({
|
||||||
|
sources = {
|
||||||
|
-- assembler
|
||||||
|
require("null-ls").builtins.formatting.asmfmt,
|
||||||
|
-- lua
|
||||||
|
require("null-ls").builtins.formatting.stylua,
|
||||||
|
-- markdown
|
||||||
|
require("null-ls").builtins.formatting.mdformat,
|
||||||
|
-- python
|
||||||
|
require("null-ls").builtins.formatting.isort,
|
||||||
|
require("null-ls").builtins.formatting.yapf,
|
||||||
|
-- shell
|
||||||
|
require("null-ls").builtins.formatting.shfmt,
|
||||||
|
-- yaml
|
||||||
|
require("null-ls").builtins.formatting.yamlfmt,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"jay-babu/mason-null-ls.nvim",
|
||||||
|
opts = {
|
||||||
|
automatic_installation = true,
|
||||||
|
ensure_installed = {
|
||||||
|
-- assembler
|
||||||
|
"asmfmt",
|
||||||
|
-- lua
|
||||||
|
"stylua",
|
||||||
|
-- markdown
|
||||||
|
"mdformat",
|
||||||
|
-- python
|
||||||
|
"isort",
|
||||||
|
"yapf",
|
||||||
|
-- shell
|
||||||
|
"shfmt",
|
||||||
|
-- yaml
|
||||||
|
"yamlfmt",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = { ui = { icons = Install_signs } },
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/modes.lua
Normal file
7
.config/nvim/lua/plugins/modes.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- decorations for the current line mode
|
||||||
|
"mvllow/modes.nvim",
|
||||||
|
config = function()
|
||||||
|
require("modes").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
85
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
85
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
return {
|
||||||
|
-- autocompletion and its sources and snippets
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"onsails/lspkind-nvim",
|
||||||
|
-- cmp sources
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"uga-rosa/cmp-dictionary",
|
||||||
|
"lukas-reineke/cmp-under-comparator",
|
||||||
|
-- luasnip
|
||||||
|
{
|
||||||
|
"l3mon4d3/luasnip",
|
||||||
|
config = function()
|
||||||
|
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||||
|
end,
|
||||||
|
version = "v2.*",
|
||||||
|
dependencies = { "saadparwaiz1/cmp_luasnip" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup({
|
||||||
|
sorting = {
|
||||||
|
comparators = {
|
||||||
|
cmp.config.compare.offset,
|
||||||
|
cmp.config.compare.exact,
|
||||||
|
cmp.config.compare.score,
|
||||||
|
require("cmp-under-comparator").under,
|
||||||
|
cmp.config.compare.kind,
|
||||||
|
cmp.config.compare.sort_text,
|
||||||
|
cmp.config.compare.length,
|
||||||
|
cmp.config.compare.order,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif require("luasnip").jumpable(-1) then
|
||||||
|
require("luasnip").jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif require("luasnip").expand_or_jumpable() then
|
||||||
|
require("luasnip").expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "dictionary" },
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
format = require("lspkind").cmp_format({
|
||||||
|
mode = "symbol_text",
|
||||||
|
preset = "codicons",
|
||||||
|
maxwidth = 50,
|
||||||
|
menu = Menu_signs,
|
||||||
|
symbol_map = Lsp_signs,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
27
.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
27
.config/nvim/lua/plugins/nvim-colorizer.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
-- showing color of hex values, etc
|
||||||
|
"ChristianChiarulli/nvim-colorizer.lua",
|
||||||
|
opts = {
|
||||||
|
filetypes = {
|
||||||
|
"*",
|
||||||
|
"!markdown",
|
||||||
|
},
|
||||||
|
user_default_options = {
|
||||||
|
RGB = true,
|
||||||
|
RRGGBB = true,
|
||||||
|
RRGGBBAA = true,
|
||||||
|
AARRGGBB = true,
|
||||||
|
rgb_fn = true,
|
||||||
|
hsl_fn = true,
|
||||||
|
css_fn = true,
|
||||||
|
mode = "virtualtext",
|
||||||
|
virtualtext = " ",
|
||||||
|
},
|
||||||
|
-- all the sub-options of filetypes apply to buftypes
|
||||||
|
buftypes = {
|
||||||
|
"*",
|
||||||
|
"!prompt",
|
||||||
|
"!popup",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
9
.config/nvim/lua/plugins/nvim-docs-view.lua
Normal file
9
.config/nvim/lua/plugins/nvim-docs-view.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
-- hover documentation
|
||||||
|
"tiyn/nvim-docs-view",
|
||||||
|
lazy = true,
|
||||||
|
cmd = "DocsViewToggle",
|
||||||
|
opts = {
|
||||||
|
position = "bottom",
|
||||||
|
},
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/nvim-hlslens.lua
Normal file
7
.config/nvim/lua/plugins/nvim-hlslens.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- improved virtual text
|
||||||
|
"kevinhwang91/nvim-hlslens",
|
||||||
|
opts = {
|
||||||
|
calm_down = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
98
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
98
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
return {
|
||||||
|
-- lang server management
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
{
|
||||||
|
"mrcjkb/rustaceanvim",
|
||||||
|
version = "^6",
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
config = function()
|
||||||
|
Capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
Capabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
automatic_setup = true,
|
||||||
|
ensure_installed = {
|
||||||
|
-- assembler
|
||||||
|
-- "asm_lsp", -- TODO: needs extra steps to install (rust)
|
||||||
|
-- c
|
||||||
|
"clangd",
|
||||||
|
-- docker
|
||||||
|
"dockerls",
|
||||||
|
-- go
|
||||||
|
"gopls",
|
||||||
|
-- html
|
||||||
|
"html",
|
||||||
|
-- json
|
||||||
|
"jsonls",
|
||||||
|
-- xml
|
||||||
|
"lemminx",
|
||||||
|
-- latex
|
||||||
|
-- "ltex", -- TODO: needs extra steps to install
|
||||||
|
"texlab",
|
||||||
|
-- lua
|
||||||
|
"lua_ls",
|
||||||
|
-- markdown
|
||||||
|
"marksman",
|
||||||
|
-- nim
|
||||||
|
-- "nimls", -- TODO: needs extra steps to install (nimble)
|
||||||
|
-- python
|
||||||
|
"pyright",
|
||||||
|
-- r
|
||||||
|
-- "r_language_server", -- TODO: installation takes really long
|
||||||
|
-- shell
|
||||||
|
"bashls",
|
||||||
|
-- sql
|
||||||
|
"sqlls",
|
||||||
|
-- typescript / javascript
|
||||||
|
"ts_ls",
|
||||||
|
-- yaml
|
||||||
|
"yamlls",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
local default_flags = {
|
||||||
|
debounce_text_changes = 150,
|
||||||
|
allow_incremental_sync = true,
|
||||||
|
progress = true,
|
||||||
|
}
|
||||||
|
local servers = {
|
||||||
|
ltex = {
|
||||||
|
settings = {
|
||||||
|
ltex = {
|
||||||
|
-- language = "de-DE",
|
||||||
|
enabled = { "latex", "markdown" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pyright = {},
|
||||||
|
}
|
||||||
|
for name, config in pairs(servers) do
|
||||||
|
vim.lsp.config(
|
||||||
|
name,
|
||||||
|
vim.tbl_extend("force", config, {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = Capabilities,
|
||||||
|
flags = default_flags,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
57
.config/nvim/lua/plugins/nvim-scrollbar.lua
Normal file
57
.config/nvim/lua/plugins/nvim-scrollbar.lua
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
return {
|
||||||
|
-- scrollbar with git and diagnostics support for easier navigation
|
||||||
|
"petertriho/nvim-scrollbar",
|
||||||
|
dependencies = {
|
||||||
|
"kevinhwang91/nvim-hlslens",
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("scrollbar").setup({
|
||||||
|
marks = {
|
||||||
|
Cursor = {
|
||||||
|
highlight = "Normal",
|
||||||
|
},
|
||||||
|
Search = {
|
||||||
|
highlight = "Special",
|
||||||
|
},
|
||||||
|
Error = {
|
||||||
|
highlight = "DiagnosticSignError",
|
||||||
|
},
|
||||||
|
Warn = {
|
||||||
|
highlight = "DiagnosticSignWarn",
|
||||||
|
},
|
||||||
|
Info = {
|
||||||
|
highlight = "DiagnosticSignInfo",
|
||||||
|
},
|
||||||
|
Hint = {
|
||||||
|
highlight = "DiagnosticSignHint",
|
||||||
|
},
|
||||||
|
Misc = {
|
||||||
|
highlight = "Special",
|
||||||
|
},
|
||||||
|
GitAdd = {
|
||||||
|
highlight = "GitGutterAdd",
|
||||||
|
},
|
||||||
|
GitChange = {
|
||||||
|
highlight = "GitGutterChange",
|
||||||
|
},
|
||||||
|
GitDelete = {
|
||||||
|
highlight = "GitGutterDelete",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
excluded_filetypes = {
|
||||||
|
"cmp_docs",
|
||||||
|
"cmp_menu",
|
||||||
|
"noice",
|
||||||
|
"prompt",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"NvimTree",
|
||||||
|
"Navbuddy",
|
||||||
|
"FTerm",
|
||||||
|
"",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("scrollbar.handlers.search").setup()
|
||||||
|
require("scrollbar.handlers.gitsigns").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/nvim-surround.lua
Normal file
7
.config/nvim/lua/plugins/nvim-surround.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- additional quote/parantheses funtions
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
version = "*",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
28
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
28
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
-- fileexplorer on the side
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
cmd = "NvimTreeToggle",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
sort_by = "case_sensitive",
|
||||||
|
view = {
|
||||||
|
width = 30,
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = true,
|
||||||
|
},
|
||||||
|
renderer = {
|
||||||
|
group_empty = true,
|
||||||
|
icons = {
|
||||||
|
glyphs = {
|
||||||
|
git = Git_signs,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
36
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
36
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
return {
|
||||||
|
-- better language highlighting by improved parsing
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
dependencies = {
|
||||||
|
-- automatically close html-tags
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
-- color brackets
|
||||||
|
-- 'p00f/nvim-ts-rainbow',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"css",
|
||||||
|
"html",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"latex",
|
||||||
|
"python",
|
||||||
|
"rust",
|
||||||
|
"lua",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
-- highlight = { enable = true },
|
||||||
|
autotag = { enable = false },
|
||||||
|
-- rainbow = {
|
||||||
|
-- enable = true,
|
||||||
|
-- extended_mode = true,
|
||||||
|
-- max_file_lines = nil,
|
||||||
|
-- -- colors = {},
|
||||||
|
-- -- termcolors = {}
|
||||||
|
-- }
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
20
.config/nvim/lua/plugins/nvim-ufo.lua
Normal file
20
.config/nvim/lua/plugins/nvim-ufo.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
-- folding improvements
|
||||||
|
"kevinhwang91/nvim-ufo",
|
||||||
|
dependencies = { "kevinhwang91/promise-async" },
|
||||||
|
config = function()
|
||||||
|
require("ufo").setup()
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, {
|
||||||
|
pattern = { "*" },
|
||||||
|
callback = function()
|
||||||
|
require("ufo").closeAllFolds()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, {
|
||||||
|
pattern = { "*" },
|
||||||
|
callback = function()
|
||||||
|
require("ufo").openAllFolds()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
8
.config/nvim/lua/plugins/oil.lua
Normal file
8
.config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
-- rename files in buffer
|
||||||
|
"stevearc/oil.nvim",
|
||||||
|
---@module 'oil'
|
||||||
|
---@type oil.setupopts
|
||||||
|
opts = {},
|
||||||
|
dependencies = { "nvim-mini/mini.icons" },
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/outline.lua
Normal file
12
.config/nvim/lua/plugins/outline.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
-- outline for code
|
||||||
|
"hedyhli/outline.nvim",
|
||||||
|
opts = {
|
||||||
|
outline_window = {
|
||||||
|
width = 25,
|
||||||
|
},
|
||||||
|
symbols = {
|
||||||
|
icon_source = "lspkind",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/renamer.lua
Normal file
7
.config/nvim/lua/plugins/renamer.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- improved gui for renaming
|
||||||
|
"filipdutescu/renamer.nvim",
|
||||||
|
branch = "master",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/spelunker.lua
Normal file
12
.config/nvim/lua/plugins/spelunker.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
-- improve spelling check for coding to feature camelcase, etc
|
||||||
|
{
|
||||||
|
"kamykn/spelunker.vim",
|
||||||
|
dependencies = { "kamykn/popup-menu.nvim" },
|
||||||
|
config = function()
|
||||||
|
-- vim.o.nospell = true
|
||||||
|
vim.g.enable_spelunker_vim = 0
|
||||||
|
vim.g.spelunker_disable_acronym_checking = 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
13
.config/nvim/lua/plugins/tccs.lua
Normal file
13
.config/nvim/lua/plugins/tccs.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
-- colorscheme
|
||||||
|
{
|
||||||
|
"tiyn/tccs.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("tccs").setup({
|
||||||
|
require("tccs").load(),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/telescope.lua
Normal file
12
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
-- fuzzy finder
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
version = "0.1.2",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"archie-judd/telescope-words.nvim",
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
10
.config/nvim/lua/plugins/tidy.lua
Normal file
10
.config/nvim/lua/plugins/tidy.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
-- clean up white spaces and empty lines before writing
|
||||||
|
{
|
||||||
|
"mcauley-penney/tidy.nvim",
|
||||||
|
branch = "main",
|
||||||
|
opts = {
|
||||||
|
filetype_exclude = { "diff" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
22
.config/nvim/lua/plugins/todo-comments.lua
Normal file
22
.config/nvim/lua/plugins/todo-comments.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
-- todo symbols and highlighting
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {
|
||||||
|
keywords = {
|
||||||
|
ERRO = { icon = Error_sign, color = "error" },
|
||||||
|
WARN = { icon = Warn_sign, color = "warning" },
|
||||||
|
HACK = { icon = Hack_sign, color = "warning" },
|
||||||
|
HINT = { icon = Hint_sign, color = "hint" },
|
||||||
|
TODO = { icon = Todo_sign, color = "info" },
|
||||||
|
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
|
||||||
|
PERF = { icon = Perfect_sign, color = "default" },
|
||||||
|
TEST = { icon = Test_sign, color = "test" },
|
||||||
|
},
|
||||||
|
colors = {
|
||||||
|
default = { "Operator" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
11
.config/nvim/lua/plugins/trouble.lua
Normal file
11
.config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
-- list of errors
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/undotree.lua
Normal file
4
.config/nvim/lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
-- tree style undo visualizer
|
||||||
|
"mbbill/undotree",
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/vim-abolish.lua
Normal file
5
.config/nvim/lua/plugins/vim-abolish.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- better substitutions
|
||||||
|
"tpope/vim-abolish",
|
||||||
|
config = function() end,
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/vim-illuminate.lua
Normal file
4
.config/nvim/lua/plugins/vim-illuminate.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
-- highlight other occurences of the same word
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/vim-markdown.lua
Normal file
7
.config/nvim/lua/plugins/vim-markdown.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- markdown improvements
|
||||||
|
"preservim/vim-markdown",
|
||||||
|
ft = { "markdown" },
|
||||||
|
dependencies = { "godlygeek/tabular" },
|
||||||
|
config = function() end,
|
||||||
|
}
|
||||||
8
.config/nvim/lua/plugins/viper-nvim.lua
Normal file
8
.config/nvim/lua/plugins/viper-nvim.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
-- highlighting for the viper verification language
|
||||||
|
"tiyn/viper.nvim",
|
||||||
|
event = { "BufReadPre *.vpr", "FileType viper" },
|
||||||
|
config = function()
|
||||||
|
require("viper").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/which-key.lua
Normal file
4
.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
-- improved keybindings, previewing them
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
}
|
||||||
74
.config/nvim/lua/plugins/wilder.lua
Normal file
74
.config/nvim/lua/plugins/wilder.lua
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
return {
|
||||||
|
-- improved wild menu
|
||||||
|
{
|
||||||
|
"gelguy/wilder.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
"roxma/nvim-yarp",
|
||||||
|
"roxma/vim-hug-neovim-rpc",
|
||||||
|
"romgrk/fzy-lua-native",
|
||||||
|
"nixprime/cpsm",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local wilder = require("wilder")
|
||||||
|
wilder.setup({
|
||||||
|
modes = { ":", "/", "?" },
|
||||||
|
accept_key = "<CR>",
|
||||||
|
reject_key = "<C-e>",
|
||||||
|
})
|
||||||
|
wilder.set_option("pipeline", {
|
||||||
|
wilder.branch(
|
||||||
|
wilder.python_file_finder_pipeline({
|
||||||
|
file_command = function(ctx, arg)
|
||||||
|
if string.find(arg, ".") ~= nil then
|
||||||
|
return { "fd", "-tf", "-H" }
|
||||||
|
else
|
||||||
|
return { "fd", "-tf" }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
dir_command = { "fd", "-td" },
|
||||||
|
filters = { "cpsm_filter" },
|
||||||
|
}),
|
||||||
|
wilder.substitute_pipeline({
|
||||||
|
pipeline = wilder.python_search_pipeline({
|
||||||
|
skip_cmdtype_check = 1,
|
||||||
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
|
start_at_boundary = 0,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
wilder.cmdline_pipeline({
|
||||||
|
fuzzy = 2,
|
||||||
|
fuzzy_filter = wilder.lua_fzy_filter(),
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wilder.check(function(ctx, x)
|
||||||
|
return x == ""
|
||||||
|
end),
|
||||||
|
wilder.history(),
|
||||||
|
},
|
||||||
|
wilder.python_search_pipeline({
|
||||||
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
|
start_at_boundary = 0,
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
),
|
||||||
|
})
|
||||||
|
local highlighters = {
|
||||||
|
wilder.pcre2_highlighter(),
|
||||||
|
wilder.lua_fzy_highlighter(),
|
||||||
|
}
|
||||||
|
wilder.set_option(
|
||||||
|
"renderer",
|
||||||
|
wilder.popupmenu_renderer({
|
||||||
|
highlighter = highlighters,
|
||||||
|
left = { " ", wilder.popupmenu_devicons() },
|
||||||
|
right = { " ", wilder.popupmenu_scrollbar() },
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/winshift.lua
Normal file
5
.config/nvim/lua/plugins/winshift.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
-- improved movement of windows
|
||||||
|
"sindrets/winshift.nvim",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
13
.config/nvim/lua/resources/header.tex
Normal file
13
.config/nvim/lua/resources/header.tex
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
% \usepackage[utf8]{inputenc}
|
||||||
|
% \DeclareUnicodeCharacter{2605}{\ensuremath{\star}}
|
||||||
|
%
|
||||||
|
\usepackage{fontspec}
|
||||||
|
\usepackage{newunicodechar}
|
||||||
|
|
||||||
|
\newfontfamily\symbolafont{Symbola}
|
||||||
|
|
||||||
|
% U+2605 BLACK STAR
|
||||||
|
\newunicodechar{★}{{\symbolafont ★}}
|
||||||
|
|
||||||
|
% U+2606 WHITE STAR
|
||||||
|
\newunicodechar{☆}{{\symbolafont ☆}}
|
||||||
131
.config/nvim/lua/style.lua
Normal file
131
.config/nvim/lua/style.lua
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
-- set signs for various uses
|
||||||
|
Return_sign = ""
|
||||||
|
Space_sign = "·"
|
||||||
|
|
||||||
|
Reference_sign = "%s"
|
||||||
|
Definition_sign = ""
|
||||||
|
|
||||||
|
Error_sign = " "
|
||||||
|
Hack_sign = " "
|
||||||
|
Hint_sign = " "
|
||||||
|
Info_sign = " "
|
||||||
|
Perfect_sign = " "
|
||||||
|
Test_sign = " "
|
||||||
|
Todo_sign = " "
|
||||||
|
Warn_sign = " "
|
||||||
|
|
||||||
|
Menu_signs = {
|
||||||
|
buffer = "",
|
||||||
|
luasnip = "",
|
||||||
|
nvim_lsp = "",
|
||||||
|
path = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
Lsp_signs = {
|
||||||
|
Array = "",
|
||||||
|
Boolean = "⊥",
|
||||||
|
Class = "",
|
||||||
|
Color = "",
|
||||||
|
Component = "",
|
||||||
|
Constant = "π",
|
||||||
|
Constructor = "",
|
||||||
|
Enum = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Event = "",
|
||||||
|
Field = "■",
|
||||||
|
File = "",
|
||||||
|
Folder = "",
|
||||||
|
Fragment = "",
|
||||||
|
Function = "φ",
|
||||||
|
Interface = "",
|
||||||
|
Keyword = "",
|
||||||
|
Method = "",
|
||||||
|
Module = "",
|
||||||
|
Namespace = "",
|
||||||
|
Null = "∅",
|
||||||
|
Number = "#",
|
||||||
|
Object = "",
|
||||||
|
Operator = "",
|
||||||
|
Package = "",
|
||||||
|
Property = "",
|
||||||
|
Reference = "",
|
||||||
|
Snippet = "",
|
||||||
|
String = "",
|
||||||
|
Struct = "",
|
||||||
|
Text = "",
|
||||||
|
TypeParameter = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Variable = "β",
|
||||||
|
}
|
||||||
|
|
||||||
|
Install_signs = {
|
||||||
|
package_installed = "",
|
||||||
|
package_pending = "",
|
||||||
|
package_uninstalled = "✗",
|
||||||
|
}
|
||||||
|
|
||||||
|
Git_signs = {
|
||||||
|
deleted = "",
|
||||||
|
ignored = "",
|
||||||
|
renamed = "",
|
||||||
|
staged = "",
|
||||||
|
unmerged = "",
|
||||||
|
unstaged = "",
|
||||||
|
untracked = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
Lazy_signs = {
|
||||||
|
cmd = " ",
|
||||||
|
config = " ",
|
||||||
|
event = " ",
|
||||||
|
ft = " ",
|
||||||
|
import = " ",
|
||||||
|
init = " ",
|
||||||
|
keys = " ",
|
||||||
|
lazy = " ",
|
||||||
|
list = {
|
||||||
|
"●",
|
||||||
|
"➜",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
},
|
||||||
|
loaded = " ",
|
||||||
|
not_loaded = " ",
|
||||||
|
plugin = " ",
|
||||||
|
runtime = " ",
|
||||||
|
source = " ",
|
||||||
|
start = " ",
|
||||||
|
task = " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
Lualine_signs = {
|
||||||
|
modified = "",
|
||||||
|
newfile = "",
|
||||||
|
readonly = "",
|
||||||
|
unnamed = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = false,
|
||||||
|
severity_sort = true,
|
||||||
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = Error_sign,
|
||||||
|
[vim.diagnostic.severity.WARN] = Warn_sign,
|
||||||
|
[vim.diagnostic.severity.INFO] = Info_sign,
|
||||||
|
[vim.diagnostic.severity.HINT] = Hint_sign,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- enable colorcolumn when textwidth is set
|
||||||
|
vim.o.cursorline = true
|
||||||
|
vim.opt_local.colorcolumn = "+" .. vim.fn.join(vim.fn.range(0, 254), ",+")
|
||||||
|
-- alternatively highlight only one line for colorcolumn
|
||||||
|
-- vim.o.colorcolumn = "-0"
|
||||||
|
|
||||||
|
-- display certain invisible chars
|
||||||
|
vim.o.list = true
|
||||||
|
vim.opt.listchars:append("space:" .. Space_sign)
|
||||||
|
vim.opt.listchars:append("eol:" .. Return_sign)
|
||||||
199
.config/nvim/snippets/python.snippets
Normal file
199
.config/nvim/snippets/python.snippets
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
# shbang 3
|
||||||
|
snippet #!
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# shbang 2
|
||||||
|
snippet #!2
|
||||||
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# shbang 3
|
||||||
|
snippet #!3
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# import
|
||||||
|
snippet imp
|
||||||
|
import ${0:module}
|
||||||
|
|
||||||
|
# from ... import
|
||||||
|
snippet from
|
||||||
|
from ${1:package} import ${0:module}
|
||||||
|
|
||||||
|
# while
|
||||||
|
snippet wh
|
||||||
|
while ${1:condition}:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# do ... while
|
||||||
|
snippet dowh
|
||||||
|
while True:
|
||||||
|
${1}
|
||||||
|
if ${0:condition}:
|
||||||
|
break
|
||||||
|
|
||||||
|
# with
|
||||||
|
snippet with
|
||||||
|
with ${1:expr} as ${2:var}:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# async with
|
||||||
|
snippet awith
|
||||||
|
async with ${1:expr} as ${2:var}:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# class
|
||||||
|
snippet cla
|
||||||
|
class ${1:class_name}:
|
||||||
|
"""${0:description}"""
|
||||||
|
|
||||||
|
# class with init
|
||||||
|
snippet clai
|
||||||
|
class ${1:class_name}:
|
||||||
|
"""${2:description}"""
|
||||||
|
def __init__(self, ${3:args}):
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# function with docstring
|
||||||
|
snippet def
|
||||||
|
def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
|
||||||
|
"""${3:docstring for $1}"""
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# function
|
||||||
|
snippet deff
|
||||||
|
def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# async function with docstring
|
||||||
|
snippet adef
|
||||||
|
async def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
|
||||||
|
"""${3:docstring for $1}"""
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# async function
|
||||||
|
snippet adeff
|
||||||
|
async def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# init function
|
||||||
|
snippet defi
|
||||||
|
def __init__(self, ${1:args}):
|
||||||
|
${0}
|
||||||
|
# if
|
||||||
|
snippet if
|
||||||
|
if ${1:condition}:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# else
|
||||||
|
snippet el
|
||||||
|
else:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# else if
|
||||||
|
snippet ei
|
||||||
|
elif ${1:condition}:
|
||||||
|
${0:${VISUAL}}
|
||||||
|
|
||||||
|
# for
|
||||||
|
snippet for
|
||||||
|
for ${1:item} in ${2:items}:
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# return
|
||||||
|
snippet ret
|
||||||
|
return ${0}
|
||||||
|
|
||||||
|
# self reference
|
||||||
|
snippet .
|
||||||
|
self.
|
||||||
|
|
||||||
|
# self attribute
|
||||||
|
snippet sa self.attribute = attribute
|
||||||
|
self.${1:attribute} = $1
|
||||||
|
|
||||||
|
# try ... except
|
||||||
|
snippet try Try/Except
|
||||||
|
try:
|
||||||
|
${1:${VISUAL}}
|
||||||
|
except ${2:Exception} as ${3:e}:
|
||||||
|
${0:raise $3}
|
||||||
|
|
||||||
|
# try ... except ... else
|
||||||
|
snippet trye Try/Except/Else
|
||||||
|
try:
|
||||||
|
${1:${VISUAL}}
|
||||||
|
except ${2:Exception} as ${3:e}:
|
||||||
|
${4:raise $3}
|
||||||
|
else:
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# try ... except ... finally
|
||||||
|
snippet tryf Try/Except/Finally
|
||||||
|
try:
|
||||||
|
${1:${VISUAL}}
|
||||||
|
except ${2:Exception} as ${3:e}:
|
||||||
|
${4:raise $3}
|
||||||
|
finally:
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# try ... except ... else ... finally
|
||||||
|
snippet tryef Try/Except/Else/Finally
|
||||||
|
try:
|
||||||
|
${1:${VISUAL}}
|
||||||
|
except ${2:Exception} as ${3:e}:
|
||||||
|
${4:raise $3}
|
||||||
|
else:
|
||||||
|
${5}
|
||||||
|
finally:
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# if name is main
|
||||||
|
snippet ifmain
|
||||||
|
if __name__ == '__main__':
|
||||||
|
${0:main()}
|
||||||
|
|
||||||
|
# docstring
|
||||||
|
snippet "
|
||||||
|
"""${0:doc}
|
||||||
|
"""
|
||||||
|
|
||||||
|
# test function
|
||||||
|
snippet test
|
||||||
|
def test_${1:description}(${2:`indent('.') ? 'self' : ''`}):
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# list comprehension
|
||||||
|
snippet lcp list comprehension
|
||||||
|
[${1} for ${2} in ${3:${VISUAL}}]${0}
|
||||||
|
|
||||||
|
# dict comprehension
|
||||||
|
snippet dcp dict comprehension
|
||||||
|
{${1}: ${2} for ${3} in ${4:${VISUAL}}}${0}
|
||||||
|
|
||||||
|
# set comprehension
|
||||||
|
snippet scp set comprehension
|
||||||
|
{${1} for ${2} in ${3:${VISUAL}}}${0}
|
||||||
|
|
||||||
|
# print
|
||||||
|
snippet pr
|
||||||
|
print($0)
|
||||||
|
|
||||||
|
# print string
|
||||||
|
snippet prs
|
||||||
|
print("$0")
|
||||||
|
|
||||||
|
# fprint string
|
||||||
|
snippet prf
|
||||||
|
print(f"$0")
|
||||||
|
|
||||||
|
# print to file
|
||||||
|
snippet fpr
|
||||||
|
print($0, file=${1:sys.stderr})
|
||||||
|
|
||||||
|
# print string to file
|
||||||
|
snippet fprs
|
||||||
|
print("$0", file=${1:sys.stderr})
|
||||||
|
|
||||||
|
# fprint string to file
|
||||||
|
snippet fprf
|
||||||
|
print(f"$0", file=${1:sys.stderr})
|
||||||
257
.config/nvim/snippets/tex.snippets
Normal file
257
.config/nvim/snippets/tex.snippets
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
# documentclass without options
|
||||||
|
snippet dcl \documentclass{}
|
||||||
|
\\documentclass{${1:class}} ${0}
|
||||||
|
|
||||||
|
# documentclass with options
|
||||||
|
snippet dclo \documentclass[]{}
|
||||||
|
\\documentclass[${1:options}]{${2:class}} ${0}
|
||||||
|
|
||||||
|
# newcommand
|
||||||
|
snippet nc \newcommand
|
||||||
|
\\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
|
||||||
|
|
||||||
|
# usepackage
|
||||||
|
snippet up \usepackage
|
||||||
|
\\usepackage[${1:options}]{${2:package}} ${0}
|
||||||
|
|
||||||
|
# \begin{}...\end{}
|
||||||
|
snippet begin \begin{} ... \end{} block
|
||||||
|
\\begin{${1:env}}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{$1}
|
||||||
|
|
||||||
|
# maketitle
|
||||||
|
snippet mkt maketitle
|
||||||
|
\\maketitle
|
||||||
|
|
||||||
|
# tabular
|
||||||
|
snippet tab tabular (or arbitrary) environment
|
||||||
|
\\begin{${1:tabular}}{${2:c}}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{$1}
|
||||||
|
|
||||||
|
snippet center center environment
|
||||||
|
\\begin{center}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{center}
|
||||||
|
|
||||||
|
# align(ed)
|
||||||
|
snippet ali align(ed) environment
|
||||||
|
\\begin{align${1:ed}}
|
||||||
|
\\label{eq:${2}}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{align$1}
|
||||||
|
|
||||||
|
# equation
|
||||||
|
snippet eq equation environment
|
||||||
|
\\begin{equation}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{equation}
|
||||||
|
|
||||||
|
# equation
|
||||||
|
snippet eql Labeled equation environment
|
||||||
|
\\begin{equation}
|
||||||
|
\\label{eq:${2}}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{equation}
|
||||||
|
|
||||||
|
# equation
|
||||||
|
snippet eq* unnumbered equation environment
|
||||||
|
\\begin{equation*}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{equation*}
|
||||||
|
|
||||||
|
# label
|
||||||
|
snippet lab \label
|
||||||
|
\\label{${1:eq:}${2:fig:}${3:tab:}${0}}
|
||||||
|
|
||||||
|
# enumerate
|
||||||
|
snippet enum enumerate environment
|
||||||
|
\\begin{enumerate}
|
||||||
|
\\item ${0}
|
||||||
|
\\end{enumerate}
|
||||||
|
|
||||||
|
# itemize
|
||||||
|
snippet item itemize environment
|
||||||
|
\\begin{itemize}
|
||||||
|
\\item ${0}
|
||||||
|
\\end{itemize}
|
||||||
|
|
||||||
|
# item
|
||||||
|
snippet it \item
|
||||||
|
\\item ${1:${VISUAL}}
|
||||||
|
|
||||||
|
# endless new item
|
||||||
|
snippet ]i \item (recursive)
|
||||||
|
\\item ${1}
|
||||||
|
${0:]i}
|
||||||
|
|
||||||
|
# matrix
|
||||||
|
snippet mat smart matrix environment
|
||||||
|
\\begin{${1:p/b/v/V/B/small}matrix}
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{$1matrix}
|
||||||
|
|
||||||
|
# chapter
|
||||||
|
snippet cha \chapter
|
||||||
|
\\chapter{${1:chapter name}}%
|
||||||
|
\\label{cha:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# section
|
||||||
|
snippet sec \section
|
||||||
|
\\section{${1:section name}}%
|
||||||
|
\\label{sec:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# section without number
|
||||||
|
snippet sec* \section*
|
||||||
|
\\section*{${1:section name}}%
|
||||||
|
\\label{sec:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# sub section
|
||||||
|
snippet sub \subsection
|
||||||
|
\\subsection{${1:subsection name}}%
|
||||||
|
\\label{sub:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# sub section without number
|
||||||
|
snippet sub* \subsection*
|
||||||
|
\\subsection*{${1:subsection name}}%
|
||||||
|
\\label{sub:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# sub sub section
|
||||||
|
snippet ssub \subsubsection
|
||||||
|
\\subsubsection{${1:subsubsection name}}%
|
||||||
|
\\label{ssub:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# sub sub section without number
|
||||||
|
snippet ssub* \subsubsection*
|
||||||
|
\\subsubsection*{${1:subsubsection name}}%
|
||||||
|
\\label{ssub:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# paragraph
|
||||||
|
snippet par \paragraph
|
||||||
|
\\paragraph{${1:paragraph name}}%
|
||||||
|
\\label{par:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# sub paragraph
|
||||||
|
snippet subp \subparagraph
|
||||||
|
\\subparagraph{${1:subparagraph name}}%
|
||||||
|
\\label{subp:${2:$1}}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# text italic
|
||||||
|
snippet ita italic text
|
||||||
|
\\textit{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text bold
|
||||||
|
snippet bf bold face text
|
||||||
|
\\textbf{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text underline
|
||||||
|
snippet under underline text
|
||||||
|
\\underline{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text overline
|
||||||
|
snippet over overline text
|
||||||
|
\\overline{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text emphasize
|
||||||
|
snippet emp emphasize text
|
||||||
|
\\emph{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text small caps
|
||||||
|
snippet sc small caps text
|
||||||
|
\\textsc{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text sans serife
|
||||||
|
snippet sf sans serife text
|
||||||
|
\\textsf{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text roman
|
||||||
|
snippet rm roman font text
|
||||||
|
\\textrm{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text typewriter
|
||||||
|
snippet tt typewriter (monospace) text
|
||||||
|
\\texttt{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text subscripted
|
||||||
|
snippet tsub subscripted text
|
||||||
|
\\textsubscript{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# text superscripted
|
||||||
|
snippet tsup superscripted text
|
||||||
|
\\textsuperscript{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# footnote
|
||||||
|
snippet ft \footnote
|
||||||
|
\\footnote{${1:${VISUAL:text}}}${0}
|
||||||
|
|
||||||
|
# figure includegraphics
|
||||||
|
snippet fig figure environment (includegraphics)
|
||||||
|
\\begin{figure}[htpb]
|
||||||
|
\\begin{center}
|
||||||
|
\\includegraphics[scale=${1}]{Figures/${2}}
|
||||||
|
\\end{center}
|
||||||
|
\\caption{${3}}
|
||||||
|
\\label{fig:${4}}
|
||||||
|
\\end{figure}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# figure tikz
|
||||||
|
snippet tikz figure environment (tikzpicture)
|
||||||
|
\\begin{figure}[htpb]
|
||||||
|
\\begin{center}
|
||||||
|
\\begin{tikzpicture}[scale=${1:1}, transform shape]
|
||||||
|
${2}
|
||||||
|
\\end{tikzpicture}
|
||||||
|
\\end{center}
|
||||||
|
\\caption{${3}}%
|
||||||
|
\\label{fig:${4}}
|
||||||
|
\\end{figure}
|
||||||
|
${0}
|
||||||
|
|
||||||
|
# math fraction
|
||||||
|
snippet frac \frac{}{}
|
||||||
|
\\frac{${1:num}}{${2:denom}} ${0}
|
||||||
|
|
||||||
|
# math sum
|
||||||
|
snippet sum \sum^{}_{}
|
||||||
|
\\sum^{${1:n}}_{${2:i=1}} ${0}
|
||||||
|
|
||||||
|
# math limes
|
||||||
|
snippet lim \lim_{}
|
||||||
|
\\lim_{${1:n \\to \\infty}} ${0}
|
||||||
|
|
||||||
|
# code listing
|
||||||
|
snippet lst
|
||||||
|
\\begin{listing}[language=${1:language}]
|
||||||
|
${0:${VISUAL}}
|
||||||
|
\\end{listing}
|
||||||
|
|
||||||
|
# code listing inline
|
||||||
|
snippet lsi
|
||||||
|
\\lstinline|${1}| ${0}
|
||||||
|
|
||||||
|
# hyperlink url
|
||||||
|
snippet url
|
||||||
|
\\url{${1}} ${0}
|
||||||
|
|
||||||
|
# hyperlink href
|
||||||
|
snippet href
|
||||||
|
\\href{${1}}{${2}} ${0}
|
||||||
|
|
||||||
|
# right arrow
|
||||||
|
snippet ra rightarrow
|
||||||
|
\\rightarrow {$0}
|
||||||
|
|
||||||
|
# long right arrow
|
||||||
|
snippet lra longrightarrow
|
||||||
|
\\longrightarrow {$0}
|
||||||
Reference in New Issue
Block a user