From 6db33686b5b195251e9fe4c125fec3730e5f6685 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 12 Jun 2021 20:07:54 +0200 Subject: [PATCH 001/894] Adopt for vscode neovim plugin --- init.vim | 389 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 208 insertions(+), 181 deletions(-) diff --git a/init.vim b/init.vim index 1adef2b..58e9866 100644 --- a/init.vim +++ b/init.vim @@ -1,42 +1,43 @@ let HOSTNAME = substitute(system('hostname'), '\n', '', '') " =============Plugins================== -call plug#begin() -Plug 'morhetz/gruvbox' -Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'chemzqm/denite-git' -Plug 'tomtom/tcomment_vim' -Plug 'bling/vim-airline' -Plug 'vim-airline/vim-airline-themes' -" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'tpope/vim-fugitive' -Plug 'airblade/vim-gitgutter' -Plug 'SirVer/ultisnips' -Plug 'honza/vim-snippets' -Plug 'vim-scripts/a.vim' -Plug 'luochen1990/rainbow' -if has("win32") - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'powershell -executionpolicy bypass -File install.ps1', - \ } -else - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } -end -Plug 'Shougo/echodoc.vim' -Plug 'arakashic/chromatica.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} -Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'} -Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'} -Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'} -Plug 'neoclide/coc-highlight', {'do': 'yarn install --frozen-lockfile'} -Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'} -Plug 'neoclide/coc-lists', {'do': 'yarn install --frozen-lockfile'} -Plug 'kkoomen/vim-doge' -call plug#end() - +if !exists('g:vscode') + call plug#begin() + Plug 'morhetz/gruvbox' + Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' } + Plug 'chemzqm/denite-git' + Plug 'tomtom/tcomment_vim' + Plug 'bling/vim-airline' + Plug 'vim-airline/vim-airline-themes' + " Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + Plug 'tpope/vim-fugitive' + Plug 'airblade/vim-gitgutter' + Plug 'SirVer/ultisnips' + Plug 'honza/vim-snippets' + Plug 'vim-scripts/a.vim' + Plug 'luochen1990/rainbow' + if has("win32") + Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'powershell -executionpolicy bypass -File install.ps1', + \ } + else + Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } + end + Plug 'Shougo/echodoc.vim' + Plug 'arakashic/chromatica.nvim', { 'do': ':UpdateRemotePlugins' } + Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} + Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-highlight', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-lists', {'do': 'yarn install --frozen-lockfile'} + Plug 'kkoomen/vim-doge' + call plug#end() +endif " =============Paths===================== exec "source " . stdpath('config') . "/" . hostname() . ".vim" " =============Settings================== @@ -89,51 +90,61 @@ vnoremap P "+P autocmd BufEnter,FocusGained * checktime " Check for file modifications " =================Look and feel======================= -set termguicolors -set background=dark -colorscheme gruvbox +if !exists('g:vscode') + set termguicolors + set background=dark + colorscheme gruvbox +endif " =================Filetypes=========================== -au BufRead,BufNewFile *.simvis set filetype=xml -au BufRead,BufNewFile *.simcfg set filetype=cfg -au BufRead,BufNewFile *.simcon set filetype=cfg -au BufRead,BufNewFile *.simudex set filetype=cfg -au BufRead,BufNewFile Jenkinsfile* set filetype=groovy -autocmd BufNewFile,BufRead *.manifest set filetype=xml -autocmd BufNewFile,BufReadPre SConstruct set filetype=python -autocmd BufNewFile,BufReadPre SConscript set filetype=python -autocmd FileType xml nnoremap :% !xmllint.exe "%" --format -autocmd FileType json syntax match Comment +\/\/.\+$+ +if !exists('g:vscode') + au BufRead,BufNewFile *.simvis set filetype=xml + au BufRead,BufNewFile *.simcfg set filetype=cfg + au BufRead,BufNewFile *.simcon set filetype=cfg + au BufRead,BufNewFile *.simudex set filetype=cfg + au BufRead,BufNewFile Jenkinsfile* set filetype=groovy + autocmd BufNewFile,BufRead *.manifest set filetype=xml + autocmd BufNewFile,BufReadPre SConstruct set filetype=python + autocmd BufNewFile,BufReadPre SConscript set filetype=python + autocmd FileType xml nnoremap :% !xmllint.exe "%" --format + autocmd FileType json syntax match Comment +\/\/.\+$+ +endif " =================Windows and Tabs==================== -" Open a new tab with F2 -map :tabnew :Explore -imap :tabnew :Explore -map :tabnext -map :tabprevious -nmap :wincmd k -nmap :wincmd j -nmap :wincmd h -nmap :wincmd l -" Open a new vertical split window with Ctrl - F2 -map :vsplit . -imap :vsplit . -" Open a new horizontal split window with Shift - F2 -map :split . -imap :split . +if !exists('g:vscode') + " Open a new tab with F2 + map :tabnew :Explore + imap :tabnew :Explore + map :tabnext + map :tabprevious + nmap :wincmd k + nmap :wincmd j + nmap :wincmd h + nmap :wincmd l + " Open a new vertical split window with Ctrl - F2 + map :vsplit . + imap :vsplit . + " Open a new horizontal split window with Shift - F2 + map :split . + imap :split . +endif " ========================Codestyle======================== -set tabstop=2 " Size of a tab -set shiftwidth=2 " Die Einrückung -set expandtab "Tabs get spaces when inserting -set softtabstop=0 -"set autoindent -"alignment ansi style (astyle) -set cindent " C-Code Style / Automatische Einrückung -set cinoptions=(0,u0,U0,:0,=0 "Einrückung wie bei astyle: :0 (switch), =0 (case), (0 (unclosed parentheses), -set modeline "Read indent comments (at end of file) +if !exists('g:vscode') + set tabstop=2 " Size of a tab + set shiftwidth=2 " Die Einrückung + set expandtab "Tabs get spaces when inserting + set softtabstop=0 + "set autoindent + "alignment ansi style (astyle) + set cindent " C-Code Style / Automatische Einrückung + set cinoptions=(0,u0,U0,:0,=0 "Einrückung wie bei astyle: :0 (switch), =0 (case), (0 (unclosed parentheses), + set modeline "Read indent comments (at end of file) +endif " ======================shortcut======================= -map :wa -imap :wa +if !exists('g:vscode') + map :wa + imap :wa +endif "Jump to last modification line map ö `. nnoremap ü :let @/='\<=expand("")\>':set hls @@ -150,119 +161,133 @@ vnoremap < >gv " ===========Linewrap and jumping============================= -setlocal wrap linebreak nolist -set virtualedit= -setlocal display+=lastline -nnoremap k gk -nnoremap j gj -nnoremap 0 g0 -nnoremap $ g$ -nnoremap gk -nnoremap gj -nnoremap g -nnoremap g -vnoremap gk -vnoremap gj -vnoremap g -vnoremap g +if !exists('g:vscode') + setlocal wrap linebreak nolist + set virtualedit= + setlocal display+=lastline + nnoremap k gk + nnoremap j gj + nnoremap 0 g0 + nnoremap $ g$ + nnoremap gk + nnoremap gj + nnoremap g + nnoremap g + vnoremap gk + vnoremap gj + vnoremap g + vnoremap g +endif " =================Comments============================ -map :TComment +if !exists('g:vscode') + map :TComment +endif " =========================Deoplete==================== -let g:deoplete#enable_at_startup = 1 -let g:deoplete#auto_complete_start_length = 1 -let g:deoplete#enable_smart_case = 1 +if !exists('g:vscode') + let g:deoplete#enable_at_startup = 1 + let g:deoplete#auto_complete_start_length = 1 + let g:deoplete#enable_smart_case = 1 +endif " =====================A====================== -" Function for switching between header and c* files -map :wa :A -imap :wa:Ai -map :AV -imap :AVi -map :AT -imap :ATi -let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,../../include,sfr:../inc,sfr:../h' -" Dont create the file if the .cpp or .h is not found -let g:alternateNoDefaultAlternate = 1 - -" ===================UltiSnips================ -let g:UltiSnipsExpandTrigger = "(ultisnips_expand)" -let g:UltiSnipsJumpForwardTrigger = "" -let g:UltiSnipsJumpBackwardTrigger = "" -" ===========RAINBOW==================== -let g:rainbow_active = 1 -let g:rainbow_conf = { - \ 'guifgs': ['lightblue', 'darkorange3', 'seagreen3', 'firebrick'], - \ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'], - \ 'operators': '_,_', - \ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'], - \ 'separately': { - \ '*': {}, - \ 'tex': { - \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'], - \ }, - \ 'cpp': { - \ 'parentheses': [ - \ 'start=/(/ end=/)/ fold', - \ 'start=/\[/ end=/\]/ fold', - \ 'start=/{/ end=/}/ fold', - \ 'start=/\(\(\\)\@/'] - \ }, - \ 'cmake': { - \ 'parentheses': [], - \ }, - \ 'lisp': { - \ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], - \ }, - \ 'vim': { - \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'], - \ }, - \ 'html': { - \ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=## fold'], - \ }, - \ 'css': 0, - \ } - \} +if !exists('g:vscode') + " Function for switching between header and c* files + map :wa :A + imap :wa:Ai + map :AV + imap :AVi + map :AT + imap :ATi + let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,../../include,sfr:../inc,sfr:../h' + " Dont create the file if the .cpp or .h is not found + let g:alternateNoDefaultAlternate = 1 + " ===================UltiSnips================ + let g:UltiSnipsExpandTrigger = "(ultisnips_expand)" + let g:UltiSnipsJumpForwardTrigger = "" + let g:UltiSnipsJumpBackwardTrigger = "" + " ===========RAINBOW==================== + let g:rainbow_active = 1 + let g:rainbow_conf = { + \ 'guifgs': ['lightblue', 'darkorange3', 'seagreen3', 'firebrick'], + \ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'], + \ 'operators': '_,_', + \ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'], + \ 'separately': { + \ '*': {}, + \ 'tex': { + \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'], + \ }, + \ 'cpp': { + \ 'parentheses': [ + \ 'start=/(/ end=/)/ fold', + \ 'start=/\[/ end=/\]/ fold', + \ 'start=/{/ end=/}/ fold', + \ 'start=/\(\(\\)\@/'] + \ }, + \ 'cmake': { + \ 'parentheses': [], + \ }, + \ 'lisp': { + \ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], + \ }, + \ 'vim': { + \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'], + \ }, + \ 'html': { + \ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=## fold'], + \ }, + \ 'css': 0, + \ } + \} +endif " ===================LanguageServer================== -if has("win32") - let g:LanguageClient_serverCommands = { - \ 'cpp': ['clangd'], - \ } -else - let g:LanguageClient_serverCommands = { - \ 'cpp': ['cquery', - \ '--log-file=/tmp/cq.log', - \ '--init={"cacheDirectory":"/tmp/cquery/"}'] - \ } -end -nnoremap K :call LanguageClient#textDocument_hover() -nnoremap gd :call LanguageClient#textDocument_definition({'gotoCmd': 'tabedit'}) -nnoremap :call LanguageClient_contextMenu() -vnoremap :call LanguageClient_contextMenu() -nnoremap :call LanguageClient_textDocument_documentSymbol() +if !exists('g:vscode') + if has("win32") + let g:LanguageClient_serverCommands = { + \ 'cpp': ['clangd'], + \ } + else + let g:LanguageClient_serverCommands = { + \ 'cpp': ['cquery', + \ '--log-file=/tmp/cq.log', + \ '--init={"cacheDirectory":"/tmp/cquery/"}'] + \ } + end + nnoremap K :call LanguageClient#textDocument_hover() + nnoremap gd :call LanguageClient#textDocument_definition({'gotoCmd': 'tabedit'}) + nnoremap :call LanguageClient_contextMenu() + vnoremap :call LanguageClient_contextMenu() + nnoremap :call LanguageClient_textDocument_documentSymbol() -let g:LanguageClient_hasClientSupport = 0 -" ===================EchoDoc========================= -set cmdheight=2 -let g:echodoc#enable_at_startup = 1 -let g:echodoc#type = 'signature' + let g:LanguageClient_hasClientSupport = 0 + " ===================EchoDoc========================= + set cmdheight=2 + let g:echodoc#enable_at_startup = 1 + let g:echodoc#type = 'signature' +endif " ===================FZF============================= -nnoremap :FZF -let g:fzf_action = { - \ 'enter': 'tab split', - \ 'ctrl-x': 'split', - \ 'ctrl-v': 'vsplit' } +if !exists('g:vscode') + nnoremap :FZF + let g:fzf_action = { + \ 'enter': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } +endif " ===================Chromatica====================== -let g:chromatica#enable_at_startup=1 +if !exists('g:vscode') + let g:chromatica#enable_at_startup=1 +endif " ===================COC============================= -inoremap coc#refresh() -autocmd CursorHold * silent call CocActionAsync('highlight') -set updatetime=500 " After ms should CursorHold trigger -" Remap for format selected region -vmap f (coc-format-selected) -nmap f (coc-format-selected) +if !exists('g:vscode') + inoremap coc#refresh() + autocmd CursorHold * silent call CocActionAsync('highlight') + set updatetime=500 " After ms should CursorHold trigger + " Remap for format selected region + vmap f (coc-format-selected) + nmap f (coc-format-selected) nmap r (coc-rename) " Use `:Format` for format current buffer @@ -298,8 +323,10 @@ endfunction nnoremap y :CocList -A --normal yank " ===================Denite========================== -call denite#custom#map('insert', '', '', 'noremap') -call denite#custom#map('insert', '', '', 'noremap') +if !exists('g:vscode') + call denite#custom#map('insert', '', '', 'noremap') + call denite#custom#map('insert', '', '', 'noremap') -nnoremap :Denite -default-action=tabopen file/rec -nnoremap :Denite buffer + nnoremap :Denite -default-action=tabopen file/rec + nnoremap :Denite buffer +endif -- 2.49.1 From 31ca3a6d0056f3ccf84626b2a4a893c6d61de822 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 21 Dec 2021 22:07:59 +0100 Subject: [PATCH 002/894] Auto install lsp servers --- lua/my_lspinstall.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 0647ab8..5f70ec4 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -77,6 +77,27 @@ local on_attach = function(client, bufnr) end local lsp_installer = require("nvim-lsp-installer") + +local servers = { + "pyright", + "cmake", + "clangd", + "jsonls", + "groovyls", + "sumneko_lua", + "dockerls", +} + +for _, name in pairs(servers) do + local server_is_found, server = lsp_installer.get_server(name) + if server_is_found then + if not server:is_installed() then + print("Installing " .. name) + server:install() + end + end +end + lsp_installer.on_server_ready(function(server) local opts = { on_attach = on_attach, -- 2.49.1 From b7020671d7246a7135910cb954926992b0bf79a6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 21 Dec 2021 22:21:41 +0100 Subject: [PATCH 003/894] Removed double mappings --- lua/my_keymappings.lua | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index e941744..bf34643 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -76,15 +76,5 @@ utils.map('n', '', 'Telescope commands') utils.map('n', 'b', 'Telescope buffers') utils.map('n', 'q', 'Telescope quickfix') utils.map('n', 'l', 'Telescope live_grep') -utils.map('n', 'r', 'Telescope lsp_references') -utils.map('n', '', 'Telescope lsp_document_symbols') -utils.map('n', '', 'Telescope lsp_document_symbols') -utils.map('n', 'v', 'Telescope diagnostics bufnr=0') utils.map('n', '', 'Telescope neoclip') utils.map('n', 'j', 'Telescope jumplist') - --- wildmode - --- Symbols Outline -utils.map('n', 's', 'SymbolsOutline') - -- 2.49.1 From 0e92584aafa3772a8a20952c900f8571e78265bf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 21 Dec 2021 22:21:54 +0100 Subject: [PATCH 004/894] Only set lsp keymaps if server attached --- lua/my_lspinstall.lua | 45 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 5f70ec4..6f89b62 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -25,32 +25,35 @@ local on_attach = function(client, bufnr) -- Mappings. local opts = { noremap=true, silent=true } - utils.map('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) - utils.map('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) - utils.map('n', 'a', 'Telescope lsp_code_actions', opts) - utils.map('n', 'd', 'lua vim.lsp.buf.definition()', opts) - utils.map('n', 'e', 'lua vim.lsp.buf.declaration()', opts) - utils.map('n', 'h', 'lua vim.lsp.buf.hover()', opts) - utils.map('n', 'c', 'lua vim.lsp.buf.outgoing_calls()', opts) - utils.map('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) - utils.map('n', 'm', 'lua vim.lsp.buf.rename()', opts) - -- utils.map('n', 'r', 'lua vim.lsp.buf.references()') - utils.map('n', 's', 'lua vim.lsp.buf.document_symbol()', opts) - utils.map('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) - utils.map('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - utils.map('n', '', 'lua vim.lsp.buf.signature_help()', opts) - utils.map('n', 'r', 'Telescope lsp_references') - utils.map('n', '', 'Telescope lsp_document_symbols') - utils.map('n', '', 'Telescope lsp_document_symbols') - utils.map('n', 'v', 'Telescope diagnostics bufnr=0') - utils.map('n', '', ':ClangdSwitchSourceHeader', opts) + buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'a', 'Telescope lsp_code_actions', opts) + buf_set_keymap('n', 'd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'h', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'c', 'lua vim.lsp.buf.outgoing_calls()', opts) + buf_set_keymap('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) + buf_set_keymap('n', 'm', 'lua vim.lsp.buf.rename()', opts) + -- buf_set_keymap('n', 'r', 'lua vim.lsp.buf.references()') + buf_set_keymap('n', 's', 'lua vim.lsp.buf.document_symbol()', opts) + buf_set_keymap('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) + buf_set_keymap('n', 'r', 'Telescope lsp_references', opts) + buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) + buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) + buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) + buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) + + -- Symbols Outline + buf_set_keymap('n', 's', 'SymbolsOutline', opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then - utils.map('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) end if client.resolved_capabilities.document_range_formatting then - utils.map('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) + buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) end -- Set autocommands conditional on server_capabilities -- 2.49.1 From 0e13e43fc31731a6ea77333fcafa925f0aa19e7b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 21 Dec 2021 22:22:08 +0100 Subject: [PATCH 005/894] Disable space key in normal mode --- lua/my_keymappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index bf34643..2b37888 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,5 +1,6 @@ local utils = require('utils') vim.g.mapleader = ',' +utils.map('n', '', 'nil', { noremap = true, silent = true}) -- Paste from clipboard utils.map('n', 'p', '"+p') utils.map('n', 'P', '"+P') -- 2.49.1 From 3f9a7f38fb133c5e84d76a0da08ed1b3f8a03272 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 29 Jan 2022 23:45:16 +0100 Subject: [PATCH 006/894] Added neogen --- init.lua | 1 + lua/my_neogen.lua | 3 +++ lua/my_plugins.lua | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 lua/my_neogen.lua diff --git a/init.lua b/init.lua index 7ad4f77..db01a44 100644 --- a/init.lua +++ b/init.lua @@ -22,6 +22,7 @@ require("my_autocommands") require('my_telescope') require('my_lspinstall') require('my_cmp') +require('my_neogen') -------------------- TREE-SITTER --------------------------- require('nvim-treesitter.configs').setup({ ensure_installed = 'maintained', diff --git a/lua/my_neogen.lua b/lua/my_neogen.lua new file mode 100644 index 0000000..39ceb83 --- /dev/null +++ b/lua/my_neogen.lua @@ -0,0 +1,3 @@ +require('neogen').setup { + enabled = true +} diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 8c080b3..71dba8a 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -52,4 +52,8 @@ return require('packer').startup(function() 'jose-elias-alvarez/null-ls.nvim', requires = {'nvim-lua/plenary.nvim'} } + use { + "danymat/neogen", + requires = "nvim-treesitter/nvim-treesitter" + } end) -- 2.49.1 From 25a5283cd6887b6a78280e3371761d69270dacbc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jan 2022 08:59:31 +0100 Subject: [PATCH 007/894] Set format expr --- lua/my_lspinstall.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 6f89b62..f1658dc 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -22,6 +22,7 @@ local on_attach = function(client, bufnr) local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. local opts = { noremap=true, silent=true } -- 2.49.1 From cfff367b83ccbfabaf6277805a5b7d60415d5c26 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 18 Jan 2022 15:59:18 +0100 Subject: [PATCH 008/894] Keymapping for telescopy fuzzy find --- lua/my_keymappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 2b37888..8fb0483 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -77,5 +77,7 @@ utils.map('n', '', 'Telescope commands') utils.map('n', 'b', 'Telescope buffers') utils.map('n', 'q', 'Telescope quickfix') utils.map('n', 'l', 'Telescope live_grep') +utils.map('n', '', 'Telescope live_grep') utils.map('n', '', 'Telescope neoclip') utils.map('n', 'j', 'Telescope jumplist') +utils.map('n', '', 'Telescope current_buffer_fuzzy_find') -- 2.49.1 From 5c4e7a40009e73b4a20886d2bf0189f23a744d13 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Jan 2022 09:19:44 +0100 Subject: [PATCH 009/894] Adjust lualine --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index db01a44..9b72e4f 100644 --- a/init.lua +++ b/init.lua @@ -91,9 +91,9 @@ require('neoclip').setup({ require('telescope').load_extension('neoclip') -------------------- LUALINE ------------------------------- require('lualine').setup { - options = {theme = 'gruvbox'}, - sections = {lualine_c = {'getcwd', 'filename', 'nvim_treesitter#statusline'}, - } + options = {theme = 'gruvbox-material'}, + sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}}, + inactive_sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}} } -------------------- PROJECT ------------------------------- require("project_nvim").setup { -- 2.49.1 From faeea7fb5fd17ca01bc756715dde0ab14b993f6b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Jan 2022 09:20:18 +0100 Subject: [PATCH 010/894] Fixed and added cmake-format --- lua/my_lspinstall.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index f1658dc..92efc1f 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -9,6 +9,7 @@ capabilities.textDocument.completion.completionItem.labelDetailsSupport = true capabilities.textDocument.completion.completionItem.deprecatedSupport = true capabilities.textDocument.completion.completionItem.commitCharactersSupport = true capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.offsetEncoding = { "utf-16" } capabilities.textDocument.completion.completionItem.resolveSupport = { properties = { 'documentation', @@ -126,7 +127,8 @@ null_ls.setup { null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.stylua, null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort + null_ls.builtins.formatting.isort, + null_ls.builtins.formatting.cmake_format }, on_attach = on_attach, capabilities = capabilities -- 2.49.1 From 71321b1d16569738fe4fddbe24f382b1a4dad495 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Jan 2022 10:57:59 +0100 Subject: [PATCH 011/894] Enhance gruvbox theme --- lua/my_options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index 9801817..2ef9d08 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,4 +1,6 @@ local utils = require('utils') +vim.g.gruvbox_material_diagnostic_text_highlight=1 +vim.g.gruvbox_material_diagnostic_virtual_text='colored' vim.cmd 'colorscheme gruvbox-material' -- Put your favorite colorscheme here vim.cmd 'syntax enable' vim.cmd 'filetype plugin indent on' -- 2.49.1 From 9325519929aca4c57d17bc15c6fdae3e721e1f5b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 12:56:02 +0100 Subject: [PATCH 012/894] Dont use .gitignore for telescope files --- lua/my_keymappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 8fb0483..d41c73c 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -67,8 +67,8 @@ utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) -- Telescope -utils.map('n', 'f', 'Telescope find_files') -utils.map('n', '', 'Telescope find_files') +utils.map('n', 'f', 'lua require("telescope.builtin").find_files({no_ignore=true})') +utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') utils.map('n', 'g', 'Telescope git_files') utils.map('n', 'o', 'Telescope oldfiles') utils.map('n', 'h', 'Telescope command_history') -- 2.49.1 From 0d93bc8fa500f7afc1974e97da3431ff78233015 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 12:56:23 +0100 Subject: [PATCH 013/894] Update treesitter after packer update --- lua/my_plugins.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 71dba8a..76c9d5a 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -3,7 +3,10 @@ return require('packer').startup(function() -- Packer can manage itself as an optional plugin use {'wbthomason/packer.nvim'} use {'neovim/nvim-lspconfig'} - use {'nvim-treesitter/nvim-treesitter'} + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate' + } use { 'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}, {'kyazdani42/nvim-web-devicons'}} -- 2.49.1 From 577a3cd1a752d9aba6716df07b49cb93ef2a5ca3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 13:11:53 +0100 Subject: [PATCH 014/894] Removed gitblame and neoclip --- init.lua | 15 +++++++++------ lua/my_plugins.lua | 3 +-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 9b72e4f..07d8f47 100644 --- a/init.lua +++ b/init.lua @@ -31,7 +31,15 @@ require('nvim-treesitter.configs').setup({ } }) -------------------- GITSIGNS ------------------------------ -require('gitsigns').setup() +require('gitsigns').setup({ + current_line_blame = true, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'right_align', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, +}) -------------------- NVIM-TREE ----------------------------- require('nvim-tree').setup({ auto_close = true, @@ -84,11 +92,6 @@ opt.errorformat:append("\\ %#%f(%l\\\\\\,%c):\\ %m") -- cl.exe errorformat -- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m') --------------------- NEOCLIP ------------------------------- -require('neoclip').setup({ - default_register = '+', -}) -require('telescope').load_extension('neoclip') -------------------- LUALINE ------------------------------- require('lualine').setup { options = {theme = 'gruvbox-material'}, diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 76c9d5a..2ecd20c 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -34,7 +34,6 @@ return require('packer').startup(function() use {'Shatur/neovim-cmake', requires = {'mfussenegger/nvim-dap'} } - use {'AckslD/nvim-neoclip.lua'} use { 'hoob3rt/lualine.nvim', requires = {'kyazdani42/nvim-web-devicons', opt = true} @@ -42,7 +41,6 @@ return require('packer').startup(function() use {'ahmedkhalf/project.nvim'} use {'p00f/nvim-ts-rainbow'} use {'simrat39/symbols-outline.nvim'} - use {'f-person/git-blame.nvim'} use {'windwp/nvim-autopairs'} use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} use {'ray-x/lsp_signature.nvim'} @@ -59,4 +57,5 @@ return require('packer').startup(function() "danymat/neogen", requires = "nvim-treesitter/nvim-treesitter" } + use {'abecodes/tabout.nvim'} end) -- 2.49.1 From e72fa7324b94a19c85509de179c0f2ec4d3f38eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 13:12:11 +0100 Subject: [PATCH 015/894] For the moment disable previewer for files and git files --- lua/my_telescope.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_telescope.lua b/lua/my_telescope.lua index 23d08e7..40ada92 100644 --- a/lua/my_telescope.lua +++ b/lua/my_telescope.lua @@ -35,12 +35,14 @@ require('telescope').setup { }, find_files = { theme = 'ivy', + previewer = false, }, oldfiles = { theme = 'ivy', }, git_files = { theme = 'ivy', + previewer = false, }, lsp_dynamic_workspace_symbols = { }, -- 2.49.1 From bd3af2a9a4c5b5c85ec4fe5c23dbf5daa4fa7c55 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 13:12:25 +0100 Subject: [PATCH 016/894] Disable cmake telescope integration --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 07d8f47..a74f1a3 100644 --- a/init.lua +++ b/init.lua @@ -80,7 +80,7 @@ require('Comment').setup({ }, }) -------------------- CMAKE --------------------------------- -require('telescope').load_extension('cmake') +-- require('telescope').load_extension('cmake') require('cmake').setup({ parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values. -- 2.49.1 From ab444ed7d9d66b1af8f17287d052434094e6eea6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 15:42:30 +0100 Subject: [PATCH 017/894] Neogen fixes for doxygen --- lua/my_keymappings.lua | 2 ++ lua/my_neogen.lua | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index d41c73c..b3d39b3 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -81,3 +81,5 @@ utils.map('n', '', 'Telescope live_grep') utils.map('n', '', 'Telescope neoclip') utils.map('n', 'j', 'Telescope jumplist') utils.map('n', '', 'Telescope current_buffer_fuzzy_find') + +utils.map('n', 'n', 'Neogen', { noremap = true, silent = true }) diff --git a/lua/my_neogen.lua b/lua/my_neogen.lua index 39ceb83..9e79a46 100644 --- a/lua/my_neogen.lua +++ b/lua/my_neogen.lua @@ -1,3 +1,20 @@ require('neogen').setup { - enabled = true + enabled = true, + languages = { + cpp = { + template = { + annotation_convention = "custom", + custom = { + { nil, "/// file", { no_results = true, type = { "file" } } }, + { nil, "/// $1", { no_results = true, type = { "func", "file" } } }, + { nil, "", { no_results = true, type = { "file" } } }, + + { nil, "/// $1", { type = { "func" } } }, + { "tparam", "/// \\tparam %s $1" }, + { "parameters", "/// \\param %s $1" }, + { "return_statement", "/// \\return $1" }, + }, + } + }, + } } -- 2.49.1 From bec752c6b70a1af4beebba864ac8bc61befb1f56 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Feb 2022 15:42:50 +0100 Subject: [PATCH 018/894] Small refactor --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index b3d39b3..5820dd5 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -67,7 +67,7 @@ utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) -- Telescope -utils.map('n', 'f', 'lua require("telescope.builtin").find_files({no_ignore=true})') +utils.map('n', 'f', 'lua require(\'telescope.builtin\').find_files({no_ignore=true})') utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') utils.map('n', 'g', 'Telescope git_files') utils.map('n', 'o', 'Telescope oldfiles') -- 2.49.1 From 4dd3918382f55707aff9de2b156ee2a97df54d8e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:10:20 +0100 Subject: [PATCH 019/894] added nvim-treesitter-textobjects --- init.lua | 26 +++++++++++++++++++++++++- lua/my_plugins.lua | 4 ++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a74f1a3..82a9d57 100644 --- a/init.lua +++ b/init.lua @@ -112,7 +112,31 @@ require'nvim-treesitter.configs'.setup { max_file_lines = nil, -- Do not enable for files with more than n lines, int -- colors = {}, -- table of hex strings -- termcolors = {} -- table of colour name strings - } + }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + lsp_interop = { + enable = true, + border = 'none', + peek_definition_code = { + ["df"] = "@function.outer", + ["dF"] = "@class.outer", + }, + }, + }, } -------------------- LUASNIP ------------------------------- require("luasnip.loaders.from_vscode").load() diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 2ecd20c..06b20ce 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -58,4 +58,8 @@ return require('packer').startup(function() requires = "nvim-treesitter/nvim-treesitter" } use {'abecodes/tabout.nvim'} + use { + 'nvim-treesitter/nvim-treesitter-textobjects', + requires = "nvim-treesitter/nvim-treesitter" + } end) -- 2.49.1 From 667e42fe57c5fb36129c82673ad75e66371385c0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:10:33 +0100 Subject: [PATCH 020/894] Format --- lua/my_plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 06b20ce..e6a55f0 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -54,8 +54,8 @@ return require('packer').startup(function() requires = {'nvim-lua/plenary.nvim'} } use { - "danymat/neogen", - requires = "nvim-treesitter/nvim-treesitter" + 'danymat/neogen', + requires = 'nvim-treesitter/nvim-treesitter' } use {'abecodes/tabout.nvim'} use { -- 2.49.1 From 29b32edada3c9f6e2a8e410998e0f5ac8b7a15ef Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:10:56 +0100 Subject: [PATCH 021/894] changed to gruvbox --- lua/my_options.lua | 2 +- lua/my_plugins.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 2ef9d08..297b842 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,7 +1,7 @@ local utils = require('utils') vim.g.gruvbox_material_diagnostic_text_highlight=1 vim.g.gruvbox_material_diagnostic_virtual_text='colored' -vim.cmd 'colorscheme gruvbox-material' -- Put your favorite colorscheme here +vim.cmd 'colorscheme gruvbox' -- Put your favorite colorscheme here vim.cmd 'syntax enable' vim.cmd 'filetype plugin indent on' vim.cmd 'language en_US.utf-8' diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index e6a55f0..e49363a 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -12,6 +12,7 @@ return require('packer').startup(function() requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}, {'kyazdani42/nvim-web-devicons'}} } use {'sainnhe/gruvbox-material'} + use {'ellisonleao/gruvbox.nvim'} use {'lukas-reineke/indent-blankline.nvim'} use {'nvim-lua/plenary.nvim'} use {'lewis6991/gitsigns.nvim'} -- 2.49.1 From 4c5aa10996eed50f218043a8ce692e681f5f9cf1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:11:10 +0100 Subject: [PATCH 022/894] Added dressing plugin (for cmake) --- lua/my_plugins.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index e49363a..5e33dfe 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -59,6 +59,7 @@ return require('packer').startup(function() requires = 'nvim-treesitter/nvim-treesitter' } use {'abecodes/tabout.nvim'} + use {'stevearc/dressing.nvim'} use { 'nvim-treesitter/nvim-treesitter-textobjects', requires = "nvim-treesitter/nvim-treesitter" -- 2.49.1 From 6689c9b5231bef296ec51bab8f9b667cfda02739 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:11:30 +0100 Subject: [PATCH 023/894] Changed git blame align to eol --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 82a9d57..b9ef08d 100644 --- a/init.lua +++ b/init.lua @@ -35,7 +35,7 @@ require('gitsigns').setup({ current_line_blame = true, current_line_blame_opts = { virt_text = true, - virt_text_pos = 'right_align', -- 'eol' | 'overlay' | 'right_align' + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' delay = 1000, ignore_whitespace = false, }, -- 2.49.1 From 464644246c6601fa52c0af6add619c91770fdcbf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:41:54 +0100 Subject: [PATCH 024/894] Only one treesitter config --- init.lua | 67 +++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/init.lua b/init.lua index b9ef08d..513e63e 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,38 @@ require('nvim-treesitter.configs').setup({ ensure_installed = 'maintained', highlight = { enable = true - } + }, + 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 + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + lsp_interop = { + enable = true, + border = 'none', + peek_definition_code = { + ["df"] = "@function.outer", + ["dF"] = "@class.outer", + }, + }, + }, }) -------------------- GITSIGNS ------------------------------ require('gitsigns').setup({ @@ -104,40 +135,6 @@ require("project_nvim").setup { } require('telescope').load_extension('projects') utils.map('n', 'p', 'Telescope projects') --------------------- TS-RAINBOW ---------------------------- -require'nvim-treesitter.configs'.setup { - 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 - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - lsp_interop = { - enable = true, - border = 'none', - peek_definition_code = { - ["df"] = "@function.outer", - ["dF"] = "@class.outer", - }, - }, - }, -} -------------------- LUASNIP ------------------------------- require("luasnip.loaders.from_vscode").load() -------------------- AUTOPAIRS ----------------------------- -- 2.49.1 From 86b5aeb691b18ff62a9bde97bb41c976f0e9c93e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Feb 2022 09:58:23 +0100 Subject: [PATCH 025/894] Changed font and disabled bold --- lua/my_options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 297b842..ebe0ee3 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,12 +1,13 @@ local utils = require('utils') vim.g.gruvbox_material_diagnostic_text_highlight=1 vim.g.gruvbox_material_diagnostic_virtual_text='colored' +vim.g.gruvbox_bold=0 vim.cmd 'colorscheme gruvbox' -- Put your favorite colorscheme here vim.cmd 'syntax enable' vim.cmd 'filetype plugin indent on' vim.cmd 'language en_US.utf-8' utils.opt('o', 'hlsearch', true) -utils.opt('o', 'guifont', 'Hack NF:h9') +utils.opt('o', 'guifont', 'JetBrainsMono Nerd Font:h9') utils.opt('o', 'swapfile', false) utils.opt('o', 'backup', false) utils.opt('o', 'spelllang', 'en,de') -- 2.49.1 From b8bca37446e7f968f1cf407320af21e5785718c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 9 Feb 2022 13:28:15 +0100 Subject: [PATCH 026/894] No italic --- lua/my_options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index ebe0ee3..796a643 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -2,6 +2,8 @@ local utils = require('utils') vim.g.gruvbox_material_diagnostic_text_highlight=1 vim.g.gruvbox_material_diagnostic_virtual_text='colored' vim.g.gruvbox_bold=0 +vim.g.gruvbox_italicize_comments=0 +vim.g.gruvbox_italicize_strings=0 vim.cmd 'colorscheme gruvbox' -- Put your favorite colorscheme here vim.cmd 'syntax enable' vim.cmd 'filetype plugin indent on' -- 2.49.1 From 9bf991c537e476e1c20c1d98516be71a1e5fbe37 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Feb 2022 10:55:13 +0100 Subject: [PATCH 027/894] First custom lua snippets --- init.lua | 3 +-- lua/my_keymappings.lua | 2 ++ lua/my_luasnip.lua | 52 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 lua/my_luasnip.lua diff --git a/init.lua b/init.lua index 513e63e..744e340 100644 --- a/init.lua +++ b/init.lua @@ -23,6 +23,7 @@ require('my_telescope') require('my_lspinstall') require('my_cmp') require('my_neogen') +require('my_luasnip') -------------------- TREE-SITTER --------------------------- require('nvim-treesitter.configs').setup({ ensure_installed = 'maintained', @@ -135,8 +136,6 @@ require("project_nvim").setup { } require('telescope').load_extension('projects') utils.map('n', 'p', 'Telescope projects') --------------------- LUASNIP ------------------------------- -require("luasnip.loaders.from_vscode").load() -------------------- AUTOPAIRS ----------------------------- require('nvim-autopairs').setup{} -------------------- FZF NATIVE ---------------------------- diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 5820dd5..2ed0f5f 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -55,6 +55,8 @@ utils.map('v', '', 'g') utils.map('v', '<', '', '>gv') +utils.map('n', 'a', '"ayw') + -- Highlight word under cursor utils.map('n', 'ü', ":let @/='\\<=expand(\"\")\\>':set hls", { noremap = true, silent = true }) utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) diff --git a/lua/my_luasnip.lua b/lua/my_luasnip.lua new file mode 100644 index 0000000..9eeb9c6 --- /dev/null +++ b/lua/my_luasnip.lua @@ -0,0 +1,52 @@ +local ls = require("luasnip") +require("luasnip.loaders.from_vscode").load() +-- some shorthands... +local s = ls.snippet +local sn = ls.snippet_node +local isn = ls.indent_snippet_node +local t = ls.text_node +local i = ls.insert_node +local f = ls.function_node +local c = ls.choice_node +local d = ls.dynamic_node +local r = ls.restore_node +local l = require("luasnip.extras").lambda +local rep = require("luasnip.extras").rep +local p = require("luasnip.extras").partial +local m = require("luasnip.extras").match +local n = require("luasnip.extras").nonempty +local dl = require("luasnip.extras").dynamic_lambda +local fmt = require("luasnip.extras.fmt").fmt +local fmta = require("luasnip.extras.fmt").fmta +local types = require("luasnip.util.types") +local conds = require("luasnip.extras.expand_conditions") + +local function getRegA(capitalize) + local clipboard = vim.fn.getreg('a') + clipboard = clipboard:gsub('^m_', '') + if capitalize then + clipboard = clipboard:gsub("^%l", string.upper); + end + return clipboard + +end + + +ls.snippets = { + cpp = { + s('TEST_F_getset', + { + t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), + i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), + i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), + t({'','}', ''}) + }), + s('TEST_fn_getset', + { + t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), + i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), + i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), + t({'','}'}) + }) + }, +} -- 2.49.1 From 3209e01c996dd37c95ff187c23f1b78fcce87929 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Feb 2022 18:55:49 +0100 Subject: [PATCH 028/894] More snippets --- lua/my_luasnip.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/my_luasnip.lua b/lua/my_luasnip.lua index 9eeb9c6..96b0bcf 100644 --- a/lua/my_luasnip.lua +++ b/lua/my_luasnip.lua @@ -43,10 +43,14 @@ ls.snippets = { }), s('TEST_fn_getset', { - t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), - i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), - i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), - t({'','}'}) + t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({'()', '{', ' '}), + i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({');', ' '}), + i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({'());', ''}), + t({'','}', '', ''}), + + t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), + p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({'();'}), + t({'','}'}), }) }, } -- 2.49.1 From 3a700044c43a10c992d1b037e20d844824cfcb5d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Feb 2022 18:56:04 +0100 Subject: [PATCH 029/894] Fixed path to compile_commands.json --- lua/my_lspinstall.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 92efc1f..d63e083 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -110,9 +110,9 @@ lsp_installer.on_server_ready(function(server) } -- (optional) Customize the options passed to the server - -- if server.name == "tsserver" then - -- opts.root_dir = function() ... end - -- end + if server.name == "clangd" then + opts.cmd = { "clangd" , "--compile-commands-dir=build_nvim"} + end -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) server:setup(opts) -- 2.49.1 From ff4153188800d8fd06839ec2ecc32d82f67511a6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Feb 2022 18:56:14 +0100 Subject: [PATCH 030/894] Better leader a --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 2ed0f5f..106815d 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -55,7 +55,7 @@ utils.map('v', '', 'g') utils.map('v', '<', '', '>gv') -utils.map('n', 'a', '"ayw') +utils.map('n', 'a', '"ayaw') -- Highlight word under cursor utils.map('n', 'ü', ":let @/='\\<=expand(\"\")\\>':set hls", { noremap = true, silent = true }) -- 2.49.1 From c643e834e05f57882b37e9b503c217b514275fd7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Feb 2022 18:56:37 +0100 Subject: [PATCH 031/894] Changed order of cmp sources, prefer snippets --- lua/my_cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_cmp.lua b/lua/my_cmp.lua index 0e5c7c5..530b7cb 100644 --- a/lua/my_cmp.lua +++ b/lua/my_cmp.lua @@ -72,7 +72,7 @@ cmp.setup { end }, sources = { - {name = 'nvim_lsp'}, {name = 'buffer'}, {name = "luasnip"}, + {name = "luasnip"}, {name = 'nvim_lsp'}, {name = 'buffer'}, {name = "nvim_lua"}, {name = "look"}, {name = "path"}, {name = 'cmp_tabnine'}, {name = "calc"}, {name = "spell"}, {name = "emoji"} -- 2.49.1 From b259a2ae234b634da9e4a6beabd9bf8bb072deee Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 21 Feb 2022 10:55:14 +0100 Subject: [PATCH 032/894] Fixed the to regestry a keybinding --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 106815d..884e8c4 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -55,7 +55,7 @@ utils.map('v', '', 'g') utils.map('v', '<', '', '>gv') -utils.map('n', 'a', '"ayaw') +utils.map('n', 'a', '"ayiw') -- Highlight word under cursor utils.map('n', 'ü', ":let @/='\\<=expand(\"\")\\>':set hls", { noremap = true, silent = true }) -- 2.49.1 From 7e40d7732f52d2d286f7f5f6836618caf890439e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 21 Feb 2022 10:55:37 +0100 Subject: [PATCH 033/894] Disable the virtual text for warnings --- lua/my_lspinstall.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index d63e083..7908009 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -133,3 +133,4 @@ null_ls.setup { on_attach = on_attach, capabilities = capabilities } +vim.diagnostic.config({virtual_text = false}) -- 2.49.1 From 4a076eacd959996877c26b55319f082a01545a69 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 14:30:23 +0100 Subject: [PATCH 034/894] Set snapshot path of packer --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 744e340..fbce782 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,7 @@ local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local opt = vim.opt -- to set options local utils = require('utils') +local packerUtil = require'packer.util' -------------------- PACKER -------------------------------- -- Auto install packer.nvim if not exists @@ -12,6 +13,9 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd 'packadd packer.nvim' end vim.cmd [[packadd packer.nvim]] +require('packer').init({ + snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots') +}) -------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings') -- 2.49.1 From da4f4674a5510d430b33517f3deff46de0ab120d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 14:31:25 +0100 Subject: [PATCH 035/894] Some lsp fixes --- lua/my_lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 7908009..23512e6 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -49,6 +49,7 @@ local on_attach = function(client, bufnr) -- Symbols Outline buf_set_keymap('n', 's', 'SymbolsOutline', opts) + vim.cmd [[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]] -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then @@ -62,7 +63,6 @@ local on_attach = function(client, bufnr) if client.resolved_capabilities.document_highlight then vim.api.nvim_exec([[ hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen - hi LspReferenceText cterm=bold ctermbg=Black guibg=DarkYellow guifg=Black hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed augroup lsp_document_highlight autocmd! * -- 2.49.1 From 79486cd892e73a3dd5321e28a4ccb21d1fa8094c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 20:46:18 +0100 Subject: [PATCH 036/894] set 'completeopt' to menu,menuone,noselect --- lua/my_options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index 796a643..328f50a 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -13,6 +13,7 @@ utils.opt('o', 'guifont', 'JetBrainsMono Nerd Font:h9') utils.opt('o', 'swapfile', false) utils.opt('o', 'backup', false) utils.opt('o', 'spelllang', 'en,de') +utils.opt('o', 'completeopt', 'menu,menuone,noselect') local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) -- 2.49.1 From f8ff3b647f7cc8ec8fea0d1b972e5ad1d691f876 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 20:46:35 +0100 Subject: [PATCH 037/894] Added modes.nvim --- lua/my_plugins.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 5e33dfe..e3b8822 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -64,4 +64,13 @@ return require('packer').startup(function() 'nvim-treesitter/nvim-treesitter-textobjects', requires = "nvim-treesitter/nvim-treesitter" } + use {'mvllow/modes.nvim', + config = function() + vim.opt.cursorline = true + require('modes').setup({ + focus_only = true, + line_opacity = 0.2, + }) + end + } end) -- 2.49.1 From 961ec74fbdf343abb5035e824c39f418d8b8c7af Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 20:47:25 +0100 Subject: [PATCH 038/894] Removed symbols outline --- lua/my_lspinstall.lua | 2 -- lua/my_plugins.lua | 1 - 2 files changed, 3 deletions(-) diff --git a/lua/my_lspinstall.lua b/lua/my_lspinstall.lua index 23512e6..4f93c3f 100644 --- a/lua/my_lspinstall.lua +++ b/lua/my_lspinstall.lua @@ -47,8 +47,6 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) - -- Symbols Outline - buf_set_keymap('n', 's', 'SymbolsOutline', opts) vim.cmd [[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]] -- Set some keybinds conditional on server capabilities diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index e3b8822..931f0dc 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -41,7 +41,6 @@ return require('packer').startup(function() } use {'ahmedkhalf/project.nvim'} use {'p00f/nvim-ts-rainbow'} - use {'simrat39/symbols-outline.nvim'} use {'windwp/nvim-autopairs'} use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} use {'ray-x/lsp_signature.nvim'} -- 2.49.1 From d1b14f05c17864fedb6bd64485d8180cff9c61c3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 21:20:18 +0100 Subject: [PATCH 039/894] Floating window for packer --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index fbce782..24e81c3 100644 --- a/init.lua +++ b/init.lua @@ -14,7 +14,10 @@ if fn.empty(fn.glob(install_path)) > 0 then end vim.cmd [[packadd packer.nvim]] require('packer').init({ - snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots') + snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'), + display = { + open_fn = require('packer.util').float, + } }) -------------------- EXTERNAL ------------------------------ require('my_plugins') -- 2.49.1 From 7e1182a11b397b8e48c77adac98640c3bd912772 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 17:22:06 +0100 Subject: [PATCH 040/894] First version of the packer plugin setup calls --- init.lua | 15 --- lua/my_plugins.lua | 53 ++++++++-- lua/{my_telescope.lua => setup/telescope.lua} | 100 +++++++++--------- 3 files changed, 95 insertions(+), 73 deletions(-) rename lua/{my_telescope.lua => setup/telescope.lua} (95%) diff --git a/init.lua b/init.lua index 24e81c3..46c541c 100644 --- a/init.lua +++ b/init.lua @@ -5,20 +5,6 @@ local opt = vim.opt -- to set options local utils = require('utils') local packerUtil = require'packer.util' --------------------- PACKER -------------------------------- --- Auto install packer.nvim if not exists -local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' -if fn.empty(fn.glob(install_path)) > 0 then - fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) - vim.cmd 'packadd packer.nvim' -end -vim.cmd [[packadd packer.nvim]] -require('packer').init({ - snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'), - display = { - open_fn = require('packer.util').float, - } -}) -------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings') @@ -26,7 +12,6 @@ require('my_options') require("my_autocommands") -- plugins -require('my_telescope') require('my_lspinstall') require('my_cmp') require('my_neogen') diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 931f0dc..5cc01f3 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -1,3 +1,28 @@ +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerCompile + augroup end +]]) + +local fn = vim.fn +local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + packer_bootstrap = fn.system({ + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + }) +end +vim.api.nvim_command("packadd packer.nvim") + +function get_setup(name) + return string.format('require("setup/%s")', name) +end + return require('packer').startup(function() -- Packer can manage itself as an optional plugin @@ -7,10 +32,15 @@ return require('packer').startup(function() 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } - use { - 'nvim-telescope/telescope.nvim', - requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}, {'kyazdani42/nvim-web-devicons'}} - } + use({ + 'nvim-telescope/telescope.nvim', + requires = { + {'nvim-lua/popup.nvim'}, + {'nvim-lua/plenary.nvim'}, + {'kyazdani42/nvim-web-devicons'} + }, + config = get_setup("telescope"), + }) use {'sainnhe/gruvbox-material'} use {'ellisonleao/gruvbox.nvim'} use {'lukas-reineke/indent-blankline.nvim'} @@ -24,10 +54,17 @@ return require('packer').startup(function() use { 'hrsh7th/nvim-cmp', requires = { - 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-nvim-lsp', - 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-nvim-lua', - 'octaltree/cmp-look', 'hrsh7th/cmp-path', 'hrsh7th/cmp-calc', - 'f3fora/cmp-spell', 'hrsh7th/cmp-emoji', 'hrsh7th/cmp-cmdline' + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-nvim-lsp', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + 'hrsh7th/cmp-nvim-lua', + 'octaltree/cmp-look', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-calc', + 'f3fora/cmp-spell', + 'hrsh7th/cmp-emoji', + 'hrsh7th/cmp-cmdline' } } use {'rafamadriz/friendly-snippets'} diff --git a/lua/my_telescope.lua b/lua/setup/telescope.lua similarity index 95% rename from lua/my_telescope.lua rename to lua/setup/telescope.lua index 40ada92..ce222d4 100644 --- a/lua/my_telescope.lua +++ b/lua/setup/telescope.lua @@ -1,50 +1,50 @@ -local actions = require('telescope.actions') - -local mappingTab = { - i = { - [''] = actions.select_tab, - [''] = actions.select_default, - } -} - -require('telescope').setup { - defaults = { - mappings = { - i = { - [''] = actions.close, - [''] = actions.select_default + actions.center, - [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist - } - } - }, - pickers = { - -- Your special builtin config goes in here - buffers = { - sort_lastused = true, - theme = 'ivy', - mappings = { - i = { - [''] = actions.delete_buffer, - [''] = actions.select_default, - }, - n = { - [''] = actions.delete_buffer, - } - } - }, - find_files = { - theme = 'ivy', - previewer = false, - }, - oldfiles = { - theme = 'ivy', - }, - git_files = { - theme = 'ivy', - previewer = false, - }, - lsp_dynamic_workspace_symbols = { - }, - } -} +local actions = require('telescope.actions') + +local mappingTab = { + i = { + [''] = actions.select_tab, + [''] = actions.select_default, + } +} + +require('telescope').setup { + defaults = { + mappings = { + i = { + [''] = actions.close, + [''] = actions.select_default + actions.center, + [''] = actions.send_selected_to_loclist, + [''] = actions.smart_send_to_qflist + } + } + }, + pickers = { + -- Your special builtin config goes in here + buffers = { + sort_lastused = true, + theme = 'ivy', + mappings = { + i = { + [''] = actions.delete_buffer, + [''] = actions.select_default, + }, + n = { + [''] = actions.delete_buffer, + } + } + }, + find_files = { + theme = 'ivy', + previewer = false, + }, + oldfiles = { + theme = 'ivy', + }, + git_files = { + theme = 'ivy', + previewer = false, + }, + lsp_dynamic_workspace_symbols = { + }, + } +} -- 2.49.1 From 61a052b9603bce6b482712f2df2882e8402b3960 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 17:38:38 +0100 Subject: [PATCH 041/894] Same for lsp and cmp --- init.lua | 2 - lua/my_plugins.lua | 6 +- lua/{my_cmp.lua => setup/cmp.lua} | 0 .../lspinstall.lua} | 268 +++++++++--------- 4 files changed, 138 insertions(+), 138 deletions(-) rename lua/{my_cmp.lua => setup/cmp.lua} (100%) rename lua/{my_lspinstall.lua => setup/lspinstall.lua} (97%) diff --git a/init.lua b/init.lua index 46c541c..07f156e 100644 --- a/init.lua +++ b/init.lua @@ -12,8 +12,6 @@ require('my_options') require("my_autocommands") -- plugins -require('my_lspinstall') -require('my_cmp') require('my_neogen') require('my_luasnip') -------------------- TREE-SITTER --------------------------- diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 5cc01f3..8f64455 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -65,7 +65,8 @@ return require('packer').startup(function() 'f3fora/cmp-spell', 'hrsh7th/cmp-emoji', 'hrsh7th/cmp-cmdline' - } + }, + config = get_setup("cmp") } use {'rafamadriz/friendly-snippets'} use {'onsails/lspkind-nvim'} @@ -84,7 +85,8 @@ return require('packer').startup(function() use {'s1n7ax/nvim-terminal'} use { 'williamboman/nvim-lsp-installer', - requires = {'neovim/nvim-lspconfig'} + requires = {'neovim/nvim-lspconfig'}, + config = get_setup("lspinstall") } use { 'jose-elias-alvarez/null-ls.nvim', diff --git a/lua/my_cmp.lua b/lua/setup/cmp.lua similarity index 100% rename from lua/my_cmp.lua rename to lua/setup/cmp.lua diff --git a/lua/my_lspinstall.lua b/lua/setup/lspinstall.lua similarity index 97% rename from lua/my_lspinstall.lua rename to lua/setup/lspinstall.lua index 4f93c3f..ad778d9 100644 --- a/lua/my_lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -1,134 +1,134 @@ -local utils = require('utils') - -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.offsetEncoding = { "utf-16" } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - 'documentation', - 'detail', - 'additionalTextEdits', - }, -} - -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local opts = { noremap=true, silent=true } - buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'a', 'Telescope lsp_code_actions', opts) - buf_set_keymap('n', 'd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'h', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'c', 'lua vim.lsp.buf.outgoing_calls()', opts) - buf_set_keymap('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) - buf_set_keymap('n', 'm', 'lua vim.lsp.buf.rename()', opts) - -- buf_set_keymap('n', 'r', 'lua vim.lsp.buf.references()') - buf_set_keymap('n', 's', 'lua vim.lsp.buf.document_symbol()', opts) - buf_set_keymap('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'r', 'Telescope lsp_references', opts) - buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) - buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) - buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) - buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) - - vim.cmd [[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]] - - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) - end - if client.resolved_capabilities.document_range_formatting then - buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) - end - - -- Set autocommands conditional on server_capabilities - if client.resolved_capabilities.document_highlight then - vim.api.nvim_exec([[ - hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen - hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed - augroup lsp_document_highlight - autocmd! * - autocmd CursorHold lua vim.lsp.buf.document_highlight() - autocmd CursorHoldI lua vim.lsp.buf.document_highlight() - autocmd CursorMoved lua vim.lsp.buf.clear_references() - augroup END - ]], false) - end - require "lsp_signature".on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = "single" - }, - hi_parameter = "IncSearch" - }, bufnr) -end - -local lsp_installer = require("nvim-lsp-installer") - -local servers = { - "pyright", - "cmake", - "clangd", - "jsonls", - "groovyls", - "sumneko_lua", - "dockerls", -} - -for _, name in pairs(servers) do - local server_is_found, server = lsp_installer.get_server(name) - if server_is_found then - if not server:is_installed() then - print("Installing " .. name) - server:install() - end - end -end - -lsp_installer.on_server_ready(function(server) - local opts = { - on_attach = on_attach, - capabilities = capabilities, - } - - -- (optional) Customize the options passed to the server - if server.name == "clangd" then - opts.cmd = { "clangd" , "--compile-commands-dir=build_nvim"} - end - - -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) - server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] -end) - -local null_ls = require("null-ls") -null_ls.setup { - sources = { - null_ls.builtins.code_actions.gitsigns, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.stylua, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format - }, - on_attach = on_attach, - capabilities = capabilities -} -vim.diagnostic.config({virtual_text = false}) +local utils = require('utils') + +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } +capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.offsetEncoding = { "utf-16" } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + 'documentation', + 'detail', + 'additionalTextEdits', + }, +} + +local on_attach = function(client, bufnr) + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + + -- Mappings. + local opts = { noremap=true, silent=true } + buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'a', 'Telescope lsp_code_actions', opts) + buf_set_keymap('n', 'd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'h', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'c', 'lua vim.lsp.buf.outgoing_calls()', opts) + buf_set_keymap('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) + buf_set_keymap('n', 'm', 'lua vim.lsp.buf.rename()', opts) + -- buf_set_keymap('n', 'r', 'lua vim.lsp.buf.references()') + buf_set_keymap('n', 's', 'lua vim.lsp.buf.document_symbol()', opts) + buf_set_keymap('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) + buf_set_keymap('n', 'r', 'Telescope lsp_references', opts) + buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) + buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) + buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) + buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) + + vim.cmd [[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]] + + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + end + if client.resolved_capabilities.document_range_formatting then + buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) + end + + -- Set autocommands conditional on server_capabilities + if client.resolved_capabilities.document_highlight then + vim.api.nvim_exec([[ + hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen + hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed + augroup lsp_document_highlight + autocmd! * + autocmd CursorHold lua vim.lsp.buf.document_highlight() + autocmd CursorHoldI lua vim.lsp.buf.document_highlight() + autocmd CursorMoved lua vim.lsp.buf.clear_references() + augroup END + ]], false) + end + require "lsp_signature".on_attach({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = "single" + }, + hi_parameter = "IncSearch" + }, bufnr) +end + +local lsp_installer = require("nvim-lsp-installer") + +local servers = { + "pyright", + "cmake", + "clangd", + "jsonls", + "groovyls", + "sumneko_lua", + "dockerls", +} + +for _, name in pairs(servers) do + local server_is_found, server = lsp_installer.get_server(name) + if server_is_found then + if not server:is_installed() then + print("Installing " .. name) + server:install() + end + end +end + +lsp_installer.on_server_ready(function(server) + local opts = { + on_attach = on_attach, + capabilities = capabilities, + } + + -- (optional) Customize the options passed to the server + if server.name == "clangd" then + opts.cmd = { "clangd" , "--compile-commands-dir=build_nvim"} + end + + -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) + server:setup(opts) + vim.cmd [[ do User LspAttachBuffers ]] +end) + +local null_ls = require("null-ls") +null_ls.setup { + sources = { + null_ls.builtins.code_actions.gitsigns, + null_ls.builtins.formatting.autopep8, + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.stylua, + null_ls.builtins.diagnostics.flake8, + null_ls.builtins.formatting.isort, + null_ls.builtins.formatting.cmake_format + }, + on_attach = on_attach, + capabilities = capabilities +} +vim.diagnostic.config({virtual_text = false}) -- 2.49.1 From 86b8b65c99ed8fb80125afd657bdd2833ca93cc7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 17:38:50 +0100 Subject: [PATCH 042/894] Fixed autocommand for packer --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 8f64455..f61d3a5 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -1,7 +1,7 @@ vim.cmd([[ augroup packer_user_config autocmd! - autocmd BufWritePost plugins.lua source | PackerCompile + autocmd BufWritePost my_plugins.lua source | PackerCompile augroup end ]]) -- 2.49.1 From c0aa5e03d0b89b2b0836376d27f13d49988a4f19 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 18:03:36 +0100 Subject: [PATCH 043/894] More movement of setup files --- init.lua | 4 - lua/my_plugins.lua | 6 +- lua/{my_luasnip.lua => setup/luasnip.lua} | 112 +++++++++++----------- lua/{my_neogen.lua => setup/neogen.lua} | 0 4 files changed, 61 insertions(+), 61 deletions(-) rename lua/{my_luasnip.lua => setup/luasnip.lua} (97%) rename lua/{my_neogen.lua => setup/neogen.lua} (100%) diff --git a/init.lua b/init.lua index 07f156e..659800b 100644 --- a/init.lua +++ b/init.lua @@ -10,10 +10,6 @@ require('my_plugins') require('my_keymappings') require('my_options') require("my_autocommands") - --- plugins -require('my_neogen') -require('my_luasnip') -------------------- TREE-SITTER --------------------------- require('nvim-treesitter.configs').setup({ ensure_installed = 'maintained', diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index f61d3a5..ad8fda5 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -68,6 +68,9 @@ return require('packer').startup(function() }, config = get_setup("cmp") } + use {'L3MON4D3/LuaSnip', + config = get_setup("luasnip") + } use {'rafamadriz/friendly-snippets'} use {'onsails/lspkind-nvim'} use {'Shatur/neovim-cmake', @@ -94,7 +97,8 @@ return require('packer').startup(function() } use { 'danymat/neogen', - requires = 'nvim-treesitter/nvim-treesitter' + requires = 'nvim-treesitter/nvim-treesitter', + config = get_setup("neogen") } use {'abecodes/tabout.nvim'} use {'stevearc/dressing.nvim'} diff --git a/lua/my_luasnip.lua b/lua/setup/luasnip.lua similarity index 97% rename from lua/my_luasnip.lua rename to lua/setup/luasnip.lua index 96b0bcf..641fdf9 100644 --- a/lua/my_luasnip.lua +++ b/lua/setup/luasnip.lua @@ -1,56 +1,56 @@ -local ls = require("luasnip") -require("luasnip.loaders.from_vscode").load() --- some shorthands... -local s = ls.snippet -local sn = ls.snippet_node -local isn = ls.indent_snippet_node -local t = ls.text_node -local i = ls.insert_node -local f = ls.function_node -local c = ls.choice_node -local d = ls.dynamic_node -local r = ls.restore_node -local l = require("luasnip.extras").lambda -local rep = require("luasnip.extras").rep -local p = require("luasnip.extras").partial -local m = require("luasnip.extras").match -local n = require("luasnip.extras").nonempty -local dl = require("luasnip.extras").dynamic_lambda -local fmt = require("luasnip.extras.fmt").fmt -local fmta = require("luasnip.extras.fmt").fmta -local types = require("luasnip.util.types") -local conds = require("luasnip.extras.expand_conditions") - -local function getRegA(capitalize) - local clipboard = vim.fn.getreg('a') - clipboard = clipboard:gsub('^m_', '') - if capitalize then - clipboard = clipboard:gsub("^%l", string.upper); - end - return clipboard - -end - - -ls.snippets = { - cpp = { - s('TEST_F_getset', - { - t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), - i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), - i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), - t({'','}', ''}) - }), - s('TEST_fn_getset', - { - t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({'()', '{', ' '}), - i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({');', ' '}), - i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({'());', ''}), - t({'','}', '', ''}), - - t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), - p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({'();'}), - t({'','}'}), - }) - }, -} +local ls = require("luasnip") +require("luasnip.loaders.from_vscode").load() +-- some shorthands... +local s = ls.snippet +local sn = ls.snippet_node +local isn = ls.indent_snippet_node +local t = ls.text_node +local i = ls.insert_node +local f = ls.function_node +local c = ls.choice_node +local d = ls.dynamic_node +local r = ls.restore_node +local l = require("luasnip.extras").lambda +local rep = require("luasnip.extras").rep +local p = require("luasnip.extras").partial +local m = require("luasnip.extras").match +local n = require("luasnip.extras").nonempty +local dl = require("luasnip.extras").dynamic_lambda +local fmt = require("luasnip.extras.fmt").fmt +local fmta = require("luasnip.extras.fmt").fmta +local types = require("luasnip.util.types") +local conds = require("luasnip.extras.expand_conditions") + +local function getRegA(capitalize) + local clipboard = vim.fn.getreg('a') + clipboard = clipboard:gsub('^m_', '') + if capitalize then + clipboard = clipboard:gsub("^%l", string.upper); + end + return clipboard + +end + + +ls.snippets = { + cpp = { + s('TEST_F_getset', + { + t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), + i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), + i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), + t({'','}', ''}) + }), + s('TEST_fn_getset', + { + t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({'()', '{', ' '}), + i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({');', ' '}), + i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({'());', ''}), + t({'','}', '', ''}), + + t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), + p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({'();'}), + t({'','}'}), + }) + }, +} diff --git a/lua/my_neogen.lua b/lua/setup/neogen.lua similarity index 100% rename from lua/my_neogen.lua rename to lua/setup/neogen.lua -- 2.49.1 From cf9b76d0e01baa07a1cf59524b4ff76ee84fbe49 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 19:53:08 +0100 Subject: [PATCH 044/894] nvim-tree and treesitter config to packer --- init.lua | 67 ---------------------------------------- lua/my_plugins.lua | 6 ++-- lua/setup/nvim-tree.lua | 28 +++++++++++++++++ lua/setup/treesitter.lua | 37 ++++++++++++++++++++++ 4 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 lua/setup/nvim-tree.lua create mode 100644 lua/setup/treesitter.lua diff --git a/init.lua b/init.lua index 659800b..6fe7b64 100644 --- a/init.lua +++ b/init.lua @@ -3,51 +3,12 @@ local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local opt = vim.opt -- to set options local utils = require('utils') -local packerUtil = require'packer.util' -------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings') require('my_options') require("my_autocommands") --------------------- TREE-SITTER --------------------------- -require('nvim-treesitter.configs').setup({ - ensure_installed = 'maintained', - highlight = { - enable = true - }, - 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 - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - lsp_interop = { - enable = true, - border = 'none', - peek_definition_code = { - ["df"] = "@function.outer", - ["dF"] = "@class.outer", - }, - }, - }, -}) -------------------- GITSIGNS ------------------------------ require('gitsigns').setup({ current_line_blame = true, @@ -58,34 +19,6 @@ require('gitsigns').setup({ ignore_whitespace = false, }, }) --------------------- NVIM-TREE ----------------------------- -require('nvim-tree').setup({ - auto_close = true, - update_cwd = true, - update_to_buf_dir = { - -- enable the feature - enable = true, - -- allow to open the tree if it was previously closed - auto_open = false, - }, - update_focused_file = { - enable = true, - update_cwd = false, - ignore_list = {} - }, - diagnostics = { - enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - } - }, -}) -utils.map('n', 'tt', 'NvimTreeToggle') -g.nvim_tree_highlight_opened_files = 1 -g.nvim_tree_respect_buf_cwd = 1 -------------------- COMMENTED ----------------------------- require('Comment').setup({ toggler = { diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index ad8fda5..ce16612 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -30,7 +30,8 @@ return require('packer').startup(function() use {'neovim/nvim-lspconfig'} use { 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate' + run = ':TSUpdate', + config = get_setup("treesitter") } use({ 'nvim-telescope/telescope.nvim', @@ -48,7 +49,8 @@ return require('packer').startup(function() use {'lewis6991/gitsigns.nvim'} use { 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons' + requires = 'kyazdani42/nvim-web-devicons', + config = get_setup("nvim-tree") } use{'numToStr/Comment.nvim'} use { diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua new file mode 100644 index 0000000..ab0a880 --- /dev/null +++ b/lua/setup/nvim-tree.lua @@ -0,0 +1,28 @@ +local utils = require('utils') +require('nvim-tree').setup({ + auto_close = true, + update_cwd = true, + update_to_buf_dir = { + -- enable the feature + enable = true, + -- allow to open the tree if it was previously closed + auto_open = false, + }, + update_focused_file = { + enable = true, + update_cwd = false, + ignore_list = {} + }, + diagnostics = { + enable = true, + icons = { + hint = "", + info = "", + warning = "", + error = "", + } + }, +}) +utils.map('n', 'tt', 'NvimTreeToggle') +vim.g.nvim_tree_highlight_opened_files = 1 +vim.g.nvim_tree_respect_buf_cwd = 1 diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua new file mode 100644 index 0000000..b747236 --- /dev/null +++ b/lua/setup/treesitter.lua @@ -0,0 +1,37 @@ +require('nvim-treesitter.configs').setup({ + ensure_installed = 'maintained', + highlight = { + enable = true + }, + 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 + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + lsp_interop = { + enable = true, + border = 'none', + peek_definition_code = { + ["df"] = "@function.outer", + ["dF"] = "@class.outer", + }, + }, + }, +}) -- 2.49.1 From fbdad999cd9131eac3efb3325fa6135665ee51b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 21:04:13 +0100 Subject: [PATCH 045/894] gitsigns, comment, cmake --- init.lua | 34 ---------------------------------- lua/my_plugins.lua | 13 ++++++++++--- lua/setup/cmake.lua | 14 ++++++++++++++ lua/setup/comment.lua | 10 ++++++++++ lua/setup/gitsigns.lua | 9 +++++++++ 5 files changed, 43 insertions(+), 37 deletions(-) create mode 100644 lua/setup/cmake.lua create mode 100644 lua/setup/comment.lua create mode 100644 lua/setup/gitsigns.lua diff --git a/init.lua b/init.lua index 6fe7b64..77bb715 100644 --- a/init.lua +++ b/init.lua @@ -9,40 +9,6 @@ require('my_plugins') require('my_keymappings') require('my_options') require("my_autocommands") --------------------- GITSIGNS ------------------------------ -require('gitsigns').setup({ - current_line_blame = true, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, -}) --------------------- COMMENTED ----------------------------- -require('Comment').setup({ - toggler = { - ---line-comment toggle - line = 'cc', - }, - opleader = { - ---line-comment opfunc mapping - line = 'c', - }, -}) --------------------- CMAKE --------------------------------- --- require('telescope').load_extension('cmake') -require('cmake').setup({ - parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. - build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values. -}) -utils.map('n', '', ':CMake build:copen') - --- msbuild errorformat -opt.errorformat:append("\\ %#%f(%l\\\\\\,%c):\\ %m") --- cl.exe errorformat --- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m') - -------------------- LUALINE ------------------------------- require('lualine').setup { options = {theme = 'gruvbox-material'}, diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index ce16612..a38d6e4 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -46,13 +46,19 @@ return require('packer').startup(function() use {'ellisonleao/gruvbox.nvim'} use {'lukas-reineke/indent-blankline.nvim'} use {'nvim-lua/plenary.nvim'} - use {'lewis6991/gitsigns.nvim'} + use { + 'lewis6991/gitsigns.nvim', + config = get_setup("gitsigns") + } use { 'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons', config = get_setup("nvim-tree") } - use{'numToStr/Comment.nvim'} + use{ + 'numToStr/Comment.nvim', + config = get_setup("comment") + } use { 'hrsh7th/nvim-cmp', requires = { @@ -76,7 +82,8 @@ return require('packer').startup(function() use {'rafamadriz/friendly-snippets'} use {'onsails/lspkind-nvim'} use {'Shatur/neovim-cmake', - requires = {'mfussenegger/nvim-dap'} + requires = {'mfussenegger/nvim-dap'}, + config = get_setup("cmake") } use { 'hoob3rt/lualine.nvim', diff --git a/lua/setup/cmake.lua b/lua/setup/cmake.lua new file mode 100644 index 0000000..ca13350 --- /dev/null +++ b/lua/setup/cmake.lua @@ -0,0 +1,14 @@ +local opt = vim.opt -- to set options +local utils = require('utils') +-- require('telescope').load_extension('cmake') +require('cmake').setup({ + parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. + build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values. +}) +utils.map('n', '', ':CMake build:copen') + +-- msbuild errorformat +opt.errorformat:append("\\ %#%f(%l\\\\\\,%c):\\ %m") +-- cl.exe errorformat +-- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m') + diff --git a/lua/setup/comment.lua b/lua/setup/comment.lua new file mode 100644 index 0000000..36c2d79 --- /dev/null +++ b/lua/setup/comment.lua @@ -0,0 +1,10 @@ +require('Comment').setup({ + toggler = { + ---line-comment toggle + line = 'cc', + }, + opleader = { + ---line-comment opfunc mapping + line = 'c', + }, +}) diff --git a/lua/setup/gitsigns.lua b/lua/setup/gitsigns.lua new file mode 100644 index 0000000..acac0c9 --- /dev/null +++ b/lua/setup/gitsigns.lua @@ -0,0 +1,9 @@ +require('gitsigns').setup({ + current_line_blame = true, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, +}) -- 2.49.1 From a1d6d33b34b9c2427694a82b4567d9db8defe658 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 21:07:35 +0100 Subject: [PATCH 046/894] move fzf native to telescope --- init.lua | 2 -- lua/my_plugins.lua | 4 ++-- lua/setup/telescope.lua | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 77bb715..bf1f625 100644 --- a/init.lua +++ b/init.lua @@ -23,8 +23,6 @@ require('telescope').load_extension('projects') utils.map('n', 'p', 'Telescope projects') -------------------- AUTOPAIRS ----------------------------- require('nvim-autopairs').setup{} --------------------- FZF NATIVE ---------------------------- -require('telescope').load_extension('fzf') -------------------- TERMINAL ------------------------------ require('nvim-terminal').setup({ toggle_keymap = 'z', diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index a38d6e4..4d3bdbc 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -38,7 +38,8 @@ return require('packer').startup(function() requires = { {'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}, - {'kyazdani42/nvim-web-devicons'} + {'kyazdani42/nvim-web-devicons'}, + {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} }, config = get_setup("telescope"), }) @@ -92,7 +93,6 @@ return require('packer').startup(function() use {'ahmedkhalf/project.nvim'} use {'p00f/nvim-ts-rainbow'} use {'windwp/nvim-autopairs'} - use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} use {'ray-x/lsp_signature.nvim'} use {'s1n7ax/nvim-terminal'} use { diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index ce222d4..db32ef3 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -48,3 +48,5 @@ require('telescope').setup { }, } } + +require('telescope').load_extension('fzf') -- 2.49.1 From a3d76bbd15017aadee0ced22330e4b16e829be31 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 21:37:13 +0100 Subject: [PATCH 047/894] Finished all plugins --- init.lua | 26 -------------------------- lua/my_plugins.lua | 18 ++++++++++++++---- lua/setup/indent_blankline.lua | 12 ++++++++++++ lua/setup/lualine.lua | 5 +++++ lua/setup/nvim-autopair.lua | 1 + lua/setup/project.lua | 5 +++++ 6 files changed, 37 insertions(+), 30 deletions(-) create mode 100644 lua/setup/indent_blankline.lua create mode 100644 lua/setup/lualine.lua create mode 100644 lua/setup/nvim-autopair.lua create mode 100644 lua/setup/project.lua diff --git a/init.lua b/init.lua index bf1f625..06c3a22 100644 --- a/init.lua +++ b/init.lua @@ -9,34 +9,8 @@ require('my_plugins') require('my_keymappings') require('my_options') require("my_autocommands") --------------------- LUALINE ------------------------------- -require('lualine').setup { - options = {theme = 'gruvbox-material'}, - sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}}, - inactive_sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}} -} --------------------- PROJECT ------------------------------- -require("project_nvim").setup { - silent_chdir = true, -} -require('telescope').load_extension('projects') -utils.map('n', 'p', 'Telescope projects') --------------------- AUTOPAIRS ----------------------------- -require('nvim-autopairs').setup{} -------------------- TERMINAL ------------------------------ require('nvim-terminal').setup({ toggle_keymap = 'z', }) --------------------- INDENT-BLANKLINE ---------------------- -opt.listchars:append("eol:↴") --- opt.listchars:append("space: ") -opt.listchars:append("trail: ") -opt.listchars:append("tab:→ ") - -require("indent_blankline").setup { - show_end_of_line = true, - use_treesitter = true, - show_current_context = true, - context_patterns = {'class', 'function', 'method', 'block', '^if', '^for', '^while'}, -} diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 4d3bdbc..feda6a7 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -45,7 +45,10 @@ return require('packer').startup(function() }) use {'sainnhe/gruvbox-material'} use {'ellisonleao/gruvbox.nvim'} - use {'lukas-reineke/indent-blankline.nvim'} + use { + 'lukas-reineke/indent-blankline.nvim', + config = get_setup("indent_blankline") + } use {'nvim-lua/plenary.nvim'} use { 'lewis6991/gitsigns.nvim', @@ -88,11 +91,18 @@ return require('packer').startup(function() } use { 'hoob3rt/lualine.nvim', - requires = {'kyazdani42/nvim-web-devicons', opt = true} + requires = {'kyazdani42/nvim-web-devicons', opt = true}, + config = get_setup("lualine") + } + use { + 'ahmedkhalf/project.nvim', + config = get_setup("project") } - use {'ahmedkhalf/project.nvim'} use {'p00f/nvim-ts-rainbow'} - use {'windwp/nvim-autopairs'} + use { + 'windwp/nvim-autopairs', + config = get_setup("nvim-autopairs") + } use {'ray-x/lsp_signature.nvim'} use {'s1n7ax/nvim-terminal'} use { diff --git a/lua/setup/indent_blankline.lua b/lua/setup/indent_blankline.lua new file mode 100644 index 0000000..42ad533 --- /dev/null +++ b/lua/setup/indent_blankline.lua @@ -0,0 +1,12 @@ +local opt = vim.opt -- to set options +opt.listchars:append("eol:↴") +-- opt.listchars:append("space: ") +opt.listchars:append("trail: ") +opt.listchars:append("tab:→ ") + +require("indent_blankline").setup { + show_end_of_line = true, + use_treesitter = true, + show_current_context = true, + context_patterns = {'class', 'function', 'method', 'block', '^if', '^for', '^while'}, +} diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua new file mode 100644 index 0000000..4d7fd78 --- /dev/null +++ b/lua/setup/lualine.lua @@ -0,0 +1,5 @@ +require('lualine').setup { + options = {theme = 'gruvbox-material'}, + sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}}, + inactive_sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}} +} diff --git a/lua/setup/nvim-autopair.lua b/lua/setup/nvim-autopair.lua new file mode 100644 index 0000000..5b9c03c --- /dev/null +++ b/lua/setup/nvim-autopair.lua @@ -0,0 +1 @@ +require('nvim-autopairs').setup{} diff --git a/lua/setup/project.lua b/lua/setup/project.lua new file mode 100644 index 0000000..f8abf0b --- /dev/null +++ b/lua/setup/project.lua @@ -0,0 +1,5 @@ +require("project_nvim").setup { + silent_chdir = true, +} +require('telescope').load_extension('projects') +utils.map('n', 'p', 'Telescope projects') -- 2.49.1 From 8860d92ed1a1dfea4d91cb9b1436851988123c4f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 22:16:06 +0100 Subject: [PATCH 048/894] Small fixes --- lua/setup/{nvim-autopair.lua => nvim-autopairs.lua} | 0 lua/setup/project.lua | 1 + 2 files changed, 1 insertion(+) rename lua/setup/{nvim-autopair.lua => nvim-autopairs.lua} (100%) diff --git a/lua/setup/nvim-autopair.lua b/lua/setup/nvim-autopairs.lua similarity index 100% rename from lua/setup/nvim-autopair.lua rename to lua/setup/nvim-autopairs.lua diff --git a/lua/setup/project.lua b/lua/setup/project.lua index f8abf0b..1b55dcb 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,3 +1,4 @@ +local utils = require('utils') require("project_nvim").setup { silent_chdir = true, } -- 2.49.1 From 4c543d7f44c5d94b9131c6e07bbcb1e53388dc17 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 22:53:30 +0100 Subject: [PATCH 049/894] Added lua style file --- stylua.toml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 stylua.toml diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..255bfd9 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,6 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "Always" -- 2.49.1 From c3deaa45c65ef608fec33f1af681772ad88b04cf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 22:56:51 +0100 Subject: [PATCH 050/894] lua format --- init.lua | 13 ++- lua/my_autocommands.lua | 59 ++++++------ lua/my_keymappings.lua | 15 +-- lua/my_options.lua | 20 ++-- lua/my_plugins.lua | 163 ++++++++++++++++---------------- lua/setup/cmake.lua | 5 +- lua/setup/cmp.lua | 168 +++++++++++++++++---------------- lua/setup/indent_blankline.lua | 14 +-- lua/setup/lspinstall.lua | 79 +++++++++------- lua/setup/lualine.lua | 10 +- lua/setup/luasnip.lua | 29 +++--- lua/setup/neogen.lua | 26 ++--- lua/setup/nvim-autopairs.lua | 2 +- lua/setup/nvim-tree.lua | 22 ++--- lua/setup/project.lua | 4 +- lua/setup/telescope.lua | 21 ++--- lua/utils/init.lua | 18 ++-- 17 files changed, 343 insertions(+), 325 deletions(-) diff --git a/init.lua b/init.lua index 06c3a22..6546909 100644 --- a/init.lua +++ b/init.lua @@ -1,16 +1,15 @@ -local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') -local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() -local g = vim.g -- a table to access global variables -local opt = vim.opt -- to set options +local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') +local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() +local g = vim.g -- a table to access global variables +local opt = vim.opt -- to set options local utils = require('utils') -------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings') require('my_options') -require("my_autocommands") +require('my_autocommands') -------------------- TERMINAL ------------------------------ require('nvim-terminal').setup({ - toggle_keymap = 'z', + toggle_keymap = 'z', }) - diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 3fb7b3e..368706a 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -3,7 +3,7 @@ function nvim_create_augroups(definitions) vim.cmd('augroup ' .. group_name) vim.cmd('autocmd!') for _, def in ipairs(definition) do - local command = table.concat(vim.tbl_flatten{'autocmd', def}, ' ') + local command = table.concat(vim.tbl_flatten({ 'autocmd', def }), ' ') vim.cmd(command) end vim.cmd('augroup END') @@ -11,35 +11,34 @@ function nvim_create_augroups(definitions) end local autocmds = { - packer = { - { 'BufWritePost', 'plugins.lua', 'PackerCompile' }; - }; - restore_cursor = { - { 'BufRead', '*', [[call setpos(".", getpos("'\""))]] }; - }; - save_shada = { - {'FocusGained,FocusLost', '*', 'rshada|wshada'}; - }; - resize_windows_proportionally = { - { 'VimResized', '*', ':wincmd =' }; - }; - lua_highlight = { - { 'TextYankPost', '*', [[silent! lua vim.highlight.on_yank() {higroup='IncSearch', timeout=400}]] }; - }; - file_type = { - {'BufRead,BufNewFile', '*.simvis', 'set filetype=xml'}; - {'BufRead,BufNewFile', '*.simcfg,*.simcon,*.simudex', 'set filetype=cfg'}; - {'BufRead,BufNewFile', 'Jenkinsfile*', 'set filetype=groovy'}; - {'BufRead,BufNewFile', '*.manifest', 'set filetype=xml'}; - {'BufRead,BufNewFile', 'SConstruct,SConscript', 'set filetype=python'}; - }; - file_changed = { - {'BufEnter,FocusGained', '*', 'checktime'}; - }; - no_auto_comment = { - {'BufEnter', '*', 'set fo-=c fo-=r fo-=o'} - } + packer = { + { 'BufWritePost', 'plugins.lua', 'PackerCompile' }, + }, + restore_cursor = { + { 'BufRead', '*', [[call setpos(".", getpos("'\""))]] }, + }, + save_shada = { + { 'FocusGained,FocusLost', '*', 'rshada|wshada' }, + }, + resize_windows_proportionally = { + { 'VimResized', '*', ':wincmd =' }, + }, + lua_highlight = { + { 'TextYankPost', '*', [[silent! lua vim.highlight.on_yank() {higroup='IncSearch', timeout=400}]] }, + }, + file_type = { + { 'BufRead,BufNewFile', '*.simvis', 'set filetype=xml' }, + { 'BufRead,BufNewFile', '*.simcfg,*.simcon,*.simudex', 'set filetype=cfg' }, + { 'BufRead,BufNewFile', 'Jenkinsfile*', 'set filetype=groovy' }, + { 'BufRead,BufNewFile', '*.manifest', 'set filetype=xml' }, + { 'BufRead,BufNewFile', 'SConstruct,SConscript', 'set filetype=python' }, + }, + file_changed = { + { 'BufEnter,FocusGained', '*', 'checktime' }, + }, + no_auto_comment = { + { 'BufEnter', '*', 'set fo-=c fo-=r fo-=o' }, + }, } nvim_create_augroups(autocmds) - diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 884e8c4..f984476 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,6 +1,6 @@ local utils = require('utils') vim.g.mapleader = ',' -utils.map('n', '', 'nil', { noremap = true, silent = true}) +utils.map('n', '', 'nil', { noremap = true, silent = true }) -- Paste from clipboard utils.map('n', 'p', '"+p') utils.map('n', 'P', '"+P') @@ -58,18 +58,19 @@ utils.map('v', '>', '>gv') utils.map('n', 'a', '"ayiw') -- Highlight word under cursor -utils.map('n', 'ü', ":let @/='\\<=expand(\"\")\\>':set hls", { noremap = true, silent = true }) -utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) +utils.map('n', 'ü', ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) +utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") +utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) --- Close Buffer +-- Close Buffer utils.map('n', '', ':bd') -- to navigate the completion menu -utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) -utils.map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) +utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) +utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) -- Telescope -utils.map('n', 'f', 'lua require(\'telescope.builtin\').find_files({no_ignore=true})') +utils.map('n', 'f', "lua require('telescope.builtin').find_files({no_ignore=true})") utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') utils.map('n', 'g', 'Telescope git_files') utils.map('n', 'o', 'Telescope oldfiles') diff --git a/lua/my_options.lua b/lua/my_options.lua index 328f50a..5d0c98d 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,13 +1,13 @@ local utils = require('utils') -vim.g.gruvbox_material_diagnostic_text_highlight=1 -vim.g.gruvbox_material_diagnostic_virtual_text='colored' -vim.g.gruvbox_bold=0 -vim.g.gruvbox_italicize_comments=0 -vim.g.gruvbox_italicize_strings=0 -vim.cmd 'colorscheme gruvbox' -- Put your favorite colorscheme here -vim.cmd 'syntax enable' -vim.cmd 'filetype plugin indent on' -vim.cmd 'language en_US.utf-8' +vim.g.gruvbox_material_diagnostic_text_highlight = 1 +vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' +vim.g.gruvbox_bold = 0 +vim.g.gruvbox_italicize_comments = 0 +vim.g.gruvbox_italicize_strings = 0 +vim.cmd('colorscheme gruvbox') -- Put your favorite colorscheme here +vim.cmd('syntax enable') +vim.cmd('filetype plugin indent on') +vim.cmd('language en_US.utf-8') utils.opt('o', 'hlsearch', true) utils.opt('o', 'guifont', 'JetBrainsMono Nerd Font:h9') utils.opt('o', 'swapfile', false) @@ -21,7 +21,7 @@ utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('o', 'hidden', true) utils.opt('o', 'ignorecase', true) -utils.opt('o', 'scrolloff', 4 ) +utils.opt('o', 'scrolloff', 4) utils.opt('o', 'shiftround', true) utils.opt('o', 'relativenumber', false) utils.opt('o', 'smartcase', true) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index feda6a7..54e45fc 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -6,64 +6,71 @@ vim.cmd([[ ]]) local fn = vim.fn -local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" +local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then packer_bootstrap = fn.system({ - "git", - "clone", - "--depth", - "1", - "https://github.com/wbthomason/packer.nvim", + 'git', + 'clone', + '--depth', + '1', + 'https://github.com/wbthomason/packer.nvim', install_path, }) end -vim.api.nvim_command("packadd packer.nvim") +vim.api.nvim_command('packadd packer.nvim') function get_setup(name) return string.format('require("setup/%s")', name) end -return require('packer').startup(function() +local packerUtil = require('packer.util') +require('packer').init({ + snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'), + display = { + open_fn = require('packer.util').float, + }, +}) +return require('packer').startup(function() -- Packer can manage itself as an optional plugin - use {'wbthomason/packer.nvim'} - use {'neovim/nvim-lspconfig'} - use { + use({ 'wbthomason/packer.nvim' }) + use({ 'neovim/nvim-lspconfig' }) + use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', - config = get_setup("treesitter") - } + config = get_setup('treesitter'), + }) use({ 'nvim-telescope/telescope.nvim', requires = { - {'nvim-lua/popup.nvim'}, - {'nvim-lua/plenary.nvim'}, - {'kyazdani42/nvim-web-devicons'}, - {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} + { 'nvim-lua/popup.nvim' }, + { 'nvim-lua/plenary.nvim' }, + { 'kyazdani42/nvim-web-devicons' }, + { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, }, - config = get_setup("telescope"), + config = get_setup('telescope'), }) - use {'sainnhe/gruvbox-material'} - use {'ellisonleao/gruvbox.nvim'} - use { + use({ 'sainnhe/gruvbox-material' }) + use({ 'ellisonleao/gruvbox.nvim' }) + use({ 'lukas-reineke/indent-blankline.nvim', - config = get_setup("indent_blankline") - } - use {'nvim-lua/plenary.nvim'} - use { + config = get_setup('indent_blankline'), + }) + use({ 'nvim-lua/plenary.nvim' }) + use({ 'lewis6991/gitsigns.nvim', - config = get_setup("gitsigns") - } - use { - 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons', - config = get_setup("nvim-tree") - } - use{ + config = get_setup('gitsigns'), + }) + use({ + 'kyazdani42/nvim-tree.lua', + requires = 'kyazdani42/nvim-web-devicons', + config = get_setup('nvim-tree'), + }) + use({ 'numToStr/Comment.nvim', - config = get_setup("comment") - } - use { + config = get_setup('comment'), + }) + use({ 'hrsh7th/nvim-cmp', requires = { 'hrsh7th/cmp-buffer', @@ -75,63 +82,59 @@ return require('packer').startup(function() 'hrsh7th/cmp-path', 'hrsh7th/cmp-calc', 'f3fora/cmp-spell', - 'hrsh7th/cmp-emoji', - 'hrsh7th/cmp-cmdline' + 'hrsh7th/cmp-emoji', + 'hrsh7th/cmp-cmdline', }, - config = get_setup("cmp") - } - use {'L3MON4D3/LuaSnip', - config = get_setup("luasnip") - } - use {'rafamadriz/friendly-snippets'} - use {'onsails/lspkind-nvim'} - use {'Shatur/neovim-cmake', - requires = {'mfussenegger/nvim-dap'}, - config = get_setup("cmake") - } - use { + config = get_setup('cmp'), + }) + use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) + use({ 'rafamadriz/friendly-snippets' }) + use({ 'onsails/lspkind-nvim' }) + use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') }) + use({ 'hoob3rt/lualine.nvim', - requires = {'kyazdani42/nvim-web-devicons', opt = true}, - config = get_setup("lualine") - } - use { + requires = { 'kyazdani42/nvim-web-devicons', opt = true }, + config = get_setup('lualine'), + }) + use({ 'ahmedkhalf/project.nvim', - config = get_setup("project") - } - use {'p00f/nvim-ts-rainbow'} - use { + config = get_setup('project'), + }) + use({ 'p00f/nvim-ts-rainbow' }) + use({ 'windwp/nvim-autopairs', - config = get_setup("nvim-autopairs") - } - use {'ray-x/lsp_signature.nvim'} - use {'s1n7ax/nvim-terminal'} - use { + config = get_setup('nvim-autopairs'), + }) + use({ 'ray-x/lsp_signature.nvim' }) + use({ 's1n7ax/nvim-terminal' }) + use({ 'williamboman/nvim-lsp-installer', - requires = {'neovim/nvim-lspconfig'}, - config = get_setup("lspinstall") - } - use { + requires = { 'neovim/nvim-lspconfig' }, + config = get_setup('lspinstall'), + }) + use({ 'jose-elias-alvarez/null-ls.nvim', - requires = {'nvim-lua/plenary.nvim'} - } - use { + requires = { 'nvim-lua/plenary.nvim' }, + }) + use({ 'danymat/neogen', requires = 'nvim-treesitter/nvim-treesitter', - config = get_setup("neogen") - } - use {'abecodes/tabout.nvim'} - use {'stevearc/dressing.nvim'} - use { + config = get_setup('neogen'), + }) + use({ 'abecodes/tabout.nvim' }) + use({ 'stevearc/dressing.nvim' }) + use({ 'nvim-treesitter/nvim-treesitter-textobjects', - requires = "nvim-treesitter/nvim-treesitter" - } - use {'mvllow/modes.nvim', + requires = 'nvim-treesitter/nvim-treesitter', + }) + use({ + 'mvllow/modes.nvim', config = function() vim.opt.cursorline = true require('modes').setup({ focus_only = true, line_opacity = 0.2, }) - end - } + end, + }) end) diff --git a/lua/setup/cmake.lua b/lua/setup/cmake.lua index ca13350..f800b95 100644 --- a/lua/setup/cmake.lua +++ b/lua/setup/cmake.lua @@ -1,4 +1,4 @@ -local opt = vim.opt -- to set options +local opt = vim.opt -- to set options local utils = require('utils') -- require('telescope').load_extension('cmake') require('cmake').setup({ @@ -8,7 +8,6 @@ require('cmake').setup({ utils.map('n', '', ':CMake build:copen') -- msbuild errorformat -opt.errorformat:append("\\ %#%f(%l\\\\\\,%c):\\ %m") +opt.errorformat:append('\\ %#%f(%l\\\\\\,%c):\\ %m') -- cl.exe errorformat -- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m') - diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 530b7cb..6c9604d 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -1,101 +1,106 @@ local cmp = require('cmp') -local luasnip = require("luasnip") +local luasnip = require('luasnip') local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) + return vim.api.nvim_replace_termcodes(str, true, true, true) end local check_back_space = function() - local col = vim.fn.col(".") - 1 - return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil + local col = vim.fn.col('.') - 1 + return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil end -cmp.setup { +cmp.setup({ - formatting = { - format = function(entry, vim_item) - -- fancy icons and a name of kind - vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. - " " .. vim_item.kind - -- set a name for each source - vim_item.menu = ({ - buffer = "[Buffer]", - nvim_lsp = "[LSP]", - ultisnips = "[UltiSnips]", - nvim_lua = "[Lua]", - cmp_tabnine = "[TabNine]", - look = "[Look]", - path = "[Path]", - spell = "[Spell]", - calc = "[Calc]", - emoji = "[Emoji]" - })[entry.source.name] - return vim_item - end - }, - mapping = { - [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's'}), - [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), - [''] = cmp.mapping({ - i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }), - c = cmp.mapping.confirm({ select = false }), - s = cmp.mapping.confirm({ select = false }), - }), - [""] = cmp.mapping(function(fallback) - if luasnip.expand_or_jumpable() then - vim.api.nvim_feedkeys(t("luasnip-expand-or-jump"), "", true) - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - vim.api.nvim_feedkeys(t("luasnip-jump-prev"), "", true) - else - fallback() - end - end, { - "i", - "s", - }), - }, - snippet = { - expand = function(args) - require'luasnip'.lsp_expand(args.body) + formatting = { + format = function(entry, vim_item) + -- fancy icons and a name of kind + vim_item.kind = require('lspkind').presets.default[vim_item.kind] .. ' ' .. vim_item.kind + -- set a name for each source + vim_item.menu = ({ + buffer = '[Buffer]', + nvim_lsp = '[LSP]', + ultisnips = '[UltiSnips]', + nvim_lua = '[Lua]', + cmp_tabnine = '[TabNine]', + look = '[Look]', + path = '[Path]', + spell = '[Spell]', + calc = '[Calc]', + emoji = '[Emoji]', + })[entry.source.name] + return vim_item + end, + }, + mapping = { + [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), + [''] = cmp.mapping({ + i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }), + c = cmp.mapping.confirm({ select = false }), + s = cmp.mapping.confirm({ select = false }), + }), + [''] = cmp.mapping(function(fallback) + if luasnip.expand_or_jumpable() then + vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) + else + fallback() end - }, - sources = { - {name = "luasnip"}, {name = 'nvim_lsp'}, {name = 'buffer'}, - {name = "nvim_lua"}, {name = "look"}, {name = "path"}, - {name = 'cmp_tabnine'}, {name = "calc"}, {name = "spell"}, - {name = "emoji"} - }, - completion = {completeopt = 'menu,menuone,noinsert, noselect'}, - -- experimental = { native_menu = true } -} + end, { + 'i', + 's', + }), + [''] = cmp.mapping(function(fallback) + if luasnip.jumpable(-1) then + vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) + else + fallback() + end + end, { + 'i', + 's', + }), + }, + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + sources = { + { name = 'luasnip' }, + { name = 'nvim_lsp' }, + { name = 'buffer' }, + { name = 'nvim_lua' }, + { name = 'look' }, + { name = 'path' }, + { name = 'cmp_tabnine' }, + { name = 'calc' }, + { name = 'spell' }, + { name = 'emoji' }, + }, + completion = { completeopt = 'menu,menuone,noinsert, noselect' }, + -- experimental = { native_menu = true } +}) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline('/', { sources = { - { name = 'buffer' } + { name = 'buffer' }, }, - }) +}) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { sources = cmp.config.sources({ - { name = 'path' } + { name = 'path' }, }, { - { name = 'cmdline' } + { name = 'cmdline' }, }, { - { name = 'buffer' } + { name = 'buffer' }, }), }) @@ -106,13 +111,16 @@ cmp.setup.cmdline(':', { -- auto_select = true --}) local cmp_autopairs = require('nvim-autopairs.completion.cmp') -cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) +cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) -- TabNine --local tabnine = require('cmp_tabnine.config') --tabnine:setup({max_lines = 1000, max_num_results = 20, sort = true}) -- Database completion -vim.api.nvim_exec([[ +vim.api.nvim_exec( + [[ autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} }) -]], false) +]], + false +) diff --git a/lua/setup/indent_blankline.lua b/lua/setup/indent_blankline.lua index 42ad533..fa14302 100644 --- a/lua/setup/indent_blankline.lua +++ b/lua/setup/indent_blankline.lua @@ -1,12 +1,12 @@ -local opt = vim.opt -- to set options -opt.listchars:append("eol:↴") +local opt = vim.opt -- to set options +opt.listchars:append('eol:↴') -- opt.listchars:append("space: ") -opt.listchars:append("trail: ") -opt.listchars:append("tab:→ ") +opt.listchars:append('trail: ') +opt.listchars:append('tab:→ ') -require("indent_blankline").setup { +require('indent_blankline').setup({ show_end_of_line = true, use_treesitter = true, show_current_context = true, - context_patterns = {'class', 'function', 'method', 'block', '^if', '^for', '^while'}, -} + context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, +}) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index ad778d9..2cc3532 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -9,7 +9,7 @@ capabilities.textDocument.completion.completionItem.labelDetailsSupport = true capabilities.textDocument.completion.completionItem.deprecatedSupport = true capabilities.textDocument.completion.completionItem.commitCharactersSupport = true capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.offsetEncoding = { "utf-16" } +capabilities.offsetEncoding = { 'utf-16' } capabilities.textDocument.completion.completionItem.resolveSupport = { properties = { 'documentation', @@ -19,14 +19,18 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { } local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. - local opts = { noremap=true, silent=true } + local opts = { noremap = true, silent = true } buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) buf_set_keymap('n', 'a', 'Telescope lsp_code_actions', opts) @@ -47,7 +51,7 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) - vim.cmd [[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]] + vim.cmd([[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]]) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then @@ -59,7 +63,8 @@ local on_attach = function(client, bufnr) -- Set autocommands conditional on server_capabilities if client.resolved_capabilities.document_highlight then - vim.api.nvim_exec([[ + vim.api.nvim_exec( + [[ hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed augroup lsp_document_highlight @@ -68,34 +73,36 @@ local on_attach = function(client, bufnr) autocmd CursorHoldI lua vim.lsp.buf.document_highlight() autocmd CursorMoved lua vim.lsp.buf.clear_references() augroup END - ]], false) + ]], + false + ) end - require "lsp_signature".on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = "single" - }, - hi_parameter = "IncSearch" - }, bufnr) + require('lsp_signature').on_attach({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = 'single', + }, + hi_parameter = 'IncSearch', + }, bufnr) end -local lsp_installer = require("nvim-lsp-installer") +local lsp_installer = require('nvim-lsp-installer') local servers = { - "pyright", - "cmake", - "clangd", - "jsonls", - "groovyls", - "sumneko_lua", - "dockerls", + 'pyright', + 'cmake', + 'clangd', + 'jsonls', + 'groovyls', + 'sumneko_lua', + 'dockerls', } for _, name in pairs(servers) do local server_is_found, server = lsp_installer.get_server(name) if server_is_found then if not server:is_installed() then - print("Installing " .. name) + print('Installing ' .. name) server:install() end end @@ -107,18 +114,18 @@ lsp_installer.on_server_ready(function(server) capabilities = capabilities, } - -- (optional) Customize the options passed to the server - if server.name == "clangd" then - opts.cmd = { "clangd" , "--compile-commands-dir=build_nvim"} - end + -- (optional) Customize the options passed to the server + if server.name == 'clangd' then + opts.cmd = { 'clangd', '--compile-commands-dir=build_nvim' } + end - -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) - server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] + -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) + server:setup(opts) + vim.cmd([[ do User LspAttachBuffers ]]) end) -local null_ls = require("null-ls") -null_ls.setup { +local null_ls = require('null-ls') +null_ls.setup({ sources = { null_ls.builtins.code_actions.gitsigns, null_ls.builtins.formatting.autopep8, @@ -126,9 +133,9 @@ null_ls.setup { null_ls.builtins.formatting.stylua, null_ls.builtins.diagnostics.flake8, null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format + null_ls.builtins.formatting.cmake_format, }, on_attach = on_attach, - capabilities = capabilities -} -vim.diagnostic.config({virtual_text = false}) + capabilities = capabilities, +}) +vim.diagnostic.config({ virtual_text = false }) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index 4d7fd78..e9ec550 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,5 +1,5 @@ -require('lualine').setup { - options = {theme = 'gruvbox-material'}, - sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}}, - inactive_sections = {lualine_c = {'getcwd', {'filename', path = 1, file_status = true}}} -} +require('lualine').setup({ + options = { theme = 'gruvbox-material' }, + sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, +}) diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index 641fdf9..611f6a1 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -1,5 +1,5 @@ -local ls = require("luasnip") -require("luasnip.loaders.from_vscode").load() +local ls = require('luasnip') +require('luasnip.loaders.from_vscode').load() -- some shorthands... local s = ls.snippet local sn = ls.snippet_node @@ -10,25 +10,24 @@ local f = ls.function_node local c = ls.choice_node local d = ls.dynamic_node local r = ls.restore_node -local l = require("luasnip.extras").lambda -local rep = require("luasnip.extras").rep -local p = require("luasnip.extras").partial -local m = require("luasnip.extras").match -local n = require("luasnip.extras").nonempty -local dl = require("luasnip.extras").dynamic_lambda -local fmt = require("luasnip.extras.fmt").fmt -local fmta = require("luasnip.extras.fmt").fmta -local types = require("luasnip.util.types") -local conds = require("luasnip.extras.expand_conditions") +local l = require('luasnip.extras').lambda +local rep = require('luasnip.extras').rep +local p = require('luasnip.extras').partial +local m = require('luasnip.extras').match +local n = require('luasnip.extras').nonempty +local dl = require('luasnip.extras').dynamic_lambda +local fmt = require('luasnip.extras.fmt').fmt +local fmta = require('luasnip.extras.fmt').fmta +local types = require('luasnip.util.types') +local conds = require('luasnip.extras.expand_conditions') local function getRegA(capitalize) local clipboard = vim.fn.getreg('a') clipboard = clipboard:gsub('^m_', '') if capitalize then - clipboard = clipboard:gsub("^%l", string.upper); + clipboard = clipboard:gsub('^%l', string.upper) end - return clipboard - + return clipboard end diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua index 9e79a46..4968fec 100644 --- a/lua/setup/neogen.lua +++ b/lua/setup/neogen.lua @@ -1,20 +1,20 @@ -require('neogen').setup { +require('neogen').setup({ enabled = true, languages = { cpp = { template = { - annotation_convention = "custom", - custom = { - { nil, "/// file", { no_results = true, type = { "file" } } }, - { nil, "/// $1", { no_results = true, type = { "func", "file" } } }, - { nil, "", { no_results = true, type = { "file" } } }, + annotation_convention = 'custom', + custom = { + { nil, '/// file', { no_results = true, type = { 'file' } } }, + { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, + { nil, '', { no_results = true, type = { 'file' } } }, - { nil, "/// $1", { type = { "func" } } }, - { "tparam", "/// \\tparam %s $1" }, - { "parameters", "/// \\param %s $1" }, - { "return_statement", "/// \\return $1" }, + { nil, '/// $1', { type = { 'func' } } }, + { 'tparam', '/// \\tparam %s $1' }, + { 'parameters', '/// \\param %s $1' }, + { 'return_statement', '/// \\return $1' }, }, - } + }, }, - } -} + }, +}) diff --git a/lua/setup/nvim-autopairs.lua b/lua/setup/nvim-autopairs.lua index 5b9c03c..f96cb3e 100644 --- a/lua/setup/nvim-autopairs.lua +++ b/lua/setup/nvim-autopairs.lua @@ -1 +1 @@ -require('nvim-autopairs').setup{} +require('nvim-autopairs').setup({}) diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua index ab0a880..950e594 100644 --- a/lua/setup/nvim-tree.lua +++ b/lua/setup/nvim-tree.lua @@ -1,26 +1,26 @@ local utils = require('utils') require('nvim-tree').setup({ auto_close = true, - update_cwd = true, - update_to_buf_dir = { + update_cwd = true, + update_to_buf_dir = { -- enable the feature enable = true, -- allow to open the tree if it was previously closed auto_open = false, }, update_focused_file = { - enable = true, - update_cwd = false, - ignore_list = {} + enable = true, + update_cwd = false, + ignore_list = {}, }, - diagnostics = { + diagnostics = { enable = true, icons = { - hint = "", - info = "", - warning = "", - error = "", - } + hint = '', + info = '', + warning = '', + error = '', + }, }, }) utils.map('n', 'tt', 'NvimTreeToggle') diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 1b55dcb..87d0c4f 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,6 +1,6 @@ local utils = require('utils') -require("project_nvim").setup { +require('project_nvim').setup({ silent_chdir = true, -} +}) require('telescope').load_extension('projects') utils.map('n', 'p', 'Telescope projects') diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index db32ef3..f18d02f 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -4,19 +4,19 @@ local mappingTab = { i = { [''] = actions.select_tab, [''] = actions.select_default, - } + }, } -require('telescope').setup { +require('telescope').setup({ defaults = { mappings = { i = { [''] = actions.close, [''] = actions.select_default + actions.center, [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist - } - } + [''] = actions.smart_send_to_qflist, + }, + }, }, pickers = { -- Your special builtin config goes in here @@ -30,8 +30,8 @@ require('telescope').setup { }, n = { [''] = actions.delete_buffer, - } - } + }, + }, }, find_files = { theme = 'ivy', @@ -44,9 +44,8 @@ require('telescope').setup { theme = 'ivy', previewer = false, }, - lsp_dynamic_workspace_symbols = { - }, - } -} + lsp_dynamic_workspace_symbols = {}, + }, +}) require('telescope').load_extension('fzf') diff --git a/lua/utils/init.lua b/lua/utils/init.lua index 2d1f40b..ab1f91a 100644 --- a/lua/utils/init.lua +++ b/lua/utils/init.lua @@ -1,16 +1,20 @@ -local utils = { } +local utils = {} -local scopes = {o = vim.o, b = vim.bo, w = vim.wo} +local scopes = { o = vim.o, b = vim.bo, w = vim.wo } function utils.opt(scope, key, value) - scopes[scope][key] = value - if scope ~= 'o' then scopes['o'][key] = value end + scopes[scope][key] = value + if scope ~= 'o' then + scopes['o'][key] = value + end end function utils.map(mode, lhs, rhs, opts) - local options = {noremap = true} - if opts then options = vim.tbl_extend('force', options, opts) end + local options = { noremap = true } + if opts then + options = vim.tbl_extend('force', options, opts) + end vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -return utils \ No newline at end of file +return utils -- 2.49.1 From cb2b0e521f681d0f627ef03f37f0e97a29631a63 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 22:58:46 +0100 Subject: [PATCH 051/894] Added stable.json --- snapshots/stable.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 snapshots/stable.json diff --git a/snapshots/stable.json b/snapshots/stable.json new file mode 100644 index 0000000..c88882e --- /dev/null +++ b/snapshots/stable.json @@ -0,0 +1 @@ +{"tabout.nvim": {"commit": "6ff556b"}, "nvim-dap": {"commit": "3d0575a"}, "telescope-fzf-native.nvim": {"commit": "8ec164b"}, "packer.nvim": {"commit": "c576ab3"}, "nvim-lspconfig": {"commit": "710deb0"}, "nvim-cmp": {"commit": "c60cb7a"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "08441c9"}, "lualine.nvim": {"commit": "88a44ad"}, "cmp-cmdline": {"commit": "f4beb74"}, "nvim-treesitter-textobjects": {"commit": "7c6b5fe"}, "cmp-nvim-lsp": {"commit": "ebdfc20"}, "cmp_luasnip": {"commit": "d6f837f"}, "friendly-snippets": {"commit": "ad07b28"}, "gruvbox-material": {"commit": "256cd9d"}, "gitsigns.nvim": {"commit": "7de9533"}, "modes.nvim": {"commit": "38f6c91"}, "indent-blankline.nvim": {"commit": "9915d46"}, "dressing.nvim": {"commit": "6006de7"}, "lspkind-nvim": {"commit": "93e98a0"}, "cmp-look": {"commit": "b372504"}, "telescope.nvim": {"commit": "a36a813"}, "lsp_signature.nvim": {"commit": "e4f7dad"}, "Comment.nvim": {"commit": "92da1bd"}, "cmp-spell": {"commit": "5602f1a"}, "gruvbox.nvim": {"commit": "dc6bae9"}, "neovim-cmake": {"commit": "536987e"}, "nvim-autopairs": {"commit": "6617498"}, "LuaSnip": {"commit": "0d33649"}, "popup.nvim": {"commit": "b7404d3"}, "nvim-web-devicons": {"commit": "4415d1a"}, "nvim-treesitter": {"commit": "c993f27"}, "nvim-terminal": {"commit": "e044b91"}, "neogen": {"commit": "778a853"}, "nvim-tree.lua": {"commit": "d93a93c"}, "nvim-lsp-installer": {"commit": "a0e6aa4"}, "cmp-calc": {"commit": "eb7bd1d"}, "plenary.nvim": {"commit": "14dfb40"}, "project.nvim": {"commit": "cef52b8"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "ee98f4e"}, "cmp-path": {"commit": "466b6b8"}, "cmp-buffer": {"commit": "d66c4c2"}} -- 2.49.1 From d219e43cc7823498aed1ecc3d1bd8757a2777709 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 23:04:13 +0100 Subject: [PATCH 052/894] Fixed packer bootstrap --- lua/my_plugins.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 54e45fc..a4bac2f 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -137,4 +137,7 @@ return require('packer').startup(function() }) end, }) + if packer_bootstrap then + require('packer').sync() + end end) -- 2.49.1 From e3a6774b762f3d2cbd90200a9349f3915d331dcb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Mar 2022 23:55:26 +0100 Subject: [PATCH 053/894] Added clangd_extensions --- lua/my_plugins.lua | 5 ++++- lua/setup/cmp.lua | 12 ++++++++++++ lua/setup/lspinstall.lua | 10 +++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index a4bac2f..571da20 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -109,7 +109,10 @@ return require('packer').startup(function() use({ 's1n7ax/nvim-terminal' }) use({ 'williamboman/nvim-lsp-installer', - requires = { 'neovim/nvim-lspconfig' }, + requires = { + 'neovim/nvim-lspconfig', + '/p00f/clangd_extensions.nvim', + }, config = get_setup('lspinstall'), }) use({ diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 6c9604d..cfc0ecd 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -83,6 +83,18 @@ cmp.setup({ { name = 'emoji' }, }, completion = { completeopt = 'menu,menuone,noinsert, noselect' }, + sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.recently_used, + require("clangd_extensions.cmp_scores"), + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + }, -- experimental = { native_menu = true } }) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 2cc3532..977c111 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -116,7 +116,7 @@ lsp_installer.on_server_ready(function(server) -- (optional) Customize the options passed to the server if server.name == 'clangd' then - opts.cmd = { 'clangd', '--compile-commands-dir=build_nvim' } + return end -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) @@ -139,3 +139,11 @@ null_ls.setup({ capabilities = capabilities, }) vim.diagnostic.config({ virtual_text = false }) + +require('clangd_extensions').setup({ + server = { + on_attach = on_attach, + capabilities = capabilities, + cmd = { 'clangd', '--compile-commands-dir=build_nvim' } + }, +}) -- 2.49.1 From aa7bc38af6ce62cbebb924722881044d7beca1e7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Mar 2022 00:11:28 +0100 Subject: [PATCH 054/894] Use default sorting in cmp --- lua/setup/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index cfc0ecd..96ac32e 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -87,8 +87,8 @@ cmp.setup({ comparators = { cmp.config.compare.offset, cmp.config.compare.exact, - cmp.config.compare.recently_used, require("clangd_extensions.cmp_scores"), + cmp.config.compare.recently_used, cmp.config.compare.kind, cmp.config.compare.sort_text, cmp.config.compare.length, -- 2.49.1 From 479c8686ebc29d60864fc1cde02031cce80c7f53 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 23 Mar 2022 21:16:41 +0100 Subject: [PATCH 055/894] Move terminal to own config file --- init.lua | 4 ---- lua/my_plugins.lua | 5 ++++- lua/setup/terminal.lua | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 lua/setup/terminal.lua diff --git a/init.lua b/init.lua index 6546909..867442a 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,3 @@ require('my_plugins') require('my_keymappings') require('my_options') require('my_autocommands') --------------------- TERMINAL ------------------------------ -require('nvim-terminal').setup({ - toggle_keymap = 'z', -}) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 571da20..a8e3b41 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -106,7 +106,10 @@ return require('packer').startup(function() config = get_setup('nvim-autopairs'), }) use({ 'ray-x/lsp_signature.nvim' }) - use({ 's1n7ax/nvim-terminal' }) + use({ + 's1n7ax/nvim-terminal', + config = get_setup('terminal') + }) use({ 'williamboman/nvim-lsp-installer', requires = { diff --git a/lua/setup/terminal.lua b/lua/setup/terminal.lua new file mode 100644 index 0000000..f3bae43 --- /dev/null +++ b/lua/setup/terminal.lua @@ -0,0 +1,3 @@ +require('nvim-terminal').setup({ + toggle_keymap = 'z', +}) -- 2.49.1 From f9d0bf53666edfac3b416f170e2307d25d8b5a79 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 23 Mar 2022 21:18:39 +0100 Subject: [PATCH 056/894] Removed unused variables in init --- init.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/init.lua b/init.lua index 867442a..e35c0ad 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,3 @@ -local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') -local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() -local g = vim.g -- a table to access global variables -local opt = vim.opt -- to set options -local utils = require('utils') - --------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings') require('my_options') -- 2.49.1 From 434611abf43e51c9da83526c05000cb4c6856050 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 23 Mar 2022 21:25:06 +0100 Subject: [PATCH 057/894] Move some keybinding to the plugin config file --- lua/my_keymappings.lua | 17 ----------------- lua/setup/neogen.lua | 3 +++ lua/setup/telescope.lua | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index f984476..1f08e5f 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -69,20 +69,3 @@ utils.map('n', '', ':bd') utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) --- Telescope -utils.map('n', 'f', "lua require('telescope.builtin').find_files({no_ignore=true})") -utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') -utils.map('n', 'g', 'Telescope git_files') -utils.map('n', 'o', 'Telescope oldfiles') -utils.map('n', 'h', 'Telescope command_history') -utils.map('v', 'h', 'Telescope command_history') -utils.map('n', '', 'Telescope commands') -utils.map('n', 'b', 'Telescope buffers') -utils.map('n', 'q', 'Telescope quickfix') -utils.map('n', 'l', 'Telescope live_grep') -utils.map('n', '', 'Telescope live_grep') -utils.map('n', '', 'Telescope neoclip') -utils.map('n', 'j', 'Telescope jumplist') -utils.map('n', '', 'Telescope current_buffer_fuzzy_find') - -utils.map('n', 'n', 'Neogen', { noremap = true, silent = true }) diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua index 4968fec..42d4128 100644 --- a/lua/setup/neogen.lua +++ b/lua/setup/neogen.lua @@ -18,3 +18,6 @@ require('neogen').setup({ }, }, }) + +local utils = require('utils') +utils.map('n', 'n', 'Neogen', { noremap = true, silent = true }) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index f18d02f..be0b5a8 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -49,3 +49,19 @@ require('telescope').setup({ }) require('telescope').load_extension('fzf') + +local utils = require('utils') +utils.map('n', 'f', "lua require('telescope.builtin').find_files({no_ignore=true})") +utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') +utils.map('n', 'g', 'Telescope git_files') +utils.map('n', 'o', 'Telescope oldfiles') +utils.map('n', 'h', 'Telescope command_history') +utils.map('v', 'h', 'Telescope command_history') +utils.map('n', '', 'Telescope commands') +utils.map('n', 'b', 'Telescope buffers') +utils.map('n', 'q', 'Telescope quickfix') +utils.map('n', 'l', 'Telescope live_grep') +utils.map('n', '', 'Telescope live_grep') +utils.map('n', '', 'Telescope neoclip') +utils.map('n', 'j', 'Telescope jumplist') +utils.map('n', '', 'Telescope current_buffer_fuzzy_find') -- 2.49.1 From 04d69955d76e629837965fa965755690da52af4f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Mar 2022 22:58:20 +0200 Subject: [PATCH 058/894] Fixed clangd extensions url --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index a8e3b41..9dc6189 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -114,7 +114,7 @@ return require('packer').startup(function() 'williamboman/nvim-lsp-installer', requires = { 'neovim/nvim-lspconfig', - '/p00f/clangd_extensions.nvim', + 'p00f/clangd_extensions.nvim', }, config = get_setup('lspinstall'), }) -- 2.49.1 From 018c25d0d759db5250ac1b6164b1cbdd116940e0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Mar 2022 23:39:05 +0200 Subject: [PATCH 059/894] Disable gruvbox material and setup config for gruvbox --- lua/my_options.lua | 6 ------ lua/my_plugins.lua | 10 ++++++++-- lua/setup/gruvbox.lua | 6 ++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 lua/setup/gruvbox.lua diff --git a/lua/my_options.lua b/lua/my_options.lua index 5d0c98d..033dd26 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,10 +1,4 @@ local utils = require('utils') -vim.g.gruvbox_material_diagnostic_text_highlight = 1 -vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' -vim.g.gruvbox_bold = 0 -vim.g.gruvbox_italicize_comments = 0 -vim.g.gruvbox_italicize_strings = 0 -vim.cmd('colorscheme gruvbox') -- Put your favorite colorscheme here vim.cmd('syntax enable') vim.cmd('filetype plugin indent on') vim.cmd('language en_US.utf-8') diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9dc6189..12fc228 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -50,8 +50,14 @@ return require('packer').startup(function() }, config = get_setup('telescope'), }) - use({ 'sainnhe/gruvbox-material' }) - use({ 'ellisonleao/gruvbox.nvim' }) + use({ + 'sainnhe/gruvbox-material', + disable = true + }) + use({ + 'ellisonleao/gruvbox.nvim', + config = get_setup('gruvbox'), + }) use({ 'lukas-reineke/indent-blankline.nvim', config = get_setup('indent_blankline'), diff --git a/lua/setup/gruvbox.lua b/lua/setup/gruvbox.lua new file mode 100644 index 0000000..d772e47 --- /dev/null +++ b/lua/setup/gruvbox.lua @@ -0,0 +1,6 @@ +vim.g.gruvbox_material_diagnostic_text_highlight = 1 +vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' +vim.g.gruvbox_bold = 0 +vim.g.gruvbox_italicize_comments = 0 +vim.g.gruvbox_italicize_strings = 0 +vim.cmd('colorscheme gruvbox') -- 2.49.1 From 198141f63f02b072ba6475c8d411ccb17f37ec8a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Mar 2022 23:40:45 +0200 Subject: [PATCH 060/894] removed whitespaces --- lua/my_plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 12fc228..ee32ca6 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -50,11 +50,11 @@ return require('packer').startup(function() }, config = get_setup('telescope'), }) - use({ + use({ 'sainnhe/gruvbox-material', disable = true }) - use({ + use({ 'ellisonleao/gruvbox.nvim', config = get_setup('gruvbox'), }) -- 2.49.1 From d57067ea70358c979385c739a754ffcd3db1827b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Mar 2022 23:40:56 +0200 Subject: [PATCH 061/894] get_setup is local --- lua/my_autocommands.lua | 2 +- lua/my_plugins.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 368706a..b9846b8 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -1,4 +1,4 @@ -function nvim_create_augroups(definitions) +local function nvim_create_augroups(definitions) for group_name, definition in pairs(definitions) do vim.cmd('augroup ' .. group_name) vim.cmd('autocmd!') diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index ee32ca6..54e4361 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -19,7 +19,7 @@ if fn.empty(fn.glob(install_path)) > 0 then end vim.api.nvim_command('packadd packer.nvim') -function get_setup(name) +local function get_setup(name) return string.format('require("setup/%s")', name) end -- 2.49.1 From 752814db020da8d26c888ee55ea75a96f8ee3129 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Mar 2022 11:03:20 +0200 Subject: [PATCH 062/894] Added neotree --- lua/my_plugins.lua | 11 ++++++++- lua/setup/neo-tree.lua | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 lua/setup/neo-tree.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 54e4361..880b5ea 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -112,7 +112,7 @@ return require('packer').startup(function() config = get_setup('nvim-autopairs'), }) use({ 'ray-x/lsp_signature.nvim' }) - use({ + use({ 's1n7ax/nvim-terminal', config = get_setup('terminal') }) @@ -139,6 +139,15 @@ return require('packer').startup(function() 'nvim-treesitter/nvim-treesitter-textobjects', requires = 'nvim-treesitter/nvim-treesitter', }) + use({ + 'nvim-neo-tree/neo-tree.nvim', + requires = { + 'nvim-lua/plenary.nvim', + 'kyazdani42/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + }, + config = get_setup('neo-tree') + }) use({ 'mvllow/modes.nvim', config = function() diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua new file mode 100644 index 0000000..67ee796 --- /dev/null +++ b/lua/setup/neo-tree.lua @@ -0,0 +1,54 @@ +-- If you want icons for diagnostic errors, you'll need to define them somewhere: +vim.fn.sign_define('DiagnosticSignError', { text = ' ', texthl = 'DiagnosticSignError' }) +vim.fn.sign_define('DiagnosticSignWarn', { text = ' ', texthl = 'DiagnosticSignWarn' }) +vim.fn.sign_define('DiagnosticSignInfo', { text = ' ', texthl = 'DiagnosticSignInfo' }) +vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' }) + +local utils = require('utils') + +require('neo-tree').setup({ + window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for + -- possible options. These can also be functions that return these options. + position = 'float', -- left, right, float, current + width = 40, -- applies to left and right positions + popup = { -- settings that apply to float position only + size = { + height = '80%', + width = '50%', + }, + position = '50%', -- 50% means center it + -- you can also specify border here, if you want a different setting from + -- the global popup_border_style. + }, + -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. + -- You can also create your own commands by providing a function instead of a string. + mappings = { + [''] = 'toggle_node', + ['<2-LeftMouse>'] = 'open', + [''] = 'open', + ['s'] = 'open_split', + ['v'] = 'open_vsplit', + ['C'] = 'close_node', + ['z'] = 'close_all_nodes', + ['R'] = 'refresh', + ['a'] = 'add', + ['A'] = 'add_directory', + ['d'] = 'delete', + ['r'] = 'rename', + ['y'] = 'copy_to_clipboard', + ['x'] = 'cut_to_clipboard', + ['p'] = 'paste_from_clipboard', + ['c'] = 'copy', -- takes text input for destination + ['m'] = 'move', -- takes text input for destination + ['q'] = 'close_window', + }, + }, + filesystem = { + filtered_items = { + hide_dotfiles = false, + hide_gitignored = false, + }, + } +}) +utils.map('n', '\\', 'Neotree reveal') +utils.map('n', 'b', 'Neotree buffers') -- 2.49.1 From 8220799933de9bd9b8fe44c3e445830e78c06354 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 31 Mar 2022 13:28:44 +0200 Subject: [PATCH 063/894] Don't use neotree for buffers --- lua/setup/neo-tree.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index 67ee796..99b1847 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -51,4 +51,3 @@ require('neo-tree').setup({ } }) utils.map('n', '\\', 'Neotree reveal') -utils.map('n', 'b', 'Neotree buffers') -- 2.49.1 From d23279a4a4a5034d586f2654886e949eb7a2cca9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 31 Mar 2022 20:31:59 +0200 Subject: [PATCH 064/894] Fixed snippet loading --- lua/setup/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index 611f6a1..86ca7dc 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -1,5 +1,4 @@ local ls = require('luasnip') -require('luasnip.loaders.from_vscode').load() -- some shorthands... local s = ls.snippet local sn = ls.snippet_node @@ -53,3 +52,4 @@ ls.snippets = { }) }, } +require('luasnip.loaders.from_vscode').load() -- 2.49.1 From f307fb2124fd453ed5e7b2ebfe6842cbbedd8340 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:15:25 +0200 Subject: [PATCH 065/894] Don't autoinstall groovyls --- lua/setup/lspinstall.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 977c111..a48fbf4 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -93,7 +93,6 @@ local servers = { 'cmake', 'clangd', 'jsonls', - 'groovyls', 'sumneko_lua', 'dockerls', } -- 2.49.1 From 4462d4af5c6222f89bafee0ca7f9b3a3fe2c2c73 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:15:33 +0200 Subject: [PATCH 066/894] lazy load snippets --- lua/setup/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index 86ca7dc..8627e83 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -52,4 +52,4 @@ ls.snippets = { }) }, } -require('luasnip.loaders.from_vscode').load() +require('luasnip.loaders.from_vscode').lazy_load() -- 2.49.1 From ee3b97648ab616cea042bcbba848b366627ae904 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:38:59 +0200 Subject: [PATCH 067/894] Some lazy loading of plugins --- lua/my_plugins.lua | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 880b5ea..03a4085 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -38,6 +38,7 @@ return require('packer').startup(function() use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', + event = 'BufRead', config = get_setup('treesitter'), }) use({ @@ -78,22 +79,23 @@ return require('packer').startup(function() }) use({ 'hrsh7th/nvim-cmp', + event = 'InsertEnter', requires = { - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-nvim-lsp', - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - 'hrsh7th/cmp-nvim-lua', - 'octaltree/cmp-look', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-calc', - 'f3fora/cmp-spell', - 'hrsh7th/cmp-emoji', - 'hrsh7th/cmp-cmdline', + { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, + { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, + { 'octaltree/cmp-look', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-calc', after = 'nvim-cmp' }, + { 'f3fora/cmp-spell', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, }, config = get_setup('cmp'), }) - use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) + use({ 'L3MON4D3/LuaSnip', event = 'InsertEnter', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') }) @@ -106,7 +108,7 @@ return require('packer').startup(function() 'ahmedkhalf/project.nvim', config = get_setup('project'), }) - use({ 'p00f/nvim-ts-rainbow' }) + use({ 'p00f/nvim-ts-rainbow', requires = 'nvim-treesitter/nvim-treesitter', after = 'nvim-treesitter' }) use({ 'windwp/nvim-autopairs', config = get_setup('nvim-autopairs'), @@ -131,12 +133,14 @@ return require('packer').startup(function() use({ 'danymat/neogen', requires = 'nvim-treesitter/nvim-treesitter', + after = 'nvim-treesitter', config = get_setup('neogen'), }) use({ 'abecodes/tabout.nvim' }) use({ 'stevearc/dressing.nvim' }) use({ 'nvim-treesitter/nvim-treesitter-textobjects', + after = 'nvim-treesitter', requires = 'nvim-treesitter/nvim-treesitter', }) use({ -- 2.49.1 From 204f38c94764568242750d01bd2ea6870b97a62b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 4 Apr 2022 14:46:22 +0200 Subject: [PATCH 068/894] Don't show diagnostic windows if there is already a floating window --- lua/setup/lspinstall.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 977c111..200eb4c 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -18,6 +18,15 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } +OpenDiagFloat = function () + for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do + if vim.api.nvim_win_get_config(winid).zindex then + return + end + end + vim.diagnostic.open_float({focusable = false}) +end + local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) @@ -51,7 +60,7 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) - vim.cmd([[autocmd CursorHold lua vim.diagnostic.open_float({focusable = false})]]) + vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then -- 2.49.1 From 641d2e0c9ef61bcedb0df3055d5adcffc916761a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 4 Apr 2022 15:15:11 +0200 Subject: [PATCH 069/894] Load cmp_luasnip after luasnip --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 03a4085..ac4f1a8 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -84,7 +84,7 @@ return require('packer').startup(function() { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, - { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip', after = {'nvim-cmp', 'LuaSnip'} }, { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, { 'octaltree/cmp-look', after = 'nvim-cmp' }, { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, -- 2.49.1 From 595a4d287bd78e81746d67890cc5cae605753884 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Apr 2022 00:01:49 +0200 Subject: [PATCH 070/894] Configure lua lsp to have vim and use as global variables --- lua/setup/lspinstall.lua | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 4da0d3c..59a7879 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -1,5 +1,3 @@ -local utils = require('utils') - local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } capabilities.textDocument.completion.completionItem.snippetSupport = true @@ -127,6 +125,34 @@ lsp_installer.on_server_ready(function(server) return end + if server.name == 'sumneko_lua' then + local lua_rtp = vim.split(package.path, ';') + table.insert(lua_rtp, 'lua/?.lua') + table.insert(lua_rtp, 'lua/?/init.lua') + opts.settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = lua_rtp, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim', 'use' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + } + end + -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) server:setup(opts) vim.cmd([[ do User LspAttachBuffers ]]) -- 2.49.1 From ab1de6c1de9552a340cded881e0ca9c55aac5a34 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Apr 2022 00:03:29 +0200 Subject: [PATCH 071/894] stylua --- lua/my_plugins.lua | 6 +++--- lua/setup/lspinstall.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 03a4085..7ce826f 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -53,7 +53,7 @@ return require('packer').startup(function() }) use({ 'sainnhe/gruvbox-material', - disable = true + disable = true, }) use({ 'ellisonleao/gruvbox.nvim', @@ -116,7 +116,7 @@ return require('packer').startup(function() use({ 'ray-x/lsp_signature.nvim' }) use({ 's1n7ax/nvim-terminal', - config = get_setup('terminal') + config = get_setup('terminal'), }) use({ 'williamboman/nvim-lsp-installer', @@ -150,7 +150,7 @@ return require('packer').startup(function() 'kyazdani42/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', }, - config = get_setup('neo-tree') + config = get_setup('neo-tree'), }) use({ 'mvllow/modes.nvim', diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 59a7879..9ef067e 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -178,6 +178,6 @@ require('clangd_extensions').setup({ server = { on_attach = on_attach, capabilities = capabilities, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' } + cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, }, }) -- 2.49.1 From 2425d5f29dbd10eeda2f46d1a1bf08b4567d3f06 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Apr 2022 00:12:49 +0200 Subject: [PATCH 072/894] more lua style --- lua/my_keymappings.lua | 1 - lua/setup/cmp.lua | 3 +-- lua/setup/neo-tree.lua | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 1f08e5f..2523321 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -68,4 +68,3 @@ utils.map('n', '', ':bd') -- to navigate the completion menu utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) - diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 96ac32e..2936411 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -11,7 +11,6 @@ local check_back_space = function() end cmp.setup({ - formatting = { format = function(entry, vim_item) -- fancy icons and a name of kind @@ -87,7 +86,7 @@ cmp.setup({ comparators = { cmp.config.compare.offset, cmp.config.compare.exact, - require("clangd_extensions.cmp_scores"), + require('clangd_extensions.cmp_scores'), cmp.config.compare.recently_used, cmp.config.compare.kind, cmp.config.compare.sort_text, diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index 99b1847..45322b6 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -48,6 +48,6 @@ require('neo-tree').setup({ hide_dotfiles = false, hide_gitignored = false, }, - } + }, }) utils.map('n', '\\', 'Neotree reveal') -- 2.49.1 From f0f1c357401735f83e600e01b6d621a5e965707f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Apr 2022 02:10:47 +0200 Subject: [PATCH 073/894] Don't use null-ls in project nvimm --- lua/setup/project.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 87d0c4f..9030be2 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,6 +1,7 @@ local utils = require('utils') require('project_nvim').setup({ silent_chdir = true, + ignore_lsp = { 'null-ls' }, }) require('telescope').load_extension('projects') utils.map('n', 'p', 'Telescope projects') -- 2.49.1 From 99e257dbc1f73e8814604d32e44e3fad5bd22f64 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Apr 2022 02:22:16 +0200 Subject: [PATCH 074/894] added toggleterm --- lua/my_plugins.lua | 4 ++++ lua/setup/toggleterm.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 lua/setup/toggleterm.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 7ce826f..8cb7577 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -162,6 +162,10 @@ return require('packer').startup(function() }) end, }) + use({ + 'akinsho/toggleterm.nvim', + config = get_setup('toggleterm') + }) if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua new file mode 100644 index 0000000..2bb2040 --- /dev/null +++ b/lua/setup/toggleterm.lua @@ -0,0 +1,32 @@ +require('toggleterm').setup({}) + +local Terminal = require('toggleterm.terminal').Terminal + +function _G.set_terminal_keymaps() + local opts = { noremap = true } + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) +end + +-- Disbled for the moment because it is also set for lazygit +-- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') + +local lazygit = Terminal:new({ + cmd = 'lazygit', + -- dir = vim.fn.getcwd(), + hidden = true, + direction = 'float', + on_open = function(term) + vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", {noremap = true, silent = true}) + end, +}) + +function _lazygit_toggle() + lazygit:toggle() +end + +vim.api.nvim_set_keymap('n', 'g', 'lua _lazygit_toggle()', { noremap = true, silent = true }) -- 2.49.1 From 579cdff05452708141da0b7d48ec0737b510d5ea Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Apr 2022 20:40:41 +0200 Subject: [PATCH 075/894] disable nvim-tree --- lua/my_plugins.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 5f31db5..c80d8b0 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -72,6 +72,7 @@ return require('packer').startup(function() 'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons', config = get_setup('nvim-tree'), + disable = true, }) use({ 'numToStr/Comment.nvim', -- 2.49.1 From 651d1d0d2f3d3ca14d8cc32a66a48a64d78a83ce Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Apr 2022 20:44:35 +0200 Subject: [PATCH 076/894] don't lazyload luasnip --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index c80d8b0..136d2bd 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -96,7 +96,7 @@ return require('packer').startup(function() }, config = get_setup('cmp'), }) - use({ 'L3MON4D3/LuaSnip', event = 'InsertEnter', config = get_setup('luasnip') }) + use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') }) -- 2.49.1 From 3dc493ff7e889bcf82884921ca64ebae57201f7c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 13 Apr 2022 22:41:05 +0200 Subject: [PATCH 077/894] command center added --- lua/my_plugins.lua | 7 ++++++- lua/setup/my_command_center.lua | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 lua/setup/my_command_center.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 136d2bd..9328926 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -165,7 +165,12 @@ return require('packer').startup(function() }) use({ 'akinsho/toggleterm.nvim', - config = get_setup('toggleterm') + config = get_setup('toggleterm'), + }) + use({ + 'gfeiyou/command-center.nvim', + requires = { 'nvim-telescope/telescope.nvim' }, + config = get_setup('my_command_center'), }) if packer_bootstrap then require('packer').sync() diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua new file mode 100644 index 0000000..4be83c3 --- /dev/null +++ b/lua/setup/my_command_center.lua @@ -0,0 +1,5 @@ +require("telescope").load_extension('command_center') + +local command_center = require("command_center") +local noremap = {noremap = true} +local silent_noremap = {noremap = true, silent = true} -- 2.49.1 From 257d2fffcfe9234b64e22c6498b75bfafd53940d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 13 Apr 2022 23:40:53 +0200 Subject: [PATCH 078/894] convert some keybindings to command center --- lua/my_keymappings.lua | 10 -- lua/setup/cmake.lua | 2 - lua/setup/my_command_center.lua | 168 +++++++++++++++++++++++++++++++- lua/setup/neogen.lua | 1 - lua/setup/project.lua | 1 - lua/setup/telescope.lua | 15 --- lua/setup/toggleterm.lua | 2 - 7 files changed, 163 insertions(+), 36 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 2523321..28cac05 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -14,10 +14,6 @@ utils.map('n', 'y', '"+y') utils.map('n', 'yy', '"+yy') -- Tabs -utils.map('n', '', ':tabnew .', { noremap = true, silent = true }) -utils.map('i', '', ':tabnew .', { noremap = true, silent = true }) --- utils.map('n', '', ':BufferLineCycleNext') --- utils.map('n', '', ':BufferLineCyclePrev') utils.map('n', '', ':tabnext', { noremap = true, silent = true }) utils.map('n', '', ':tabprevious', { noremap = true, silent = true }) -- Split movement @@ -25,12 +21,6 @@ utils.map('n', '', ':wincmd k', { noremap = true, silent = true }) utils.map('n', '', ':wincmd j', { noremap = true, silent = true }) utils.map('n', '', ':wincmd h', { noremap = true, silent = true }) utils.map('n', '', ':wincmd l', { noremap = true, silent = true }) --- Open a new vertical split window with Ctrl - F2 -utils.map('n', '', ':vsplit .', { noremap = true, silent = true }) -utils.map('i', '', ':vsplit .', { noremap = true, silent = true }) --- Open a new horizontal split window with Shift - F2 -utils.map('n', '', ':split .', { noremap = true, silent = true }) -utils.map('i', '', ':split .', { noremap = true, silent = true }) utils.map('n', '', ':wa') diff --git a/lua/setup/cmake.lua b/lua/setup/cmake.lua index f800b95..663d5fe 100644 --- a/lua/setup/cmake.lua +++ b/lua/setup/cmake.lua @@ -5,8 +5,6 @@ require('cmake').setup({ parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values. }) -utils.map('n', '', ':CMake build:copen') - -- msbuild errorformat opt.errorformat:append('\\ %#%f(%l\\\\\\,%c):\\ %m') -- cl.exe errorformat diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 4be83c3..7299636 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -1,5 +1,163 @@ -require("telescope").load_extension('command_center') - -local command_center = require("command_center") -local noremap = {noremap = true} -local silent_noremap = {noremap = true, silent = true} +require('telescope').load_extension('command_center') + +local command_center = require('command_center') +local noremap = { noremap = true } +local silent_noremap = { noremap = true, silent = true } + +command_center.add({ + { + description = 'Open command_center', + command = 'Telescope command_center', + keybindings = { + { 'n', 'p', noremap }, + { 'v', 'p', noremap }, + }, + }, + { + description = 'Open a new tab', + command = 'tabnew .', + keybindings = { + { 'n', 'F2', silent_noremap }, + }, + }, + { + description = 'Open a new vertical split', + command = 'vsplit .', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Open a new horizontal split', + command = 'split .', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'CMake build all', + command = 'CMake build_all', + }, + { + description = 'CMake build selected target', + command = 'CMake build', + keybindings = { + { 'n', 'F5', silent_noremap }, + }, + }, + { + description = 'CMake configure', + command = 'CMake configure', + }, + { + description = 'CMake select target', + command = 'CMake select_target', + }, + { + description = 'CMake clear cache', + command = 'CMake clear_cache', + }, + { + description = 'List snippets', + command = 'LuaSnipListAvailable', + }, + { + description = 'Add comment', + command = 'Neogen', + keybindings = { + { 'n', 'n', silent_noremap }, + }, + }, + { + description = 'Select project', + command = 'Telescope projects', + keybindings = { + { 'n', 'p', silent_noremap }, + }, + }, + { + description = 'Find file', + command = 'lua require("telescope.builtin").find_files({no_ignore=true})', + keybindings = { + { 'n', 'f', silent_noremap }, + }, + }, + { + description = 'Find file (with gitignore)', + command = 'lua require("telescope.builtin").find_files({no_ignore=false})', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Find git files', + command = 'Telescope git_files', + keybindings = { + { 'n', 'g', silent_noremap }, + }, + }, + { + description = 'Find old files', + command = 'Telescope oldfiles', + keybindings = { + { 'n', 'o', silent_noremap }, + }, + }, + { + description = 'Open command history', + command = 'Telescope command_history', + keybindings = { + { 'n', 'h', silent_noremap }, + }, + }, + { + description = 'Select buffer', + command = 'Telescope buffers', + keybindings = { + { 'n', 'b', silent_noremap }, + }, + }, + { + description = 'Quickfix list with telescope', + command = 'Telescope quickfix', + keybindings = { + { 'n', 'q', silent_noremap }, + }, + }, + { + description = 'Search in project', + command = 'Telescope live_grep', + keybindings = { + { 'n', 'l', silent_noremap }, + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Open clipboard history', + command = 'Telescope neoclip', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Open jumplist', + command = 'Telescope jumplist', + keybindings = { + { 'n', 'j', silent_noremap }, + }, + }, + { + description = 'Find in buffer', + command = 'Telescope current_buffer_fuzzy_find', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Open lazygit', + command = 'lua _lazygit_toggle()', + keybindings = { + { 'n', 'g', silent_noremap }, + }, + }, +}) diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua index 42d4128..5a10946 100644 --- a/lua/setup/neogen.lua +++ b/lua/setup/neogen.lua @@ -20,4 +20,3 @@ require('neogen').setup({ }) local utils = require('utils') -utils.map('n', 'n', 'Neogen', { noremap = true, silent = true }) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 9030be2..dbde7f7 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -4,4 +4,3 @@ require('project_nvim').setup({ ignore_lsp = { 'null-ls' }, }) require('telescope').load_extension('projects') -utils.map('n', 'p', 'Telescope projects') diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index be0b5a8..777a2e5 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -50,18 +50,3 @@ require('telescope').setup({ require('telescope').load_extension('fzf') -local utils = require('utils') -utils.map('n', 'f', "lua require('telescope.builtin').find_files({no_ignore=true})") -utils.map('n', '', 'lua require("telescope.builtin").find_files({no_ignore=true})') -utils.map('n', 'g', 'Telescope git_files') -utils.map('n', 'o', 'Telescope oldfiles') -utils.map('n', 'h', 'Telescope command_history') -utils.map('v', 'h', 'Telescope command_history') -utils.map('n', '', 'Telescope commands') -utils.map('n', 'b', 'Telescope buffers') -utils.map('n', 'q', 'Telescope quickfix') -utils.map('n', 'l', 'Telescope live_grep') -utils.map('n', '', 'Telescope live_grep') -utils.map('n', '', 'Telescope neoclip') -utils.map('n', 'j', 'Telescope jumplist') -utils.map('n', '', 'Telescope current_buffer_fuzzy_find') diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua index 2bb2040..b0b22c4 100644 --- a/lua/setup/toggleterm.lua +++ b/lua/setup/toggleterm.lua @@ -28,5 +28,3 @@ local lazygit = Terminal:new({ function _lazygit_toggle() lazygit:toggle() end - -vim.api.nvim_set_keymap('n', 'g', 'lua _lazygit_toggle()', { noremap = true, silent = true }) -- 2.49.1 From 7f99415c021b860cfc69022ced4846249acc68db Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 13 Apr 2022 23:47:54 +0200 Subject: [PATCH 079/894] format my_plugins --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9328926..264cdb6 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -85,7 +85,7 @@ return require('packer').startup(function() { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, - { 'saadparwaiz1/cmp_luasnip', after = {'nvim-cmp', 'LuaSnip'} }, + { 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } }, { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, { 'octaltree/cmp-look', after = 'nvim-cmp' }, { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, -- 2.49.1 From 8a000f811c2f2c1eb1a5d2ecdc8c0707b4240992 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Apr 2022 09:29:36 +0200 Subject: [PATCH 080/894] update to new command center format --- lua/setup/my_command_center.lua | 48 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 7299636..eae54e0 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -7,7 +7,7 @@ local silent_noremap = { noremap = true, silent = true } command_center.add({ { description = 'Open command_center', - command = 'Telescope command_center', + cmd = 'Telescope command_center', keybindings = { { 'n', 'p', noremap }, { 'v', 'p', noremap }, @@ -15,118 +15,118 @@ command_center.add({ }, { description = 'Open a new tab', - command = 'tabnew .', + cmd = 'tabnew .', keybindings = { { 'n', 'F2', silent_noremap }, }, }, { description = 'Open a new vertical split', - command = 'vsplit .', + cmd = 'vsplit .', keybindings = { { 'n', '', silent_noremap }, }, }, { description = 'Open a new horizontal split', - command = 'split .', + cmd = 'split .', keybindings = { { 'n', '', silent_noremap }, }, }, { description = 'CMake build all', - command = 'CMake build_all', + cmd = 'CMake build_all', }, { description = 'CMake build selected target', - command = 'CMake build', + cmd = 'CMake build', keybindings = { { 'n', 'F5', silent_noremap }, }, }, { description = 'CMake configure', - command = 'CMake configure', + cmd = 'CMake configure', }, { description = 'CMake select target', - command = 'CMake select_target', + cmd = 'CMake select_target', }, { description = 'CMake clear cache', - command = 'CMake clear_cache', + cmd = 'CMake clear_cache', }, { description = 'List snippets', - command = 'LuaSnipListAvailable', + cmd = 'LuaSnipListAvailable', }, { description = 'Add comment', - command = 'Neogen', + cmd = 'Neogen', keybindings = { { 'n', 'n', silent_noremap }, }, }, { description = 'Select project', - command = 'Telescope projects', + cmd = 'Telescope projects', keybindings = { { 'n', 'p', silent_noremap }, }, }, { description = 'Find file', - command = 'lua require("telescope.builtin").find_files({no_ignore=true})', + cmd = 'lua require("telescope.builtin").find_files({no_ignore=true})', keybindings = { { 'n', 'f', silent_noremap }, }, }, { description = 'Find file (with gitignore)', - command = 'lua require("telescope.builtin").find_files({no_ignore=false})', + cmd = 'lua require("telescope.builtin").find_files({no_ignore=false})', keybindings = { { 'n', '', silent_noremap }, }, }, { description = 'Find git files', - command = 'Telescope git_files', + cmd = 'Telescope git_files', keybindings = { { 'n', 'g', silent_noremap }, }, }, { description = 'Find old files', - command = 'Telescope oldfiles', + cmd = 'Telescope oldfiles', keybindings = { { 'n', 'o', silent_noremap }, }, }, { description = 'Open command history', - command = 'Telescope command_history', + cmd = 'Telescope command_history', keybindings = { { 'n', 'h', silent_noremap }, }, }, { description = 'Select buffer', - command = 'Telescope buffers', + cmd = 'Telescope buffers', keybindings = { { 'n', 'b', silent_noremap }, }, }, { description = 'Quickfix list with telescope', - command = 'Telescope quickfix', + cmd = 'Telescope quickfix', keybindings = { { 'n', 'q', silent_noremap }, }, }, { description = 'Search in project', - command = 'Telescope live_grep', + cmd = 'Telescope live_grep', keybindings = { { 'n', 'l', silent_noremap }, { 'n', '', silent_noremap }, @@ -134,28 +134,28 @@ command_center.add({ }, { description = 'Open clipboard history', - command = 'Telescope neoclip', + cmd = 'Telescope neoclip', keybindings = { { 'n', '', silent_noremap }, }, }, { description = 'Open jumplist', - command = 'Telescope jumplist', + cmd = 'Telescope jumplist', keybindings = { { 'n', 'j', silent_noremap }, }, }, { description = 'Find in buffer', - command = 'Telescope current_buffer_fuzzy_find', + cmd = 'Telescope current_buffer_fuzzy_find', keybindings = { { 'n', '', silent_noremap }, }, }, { description = 'Open lazygit', - command = 'lua _lazygit_toggle()', + cmd = 'lua _lazygit_toggle()', keybindings = { { 'n', 'g', silent_noremap }, }, -- 2.49.1 From d7b49c4c4b8221cab76f974a8ce0f6e4226691ba Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 15:14:11 +0200 Subject: [PATCH 081/894] use 0.7 keymappings --- lua/my_keymappings.lua | 83 ++++++++++++++++----------------- lua/setup/cmake.lua | 1 - lua/setup/my_command_center.lua | 7 +++ lua/setup/neo-tree.lua | 4 +- lua/setup/neogen.lua | 2 - lua/setup/nvim-tree.lua | 3 +- lua/setup/project.lua | 1 - lua/utils/init.lua | 8 ---- 8 files changed, 49 insertions(+), 60 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 28cac05..7554670 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,60 +1,57 @@ -local utils = require('utils') vim.g.mapleader = ',' -utils.map('n', '', 'nil', { noremap = true, silent = true }) +vim.keymap.set('n', '', 'nil', { noremap = true, silent = true }) -- Paste from clipboard -utils.map('n', 'p', '"+p') -utils.map('n', 'P', '"+P') -utils.map('v', 'p', '"+p') -utils.map('v', 'P', '"+P') +vim.keymap.set('n', 'p', '"+p') +vim.keymap.set('n', 'P', '"+P') +vim.keymap.set('v', 'p', '"+p') +vim.keymap.set('v', 'P', '"+P') -- Yank to clipboard -utils.map('v', 'y', '"+y') -utils.map('n', 'Y', '"+yg_') -utils.map('n', 'y', '"+y') -utils.map('n', 'yy', '"+yy') +vim.keymap.set('v', 'y', '"+y') +vim.keymap.set('n', 'Y', '"+yg_') +vim.keymap.set('n', 'y', '"+y') +vim.keymap.set('n', 'yy', '"+yy') -- Tabs -utils.map('n', '', ':tabnext', { noremap = true, silent = true }) -utils.map('n', '', ':tabprevious', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':tabprevious', { noremap = true, silent = true }) -- Split movement -utils.map('n', '', ':wincmd k', { noremap = true, silent = true }) -utils.map('n', '', ':wincmd j', { noremap = true, silent = true }) -utils.map('n', '', ':wincmd h', { noremap = true, silent = true }) -utils.map('n', '', ':wincmd l', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':wincmd k', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':wincmd j', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':wincmd h', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':wincmd l', { noremap = true, silent = true }) -utils.map('n', '', ':wa') +vim.keymap.set('n', '', ':wa') -- Linewrap and jumping -utils.map('n', 'k', 'gk') -utils.map('n', 'j', 'gj') -utils.map('n', '0', 'g0') -utils.map('n', '$', 'g$') -utils.map('n', '', 'gk') -utils.map('n', '', 'gj') -utils.map('n', '', 'g') -utils.map('n', '', 'g') -utils.map('v', 'k', 'gk') -utils.map('v', 'j', 'gj') -utils.map('v', '0', 'g0') -utils.map('v', '$', 'g$') -utils.map('v', '', 'gk') -utils.map('v', '', 'gj') -utils.map('v', '', 'g') -utils.map('v', '', 'g') +vim.keymap.set('n', 'k', 'gk') +vim.keymap.set('n', 'j', 'gj') +vim.keymap.set('n', '0', 'g0') +vim.keymap.set('n', '$', 'g$') +vim.keymap.set('n', '', 'gk') +vim.keymap.set('n', '', 'gj') +vim.keymap.set('n', '', 'g') +vim.keymap.set('n', '', 'g') +vim.keymap.set('v', 'k', 'gk') +vim.keymap.set('v', 'j', 'gj') +vim.keymap.set('v', '0', 'g0') +vim.keymap.set('v', '$', 'g$') +vim.keymap.set('v', '', 'gk') +vim.keymap.set('v', '', 'gj') +vim.keymap.set('v', '', 'g') +vim.keymap.set('v', '', 'g') -utils.map('v', '<', '', '>gv') - -utils.map('n', 'a', '"ayiw') +vim.keymap.set('v', '<', '', '>gv') -- Highlight word under cursor -utils.map('n', 'ü', ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) -utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") -utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) +vim.keymap.set('n', 'ü', ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) +vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") +vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) -- Close Buffer -utils.map('n', '', ':bd') +vim.keymap.set('n', '', ':bd') -- to navigate the completion menu -utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) -utils.map('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) +vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) +vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) diff --git a/lua/setup/cmake.lua b/lua/setup/cmake.lua index 663d5fe..0400e6f 100644 --- a/lua/setup/cmake.lua +++ b/lua/setup/cmake.lua @@ -1,5 +1,4 @@ local opt = vim.opt -- to set options -local utils = require('utils') -- require('telescope').load_extension('cmake') require('cmake').setup({ parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index eae54e0..d0dff1c 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -160,4 +160,11 @@ command_center.add({ { 'n', 'g', silent_noremap }, }, }, + { + description = 'Word under cursor into register a', + cmd = '"ayiw', + keybindings = { + { 'n', 'a', silent_noremap }, + }, + }, }) diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index 45322b6..94d38f5 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -4,8 +4,6 @@ vim.fn.sign_define('DiagnosticSignWarn', { text = ' ', texthl = 'DiagnosticSi vim.fn.sign_define('DiagnosticSignInfo', { text = ' ', texthl = 'DiagnosticSignInfo' }) vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' }) -local utils = require('utils') - require('neo-tree').setup({ window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for -- possible options. These can also be functions that return these options. @@ -50,4 +48,4 @@ require('neo-tree').setup({ }, }, }) -utils.map('n', '\\', 'Neotree reveal') +vim.keymap.set('n', '\\', 'Neotree reveal') diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua index 5a10946..4968fec 100644 --- a/lua/setup/neogen.lua +++ b/lua/setup/neogen.lua @@ -18,5 +18,3 @@ require('neogen').setup({ }, }, }) - -local utils = require('utils') diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua index 950e594..3295d15 100644 --- a/lua/setup/nvim-tree.lua +++ b/lua/setup/nvim-tree.lua @@ -1,4 +1,3 @@ -local utils = require('utils') require('nvim-tree').setup({ auto_close = true, update_cwd = true, @@ -23,6 +22,6 @@ require('nvim-tree').setup({ }, }, }) -utils.map('n', 'tt', 'NvimTreeToggle') +vim.keymap.set('n', 'tt', 'NvimTreeToggle') vim.g.nvim_tree_highlight_opened_files = 1 vim.g.nvim_tree_respect_buf_cwd = 1 diff --git a/lua/setup/project.lua b/lua/setup/project.lua index dbde7f7..abbc92a 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,4 +1,3 @@ -local utils = require('utils') require('project_nvim').setup({ silent_chdir = true, ignore_lsp = { 'null-ls' }, diff --git a/lua/utils/init.lua b/lua/utils/init.lua index ab1f91a..9569fc1 100644 --- a/lua/utils/init.lua +++ b/lua/utils/init.lua @@ -9,12 +9,4 @@ function utils.opt(scope, key, value) end end -function utils.map(mode, lhs, rhs, opts) - local options = { noremap = true } - if opts then - options = vim.tbl_extend('force', options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - return utils -- 2.49.1 From 4fbe1c4174b95fb3490db466cf13a7b01b538132 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 21:35:50 +0200 Subject: [PATCH 082/894] use new autocommand functions --- lua/my_autocommands.lua | 111 +++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index b9846b8..8c3464c 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -1,44 +1,71 @@ -local function nvim_create_augroups(definitions) - for group_name, definition in pairs(definitions) do - vim.cmd('augroup ' .. group_name) - vim.cmd('autocmd!') - for _, def in ipairs(definition) do - local command = table.concat(vim.tbl_flatten({ 'autocmd', def }), ' ') - vim.cmd(command) - end - vim.cmd('augroup END') - end -end +local api = vim.api -local autocmds = { - packer = { - { 'BufWritePost', 'plugins.lua', 'PackerCompile' }, - }, - restore_cursor = { - { 'BufRead', '*', [[call setpos(".", getpos("'\""))]] }, - }, - save_shada = { - { 'FocusGained,FocusLost', '*', 'rshada|wshada' }, - }, - resize_windows_proportionally = { - { 'VimResized', '*', ':wincmd =' }, - }, - lua_highlight = { - { 'TextYankPost', '*', [[silent! lua vim.highlight.on_yank() {higroup='IncSearch', timeout=400}]] }, - }, - file_type = { - { 'BufRead,BufNewFile', '*.simvis', 'set filetype=xml' }, - { 'BufRead,BufNewFile', '*.simcfg,*.simcon,*.simudex', 'set filetype=cfg' }, - { 'BufRead,BufNewFile', 'Jenkinsfile*', 'set filetype=groovy' }, - { 'BufRead,BufNewFile', '*.manifest', 'set filetype=xml' }, - { 'BufRead,BufNewFile', 'SConstruct,SConscript', 'set filetype=python' }, - }, - file_changed = { - { 'BufEnter,FocusGained', '*', 'checktime' }, - }, - no_auto_comment = { - { 'BufEnter', '*', 'set fo-=c fo-=r fo-=o' }, - }, -} +-- Highlight on yank +local yankGrp = api.nvim_create_augroup('YankHighlight', { clear = true }) +api.nvim_create_autocmd('TextYankPost', { + command = 'silent! lua vim.highlight.on_yank()', + group = yankGrp, +}) -nvim_create_augroups(autocmds) +-- Filetypes +local fileGrp = api.nvim_create_augroup('file_type', { clear = true }) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { '*.simvis', '*.manifest' }, + callback = function() + vim.bo.filetype = 'xml' + end, + group = fileGrp, +}) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { '*.simcfg', '*.simcon', '*.simudex' }, + callback = function() + vim.bo.filetype = 'xml' + end, + group = fileGrp, +}) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { 'JenkinsFile*' }, + callback = function() + vim.bo.filetype = 'groovy' + end, + group = fileGrp, +}) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { 'SConstruct', 'SConscript' }, + callback = function() + vim.bo.filetype = 'python' + end, + group = fileGrp, +}) + +-- Read and write shada file +api.nvim_create_autocmd({ 'FocusGained', 'FocusLost' }, { command = [[rshada | wshada]] }) + +-- go to last loc when opening a buffer +api.nvim_create_autocmd( + 'BufReadPost', + { command = [[if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\"" | endif]] } +) + +-- Check if we need to reload the file when it changed +api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[:checktime]] }) + +-- windows to close with "q" +api.nvim_create_autocmd( + 'FileType', + { pattern = { 'help', 'startuptime', 'qf', 'lspinfo' }, command = [[nnoremap q :close]] } +) +api.nvim_create_autocmd('FileType', { pattern = 'man', command = [[nnoremap q :quit]] }) + +-- show cursor line only in active window +local cursorGrp = api.nvim_create_augroup('CursorLine', { clear = true }) +api.nvim_create_autocmd({ 'InsertLeave', 'WinEnter' }, { pattern = '*', command = 'set cursorline', group = cursorGrp }) +api.nvim_create_autocmd( + { 'InsertEnter', 'WinLeave' }, + { pattern = '*', command = 'set nocursorline', group = cursorGrp } +) +-- don't auto comment new line +api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) + +-- Keep window ratio when resize +api.nvim_create_autocmd('VimResized', {command = [[wincmd =]]}) -- 2.49.1 From 5dde3be206bc06b2517fdadb4a134b208dc373ae Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 21:54:55 +0200 Subject: [PATCH 083/894] reworked options --- lua/my_options.lua | 79 +++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 033dd26..023307f 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -1,35 +1,50 @@ -local utils = require('utils') -vim.cmd('syntax enable') vim.cmd('filetype plugin indent on') vim.cmd('language en_US.utf-8') -utils.opt('o', 'hlsearch', true) -utils.opt('o', 'guifont', 'JetBrainsMono Nerd Font:h9') -utils.opt('o', 'swapfile', false) -utils.opt('o', 'backup', false) -utils.opt('o', 'spelllang', 'en,de') -utils.opt('o', 'completeopt', 'menu,menuone,noselect') + +local opt = vim.opt local indent = 2 -utils.opt('b', 'expandtab', true) -utils.opt('b', 'shiftwidth', indent) -utils.opt('b', 'smartindent', true) -utils.opt('b', 'tabstop', indent) -utils.opt('o', 'hidden', true) -utils.opt('o', 'ignorecase', true) -utils.opt('o', 'scrolloff', 4) -utils.opt('o', 'shiftround', true) -utils.opt('o', 'relativenumber', false) -utils.opt('o', 'smartcase', true) -utils.opt('o', 'splitbelow', true) -utils.opt('o', 'splitright', true) -utils.opt('o', 'wildmode', 'longest:full,full') -utils.opt('w', 'number', true) -utils.opt('o', 'clipboard', 'unnamed,unnamedplus') -utils.opt('o', 'mouse', 'a') -utils.opt('o', 'wrap', false) -utils.opt('o', 'termguicolors', true) -utils.opt('o', 'splitbelow', true) -utils.opt('o', 'splitright', true) -utils.opt('o', 'list', true) -utils.opt('o', 'updatetime', 300) -utils.opt('o', 'wrap', true) -utils.opt('o', 'showmatch', true) +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default +opt.relativenumber = false --Make relative number default +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.list = true +opt.hidden= true +opt.scrolloff= 4 +opt.shiftround= true +opt.relativenumber= false +opt.splitbelow= true +opt.splitright= true +opt.wildmode= 'longest:full,full' +opt.wrap= false +opt.splitbelow= true +opt.splitright= true +opt.shiftwidth = indent +opt.tabstop = indent +opt.guifont= 'JetBrainsMono Nerd Font:h9' +opt.swapfile= false +opt.backup= false +opt.spelllang= 'en,de' +opt.completeopt= 'menu,menuone,noselect' +opt.expandtab= true +opt.smartindent= true + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +-- opt.whichwrap:append('<>[]hl') + +-- disable nvim intro +opt.shortmess:append('sI') -- 2.49.1 From 2c4617f462bed6f349c37f83f8f209e7d2487ffd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 22:18:18 +0200 Subject: [PATCH 084/894] treesitter folding with space x :) --- lua/my_options.lua | 5 +++++ lua/setup/my_command_center.lua | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index 023307f..ac41fda 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -48,3 +48,8 @@ opt.smartindent= true -- disable nvim intro opt.shortmess:append('sI') + +-- Treesitter based folding +opt.foldlevel = 20 +opt.foldmethod = 'expr' +opt.foldexpr = 'nvim_treesitter#foldexpr()' diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index d0dff1c..84abf32 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -167,4 +167,11 @@ command_center.add({ { 'n', 'a', silent_noremap }, }, }, + { + description = 'Toggle fold', + cmd = 'za', + keybindings = { + { 'n', 'x', silent_noremap }, + }, + }, }) -- 2.49.1 From 7bd0f108470cad769d6a4dcf138d89d4f686f8f7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 22:49:07 +0200 Subject: [PATCH 085/894] added yanky --- lua/my_plugins.lua | 4 ++++ lua/setup/my_command_center.lua | 7 ------- lua/setup/yanky.lua | 12 ++++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 lua/setup/yanky.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 264cdb6..1f0b998 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -172,6 +172,10 @@ return require('packer').startup(function() requires = { 'nvim-telescope/telescope.nvim' }, config = get_setup('my_command_center'), }) + use({ + 'gbprod/yanky.nvim', + config = get_setup('yanky') + }) if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 84abf32..d09e2d6 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -82,13 +82,6 @@ command_center.add({ { 'n', 'f', silent_noremap }, }, }, - { - description = 'Find file (with gitignore)', - cmd = 'lua require("telescope.builtin").find_files({no_ignore=false})', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, { description = 'Find git files', cmd = 'Telescope git_files', diff --git a/lua/setup/yanky.lua b/lua/setup/yanky.lua new file mode 100644 index 0000000..e627bd5 --- /dev/null +++ b/lua/setup/yanky.lua @@ -0,0 +1,12 @@ +require('yanky').setup() +vim.api.nvim_set_keymap('n', 'p', '(YankyPutAfter)', {}) +vim.api.nvim_set_keymap('n', 'P', '(YankyPutBefore)', {}) +vim.api.nvim_set_keymap('x', 'p', '(YankyPutAfter)', {}) +vim.api.nvim_set_keymap('x', 'P', '(YankyPutBefore)', {}) +vim.api.nvim_set_keymap('n', 'gp', '(YankyGPutAfter)', {}) +vim.api.nvim_set_keymap('n', 'gP', '(YankyGPutBefore)', {}) +vim.api.nvim_set_keymap('x', 'gp', '(YankyGPutAfter)', {}) +vim.api.nvim_set_keymap('x', 'gP', '(YankyGPutBefore)', {}) + +vim.api.nvim_set_keymap("n", "", "(YankyCycleForward)", {}) +vim.api.nvim_set_keymap("n", "", "(YankyCycleBackward)", {}) -- 2.49.1 From c65f2c543bc0484031d10c736c6d777aa4ed3508 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Apr 2022 22:54:51 +0200 Subject: [PATCH 086/894] use command center for yanky --- lua/setup/my_command_center.lua | 18 ++++++++++++++++++ lua/setup/yanky.lua | 3 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index d09e2d6..27a499c 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -167,4 +167,22 @@ command_center.add({ { 'n', 'x', silent_noremap }, }, }, + { + description = 'Yanky cycle forward', + cmd = '(YankyCycleForward)', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Yanky cycle backward', + cmd = '(YankyCycleBackward)', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, }) + + + + diff --git a/lua/setup/yanky.lua b/lua/setup/yanky.lua index e627bd5..3fccdb7 100644 --- a/lua/setup/yanky.lua +++ b/lua/setup/yanky.lua @@ -7,6 +7,3 @@ vim.api.nvim_set_keymap('n', 'gp', '(YankyGPutAfter)', {}) vim.api.nvim_set_keymap('n', 'gP', '(YankyGPutBefore)', {}) vim.api.nvim_set_keymap('x', 'gp', '(YankyGPutAfter)', {}) vim.api.nvim_set_keymap('x', 'gP', '(YankyGPutBefore)', {}) - -vim.api.nvim_set_keymap("n", "", "(YankyCycleForward)", {}) -vim.api.nvim_set_keymap("n", "", "(YankyCycleBackward)", {}) -- 2.49.1 From 2da1322e7f5db875b0e79174446a1b54d3d81ddd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 29 Apr 2022 15:04:11 +0200 Subject: [PATCH 087/894] ignore cmake lsp for project plugin --- lua/setup/project.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index abbc92a..4140e8f 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,5 +1,5 @@ require('project_nvim').setup({ silent_chdir = true, - ignore_lsp = { 'null-ls' }, + ignore_lsp = { 'null-ls', 'cmake' }, }) require('telescope').load_extension('projects') -- 2.49.1 From 8cafa90c01a46cc3cb6fcdc447fe2585248cd0eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 29 Apr 2022 15:04:26 +0200 Subject: [PATCH 088/894] added doskey file type in autocommands --- lua/my_autocommands.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 8c3464c..f058acb 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -37,6 +37,13 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { end, group = fileGrp, }) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { 'doskey'}, + callback = function() + vim.bo.filetype = 'dosini' + end, + group = fileGrp, +}) -- Read and write shada file api.nvim_create_autocmd({ 'FocusGained', 'FocusLost' }, { command = [[rshada | wshada]] }) -- 2.49.1 From e34744b677da122d269c34ba6ebeceb09a0430a3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 29 Apr 2022 15:56:22 +0200 Subject: [PATCH 089/894] set title and titlestring --- lua/my_options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index ac41fda..a5c829b 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -41,6 +41,8 @@ opt.spelllang= 'en,de' opt.completeopt= 'menu,menuone,noselect' opt.expandtab= true opt.smartindent= true +opt.title = true +opt.titlestring = '%{getcwd()} - %t' -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line -- 2.49.1 From 6c8531b67a41f72341cee0b696728c1e8245c89c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 2 May 2022 10:28:46 +0200 Subject: [PATCH 090/894] don't validate yaml files --- lua/setup/lspinstall.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 9ef067e..d56732c 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -152,6 +152,13 @@ lsp_installer.on_server_ready(function(server) }, } end + if server.name == 'yamlls' then + opts.settings = { + yaml = { + validate = false + } + } + end -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) server:setup(opts) -- 2.49.1 From 4a6de72626cff0d9f86effcb0de6562ee77fa9e7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 May 2022 15:26:18 +0200 Subject: [PATCH 091/894] removed maintained from treesitter --- lua/setup/treesitter.lua | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua index b747236..9247bee 100644 --- a/lua/setup/treesitter.lua +++ b/lua/setup/treesitter.lua @@ -1,5 +1,41 @@ require('nvim-treesitter.configs').setup({ - ensure_installed = 'maintained', + ensure_installed = { + 'bash', + 'bibtex', + 'c', + 'cmake', + 'comment', + 'cpp', + 'css', + 'dockerfile', + 'help', + 'hjson', + 'html', + 'http', + 'java', + 'javascript', + 'jsdoc', + 'json', + 'json5', + 'JSONC', + 'latex', + 'llvm', + 'lua', + 'make', + 'markdown', + 'ninja', + 'perl', + 'php', + 'proto', + 'python', + 'Tree-sitter query language', + 'r', + 'regex', + 'rust', + 'toml', + 'vim', + 'yaml', + }, highlight = { enable = true }, @@ -35,3 +71,8 @@ require('nvim-treesitter.configs').setup({ }, }, }) + +require("nvim-treesitter.install").prefer_git = true + +-- local groovy_parser = require('nvim-treesitter.parsers').groovy +-- groovy_parser.groovy = 'java' -- the someft filetype will use the python parser and queries. -- 2.49.1 From 8db95a1880c46c80e356745d7ceb19f652912826 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 May 2022 15:26:43 +0200 Subject: [PATCH 092/894] use something else for shada --- lua/my_autocommands.lua | 3 ++- lua/my_keymappings.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index f058acb..9f048e4 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -46,7 +46,8 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { }) -- Read and write shada file -api.nvim_create_autocmd({ 'FocusGained', 'FocusLost' }, { command = [[rshada | wshada]] }) +api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) +api.nvim_create_autocmd({ 'FocusGained' }, { command = [[rshada]] }) -- go to last loc when opening a buffer api.nvim_create_autocmd( diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 7554670..32e5a08 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -21,7 +21,7 @@ vim.keymap.set('n', '', ':wincmd j', { noremap = true, silent = true vim.keymap.set('n', '', ':wincmd h', { noremap = true, silent = true }) vim.keymap.set('n', '', ':wincmd l', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':wa') +vim.keymap.set('n', '', ':wa | wshada') -- Linewrap and jumping vim.keymap.set('n', 'k', 'gk') -- 2.49.1 From c921ae0f4f07802b927c3dd26f320521e9ce4c7f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 May 2022 15:26:58 +0200 Subject: [PATCH 093/894] format --- lua/my_plugins.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 1f0b998..bacf465 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -109,7 +109,9 @@ return require('packer').startup(function() 'ahmedkhalf/project.nvim', config = get_setup('project'), }) - use({ 'p00f/nvim-ts-rainbow', requires = 'nvim-treesitter/nvim-treesitter', after = 'nvim-treesitter' }) + use({ 'p00f/nvim-ts-rainbow', + requires = 'nvim-treesitter/nvim-treesitter', + after = 'nvim-treesitter' }) use({ 'windwp/nvim-autopairs', config = get_setup('nvim-autopairs'), -- 2.49.1 From 76a7aad423ab6a41005188ec185048526a232465 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 11 May 2022 17:46:28 +0200 Subject: [PATCH 094/894] set additional keymappings for us keyboard --- lua/my_keymappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 32e5a08..ea6b2a8 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -48,6 +48,9 @@ vim.keymap.set('v', '>', '>gv') vim.keymap.set('n', 'ü', ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) +vim.keymap.set('n', "'", ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) +vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls") +vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) -- Close Buffer vim.keymap.set('n', '', ':bd') -- 2.49.1 From d6930cbb2f418c59eff799c14cb007dbbe1c67bb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 11 May 2022 17:46:54 +0200 Subject: [PATCH 095/894] added octo --- lua/my_plugins.lua | 11 ++++++++++- lua/setup/octo.lua | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 lua/setup/octo.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index bacf465..37959d9 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -150,7 +150,7 @@ return require('packer').startup(function() 'nvim-neo-tree/neo-tree.nvim', requires = { 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', -- not strictly required, but recommended + 'kyazdani42/nvim-web-devicons', 'MunifTanjim/nui.nvim', }, config = get_setup('neo-tree'), @@ -178,6 +178,15 @@ return require('packer').startup(function() 'gbprod/yanky.nvim', config = get_setup('yanky') }) + use { + 'pwntester/octo.nvim', + requires = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + 'kyazdani42/nvim-web-devicons', + }, + config = get_setup('octo') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/octo.lua b/lua/setup/octo.lua new file mode 100644 index 0000000..a06b954 --- /dev/null +++ b/lua/setup/octo.lua @@ -0,0 +1 @@ +require('octo').setup() -- 2.49.1 From 20cb51e2b5426b85a614cbf8ca12e45fefcc5643 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 11 May 2022 17:47:15 +0200 Subject: [PATCH 096/894] removed tree sitter query lang --- lua/setup/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua index 9247bee..9b4ab12 100644 --- a/lua/setup/treesitter.lua +++ b/lua/setup/treesitter.lua @@ -28,7 +28,6 @@ require('nvim-treesitter.configs').setup({ 'php', 'proto', 'python', - 'Tree-sitter query language', 'r', 'regex', 'rust', -- 2.49.1 From c54a51555673197a774bd1446e10344c5bf7a663 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 11 May 2022 23:35:15 +0200 Subject: [PATCH 097/894] removed focus only from modes plugin --- lua/my_plugins.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 37959d9..ff6d607 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -160,7 +160,6 @@ return require('packer').startup(function() config = function() vim.opt.cursorline = true require('modes').setup({ - focus_only = true, line_opacity = 0.2, }) end, -- 2.49.1 From 892ac617eec35f0921c9a9a3e989bcdbc6f64e09 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 May 2022 13:40:46 +0200 Subject: [PATCH 098/894] added incline --- lua/my_options.lua | 1 + lua/my_plugins.lua | 4 ++++ lua/setup/incline.lua | 1 + 3 files changed, 6 insertions(+) create mode 100644 lua/setup/incline.lua diff --git a/lua/my_options.lua b/lua/my_options.lua index a5c829b..7742351 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -43,6 +43,7 @@ opt.expandtab= true opt.smartindent= true opt.title = true opt.titlestring = '%{getcwd()} - %t' +opt.laststatus = 3 -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index ff6d607..bbe9c72 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -186,6 +186,10 @@ return require('packer').startup(function() }, config = get_setup('octo') } + use { + 'b0o/incline.nvim', + config = get_setup('incline') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/incline.lua b/lua/setup/incline.lua new file mode 100644 index 0000000..6577ccb --- /dev/null +++ b/lua/setup/incline.lua @@ -0,0 +1 @@ +require('incline').setup() -- 2.49.1 From db6d89471c2017243168026363b211baaa2a1fff Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 May 2022 13:40:55 +0200 Subject: [PATCH 099/894] more commands --- lua/setup/my_command_center.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 27a499c..f86f973 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -125,6 +125,10 @@ command_center.add({ { 'n', '', silent_noremap }, }, }, + { + description = 'Search in open files', + cmd = "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", + }, { description = 'Open clipboard history', cmd = 'Telescope neoclip', @@ -146,6 +150,13 @@ command_center.add({ { 'n', '', silent_noremap }, }, }, + { + description = 'Find in workspace', + cmd = 'Telescope grep_string', + keybindings = { + { 'n', 'd', silent_noremap }, + }, + }, { description = 'Open lazygit', cmd = 'lua _lazygit_toggle()', -- 2.49.1 From 3b66cc0b3c8d347f10386079867f3a35b8c85d66 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 May 2022 13:41:05 +0200 Subject: [PATCH 100/894] fixed wrap --- lua/my_options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 7742351..322edff 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -29,7 +29,6 @@ opt.relativenumber= false opt.splitbelow= true opt.splitright= true opt.wildmode= 'longest:full,full' -opt.wrap= false opt.splitbelow= true opt.splitright= true opt.shiftwidth = indent -- 2.49.1 From 6eba3c6f3aa9259a6510d69f60effb34bfda6e86 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 May 2022 15:00:21 +0200 Subject: [PATCH 101/894] added some octo keymaps --- lua/setup/my_command_center.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index f86f973..9d8eb91 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -192,6 +192,18 @@ command_center.add({ { 'n', '', silent_noremap }, }, }, + { + description = 'Github list PRs', + cmd = 'Octo pr list', + }, + { + description = 'Github checkout PR', + cmd = 'Octo pr checkout', + }, + { + description = 'Github open PR in browser', + cmd = 'Octo pr browser', + }, }) -- 2.49.1 From 2bdc01b56fcc9e8bbd88124e8b0306cac40db692 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 23 May 2022 15:37:11 +0200 Subject: [PATCH 102/894] added clangd file --- .clangd | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .clangd diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..e980b03 --- /dev/null +++ b/.clangd @@ -0,0 +1,71 @@ +Diagnostics: + UnusedIncludes: Strict + ClangTidy: + Add: + - cppcoreguidelines-* + - clang-analyzer-core.* + - bugprone-assert-side-effect + - bugprone-branch-clone + - bugprone-copy-constructor-init + - bugprone-exception-escape + - bugprone-forward-declaration-namespace + - bugprone-incorrect-roundings + - bugprone-infinite-loop + - bugprone-integer-division + - bugprone-macro-parentheses + - bugprone-multiple-statement-macro + - bugprone-parent-virtual-call + - bugprone-redundant-branch-condition + - bugprone-reserved-identifier + - bugprone-sizeof-container + - bugprone-sizeof-expression + - bugprone-string-constructor + - bugprone-string-integer-assignment + - bugprone-suspicious-enum-usage + - bugprone-suspicious-include + - bugprone-suspicious-missing-comma + - bugprone-suspicious-semicolon + - bugprone-swapped-arguments + - bugprone-terminating-continue + - bugprone-too-small-loop-variable + - llvm-namespace-comment + - misc-definitions-in-headers + - misc-redundant-expression + - misc-unused-parameters + - hicpp-signed-bitwise + - readability-identifier-naming + - readability-duplicate-include + - readability-braces-around-statements + - readability-implicit-bool-conversion + - readability-inconsistent-declaration-parameter-name + - readability-make-member-function-const + - readability-misleading-indentation + - readability-redundant-declaration + - readability-redundant-preprocessor + - readability-redundant-member-init + - readability-simplify-boolean-expr + - readability-static-accessed-through-instance + - readability-uppercase-literal-suffix + Remove: + - readability-avoid-const-params-in-decls + - readability-function-cognitive-complexity + - readability-magic-numbers + - readability-identifier-length + - cppcoreguidelines-explicit-virtual-functions + - cppcoreguidelines-init-variables + - cppcoreguidelines-non-private-member-variables-in-classes + - cppcoreguidelines-avoid-magic-numbers + - cppcoreguidelines-owning-memory + - cppcoreguidelines-pro-bounds-constant-array-index + - cppcoreguidelines-special-member-functions + - cppcoreguidelines-avoid-c-arrays + - cppcoreguidelines-pro-type-reinterpret-cast + CheckOptions: + readability-identifier-naming.FunctionCase: camelBack + readability-identifier-naming.NamespaceCase: lower_case + readability-identifier-naming.ClassCase: CamelCase + readability-identifier-naming.PrivateMemberPrefix: m_ + readability-identifier-naming.StructCase: CamelCase + readability-identifier-naming.VariableCase: camelBack + readability-identifier-naming.GlobalConstantCase: UPPER_CASE + readability-identifier-naming.EnumConstant: UPPER_CASE -- 2.49.1 From c6bdb676aa0dc5ee3cbf25103b0ff1e80a3e3cdb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 25 May 2022 11:12:36 +0200 Subject: [PATCH 103/894] set yaml for clang config files --- lua/my_autocommands.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 9f048e4..8f01159 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -44,6 +44,13 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { end, group = fileGrp, }) +api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = { '.clangd', '.clang-tidy'}, + callback = function() + vim.bo.filetype = 'yaml' + end, + group = fileGrp, +}) -- Read and write shada file api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) -- 2.49.1 From b31bd343fa50735688f5f68ba9af6cfa27bd5091 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 25 May 2022 11:13:26 +0200 Subject: [PATCH 104/894] fixed code actions command --- lua/setup/lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index d56732c..d3f7cae 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -40,7 +40,7 @@ local on_attach = function(client, bufnr) local opts = { noremap = true, silent = true } buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'a', 'Telescope lsp_code_actions', opts) + buf_set_keymap('n', 'a', 'lua vim.lsp.buf.code_action()', opts) buf_set_keymap('n', 'd', 'lua vim.lsp.buf.definition()', opts) buf_set_keymap('n', 'e', 'lua vim.lsp.buf.declaration()', opts) buf_set_keymap('n', 'h', 'lua vim.lsp.buf.hover()', opts) -- 2.49.1 From c6d9e5b8910b7fe4838a1d8cf3ab1733ebada266 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 May 2022 22:09:25 +0200 Subject: [PATCH 105/894] add litee --- lua/my_plugins.lua | 8 ++++++++ lua/setup/my_command_center.lua | 7 +++++++ lua/setup/my_litee.lua | 35 +++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 lua/setup/my_litee.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index bbe9c72..22160ac 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -190,6 +190,14 @@ return require('packer').startup(function() 'b0o/incline.nvim', config = get_setup('incline') } + use { + 'ldelossa/litee.nvim', + requires = { + 'ldelossa/litee-calltree.nvim', + 'ldelossa/litee-symboltree.nvim' + }, + config = get_setup('my_litee') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 9d8eb91..e2bed7f 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -204,6 +204,13 @@ command_center.add({ description = 'Github open PR in browser', cmd = 'Octo pr browser', }, + { + description = 'Symbols outline', + cmd = 'lua vim.lsp.buf.document_symbol()', + keybindings = { + { 'n', 's', silent_noremap }, + }, + }, }) diff --git a/lua/setup/my_litee.lua b/lua/setup/my_litee.lua new file mode 100644 index 0000000..edee230 --- /dev/null +++ b/lua/setup/my_litee.lua @@ -0,0 +1,35 @@ +-- configure the litee.nvim library +require('litee.lib').setup({ + tree = { + icon_set = "codicons" + }, + panel = { + orientation = "left", + panel_size = 30 + } +}) +-- configure litee-calltree.nvim +require('litee.calltree').setup({ + map_resize_keys = false, + on_open = 'panel' +}) +-- configure litee-symboltree.nvim +require('litee.symboltree').setup({ + map_resize_keys = false, + on_open = 'panel', + keymaps = { + expand = '', + collapse = 'zc', + collapse_all = 'zM', + jump = '', + jump_split = 's', + jump_vsplit = 'v', + jump_tab = 't', + hover = 'i', + details = 'd', + close = 'X', + close_panel_pop_out = '', + help = '?', + hide = 'H', + }, +}) -- 2.49.1 From 5b4878f76d8072366b4c0e738f865836e4b57da8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 27 May 2022 10:19:03 +0200 Subject: [PATCH 106/894] replace octo with litee gh --- lua/my_plugins.lua | 12 ++---------- lua/setup/my_litee.lua | 3 +++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 22160ac..da74d5e 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -177,15 +177,6 @@ return require('packer').startup(function() 'gbprod/yanky.nvim', config = get_setup('yanky') }) - use { - 'pwntester/octo.nvim', - requires = { - 'nvim-lua/plenary.nvim', - 'nvim-telescope/telescope.nvim', - 'kyazdani42/nvim-web-devicons', - }, - config = get_setup('octo') - } use { 'b0o/incline.nvim', config = get_setup('incline') @@ -194,7 +185,8 @@ return require('packer').startup(function() 'ldelossa/litee.nvim', requires = { 'ldelossa/litee-calltree.nvim', - 'ldelossa/litee-symboltree.nvim' + 'ldelossa/litee-symboltree.nvim', + 'ldelossa/gh.nvim' }, config = get_setup('my_litee') } diff --git a/lua/setup/my_litee.lua b/lua/setup/my_litee.lua index edee230..d8be21a 100644 --- a/lua/setup/my_litee.lua +++ b/lua/setup/my_litee.lua @@ -33,3 +33,6 @@ require('litee.symboltree').setup({ hide = 'H', }, }) + +require('litee.gh').setup({}) + -- 2.49.1 From d9f90a1f4b3033edf656f1c75995b6b15dc7d57d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 27 May 2022 10:19:24 +0200 Subject: [PATCH 107/894] remove stylua because of the lsp serverr --- lua/setup/lspinstall.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index d56732c..7f04354 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -171,7 +171,6 @@ null_ls.setup({ null_ls.builtins.code_actions.gitsigns, null_ls.builtins.formatting.autopep8, null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.stylua, null_ls.builtins.diagnostics.flake8, null_ls.builtins.formatting.isort, null_ls.builtins.formatting.cmake_format, -- 2.49.1 From 9b4fcca0cef6cd58f930697b8ce9934fe7035a02 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 31 May 2022 09:56:37 +0200 Subject: [PATCH 108/894] put comment to ctrl slash --- lua/setup/my_command_center.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 9d8eb91..e4a794f 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -204,6 +204,20 @@ command_center.add({ description = 'Github open PR in browser', cmd = 'Octo pr browser', }, + { + description = 'Comment line', + cmd = '(comment_toggle_current_linewise)', + keybindings = { + { 'n', '', silent_noremap }, + }, + }, + { + description = 'Comment line', + cmd = '(comment_toggle_linewise_visual)gv', + keybindings = { + { 'v', '', silent_noremap }, + }, + }, }) -- 2.49.1 From b1754cf7db0d0a0188595d4a2727df6d3e7e6d91 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 31 May 2022 14:28:06 +0200 Subject: [PATCH 109/894] remove modes.nvim --- lua/my_plugins.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index da74d5e..25a6c1f 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -155,15 +155,6 @@ return require('packer').startup(function() }, config = get_setup('neo-tree'), }) - use({ - 'mvllow/modes.nvim', - config = function() - vim.opt.cursorline = true - require('modes').setup({ - line_opacity = 0.2, - }) - end, - }) use({ 'akinsho/toggleterm.nvim', config = get_setup('toggleterm'), -- 2.49.1 From 228171561f334595f748816ef37aa76b5370f526 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 1 Jun 2022 11:47:00 +0200 Subject: [PATCH 110/894] use find files if there is not git repo --- lua/setup/my_command_center.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 3d18c97..1b64568 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -4,6 +4,12 @@ local command_center = require('command_center') local noremap = { noremap = true } local silent_noremap = { noremap = true, silent = true } +project_files = function() + local opts = {} -- define here if you want to define something + local ok = pcall(require"telescope.builtin".git_files, opts) + if not ok then require"telescope.builtin".find_files(opts) end +end + command_center.add({ { description = 'Open command_center', @@ -84,7 +90,7 @@ command_center.add({ }, { description = 'Find git files', - cmd = 'Telescope git_files', + cmd = 'lua project_files()', keybindings = { { 'n', 'g', silent_noremap }, }, -- 2.49.1 From 2951e86e0600865379af0ce051495dd4a173addd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 7 Jun 2022 15:24:23 +0200 Subject: [PATCH 111/894] fixed f5 to build all --- lua/setup/my_command_center.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 1b64568..fc777c1 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -48,7 +48,7 @@ command_center.add({ description = 'CMake build selected target', cmd = 'CMake build', keybindings = { - { 'n', 'F5', silent_noremap }, + { 'n', '', silent_noremap }, }, }, { -- 2.49.1 From 37d7e60eef4e710d61752a7081498465a9034752 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 7 Jun 2022 15:24:42 +0200 Subject: [PATCH 112/894] added litee calltree keys --- lua/setup/my_litee.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_litee.lua b/lua/setup/my_litee.lua index d8be21a..b2a600c 100644 --- a/lua/setup/my_litee.lua +++ b/lua/setup/my_litee.lua @@ -11,7 +11,24 @@ require('litee.lib').setup({ -- configure litee-calltree.nvim require('litee.calltree').setup({ map_resize_keys = false, - on_open = 'panel' + on_open = 'panel', + keymaps = { + expand = "", + collapse = "zc", + collapse_all = "zM", + jump = "", + jump_split = "s", + jump_vsplit = "v", + jump_tab = "t", + hover = "i", + details = "d", + close = "X", + close_panel_pop_out = "", + help = "?", + hide = "H", + switch = "S", + focus = "f" + }, }) -- configure litee-symboltree.nvim require('litee.symboltree').setup({ -- 2.49.1 From 2c277ee846240327582a7ffdecd6cc16d7d029d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 12:59:50 +0200 Subject: [PATCH 113/894] add cmp treesitter --- lua/my_plugins.lua | 1 + lua/setup/cmp.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 25a6c1f..234367d 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -93,6 +93,7 @@ return require('packer').startup(function() { 'f3fora/cmp-spell', after = 'nvim-cmp' }, { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, + { 'ray-x/cmp-treesitter', after = 'nvim-cmp'} }, config = get_setup('cmp'), }) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 2936411..28ae822 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -72,6 +72,7 @@ cmp.setup({ sources = { { name = 'luasnip' }, { name = 'nvim_lsp' }, + { name = 'treesitter' }, { name = 'buffer' }, { name = 'nvim_lua' }, { name = 'look' }, -- 2.49.1 From 607245c47d0ed14d680d79b534eee468dc4a8ae0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:00:07 +0200 Subject: [PATCH 114/894] removed incline --- lua/my_plugins.lua | 4 ---- lua/setup/incline.lua | 1 - 2 files changed, 5 deletions(-) delete mode 100644 lua/setup/incline.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 234367d..9d2a8eb 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -169,10 +169,6 @@ return require('packer').startup(function() 'gbprod/yanky.nvim', config = get_setup('yanky') }) - use { - 'b0o/incline.nvim', - config = get_setup('incline') - } use { 'ldelossa/litee.nvim', requires = { diff --git a/lua/setup/incline.lua b/lua/setup/incline.lua deleted file mode 100644 index 6577ccb..0000000 --- a/lua/setup/incline.lua +++ /dev/null @@ -1 +0,0 @@ -require('incline').setup() -- 2.49.1 From 37b7a68c452b8ffd048d0dacf60906ad25df6a0f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:01:28 +0200 Subject: [PATCH 115/894] comment out some cmp sources --- lua/setup/cmp.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 28ae822..fa0f4ee 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -74,13 +74,13 @@ cmp.setup({ { name = 'nvim_lsp' }, { name = 'treesitter' }, { name = 'buffer' }, - { name = 'nvim_lua' }, - { name = 'look' }, - { name = 'path' }, - { name = 'cmp_tabnine' }, - { name = 'calc' }, - { name = 'spell' }, - { name = 'emoji' }, + -- { name = 'nvim_lua' }, + -- { name = 'look' }, + -- { name = 'path' }, + -- { name = 'cmp_tabnine' }, + -- { name = 'calc' }, + -- { name = 'spell' }, + -- { name = 'emoji' }, }, completion = { completeopt = 'menu,menuone,noinsert, noselect' }, sorting = { -- 2.49.1 From 3a0e3862522ebf4158882da2441862714992a2e0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:15:47 +0200 Subject: [PATCH 116/894] fixed deprecated resolved_capabilities --- lua/setup/lspinstall.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 46f639a..257b2c1 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -61,15 +61,15 @@ local on_attach = function(client, bufnr) vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then + if client.server_capabilities.documentFormattingProvider then buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) end - if client.resolved_capabilities.document_range_formatting then + if client.server_capabilities.documentRangeFormattingProvider then buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) end -- Set autocommands conditional on server_capabilities - if client.resolved_capabilities.document_highlight then + if client.server_capabilities.document_highlight then vim.api.nvim_exec( [[ hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen -- 2.49.1 From a1bff6296634096795201431ddf213edc0726027 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:22:46 +0200 Subject: [PATCH 117/894] set winbar statusline --- lua/my_options.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index 322edff..d855e05 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -55,3 +55,28 @@ opt.shortmess:append('sI') opt.foldlevel = 20 opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' + +local function status_line() + local mode = "%-5{%v:lua.string.upper(v:lua.vim.fn.mode())%}" + local file_name = "%-.16t" + local buf_nr = "[%n]" + local modified = " %-m" + local file_type = " %y" + local right_align = "%=" + local line_no = "%10([%l/%L%)]" + local pct_thru_file = "%5p%%" + + return string.format( + "%s%s%s%s%s%s%s%s", + mode, + file_name, + buf_nr, + modified, + file_type, + right_align, + line_no, + pct_thru_file + ) +end + +opt.winbar = status_line() -- 2.49.1 From 0a60ff63bd00643aa2af85749610e06d324a89c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:23:05 +0200 Subject: [PATCH 118/894] updated stable snapshot --- snapshots/stable.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshots/stable.json b/snapshots/stable.json index c88882e..813d50e 100644 --- a/snapshots/stable.json +++ b/snapshots/stable.json @@ -1 +1 @@ -{"tabout.nvim": {"commit": "6ff556b"}, "nvim-dap": {"commit": "3d0575a"}, "telescope-fzf-native.nvim": {"commit": "8ec164b"}, "packer.nvim": {"commit": "c576ab3"}, "nvim-lspconfig": {"commit": "710deb0"}, "nvim-cmp": {"commit": "c60cb7a"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "08441c9"}, "lualine.nvim": {"commit": "88a44ad"}, "cmp-cmdline": {"commit": "f4beb74"}, "nvim-treesitter-textobjects": {"commit": "7c6b5fe"}, "cmp-nvim-lsp": {"commit": "ebdfc20"}, "cmp_luasnip": {"commit": "d6f837f"}, "friendly-snippets": {"commit": "ad07b28"}, "gruvbox-material": {"commit": "256cd9d"}, "gitsigns.nvim": {"commit": "7de9533"}, "modes.nvim": {"commit": "38f6c91"}, "indent-blankline.nvim": {"commit": "9915d46"}, "dressing.nvim": {"commit": "6006de7"}, "lspkind-nvim": {"commit": "93e98a0"}, "cmp-look": {"commit": "b372504"}, "telescope.nvim": {"commit": "a36a813"}, "lsp_signature.nvim": {"commit": "e4f7dad"}, "Comment.nvim": {"commit": "92da1bd"}, "cmp-spell": {"commit": "5602f1a"}, "gruvbox.nvim": {"commit": "dc6bae9"}, "neovim-cmake": {"commit": "536987e"}, "nvim-autopairs": {"commit": "6617498"}, "LuaSnip": {"commit": "0d33649"}, "popup.nvim": {"commit": "b7404d3"}, "nvim-web-devicons": {"commit": "4415d1a"}, "nvim-treesitter": {"commit": "c993f27"}, "nvim-terminal": {"commit": "e044b91"}, "neogen": {"commit": "778a853"}, "nvim-tree.lua": {"commit": "d93a93c"}, "nvim-lsp-installer": {"commit": "a0e6aa4"}, "cmp-calc": {"commit": "eb7bd1d"}, "plenary.nvim": {"commit": "14dfb40"}, "project.nvim": {"commit": "cef52b8"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "ee98f4e"}, "cmp-path": {"commit": "466b6b8"}, "cmp-buffer": {"commit": "d66c4c2"}} +{"litee.nvim": {"commit": "de1a3d6"}, "nvim-dap": {"commit": "2420042"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "00ec5ad"}, "tabout.nvim": {"commit": "be655cc"}, "nvim-lspconfig": {"commit": "9278dfb"}, "command-center.nvim": {"commit": "e3b32c7"}, "clangd_extensions.nvim": {"commit": "81b56d4"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "ff40739"}, "lualine.nvim": {"commit": "5113cdb"}, "cmp-cmdline": {"commit": "c36ca4b"}, "nvim-treesitter-textobjects": {"commit": "b1e850b"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "d27a83a"}, "gitsigns.nvim": {"commit": "4883988"}, "indent-blankline.nvim": {"commit": "42fe62e"}, "dressing.nvim": {"commit": "af17983"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "c552119"}, "cmp-look": {"commit": "58dd22a"}, "telescope.nvim": {"commit": "d88b44d"}, "litee-calltree.nvim": {"commit": "71f7eee"}, "lsp_signature.nvim": {"commit": "4983797"}, "Comment.nvim": {"commit": "2c26a00"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "cb65686"}, "gruvbox.nvim": {"commit": "3352c12"}, "gh.nvim": {"commit": "86a5249"}, "neovim-cmake": {"commit": "61dbc34"}, "nvim-autopairs": {"commit": "4a95b39"}, "LuaSnip": {"commit": "a12441e"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "8f13d50"}, "nvim-web-devicons": {"commit": "8d2c533"}, "nvim-treesitter": {"commit": "881b932"}, "nui.nvim": {"commit": "b26b36a"}, "nvim-terminal": {"commit": "e044b91"}, "neogen": {"commit": "c5a0c39"}, "nvim-lsp-installer": {"commit": "5904749"}, "project.nvim": {"commit": "541115e"}, "cmp-calc": {"commit": "f7efc20"}, "toggleterm.nvim": {"commit": "8f2e78d"}, "plenary.nvim": {"commit": "968a4b9"}, "nvim-cmp": {"commit": "1cad181"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "466b6b8"}, "cmp-buffer": {"commit": "62fc67a"}} -- 2.49.1 From 5f357b0db5c6f2f3489f71db9aa14d546cf1cd65 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 13:53:32 +0200 Subject: [PATCH 119/894] load blankline after treesitter --- lua/my_plugins.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9d2a8eb..5f8efbf 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -61,6 +61,7 @@ return require('packer').startup(function() }) use({ 'lukas-reineke/indent-blankline.nvim', + after = 'nvim-treesitter', config = get_setup('indent_blankline'), }) use({ 'nvim-lua/plenary.nvim' }) -- 2.49.1 From 5ad1c4be904d76e5ea7ee2773d0cc17ea1e94ef8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 14:00:43 +0200 Subject: [PATCH 120/894] fixed deprecated format call --- lua/setup/lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 257b2c1..2d0e98e 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -62,7 +62,7 @@ local on_attach = function(client, bufnr) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.format{async=true}', opts) end if client.server_capabilities.documentRangeFormattingProvider then buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) -- 2.49.1 From d609883ff76a5d47cd1fa04ca6e39f9f12348960 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 14:10:53 +0200 Subject: [PATCH 121/894] set lualine theme to gruvbox --- lua/setup/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index e9ec550..9251f0b 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,5 +1,5 @@ require('lualine').setup({ - options = { theme = 'gruvbox-material' }, sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + options = { theme = 'gruvbox' }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, }) -- 2.49.1 From 0c66846e4eb8c8e56e4d516062a660a0d8c475b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 14:32:29 +0200 Subject: [PATCH 122/894] setup aerial --- lua/my_plugins.lua | 4 ++++ lua/setup/aerial.lua | 6 ++++++ lua/setup/lspinstall.lua | 5 ++--- lua/setup/my_command_center.lua | 3 ++- lua/setup/telescope.lua | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 lua/setup/aerial.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 5f8efbf..8a537f4 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -179,6 +179,10 @@ return require('packer').startup(function() }, config = get_setup('my_litee') } + use { + 'stevearc/aerial.nvim', + config = get_setup('aerial') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua new file mode 100644 index 0000000..2ddd243 --- /dev/null +++ b/lua/setup/aerial.lua @@ -0,0 +1,6 @@ +require('aerial').setup({ + backends = { 'lsp', 'treesitter','markdown' }, + default_direction = "prefer_left", + filter_kind = false, + show_guides = true, +}) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 2d0e98e..f3878ff 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -48,13 +48,11 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) buf_set_keymap('n', 'm', 'lua vim.lsp.buf.rename()', opts) -- buf_set_keymap('n', 'r', 'lua vim.lsp.buf.references()') - buf_set_keymap('n', 's', 'lua vim.lsp.buf.document_symbol()', opts) buf_set_keymap('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) buf_set_keymap('n', 'r', 'Telescope lsp_references', opts) - buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) - buf_set_keymap('n', '', 'Telescope lsp_document_symbols', opts) + buf_set_keymap('n', '', 'Telescope aerial', opts) buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) @@ -91,6 +89,7 @@ local on_attach = function(client, bufnr) }, hi_parameter = 'IncSearch', }, bufnr) + require("aerial").on_attach(client, bufnr) end local lsp_installer = require('nvim-lsp-installer') diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index fc777c1..15ab99c 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -226,9 +226,10 @@ command_center.add({ }, { description = 'Symbols outline', - cmd = 'lua vim.lsp.buf.document_symbol()', + cmd = 'AerialToggle', keybindings = { { 'n', 's', silent_noremap }, + { 'n', 's', silent_noremap }, }, }, }) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index 777a2e5..c452716 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -49,4 +49,4 @@ require('telescope').setup({ }) require('telescope').load_extension('fzf') - +require('telescope').load_extension('aerial') -- 2.49.1 From b099ba7efd17b6f2d9b912a6b3de548fb9d01a54 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 14:38:26 +0200 Subject: [PATCH 123/894] rework status line --- lua/my_options.lua | 8 +------- lua/setup/lualine.lua | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index d855e05..20786a0 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -57,22 +57,16 @@ opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' local function status_line() - local mode = "%-5{%v:lua.string.upper(v:lua.vim.fn.mode())%}" local file_name = "%-.16t" - local buf_nr = "[%n]" local modified = " %-m" - local file_type = " %y" local right_align = "%=" local line_no = "%10([%l/%L%)]" local pct_thru_file = "%5p%%" return string.format( - "%s%s%s%s%s%s%s%s", - mode, + "%s%s%s%s%s", file_name, - buf_nr, modified, - file_type, right_align, line_no, pct_thru_file diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index 9251f0b..4e36bd6 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,5 +1,6 @@ + require('lualine').setup({ - sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, options = { theme = 'gruvbox' }, + sections = { lualine_c = { 'getcwd' , 'aerial' } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, }) -- 2.49.1 From 688493d39df595420dbe25633215ef0e22eabb25 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 15:13:02 +0200 Subject: [PATCH 124/894] disable virtual line blame --- lua/setup/gitsigns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/gitsigns.lua b/lua/setup/gitsigns.lua index acac0c9..e4fb000 100644 --- a/lua/setup/gitsigns.lua +++ b/lua/setup/gitsigns.lua @@ -1,5 +1,5 @@ require('gitsigns').setup({ - current_line_blame = true, + current_line_blame = false, current_line_blame_opts = { virt_text = true, virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' -- 2.49.1 From 1f60a850989150b49ed7551adb2fbcd6d6e72571 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 27 Jun 2022 09:18:50 +0200 Subject: [PATCH 125/894] removed jsonc treesitter --- lua/setup/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua index 9b4ab12..d38688a 100644 --- a/lua/setup/treesitter.lua +++ b/lua/setup/treesitter.lua @@ -17,7 +17,6 @@ require('nvim-treesitter.configs').setup({ 'jsdoc', 'json', 'json5', - 'JSONC', 'latex', 'llvm', 'lua', -- 2.49.1 From 7b776c7e9fd7346d7b2948342a63feb2f7b9e810 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 27 Jun 2022 09:19:51 +0200 Subject: [PATCH 126/894] no lazyloading of treesitter --- lua/my_plugins.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 8a537f4..29b827e 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -38,7 +38,6 @@ return require('packer').startup(function() use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', - event = 'BufRead', config = get_setup('treesitter'), }) use({ @@ -61,7 +60,9 @@ return require('packer').startup(function() }) use({ 'lukas-reineke/indent-blankline.nvim', - after = 'nvim-treesitter', + requires = { + 'nvim-treesitter/nvim-treesitter', + }, config = get_setup('indent_blankline'), }) use({ 'nvim-lua/plenary.nvim' }) -- 2.49.1 From 0a31d71c0cff4449a48cf84749d269fd42d02123 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 30 Jun 2022 13:57:03 +0200 Subject: [PATCH 127/894] disable default mappings for comment --- lua/setup/comment.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lua/setup/comment.lua b/lua/setup/comment.lua index 36c2d79..9438d50 100644 --- a/lua/setup/comment.lua +++ b/lua/setup/comment.lua @@ -1,10 +1,3 @@ require('Comment').setup({ - toggler = { - ---line-comment toggle - line = 'cc', - }, - opleader = { - ---line-comment opfunc mapping - line = 'c', - }, + mappings = false, }) -- 2.49.1 From 9e2890aed9ac985997e09717b2d3d2b517c68caa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 13:47:16 +0200 Subject: [PATCH 128/894] use vim.keymap.set --- lua/setup/lspinstall.lua | 44 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index f3878ff..498ad57 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -26,9 +26,6 @@ OpenDiagFloat = function () end local on_attach = function(client, bufnr) - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -37,33 +34,34 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. - local opts = { noremap = true, silent = true } - buf_set_keymap('n', ',', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ';', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'a', 'lua vim.lsp.buf.code_action()', opts) - buf_set_keymap('n', 'd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'h', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'c', 'lua vim.lsp.buf.outgoing_calls()', opts) - buf_set_keymap('n', 'C', 'lua vim.lsp.buf.incoming_calls()', opts) - buf_set_keymap('n', 'm', 'lua vim.lsp.buf.rename()', opts) - -- buf_set_keymap('n', 'r', 'lua vim.lsp.buf.references()') - buf_set_keymap('n', '', 'Telescope lsp_dynamic_workspace_symbols', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'r', 'Telescope lsp_references', opts) - buf_set_keymap('n', '', 'Telescope aerial', opts) - buf_set_keymap('n', 'v', 'Telescope diagnostics bufnr=0', opts) - buf_set_keymap('n', '', ':ClangdSwitchSourceHeader', opts) + local opts ={ noremap = true, silent = true, buffer = true } + vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts ) + vim.keymap.set('n', ';', vim.lsp.diagnostic.goto_next, opts) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) + vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) + local tele_builtins = require('telescope.builtin') + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) + local aerial = require('aerial') + vim.keymap.set('n', '', aerial.toggle, opts) + vim.keymap.set('n', 'v', function () tele_builtins.diagnostics({bufnr = 0}) end, opts) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.format{async=true}', opts) + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) end if client.server_capabilities.documentRangeFormattingProvider then - buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts) + vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) end -- Set autocommands conditional on server_capabilities -- 2.49.1 From c27b582b89702b65e233c6ba2553d54aa288b2d4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 13:55:21 +0200 Subject: [PATCH 129/894] removed some unused keymaps --- lua/my_keymappings.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index ea6b2a8..4a4d2d6 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,16 +1,5 @@ vim.g.mapleader = ',' vim.keymap.set('n', '', 'nil', { noremap = true, silent = true }) --- Paste from clipboard -vim.keymap.set('n', 'p', '"+p') -vim.keymap.set('n', 'P', '"+P') -vim.keymap.set('v', 'p', '"+p') -vim.keymap.set('v', 'P', '"+P') - --- Yank to clipboard -vim.keymap.set('v', 'y', '"+y') -vim.keymap.set('n', 'Y', '"+yg_') -vim.keymap.set('n', 'y', '"+y') -vim.keymap.set('n', 'yy', '"+yy') -- Tabs vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) -- 2.49.1 From 49bb25aec6c41fbed4f6da49f052a803ada69ec4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 13:56:06 +0200 Subject: [PATCH 130/894] fixed statusline --- lua/my_options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 20786a0..8c57408 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -57,7 +57,7 @@ opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' local function status_line() - local file_name = "%-.16t" + local file_name = "%-.32t" local modified = " %-m" local right_align = "%=" local line_no = "%10([%l/%L%)]" -- 2.49.1 From ad480c4d35da6371754094fa986a2689991d2d44 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 13:56:35 +0200 Subject: [PATCH 131/894] just use all treesitter modules --- lua/setup/treesitter.lua | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua index d38688a..094140a 100644 --- a/lua/setup/treesitter.lua +++ b/lua/setup/treesitter.lua @@ -1,39 +1,8 @@ +local parser = require('nvim-treesitter.parsers').filetype_to_parsername +parser.groovy = 'java' -- the someft filetype will use the python parser and queries. + require('nvim-treesitter.configs').setup({ - ensure_installed = { - 'bash', - 'bibtex', - 'c', - 'cmake', - 'comment', - 'cpp', - 'css', - 'dockerfile', - 'help', - 'hjson', - 'html', - 'http', - 'java', - 'javascript', - 'jsdoc', - 'json', - 'json5', - 'latex', - 'llvm', - 'lua', - 'make', - 'markdown', - 'ninja', - 'perl', - 'php', - 'proto', - 'python', - 'r', - 'regex', - 'rust', - 'toml', - 'vim', - 'yaml', - }, + ensure_installed = all, highlight = { enable = true }, -- 2.49.1 From 3392ebe2702ee3260c50cdaeb3c9e8858cc5bbbb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 15:26:14 +0200 Subject: [PATCH 132/894] use virtual text for diagnostics again --- lua/setup/lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 498ad57..3ffa321 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -175,7 +175,7 @@ null_ls.setup({ on_attach = on_attach, capabilities = capabilities, }) -vim.diagnostic.config({ virtual_text = false }) +vim.diagnostic.config({ virtual_text = true }) require('clangd_extensions').setup({ server = { -- 2.49.1 From ec56132c850e7ff9af8b917a458785739cca425b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 15:26:30 +0200 Subject: [PATCH 133/894] no aerial status message --- lua/setup/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index 4e36bd6..ef6e4e9 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,6 +1,6 @@ require('lualine').setup({ options = { theme = 'gruvbox' }, - sections = { lualine_c = { 'getcwd' , 'aerial' } }, + sections = { lualine_c = { 'getcwd' } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, }) -- 2.49.1 From 8020639f31c17070040c4e18566b2ec33620a727 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 16:44:37 +0200 Subject: [PATCH 134/894] use x for visual mode instead of v --- lua/my_keymappings.lua | 54 ++++++++++++--------------------- lua/setup/my_command_center.lua | 4 +-- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 4a4d2d6..5e750c0 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,49 +1,35 @@ vim.g.mapleader = ',' -vim.keymap.set('n', '', 'nil', { noremap = true, silent = true }) +local opts = { noremap = true, silent = true } +vim.keymap.set('n', '', 'nil', opts) -- Tabs -vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':tabprevious', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':tabnext', opts) +vim.keymap.set('n', '', ':tabprevious', opts) -- Split movement -vim.keymap.set('n', '', ':wincmd k', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':wincmd j', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':wincmd h', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':wincmd l', { noremap = true, silent = true }) +vim.keymap.set('n', '', ':wincmd k', opts) +vim.keymap.set('n', '', ':wincmd j', opts) +vim.keymap.set('n', '', ':wincmd h', opts) +vim.keymap.set('n', '', ':wincmd l', opts) vim.keymap.set('n', '', ':wa | wshada') -- Linewrap and jumping -vim.keymap.set('n', 'k', 'gk') -vim.keymap.set('n', 'j', 'gj') -vim.keymap.set('n', '0', 'g0') -vim.keymap.set('n', '$', 'g$') -vim.keymap.set('n', '', 'gk') -vim.keymap.set('n', '', 'gj') -vim.keymap.set('n', '', 'g') -vim.keymap.set('n', '', 'g') -vim.keymap.set('v', 'k', 'gk') -vim.keymap.set('v', 'j', 'gj') -vim.keymap.set('v', '0', 'g0') -vim.keymap.set('v', '$', 'g$') -vim.keymap.set('v', '', 'gk') -vim.keymap.set('v', '', 'gj') -vim.keymap.set('v', '', 'g') -vim.keymap.set('v', '', 'g') +vim.keymap.set({ 'n', 'x' }, 'k', 'gk', opts) +vim.keymap.set({ 'n', 'x' }, 'j', 'gj', opts) +vim.keymap.set({ 'n', 'x' }, '0', 'g0', opts) +vim.keymap.set({ 'n', 'x' }, '$', 'g$', opts) +vim.keymap.set({ 'n', 'x' }, '', 'gk', opts) +vim.keymap.set({ 'n', 'x' }, '', 'gj', opts) +vim.keymap.set({ 'n', 'x' }, '', 'g', opts) +vim.keymap.set({ 'n', 'x' }, '', 'g', opts) -vim.keymap.set('v', '<', '', '>gv') +vim.keymap.set('x', '<', '', '>gv') -- Highlight word under cursor -vim.keymap.set('n', 'ü', ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) -vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls") -vim.keymap.set('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) vim.keymap.set('n', "'", ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) -vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls") -vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) +-- vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls") +vim.keymap.set('x', "'", "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) -- Close Buffer vim.keymap.set('n', '', ':bd') - --- to navigate the completion menu -vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) -vim.keymap.set('i', '', 'pumvisible() ? "\\" : "\\"', { expr = true }) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 15ab99c..1ba7d7b 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -16,7 +16,7 @@ command_center.add({ cmd = 'Telescope command_center', keybindings = { { 'n', 'p', noremap }, - { 'v', 'p', noremap }, + { 'x', 'p', noremap }, }, }, { @@ -221,7 +221,7 @@ command_center.add({ description = 'Comment line', cmd = '(comment_toggle_linewise_visual)gv', keybindings = { - { 'v', '', silent_noremap }, + { 'x', '', silent_noremap }, }, }, { -- 2.49.1 From be42757e5e26c1bf6fc65c0cec9f59fdfd519bbe Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 17:27:43 +0200 Subject: [PATCH 135/894] fixed aerial keybinding --- lua/setup/lspinstall.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 3ffa321..8c2aac8 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -49,8 +49,7 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - local aerial = require('aerial') - vim.keymap.set('n', '', aerial.toggle, opts) + vim.keymap.set('n', '', 'Telescope aerial', opts) vim.keymap.set('n', 'v', function () tele_builtins.diagnostics({bufnr = 0}) end, opts) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) -- 2.49.1 From 3c9ecc9d53eef351a95c8746f4c893dc04d953a2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 17:28:13 +0200 Subject: [PATCH 136/894] added cmp signature help --- lua/my_plugins.lua | 3 ++- lua/setup/cmp.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 29b827e..e5279ee 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -95,7 +95,8 @@ return require('packer').startup(function() { 'f3fora/cmp-spell', after = 'nvim-cmp' }, { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, - { 'ray-x/cmp-treesitter', after = 'nvim-cmp'} + { 'ray-x/cmp-treesitter', after = 'nvim-cmp'}, + { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp'} }, config = get_setup('cmp'), }) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index fa0f4ee..8d19dbc 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -72,6 +72,7 @@ cmp.setup({ sources = { { name = 'luasnip' }, { name = 'nvim_lsp' }, + { name = 'nvim_lsp_signature_help' }, { name = 'treesitter' }, { name = 'buffer' }, -- { name = 'nvim_lua' }, -- 2.49.1 From b12a673ba14aee5371be35e2c0fc52f0d73bce1b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 20:24:41 +0200 Subject: [PATCH 137/894] update colorscheme --- lua/my_plugins.lua | 2 ++ lua/setup/gruvbox.lua | 18 +++++++++++++----- lua/setup/my_gruvbox-material.lua | 5 +++++ 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 lua/setup/my_gruvbox-material.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index e5279ee..6302c0a 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -53,9 +53,11 @@ return require('packer').startup(function() use({ 'sainnhe/gruvbox-material', disable = true, + config = get_setup('my_gruvbox-material') }) use({ 'ellisonleao/gruvbox.nvim', + disable = false, config = get_setup('gruvbox'), }) use({ diff --git a/lua/setup/gruvbox.lua b/lua/setup/gruvbox.lua index d772e47..27301ab 100644 --- a/lua/setup/gruvbox.lua +++ b/lua/setup/gruvbox.lua @@ -1,6 +1,14 @@ -vim.g.gruvbox_material_diagnostic_text_highlight = 1 -vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' -vim.g.gruvbox_bold = 0 -vim.g.gruvbox_italicize_comments = 0 -vim.g.gruvbox_italicize_strings = 0 +require('gruvbox').setup({ + undercurl = true, + underline = true, + bold = true, + italic = true, -- will make italic comments and special strings + inverse = true, -- invert background for search, diffs, statuslines and errors + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + contrast = "hard", -- can be "hard" or "soft" + overrides = {}, +}) vim.cmd('colorscheme gruvbox') diff --git a/lua/setup/my_gruvbox-material.lua b/lua/setup/my_gruvbox-material.lua new file mode 100644 index 0000000..c5b0136 --- /dev/null +++ b/lua/setup/my_gruvbox-material.lua @@ -0,0 +1,5 @@ +vim.g.gruvbox_material_background = 'hard' +vim.g.gruvbox_material_foreground = 'original' +vim.g.gruvbox_material_cursor = 'purple' +vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' +vim.cmd('colorscheme gruvbox-material') -- 2.49.1 From c607af6115d66f8ad8a0922516a8e9b6ff69244b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 20:25:37 +0200 Subject: [PATCH 138/894] updated font --- lua/my_options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 8c57408..f1c4add 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -33,7 +33,7 @@ opt.splitbelow= true opt.splitright= true opt.shiftwidth = indent opt.tabstop = indent -opt.guifont= 'JetBrainsMono Nerd Font:h9' +opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf opt.swapfile= false opt.backup= false opt.spelllang= 'en,de' -- 2.49.1 From f9d9bbd25876400f7a5925ca9f7cde2b6b43f8d4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 20:55:03 +0200 Subject: [PATCH 139/894] disable bold and italic --- lua/setup/gruvbox.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/setup/gruvbox.lua b/lua/setup/gruvbox.lua index 27301ab..b3cb624 100644 --- a/lua/setup/gruvbox.lua +++ b/lua/setup/gruvbox.lua @@ -1,8 +1,8 @@ require('gruvbox').setup({ undercurl = true, underline = true, - bold = true, - italic = true, -- will make italic comments and special strings + bold = false, + italic = false, -- will make italic comments and special strings inverse = true, -- invert background for search, diffs, statuslines and errors invert_selection = false, invert_signs = false, -- 2.49.1 From 4bd385dd55fb2d4eff085fca1444d14007859a25 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 20:55:20 +0200 Subject: [PATCH 140/894] disable indent for treesitter --- lua/setup/treesitter.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua index 094140a..771d4ea 100644 --- a/lua/setup/treesitter.lua +++ b/lua/setup/treesitter.lua @@ -13,6 +13,9 @@ require('nvim-treesitter.configs').setup({ -- colors = {}, -- table of hex strings -- termcolors = {} -- table of colour name strings }, + indent = { + enable = false -- maybe buggy + }, textobjects = { select = { enable = true, -- 2.49.1 From d525388f3f9b41cbf48e51c2e0ecf7736c9c9774 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 21:08:37 +0200 Subject: [PATCH 141/894] fixed highlight --- lua/setup/lspinstall.lua | 43 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 8c2aac8..86dc6fa 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -16,13 +16,13 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } -OpenDiagFloat = function () +OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end + if vim.api.nvim_win_get_config(winid).zindex then + return + end end - vim.diagnostic.open_float({focusable = false}) + vim.diagnostic.open_float({ focusable = false }) end local on_attach = function(client, bufnr) @@ -34,8 +34,8 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. - local opts ={ noremap = true, silent = true, buffer = true } - vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts ) + local opts = { noremap = true, silent = false, buffer = true } + vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts) vim.keymap.set('n', ';', vim.lsp.diagnostic.goto_next, opts) vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) @@ -50,7 +50,7 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) vim.keymap.set('n', '', 'Telescope aerial', opts) - vim.keymap.set('n', 'v', function () tele_builtins.diagnostics({bufnr = 0}) end, opts) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) @@ -64,21 +64,28 @@ local on_attach = function(client, bufnr) end -- Set autocommands conditional on server_capabilities - if client.server_capabilities.document_highlight then + if client.server_capabilities.documentHighlightProvider then vim.api.nvim_exec( [[ hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed - augroup lsp_document_highlight - autocmd! * - autocmd CursorHold lua vim.lsp.buf.document_highlight() - autocmd CursorHoldI lua vim.lsp.buf.document_highlight() - autocmd CursorMoved lua vim.lsp.buf.clear_references() - augroup END - ]], - false - ) + ]], false) + 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 + require('lsp_signature').on_attach({ bind = true, -- This is mandatory, otherwise border config won't get registered. handler_opts = { -- 2.49.1 From 23a3a8f7c6547f7c23d8736173f29e6a8fbe1009 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 21:13:57 +0200 Subject: [PATCH 142/894] added additional command for comment --- lua/setup/my_command_center.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 1ba7d7b..8f8a646 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -215,6 +215,7 @@ command_center.add({ cmd = '(comment_toggle_current_linewise)', keybindings = { { 'n', '', silent_noremap }, + { 'n', '', silent_noremap }, }, }, { @@ -222,6 +223,7 @@ command_center.add({ cmd = '(comment_toggle_linewise_visual)gv', keybindings = { { 'x', '', silent_noremap }, + { 'x', '', silent_noremap }, }, }, { -- 2.49.1 From d6f71c8ab2d5c36bf38810ce17511756c51b6d9c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Jul 2022 21:14:12 +0200 Subject: [PATCH 143/894] disbable get to location after file load --- lua/my_autocommands.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 8f01159..3c8b63a 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -57,10 +57,10 @@ api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) api.nvim_create_autocmd({ 'FocusGained' }, { command = [[rshada]] }) -- go to last loc when opening a buffer -api.nvim_create_autocmd( - 'BufReadPost', - { command = [[if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\"" | endif]] } -) +-- api.nvim_create_autocmd( +-- 'BufReadPost', +-- { command = [[if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\"" | endif]] } +-- ) -- Check if we need to reload the file when it changed api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[:checktime]] }) -- 2.49.1 From 8b79b38ca06078a8243211029eed3c8f0a73be18 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 4 Jul 2022 23:40:56 +0200 Subject: [PATCH 144/894] disable virtual text again --- lua/setup/lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 86dc6fa..3c80522 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -181,7 +181,7 @@ null_ls.setup({ on_attach = on_attach, capabilities = capabilities, }) -vim.diagnostic.config({ virtual_text = true }) +vim.diagnostic.config({ virtual_text = false }) require('clangd_extensions').setup({ server = { -- 2.49.1 From f9888e9c2af19a780e83cdb02cb68942e14b3779 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 4 Jul 2022 23:41:44 +0200 Subject: [PATCH 145/894] update stable --- snapshots/stable.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshots/stable.json b/snapshots/stable.json index 813d50e..401f23c 100644 --- a/snapshots/stable.json +++ b/snapshots/stable.json @@ -1 +1 @@ -{"litee.nvim": {"commit": "de1a3d6"}, "nvim-dap": {"commit": "2420042"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "00ec5ad"}, "tabout.nvim": {"commit": "be655cc"}, "nvim-lspconfig": {"commit": "9278dfb"}, "command-center.nvim": {"commit": "e3b32c7"}, "clangd_extensions.nvim": {"commit": "81b56d4"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "ff40739"}, "lualine.nvim": {"commit": "5113cdb"}, "cmp-cmdline": {"commit": "c36ca4b"}, "nvim-treesitter-textobjects": {"commit": "b1e850b"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "d27a83a"}, "gitsigns.nvim": {"commit": "4883988"}, "indent-blankline.nvim": {"commit": "42fe62e"}, "dressing.nvim": {"commit": "af17983"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "c552119"}, "cmp-look": {"commit": "58dd22a"}, "telescope.nvim": {"commit": "d88b44d"}, "litee-calltree.nvim": {"commit": "71f7eee"}, "lsp_signature.nvim": {"commit": "4983797"}, "Comment.nvim": {"commit": "2c26a00"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "cb65686"}, "gruvbox.nvim": {"commit": "3352c12"}, "gh.nvim": {"commit": "86a5249"}, "neovim-cmake": {"commit": "61dbc34"}, "nvim-autopairs": {"commit": "4a95b39"}, "LuaSnip": {"commit": "a12441e"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "8f13d50"}, "nvim-web-devicons": {"commit": "8d2c533"}, "nvim-treesitter": {"commit": "881b932"}, "nui.nvim": {"commit": "b26b36a"}, "nvim-terminal": {"commit": "e044b91"}, "neogen": {"commit": "c5a0c39"}, "nvim-lsp-installer": {"commit": "5904749"}, "project.nvim": {"commit": "541115e"}, "cmp-calc": {"commit": "f7efc20"}, "toggleterm.nvim": {"commit": "8f2e78d"}, "plenary.nvim": {"commit": "968a4b9"}, "nvim-cmp": {"commit": "1cad181"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "466b6b8"}, "cmp-buffer": {"commit": "62fc67a"}} +{"litee.nvim": {"commit": "de1a3d6"}, "nvim-dap": {"commit": "f4a3be5"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "d268d2e"}, "tabout.nvim": {"commit": "be655cc"}, "nvim-lspconfig": {"commit": "b9c375c"}, "command-center.nvim": {"commit": "baaf831"}, "nvim-cmp": {"commit": "9897465"}, "clangd_extensions.nvim": {"commit": "81b56d4"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "a2b7bf8"}, "lualine.nvim": {"commit": "5113cdb"}, "cmp-cmdline": {"commit": "c36ca4b"}, "nvim-treesitter-textobjects": {"commit": "c8a393e"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "15ecafe"}, "gitsigns.nvim": {"commit": "4883988"}, "dressing.nvim": {"commit": "af17983"}, "indent-blankline.nvim": {"commit": "4a58fe6"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "8613c45"}, "cmp-nvim-lsp-signature-help": {"commit": "007dd27"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "6ea1063"}, "litee-calltree.nvim": {"commit": "71f7eee"}, "lsp_signature.nvim": {"commit": "9c51678"}, "Comment.nvim": {"commit": "4086630"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "521b94d"}, "gruvbox.nvim": {"commit": "79419f9"}, "gh.nvim": {"commit": "cdf177c"}, "aerial.nvim": {"commit": "bd6de88"}, "neovim-cmake": {"commit": "d0ffe31"}, "nvim-autopairs": {"commit": "4a95b39"}, "LuaSnip": {"commit": "295cc9e"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "8f13d50"}, "nvim-web-devicons": {"commit": "8d2c533"}, "nvim-treesitter": {"commit": "cf6d84b"}, "nui.nvim": {"commit": "4af402d"}, "nvim-terminal": {"commit": "e058de4"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "nvim-lsp-installer": {"commit": "12e7c06"}, "cmp-calc": {"commit": "f7efc20"}, "toggleterm.nvim": {"commit": "04174e1"}, "plenary.nvim": {"commit": "46e8bb9"}, "project.nvim": {"commit": "541115e"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "981baf9"}, "cmp-buffer": {"commit": "62fc67a"}} -- 2.49.1 From d7b2cc31565640b18e9cd0fa2b2b564fe5fd69d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 5 Jul 2022 23:20:51 +0200 Subject: [PATCH 146/894] added hlargs --- lua/my_plugins.lua | 5 +++++ lua/setup/my_hlargs.lua | 1 + 2 files changed, 6 insertions(+) create mode 100644 lua/setup/my_hlargs.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 6302c0a..cbdada5 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -187,6 +187,11 @@ return require('packer').startup(function() 'stevearc/aerial.nvim', config = get_setup('aerial') } + use { + 'm-demare/hlargs.nvim', + requires = { 'nvim-treesitter/nvim-treesitter' }, + config = get_setup('my_hlargs') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_hlargs.lua b/lua/setup/my_hlargs.lua new file mode 100644 index 0000000..ba0e4dd --- /dev/null +++ b/lua/setup/my_hlargs.lua @@ -0,0 +1 @@ +require('hlargs').setup() -- 2.49.1 From 219a8c3e81add8c367a2a08cb344e5b45e55738b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Jul 2022 21:59:04 +0200 Subject: [PATCH 147/894] fixed autocommand for checktime --- lua/my_autocommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 3c8b63a..c79642c 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -63,7 +63,7 @@ api.nvim_create_autocmd({ 'FocusGained' }, { command = [[rshada]] }) -- ) -- Check if we need to reload the file when it changed -api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[:checktime]] }) +api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) -- windows to close with "q" api.nvim_create_autocmd( -- 2.49.1 From 5d4cf9bfdcd215f964d134a5dc46133a6fa4b808 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Jul 2022 22:21:57 +0200 Subject: [PATCH 148/894] setup the linux font --- lua/my_options.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index f1c4add..a139ada 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -33,7 +33,11 @@ opt.splitbelow= true opt.splitright= true opt.shiftwidth = indent opt.tabstop = indent -opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +if vim.loop.os_uname().sysname == 'Linux' then + opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' +else + opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +end opt.swapfile= false opt.backup= false opt.spelllang= 'en,de' -- 2.49.1 From 3b3bc5b937f6657230d9899eb085fbf06b0084e8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 8 Jul 2022 23:41:37 +0200 Subject: [PATCH 149/894] support for my own vscode snippets --- lua/setup/luasnip.lua | 2 ++ my-snippets/all.json | 0 my-snippets/cpp.json | 12 ++++++++++++ my-snippets/package.json | 19 +++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 my-snippets/all.json create mode 100644 my-snippets/cpp.json create mode 100644 my-snippets/package.json diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index 8627e83..a146428 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -52,4 +52,6 @@ ls.snippets = { }) }, } + require('luasnip.loaders.from_vscode').lazy_load() +require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } }) diff --git a/my-snippets/all.json b/my-snippets/all.json new file mode 100644 index 0000000..e69de29 diff --git a/my-snippets/cpp.json b/my-snippets/cpp.json new file mode 100644 index 0000000..38cd2da --- /dev/null +++ b/my-snippets/cpp.json @@ -0,0 +1,12 @@ +{ + "test_getter": { + "prefix": "test_getter", + "body": [ + "TEST(${1:TestClass}, ${2:TestFunction}", + "{", + "\tget${CLIPBOARD}()", + "};" + ], + "description": "Code snippet for testing the getter" + } +} diff --git a/my-snippets/package.json b/my-snippets/package.json new file mode 100644 index 0000000..5333d8b --- /dev/null +++ b/my-snippets/package.json @@ -0,0 +1,19 @@ +{ + "name": "my-snippets", + "contributes": { + "snippets": [ + { + "language": [ + "all" + ], + "path": "all.json" + }, + { + "language": [ + "cpp" + ], + "path": "cpp.json" + } + ] + } +} -- 2.49.1 From 03c102be955d7b8a2ec15ed6f247daaf6b677a8e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 8 Jul 2022 23:41:48 +0200 Subject: [PATCH 150/894] format --- lua/my_plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index cbdada5..a87801c 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -97,8 +97,8 @@ return require('packer').startup(function() { 'f3fora/cmp-spell', after = 'nvim-cmp' }, { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, - { 'ray-x/cmp-treesitter', after = 'nvim-cmp'}, - { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp'} + { 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' } }, config = get_setup('cmp'), }) -- 2.49.1 From 98a9f00bd60629d5ab1de1765e81796be79255f5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 9 Jul 2022 00:29:26 +0200 Subject: [PATCH 151/894] delete tabout --- lua/my_plugins.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index a87801c..39dd5e7 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -145,7 +145,6 @@ return require('packer').startup(function() after = 'nvim-treesitter', config = get_setup('neogen'), }) - use({ 'abecodes/tabout.nvim' }) use({ 'stevearc/dressing.nvim' }) use({ 'nvim-treesitter/nvim-treesitter-textobjects', -- 2.49.1 From 3aea401281d75cbe5c9e11d0b866e873e432fe12 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 9 Jul 2022 00:43:34 +0200 Subject: [PATCH 152/894] added yanky keys and telescope --- lua/setup/yanky.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/yanky.lua b/lua/setup/yanky.lua index 3fccdb7..74a3d34 100644 --- a/lua/setup/yanky.lua +++ b/lua/setup/yanky.lua @@ -7,3 +7,7 @@ vim.api.nvim_set_keymap('n', 'gp', '(YankyGPutAfter)', {}) vim.api.nvim_set_keymap('n', 'gP', '(YankyGPutBefore)', {}) vim.api.nvim_set_keymap('x', 'gp', '(YankyGPutAfter)', {}) vim.api.nvim_set_keymap('x', 'gP', '(YankyGPutBefore)', {}) +vim.keymap.set("n", "", "(YankyCycleForward)", {}) +vim.keymap.set("n", "", "(YankyCycleBackward)", {}) + +require("telescope").load_extension('yank_history') -- 2.49.1 From 8ebf953ec7adbbc438583cfd1a67499f390a90cf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 10 Jul 2022 23:42:52 +0200 Subject: [PATCH 153/894] added leap --- lua/my_plugins.lua | 5 +++++ lua/setup/my_leap.lua | 1 + 2 files changed, 6 insertions(+) create mode 100644 lua/setup/my_leap.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 39dd5e7..3ca6d70 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -191,6 +191,11 @@ return require('packer').startup(function() requires = { 'nvim-treesitter/nvim-treesitter' }, config = get_setup('my_hlargs') } + use { + 'ggandor/leap.nvim', + requires = {'tpope/vim-repeat'}, + config = get_setup('my_leap') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_leap.lua b/lua/setup/my_leap.lua new file mode 100644 index 0000000..08d46e0 --- /dev/null +++ b/lua/setup/my_leap.lua @@ -0,0 +1 @@ +require('leap').set_default_keymaps() -- 2.49.1 From 894dba333725ecca9be6e9f79e27c4aa2a9f9e54 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 26 Jul 2022 22:17:09 +0200 Subject: [PATCH 154/894] use mason for lsp install --- lua/my_plugins.lua | 21 ++++- lua/setup/my_lspconfig.lua | 179 +++++++++++++++++++++++++++++++++++++ lua/setup/my_mason.lua | 4 + 3 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 lua/setup/my_lspconfig.lua create mode 100644 lua/setup/my_mason.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 3ca6d70..24a843f 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -34,7 +34,6 @@ require('packer').init({ return require('packer').startup(function() -- Packer can manage itself as an optional plugin use({ 'wbthomason/packer.nvim' }) - use({ 'neovim/nvim-lspconfig' }) use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', @@ -84,7 +83,6 @@ return require('packer').startup(function() }) use({ 'hrsh7th/nvim-cmp', - event = 'InsertEnter', requires = { { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, @@ -134,6 +132,25 @@ return require('packer').startup(function() 'p00f/clangd_extensions.nvim', }, config = get_setup('lspinstall'), + disable = true, + }) + use { + 'williamboman/mason.nvim', + requires = { + 'neovim/nvim-lspconfig', + 'williamboman/mason-lspconfig.nvim', + }, + config = get_setup('my_mason') + } + use({ + 'p00f/clangd_extensions.nvim' + }) + use({ + 'neovim/nvim-lspconfig', + requires = { + 'p00f/clangd_extensions.nvim', + }, + config = get_setup('my_lspconfig'), }) use({ 'jose-elias-alvarez/null-ls.nvim', diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua new file mode 100644 index 0000000..8b43695 --- /dev/null +++ b/lua/setup/my_lspconfig.lua @@ -0,0 +1,179 @@ +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } +capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.offsetEncoding = { 'utf-16' } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + 'documentation', + 'detail', + 'additionalTextEdits', + }, +} + +OpenDiagFloat = function() + for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do + if vim.api.nvim_win_get_config(winid).zindex then + return + end + end + vim.diagnostic.open_float({ focusable = false }) +end + +local on_attach = function(client, bufnr) + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + + -- Mappings. + local opts = { noremap = true, silent = false, buffer = bufnr } + vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts) + vim.keymap.set('n', ';', vim.lsp.diagnostic.goto_next, opts) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) + vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) + local tele_builtins = require('telescope.builtin') + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) + vim.keymap.set('n', '', 'Telescope aerial', opts) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) + + vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) + + -- Set some keybinds conditional on server capabilities + if client.server_capabilities.documentFormattingProvider then + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) + end + if client.server_capabilities.documentRangeFormattingProvider then + vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) + end + + -- Set autocommands conditional on server_capabilities + if client.server_capabilities.documentHighlightProvider then + vim.api.nvim_exec( + [[ + hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen + hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed + ]], false) + 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 + + require('lsp_signature').on_attach({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = 'single', + }, + hi_parameter = 'IncSearch', + }, bufnr) + require("aerial").on_attach(client, bufnr) +end + +require('lspconfig')['pyright'].setup{ + on_attach = on_attach, +} + +require('lspconfig')['cmake'].setup{ + on_attach = on_attach, +} + +-- require('lspconfig')['clangd'].setup{ +-- on_attach = on_attach, +-- } +require('clangd_extensions').setup({ + server = { + on_attach = on_attach, + capabilities = capabilities, + cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + }, +}) + +require('lspconfig')['jsonls'].setup{ + on_attach = on_attach, +} + +local lua_rtp = vim.split(package.path, ';') +table.insert(lua_rtp, 'lua/?.lua') +table.insert(lua_rtp, 'lua/?/init.lua') +require('lspconfig').sumneko_lua.setup{ + on_attach = on_attach, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = lua_rtp, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim', 'use' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + } +} + +require('lspconfig')['dockerls'].setup{ + on_attach = on_attach, +} + +require('lspconfig')['yamlls'].setup{ + on_attach = on_attach, + settings = { + yaml = { + validate = false + } + } +} + +local null_ls = require('null-ls') +null_ls.setup({ + sources = { + null_ls.builtins.code_actions.gitsigns, + null_ls.builtins.formatting.autopep8, + null_ls.builtins.formatting.prettier, + null_ls.builtins.diagnostics.flake8, + null_ls.builtins.formatting.isort, + null_ls.builtins.formatting.cmake_format, + }, + on_attach = on_attach, + capabilities = capabilities, +}) + +vim.diagnostic.config({ virtual_text = false }) + diff --git a/lua/setup/my_mason.lua b/lua/setup/my_mason.lua new file mode 100644 index 0000000..416a97a --- /dev/null +++ b/lua/setup/my_mason.lua @@ -0,0 +1,4 @@ +require('mason').setup() +require('mason-lspconfig').setup({ + automatic_installation = true, +}) -- 2.49.1 From 6a8c84250f48966df43990d5f6f489346c3fd9f0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 26 Jul 2022 22:35:52 +0200 Subject: [PATCH 155/894] set ttimeoutlen --- lua/my_options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_options.lua b/lua/my_options.lua index a139ada..b0401bd 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -16,6 +16,7 @@ opt.updatetime = 300 --Decrease update time opt.signcolumn = 'yes' -- Always show sign column opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.ttimeoutlen = 10 opt.showmode = false -- Do not need to show the mode. We use the statusline instead. opt.scrolloff = 999 -- Lines of context opt.joinspaces = false -- No double spaces with join after a dot -- 2.49.1 From b396169fcae6a7a6aa8a413bb4a781dafd9c3cb5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 13:16:40 +0200 Subject: [PATCH 156/894] replaced deprecated diagnostic calls --- lua/setup/my_lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 8b43695..bb74acf 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -35,8 +35,8 @@ local on_attach = function(client, bufnr) -- Mappings. local opts = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.lsp.diagnostic.goto_next, opts) + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) -- 2.49.1 From deb6dea93b1f995282345f4a4d7da8f03a778858 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 13:56:40 +0200 Subject: [PATCH 157/894] removed lazy loading --- lua/my_plugins.lua | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 24a843f..baacbcc 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -84,19 +84,19 @@ return require('packer').startup(function() use({ 'hrsh7th/nvim-cmp', requires = { - { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, - { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, - { 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } }, - { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, - { 'octaltree/cmp-look', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-calc', after = 'nvim-cmp' }, - { 'f3fora/cmp-spell', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, - { 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' } + { 'hrsh7th/cmp-buffer'}, + { 'hrsh7th/cmp-nvim-lsp'}, + { 'L3MON4D3/LuaSnip'}, + { 'saadparwaiz1/cmp_luasnip'}, + { 'hrsh7th/cmp-nvim-lua'}, + { 'octaltree/cmp-look'}, + { 'hrsh7th/cmp-path'}, + { 'hrsh7th/cmp-calc'}, + { 'f3fora/cmp-spell'}, + { 'hrsh7th/cmp-emoji'}, + { 'hrsh7th/cmp-cmdline'}, + { 'ray-x/cmp-treesitter'}, + { 'hrsh7th/cmp-nvim-lsp-signature-help'} }, config = get_setup('cmp'), }) @@ -115,7 +115,7 @@ return require('packer').startup(function() }) use({ 'p00f/nvim-ts-rainbow', requires = 'nvim-treesitter/nvim-treesitter', - after = 'nvim-treesitter' }) + }) use({ 'windwp/nvim-autopairs', config = get_setup('nvim-autopairs'), @@ -159,13 +159,11 @@ return require('packer').startup(function() use({ 'danymat/neogen', requires = 'nvim-treesitter/nvim-treesitter', - after = 'nvim-treesitter', config = get_setup('neogen'), }) use({ 'stevearc/dressing.nvim' }) use({ 'nvim-treesitter/nvim-treesitter-textobjects', - after = 'nvim-treesitter', requires = 'nvim-treesitter/nvim-treesitter', }) use({ -- 2.49.1 From 860b97c24c3ea3afd70637effd5e4322f788daed Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 13:56:56 +0200 Subject: [PATCH 158/894] fixd fzf build --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index baacbcc..4e477ca 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -45,7 +45,7 @@ return require('packer').startup(function() { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' }, { 'kyazdani42/nvim-web-devicons' }, - { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, + { 'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, }, config = get_setup('telescope'), }) -- 2.49.1 From d019626efbbd9cced1aec5f123cfe620da7876eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 13:32:14 +0200 Subject: [PATCH 159/894] first version of dap --- lua/my_plugins.lua | 5 +++++ lua/setup/my_dap.lua | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 lua/setup/my_dap.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 4e477ca..015e5c9 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -211,6 +211,11 @@ return require('packer').startup(function() requires = {'tpope/vim-repeat'}, config = get_setup('my_leap') } + use { + 'mfussenegger/nvim-dap', + requires = {'mfussenegger/nvim-dap-python'}, + config = get_setup('my_dap') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua new file mode 100644 index 0000000..a969c1e --- /dev/null +++ b/lua/setup/my_dap.lua @@ -0,0 +1,44 @@ +dap = require('dap') +local opts = { noremap = true, silent = false } +-- vim.keymap.set('n', '', dap.continue(), opts) +vim.keymap.set('n', '', ":lua require('dap').continue()", opts) +vim.keymap.set('n', '', ":lua require('dap').toggle_breakpoint()", opts) +vim.keymap.set('n', '', ":lua require('dap').step_over()", opts) +vim.keymap.set('n', '', ":lua require('dap').step_into()", opts) +vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) +-- vim.keymap.set('n', '', dap.step_over(), opts) +-- vim.keymap.set('n', '', dap.step_into(), opts) +-- vim.keymap.set('n', '', dap.step_out(), opts) + +dap.adapters.python = { + type = 'executable'; + command = 'C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe'; + args = { '-m', 'debugpy.adapter' }; +} +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/usr/bin/python' + end + end; + }, +} + +-- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') -- 2.49.1 From 80cff4251996e3658e27a00d0332f0844ca0ef17 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 14:15:06 +0200 Subject: [PATCH 160/894] fixed lua language server loading with mason --- lua/my_plugins.lua | 13 ++----------- lua/setup/my_lspconfig.lua | 5 +++++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 015e5c9..42d45ea 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -134,20 +134,11 @@ return require('packer').startup(function() config = get_setup('lspinstall'), disable = true, }) - use { - 'williamboman/mason.nvim', - requires = { - 'neovim/nvim-lspconfig', - 'williamboman/mason-lspconfig.nvim', - }, - config = get_setup('my_mason') - } - use({ - 'p00f/clangd_extensions.nvim' - }) use({ 'neovim/nvim-lspconfig', requires = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', }, config = get_setup('my_lspconfig'), diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index bb74acf..184c7e7 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -1,3 +1,8 @@ +require('mason').setup() +require('mason-lspconfig').setup({ + automatic_installation = true, +}) + local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } capabilities.textDocument.completion.completionItem.snippetSupport = true -- 2.49.1 From c792c0839bae37745f0197ece98f1e85d0dc6df9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 14:16:20 +0200 Subject: [PATCH 161/894] delete unused mason lua file --- lua/setup/my_mason.lua | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lua/setup/my_mason.lua diff --git a/lua/setup/my_mason.lua b/lua/setup/my_mason.lua deleted file mode 100644 index 416a97a..0000000 --- a/lua/setup/my_mason.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('mason').setup() -require('mason-lspconfig').setup({ - automatic_installation = true, -}) -- 2.49.1 From c9c630ce61821248c960c961d43679c55c95b81a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 14:18:55 +0200 Subject: [PATCH 162/894] format lua files --- lua/my_plugins.lua | 33 +++++++++-------- lua/setup/my_lspconfig.lua | 75 +++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 42d45ea..cb55deb 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -45,7 +45,8 @@ return require('packer').startup(function() { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' }, { 'kyazdani42/nvim-web-devicons' }, - { 'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, + { 'nvim-telescope/telescope-fzf-native.nvim', + run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, }, config = get_setup('telescope'), }) @@ -84,19 +85,19 @@ return require('packer').startup(function() use({ 'hrsh7th/nvim-cmp', requires = { - { 'hrsh7th/cmp-buffer'}, - { 'hrsh7th/cmp-nvim-lsp'}, - { 'L3MON4D3/LuaSnip'}, - { 'saadparwaiz1/cmp_luasnip'}, - { 'hrsh7th/cmp-nvim-lua'}, - { 'octaltree/cmp-look'}, - { 'hrsh7th/cmp-path'}, - { 'hrsh7th/cmp-calc'}, - { 'f3fora/cmp-spell'}, - { 'hrsh7th/cmp-emoji'}, - { 'hrsh7th/cmp-cmdline'}, - { 'ray-x/cmp-treesitter'}, - { 'hrsh7th/cmp-nvim-lsp-signature-help'} + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { 'L3MON4D3/LuaSnip' }, + { 'saadparwaiz1/cmp_luasnip' }, + { 'hrsh7th/cmp-nvim-lua' }, + { 'octaltree/cmp-look' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-calc' }, + { 'f3fora/cmp-spell' }, + { 'hrsh7th/cmp-emoji' }, + { 'hrsh7th/cmp-cmdline' }, + { 'ray-x/cmp-treesitter' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help' } }, config = get_setup('cmp'), }) @@ -199,12 +200,12 @@ return require('packer').startup(function() } use { 'ggandor/leap.nvim', - requires = {'tpope/vim-repeat'}, + requires = { 'tpope/vim-repeat' }, config = get_setup('my_leap') } use { 'mfussenegger/nvim-dap', - requires = {'mfussenegger/nvim-dap-python'}, + requires = { 'mfussenegger/nvim-dap-python' }, config = get_setup('my_dap') } if packer_bootstrap then diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 184c7e7..4fbab14 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -101,12 +101,12 @@ local on_attach = function(client, bufnr) require("aerial").on_attach(client, bufnr) end -require('lspconfig')['pyright'].setup{ - on_attach = on_attach, +require('lspconfig')['pyright'].setup { + on_attach = on_attach, } -require('lspconfig')['cmake'].setup{ - on_attach = on_attach, +require('lspconfig')['cmake'].setup { + on_attach = on_attach, } -- require('lspconfig')['clangd'].setup{ @@ -120,50 +120,50 @@ require('clangd_extensions').setup({ }, }) -require('lspconfig')['jsonls'].setup{ - on_attach = on_attach, +require('lspconfig')['jsonls'].setup { + on_attach = on_attach, } local lua_rtp = vim.split(package.path, ';') table.insert(lua_rtp, 'lua/?.lua') table.insert(lua_rtp, 'lua/?/init.lua') -require('lspconfig').sumneko_lua.setup{ - on_attach = on_attach, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, +require('lspconfig').sumneko_lua.setup { + on_attach = on_attach, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = lua_rtp, }, - } + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim', 'use' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + } } -require('lspconfig')['dockerls'].setup{ - on_attach = on_attach, +require('lspconfig')['dockerls'].setup { + on_attach = on_attach, } -require('lspconfig')['yamlls'].setup{ - on_attach = on_attach, - settings = { - yaml = { - validate = false - } +require('lspconfig')['yamlls'].setup { + on_attach = on_attach, + settings = { + yaml = { + validate = false } + } } local null_ls = require('null-ls') @@ -181,4 +181,3 @@ null_ls.setup({ }) vim.diagnostic.config({ virtual_text = false }) - -- 2.49.1 From 5a22a03eba6cfe243791ef5af2084c664317c813 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 2 Aug 2022 09:20:33 +0200 Subject: [PATCH 163/894] add clangd_extension as cmp dependency --- lua/my_plugins.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index cb55deb..21f669b 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -97,7 +97,8 @@ return require('packer').startup(function() { 'hrsh7th/cmp-emoji' }, { 'hrsh7th/cmp-cmdline' }, { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' } + { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { 'p00f/clangd_extensions.nvim' }, }, config = get_setup('cmp'), }) -- 2.49.1 From 69b5cace69d30073f78a5209460a7d4d8b51051e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 3 Aug 2022 14:57:58 +0200 Subject: [PATCH 164/894] setup groovyls --- lua/setup/my_lspconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 4fbab14..1d6c835 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -105,6 +105,10 @@ require('lspconfig')['pyright'].setup { on_attach = on_attach, } +require('lspconfig')['groovyls'].setup { + on_attach = on_attach, +} + require('lspconfig')['cmake'].setup { on_attach = on_attach, } -- 2.49.1 From 49f849407268d96cf3fe05ab7f8558727f8b3ee3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 6 Aug 2022 15:26:18 +0200 Subject: [PATCH 165/894] first running verion of dab python --- .gitignore | 1 + lua/setup/my_dap.lua | 66 ++++++++++++++++++++++++-------------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index d87f6b4..62b7e09 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ vim.bundle plugged rplugin.vim plugin/packer_compiled.lua +venv_debugpy diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index a969c1e..e891040 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -10,35 +10,41 @@ vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) -- vim.keymap.set('n', '', dap.step_into(), opts) -- vim.keymap.set('n', '', dap.step_out(), opts) -dap.adapters.python = { - type = 'executable'; - command = 'C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe'; - args = { '-m', 'debugpy.adapter' }; -} -dap.configurations.python = { - { - -- The first three options are required by nvim-dap - type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` - request = 'launch'; - name = "Launch file"; - - -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options - - program = "${file}"; -- This configuration will launch the current file if used. - pythonPath = function() - -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. - -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. - -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then - return cwd .. '/venv/bin/python' - elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then - return cwd .. '/.venv/bin/python' - else - return '/usr/bin/python' - end - end; - }, -} +-- dap.adapters.python = { +-- type = 'executable'; +-- command = 'C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python'; +-- args = { '-m', 'debugpy.adapter' }; +-- options = { +-- detached = true; +-- }; +-- } +-- dap.configurations.python = { +-- { +-- -- The first three options are required by nvim-dap +-- type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` +-- request = 'launch'; +-- name = "Launch file"; +-- +-- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options +-- +-- program = "${file}"; -- This configuration will launch the current file if used. +-- pythonPath = function() +-- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. +-- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. +-- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. +-- local venv = os.getenv("VIRTUAL_ENV") +-- return string.format("%s\\bin\\python.exe",venv) +-- -- local cwd = vim.fn.getcwd() +-- -- if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then +-- -- return cwd .. '/venv/bin/python' +-- -- elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then +-- -- return cwd .. '/.venv/bin/python' +-- -- else +-- -- return '/usr/bin/python' +-- -- end +-- end; +-- }, +-- } +require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') -- 2.49.1 From 8030c44a935e98bae09bbf744f2140b3f1fbc83b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 6 Aug 2022 18:40:48 +0200 Subject: [PATCH 166/894] switch to gruvbox-baby --- lua/my_plugins.lua | 7 ++++++- lua/setup/lualine.lua | 2 +- lua/setup/my_gruvbox-baby.lua | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 lua/setup/my_gruvbox-baby.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 21f669b..02ac5d2 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -57,9 +57,14 @@ return require('packer').startup(function() }) use({ 'ellisonleao/gruvbox.nvim', - disable = false, + disable = true, config = get_setup('gruvbox'), }) + use({ + 'luisiacc/gruvbox-baby', + disable = false, + config = get_setup('my_gruvbox-baby') + }) use({ 'lukas-reineke/indent-blankline.nvim', requires = { diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index ef6e4e9..2ae1bd9 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,6 +1,6 @@ require('lualine').setup({ - options = { theme = 'gruvbox' }, + options = { theme = 'gruvbox-baby' }, sections = { lualine_c = { 'getcwd' } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, }) diff --git a/lua/setup/my_gruvbox-baby.lua b/lua/setup/my_gruvbox-baby.lua new file mode 100644 index 0000000..ea8d35f --- /dev/null +++ b/lua/setup/my_gruvbox-baby.lua @@ -0,0 +1,2 @@ +vim.g.gruvbox_baby_telescope_theme = 1 +vim.cmd[[colorscheme gruvbox-baby]] -- 2.49.1 From 14fd19bde60ad534a945b618e9c6dfbab9c70e54 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 6 Aug 2022 18:46:41 +0200 Subject: [PATCH 167/894] more dap plugins --- lua/my_plugins.lua | 8 +++++++- lua/setup/my_dap.lua | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 02ac5d2..399ac8c 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -211,7 +211,13 @@ return require('packer').startup(function() } use { 'mfussenegger/nvim-dap', - requires = { 'mfussenegger/nvim-dap-python' }, + requires = { + 'mfussenegger/nvim-dap-python', + 'theHamsta/nvim-dap-virtual-text', + 'nvim-telescope/telescope-dap.nvim', + 'rcarriga/cmp-dap', + 'rcarriga/nvim-dap-ui' + }, config = get_setup('my_dap') } if packer_bootstrap then diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index e891040..7b9ba0d 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -47,4 +47,20 @@ vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) -- } require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') +table.insert(require('dap').configurations.python, { + -- type = 'python', + -- request = 'launch', + -- name = 'My custom launch configuration', + -- program = '${file}', + justMyCode = false + -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings +}) -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') +require("nvim-dap-virtual-text").setup() +require('telescope').load_extension('dap') +require("cmp").setup.filetype({ "dap-repl", "dapui_watches" }, { + sources = { + { name = "dap" }, + }, +}) +require("dapui").setup() -- 2.49.1 From 087e0faad2a69ba7f8ead469c8e25cb5a4252777 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 8 Aug 2022 10:00:45 +0200 Subject: [PATCH 168/894] added commands for font size --- lua/setup/my_command_center.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index 8f8a646..b62263d 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -234,6 +234,14 @@ command_center.add({ { 'n', 's', silent_noremap }, }, }, + { + description = 'Big font size', + cmd = 'set guifont=JetBrainsMonoNL\\ NF:h12', + }, + { + description = 'Reset font size', + cmd = 'set guifont=JetBrainsMonoNL\\ NF:h9', + }, }) -- 2.49.1 From 4a218024294c2477b8a364d715a0295658e2c58f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Aug 2022 14:17:01 +0200 Subject: [PATCH 169/894] added python debug session with venv search --- lua/setup/my_dap.lua | 69 +++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 7b9ba0d..1926e06 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -18,33 +18,48 @@ vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) -- detached = true; -- }; -- } --- dap.configurations.python = { --- { --- -- The first three options are required by nvim-dap --- type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` --- request = 'launch'; --- name = "Launch file"; --- --- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options --- --- program = "${file}"; -- This configuration will launch the current file if used. --- pythonPath = function() --- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. --- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. --- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. --- local venv = os.getenv("VIRTUAL_ENV") --- return string.format("%s\\bin\\python.exe",venv) --- -- local cwd = vim.fn.getcwd() --- -- if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then --- -- return cwd .. '/venv/bin/python' --- -- elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then --- -- return cwd .. '/.venv/bin/python' --- -- else --- -- return '/usr/bin/python' --- -- end --- end; --- }, --- } +local function getVenvSuffix() + if vim.loop.os_uname().sysname == 'Linux' then + return 'bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return 'Scripts/python.exe' + end +end + +function getPythonEnv() + + local venv = os.getenv("VIRTUAL_ENV") + if venv ~= nil then + return string.format("%s\\bin\\python.exe",venv) + end + + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/venv/' .. getVenvSuffix() + elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/.venv/' .. getVenvSuffix() + else + if vim.loop.os_uname().sysname == 'Linux' then + return '/usr/bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return os.getenv('SCOOP') .. '/apps/python/current/python.exe' + end + end +end + +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file with venv"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = getPythonEnv() + }, +} require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') table.insert(require('dap').configurations.python, { -- 2.49.1 From 1ba7731c16dd879f7c09de925abee4fe1e4c397d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Aug 2022 14:47:05 +0200 Subject: [PATCH 170/894] fixed visual selection in gruvbox baby --- lua/setup/my_gruvbox-baby.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/setup/my_gruvbox-baby.lua b/lua/setup/my_gruvbox-baby.lua index ea8d35f..fe8ce6c 100644 --- a/lua/setup/my_gruvbox-baby.lua +++ b/lua/setup/my_gruvbox-baby.lua @@ -1,2 +1,4 @@ vim.g.gruvbox_baby_telescope_theme = 1 +local colors = require("gruvbox-baby.colors").config() +vim.g.gruvbox_baby_highlights = {Visual = {bg = '#384741'}} vim.cmd[[colorscheme gruvbox-baby]] -- 2.49.1 From 382871be03e03b4d431bac12fb37cab30bc27d36 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Aug 2022 14:47:20 +0200 Subject: [PATCH 171/894] auto launch debug ui --- lua/setup/my_dap.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 1926e06..8a9fd20 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -18,6 +18,18 @@ vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) -- detached = true; -- }; -- } +local dap, dapui = require("dap"), require("dapui") +dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() +end +dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() +end +dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() +end + + local function getVenvSuffix() if vim.loop.os_uname().sysname == 'Linux' then return 'bin/python' -- 2.49.1 From 99e11393371c3dc6e003e8e3c89991958ee807ae Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Aug 2022 14:47:36 +0200 Subject: [PATCH 172/894] cleanup python debug config --- lua/setup/my_dap.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 8a9fd20..43bcf4a 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -61,15 +61,12 @@ end dap.configurations.python = { { - -- The first three options are required by nvim-dap - type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + type = 'python'; request = 'launch'; name = "Launch file with venv"; - - -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options - - program = "${file}"; -- This configuration will launch the current file if used. - pythonPath = getPythonEnv() + justMyCode = false; + program = "${file}"; + pythonPath = getPythonEnv(); }, } -- 2.49.1 From 54e6d1b8446b3f808149aa8a93c62156dfe89e41 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 31 Aug 2022 12:18:50 +0200 Subject: [PATCH 173/894] set capabilities correctly --- lua/setup/my_lspconfig.lua | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 1d6c835..6cbf883 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -20,6 +20,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { 'additionalTextEdits', }, } +capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do @@ -102,29 +103,34 @@ local on_attach = function(client, bufnr) end require('lspconfig')['pyright'].setup { + capabilities = capabilities, on_attach = on_attach, } require('lspconfig')['groovyls'].setup { + capabilities = capabilities, on_attach = on_attach, } require('lspconfig')['cmake'].setup { + capabilities = capabilities, on_attach = on_attach, } --- require('lspconfig')['clangd'].setup{ --- on_attach = on_attach, --- } -require('clangd_extensions').setup({ - server = { +require('lspconfig')['clangd'].setup{ + capabilities = capabilities, on_attach = on_attach, - capabilities = capabilities, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - }, -}) +} +-- require('clangd_extensions').setup({ +-- server = { +-- on_attach = on_attach, +-- capabilities = capabilities, +-- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, +-- }, +-- }) require('lspconfig')['jsonls'].setup { + capabilities = capabilities, on_attach = on_attach, } @@ -132,6 +138,7 @@ local lua_rtp = vim.split(package.path, ';') table.insert(lua_rtp, 'lua/?.lua') table.insert(lua_rtp, 'lua/?/init.lua') require('lspconfig').sumneko_lua.setup { + capabilities = capabilities, on_attach = on_attach, settings = { Lua = { @@ -158,10 +165,12 @@ require('lspconfig').sumneko_lua.setup { } require('lspconfig')['dockerls'].setup { + capabilities = capabilities, on_attach = on_attach, } require('lspconfig')['yamlls'].setup { + capabilities = capabilities, on_attach = on_attach, settings = { yaml = { -- 2.49.1 From 988db59976ca902aa59072a2a69f6654dffaf0e2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Sep 2022 08:35:10 +0200 Subject: [PATCH 174/894] fixed clangd search dir --- lua/setup/my_lspconfig.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 6cbf883..53e069b 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -119,7 +119,8 @@ require('lspconfig')['cmake'].setup { require('lspconfig')['clangd'].setup{ capabilities = capabilities, - on_attach = on_attach, + on_attach = on_attach, + cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, } -- require('clangd_extensions').setup({ -- server = { -- 2.49.1 From 652a1c2aa7510382aa323c0742ad77b31c1737d0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 13:41:12 +0200 Subject: [PATCH 175/894] fixed dap python config --- lua/setup/my_dap.lua | 79 +++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 43bcf4a..a7b6a52 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -6,18 +6,19 @@ vim.keymap.set('n', '', ":lua require('dap').toggle_breakpoint()", opts) vim.keymap.set('n', '', ":lua require('dap').step_over()", opts) vim.keymap.set('n', '', ":lua require('dap').step_into()", opts) vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) --- vim.keymap.set('n', '', dap.step_over(), opts) --- vim.keymap.set('n', '', dap.step_into(), opts) --- vim.keymap.set('n', '', dap.step_out(), opts) --- dap.adapters.python = { --- type = 'executable'; --- command = 'C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python'; --- args = { '-m', 'debugpy.adapter' }; --- options = { --- detached = true; --- }; --- } +local initDir = vim.api.nvim_list_runtime_paths()[1] + +-- PYTHON +dap.adapters.python = { + type = 'executable'; + command = initDir .. '/venv_debugpy/Scripts/python'; + args = { '-m', 'debugpy.adapter' }; + options = { + detached = true; + }; +} + local dap, dapui = require("dap"), require("dapui") dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() @@ -29,7 +30,6 @@ dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end - local function getVenvSuffix() if vim.loop.os_uname().sysname == 'Linux' then return 'bin/python' @@ -38,11 +38,10 @@ local function getVenvSuffix() end end -function getPythonEnv() - +local function getPythonEnv() local venv = os.getenv("VIRTUAL_ENV") if venv ~= nil then - return string.format("%s\\bin\\python.exe",venv) + return string.format("%s\\bin\\python.exe", venv) end local cwd = vim.fn.getcwd() @@ -66,25 +65,45 @@ dap.configurations.python = { name = "Launch file with venv"; justMyCode = false; program = "${file}"; - pythonPath = getPythonEnv(); + pythonPath = function() + return getPythonEnv() + end; }, } -require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') -table.insert(require('dap').configurations.python, { - -- type = 'python', - -- request = 'launch', - -- name = 'My custom launch configuration', - -- program = '${file}', - justMyCode = false - -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings -}) +-- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') +-- table.insert(require('dap').configurations.python, { +-- -- type = 'python', +-- -- request = 'launch', +-- -- name = 'My custom launch configuration', +-- -- program = '${file}', +-- justMyCode = false +-- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings +-- }) -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') + +-- CPP +dap.adapters.codelldb = { + type = 'server', + port = "${port}", + executable = { + -- CHANGE THIS to your path! + command = '/absolute/path/to/codelldb/extension/adapter/codelldb', + args = { '--port', '${port}' }, + + -- On windows you may have to uncomment this: + -- detached = false, + } +} + + +-- EXTENSIONS + require("nvim-dap-virtual-text").setup() require('telescope').load_extension('dap') -require("cmp").setup.filetype({ "dap-repl", "dapui_watches" }, { - sources = { - { name = "dap" }, - }, -}) +-- require("cmp").setup.filetype({ "dap-repl", "dapui_watches" }, { +-- sources = { +-- { name = "dap" }, +-- }, +-- }) require("dapui").setup() -- 2.49.1 From 41ce8f206357f5a441d24764f3462594b75fe93d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 14:04:07 +0200 Subject: [PATCH 176/894] use debugpy from mason --- lua/setup/my_dap.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index a7b6a52..4fdcc04 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -8,11 +8,20 @@ vim.keymap.set('n', '', ":lua require('dap').step_into()", opts) vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) local initDir = vim.api.nvim_list_runtime_paths()[1] +local masonpath = vim.fn.stdpath('data') .. '/mason' -- PYTHON +local function getVenvSuffix() + if vim.loop.os_uname().sysname == 'Linux' then + return 'bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return 'Scripts/python.exe' + end +end + dap.adapters.python = { type = 'executable'; - command = initDir .. '/venv_debugpy/Scripts/python'; + command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix(); args = { '-m', 'debugpy.adapter' }; options = { detached = true; @@ -30,14 +39,6 @@ dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end -local function getVenvSuffix() - if vim.loop.os_uname().sysname == 'Linux' then - return 'bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return 'Scripts/python.exe' - end -end - local function getPythonEnv() local venv = os.getenv("VIRTUAL_ENV") if venv ~= nil then -- 2.49.1 From ebd55ecc5592c394404265ee31da3cc8b75d5951 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 19:18:09 +0200 Subject: [PATCH 177/894] correctly call getpythonenv --- lua/setup/my_dap.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 4fdcc04..fda0de0 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -66,9 +66,7 @@ dap.configurations.python = { name = "Launch file with venv"; justMyCode = false; program = "${file}"; - pythonPath = function() - return getPythonEnv() - end; + pythonPath = getPythonEnv }, } -- 2.49.1 From 59d9b95eb92c5a871e5eddd41fad98d4ec9231ad Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 19:18:29 +0200 Subject: [PATCH 178/894] add cpp config and fix adapter --- lua/setup/my_dap.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index fda0de0..6318265 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -87,14 +87,26 @@ dap.adapters.codelldb = { port = "${port}", executable = { -- CHANGE THIS to your path! - command = '/absolute/path/to/codelldb/extension/adapter/codelldb', + command = masonpath .. '/bin/codelldb.cmd', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: - -- detached = false, + detached = false, } } +dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = true, + }, +} -- EXTENSIONS -- 2.49.1 From e6d1091430de0a7f2dfa8bcac9f45412e8af86a4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 19:20:19 +0200 Subject: [PATCH 179/894] map build to f4 --- lua/setup/my_command_center.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index b62263d..d371965 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -48,7 +48,7 @@ command_center.add({ description = 'CMake build selected target', cmd = 'CMake build', keybindings = { - { 'n', '', silent_noremap }, + { 'n', '', silent_noremap }, }, }, { -- 2.49.1 From e72eaa724efb42c7f1c60a008c1dc28569c268b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 19:54:12 +0200 Subject: [PATCH 180/894] added lldb-vscode adapter --- lua/setup/my_dap.lua | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 6318265..a031857 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -95,19 +95,52 @@ dap.adapters.codelldb = { } } +dap.adapters.lldb = { + type = 'executable', + command = os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe', + name = 'lldb' +} + dap.configurations.cpp = { { - name = "Launch file", + name = "Launch codelldb", type = "codelldb", request = "launch", program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') end, cwd = '${workspaceFolder}', stopOnEntry = true, }, } +dap.configurations.cpp = { + { + name = 'Launch lldb', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + args = {}, + + -- 💀 + -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: + -- + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + -- + -- Otherwise you might get the following error: + -- + -- Error on launch: Failed to attach to the target process + -- + -- But you should be aware of the implications: + -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html + -- runInTerminal = false, + }, +} + -- EXTENSIONS require("nvim-dap-virtual-text").setup() -- 2.49.1 From c19072c4cd1d52551a48ce900b1b952300a11d5c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Sep 2022 20:51:18 +0200 Subject: [PATCH 181/894] winbar only with nvim ^>= 0.8 --- lua/my_options.lua | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index b0401bd..73e138d 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -61,21 +61,23 @@ opt.foldlevel = 20 opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' -local function status_line() - local file_name = "%-.32t" - local modified = " %-m" - local right_align = "%=" - local line_no = "%10([%l/%L%)]" - local pct_thru_file = "%5p%%" +if vim.version().minor >= 8 then + local function status_line() + local file_name = "%-.32t" + local modified = " %-m" + local right_align = "%=" + local line_no = "%10([%l/%L%)]" + local pct_thru_file = "%5p%%" - return string.format( - "%s%s%s%s%s", - file_name, - modified, - right_align, - line_no, - pct_thru_file - ) + return string.format( + "%s%s%s%s%s", + file_name, + modified, + right_align, + line_no, + pct_thru_file + ) + end + + opt.winbar = status_line() end - -opt.winbar = status_line() -- 2.49.1 From 612ec0cbe6a37cc23815f0408fb4a774597b595c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Sep 2022 13:39:45 +0200 Subject: [PATCH 182/894] some more fixes for different nvim versions --- lua/my_options.lua | 21 --------------------- lua/setup/lualine.lua | 38 +++++++++++++++++++++++++++++++++----- lua/setup/my_lspconfig.lua | 6 +++++- 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a/lua/my_options.lua b/lua/my_options.lua index 73e138d..dc33c6b 100644 --- a/lua/my_options.lua +++ b/lua/my_options.lua @@ -47,7 +47,6 @@ opt.expandtab= true opt.smartindent= true opt.title = true opt.titlestring = '%{getcwd()} - %t' -opt.laststatus = 3 -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line @@ -61,23 +60,3 @@ opt.foldlevel = 20 opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' -if vim.version().minor >= 8 then - local function status_line() - local file_name = "%-.32t" - local modified = " %-m" - local right_align = "%=" - local line_no = "%10([%l/%L%)]" - local pct_thru_file = "%5p%%" - - return string.format( - "%s%s%s%s%s", - file_name, - modified, - right_align, - line_no, - pct_thru_file - ) - end - - opt.winbar = status_line() -end diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index 2ae1bd9..ebe45d2 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,6 +1,34 @@ +if vim.version().minor >= 8 then + local function status_line() + local file_name = "%-.32t" + local modified = " %-m" + local right_align = "%=" + local line_no = "%10([%l/%L%)]" + local pct_thru_file = "%5p%%" -require('lualine').setup({ - options = { theme = 'gruvbox-baby' }, - sections = { lualine_c = { 'getcwd' } }, - inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, -}) + return string.format( + "%s%s%s%s%s", + file_name, + modified, + right_align, + line_no, + pct_thru_file + ) + end + + vim.opt.laststatus = 3 + vim.opt.winbar = status_line() + require('lualine').setup({ + options = { theme = 'gruvbox-baby' }, + sections = { lualine_c = { 'getcwd' } }, + inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + globalstatus = true, + }) +else + require('lualine').setup({ + options = { theme = 'gruvbox-baby' }, + sections = { lualine_c = { 'filename' } }, + globalstatus = false, + -- inactive_sections = { lualine_c = { 'filename' } }, + }) +end diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 53e069b..98bd57f 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -63,7 +63,11 @@ local on_attach = function(client, bufnr) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) + if vim.version().minor >= 8 then + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) + else + vim.keymap.set('n', 'f', vim.lsp.buf.formatting, opts) + end end if client.server_capabilities.documentRangeFormattingProvider then vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) -- 2.49.1 From 774fdda9693422e75125002d8a48152ffa1e3837 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 15 Sep 2022 09:25:58 +0200 Subject: [PATCH 183/894] added diffview --- lua/my_plugins.lua | 5 +++++ lua/setup/my_diffview.lua | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 lua/setup/my_diffview.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 399ac8c..0fde1b9 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -220,6 +220,11 @@ return require('packer').startup(function() }, config = get_setup('my_dap') } + use { + 'sindrets/diffview.nvim', + requires = 'nvim-lua/plenary.nvim', + config = get_setup('my_diffview') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/setup/my_diffview.lua b/lua/setup/my_diffview.lua new file mode 100644 index 0000000..eedf472 --- /dev/null +++ b/lua/setup/my_diffview.lua @@ -0,0 +1,3 @@ +local actions = require("diffview.actions") + +require("diffview").setup({}) -- 2.49.1 From e32ff73562c72ad9cec874afad3365812dfbecd5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 15 Sep 2022 09:30:17 +0200 Subject: [PATCH 184/894] fixed fzf build by using Ninja --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 0fde1b9..b8d9226 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -46,7 +46,7 @@ return require('packer').startup(function() { 'nvim-lua/plenary.nvim' }, { 'kyazdani42/nvim-web-devicons' }, { 'nvim-telescope/telescope-fzf-native.nvim', - run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, + run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build --config Release && cmake --install build --prefix build' }, }, config = get_setup('telescope'), }) -- 2.49.1 From 4c9b01654079fe18abb8a6dd2cc5199568fcf745 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 15 Sep 2022 09:31:35 +0200 Subject: [PATCH 185/894] added working.json --- snapshots/working.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 snapshots/working.json diff --git a/snapshots/working.json b/snapshots/working.json new file mode 100644 index 0000000..a20323d --- /dev/null +++ b/snapshots/working.json @@ -0,0 +1 @@ +{"litee.nvim": {"commit": "d346001"}, "nvim-dap": {"commit": "66d33b7"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "afab895"}, "nvim-lspconfig": {"commit": "a78831f"}, "command-center.nvim": {"commit": "31468fd"}, "clangd_extensions.nvim": {"commit": "2390bf7"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "null-ls.nvim": {"commit": "53622ed"}, "mason-lspconfig.nvim": {"commit": "3cbd87f"}, "lualine.nvim": {"commit": "4b5048a"}, "cmp-cmdline": {"commit": "9c0e331"}, "hlargs.nvim": {"commit": "f603d88"}, "aerial.nvim": {"commit": "1abd19b"}, "nvim-autopairs": {"commit": "ca89ab9"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "7339def"}, "leap.nvim": {"commit": "b9bc061"}, "gitsigns.nvim": {"commit": "1e107c9"}, "dressing.nvim": {"commit": "d886a1b"}, "indent-blankline.nvim": {"commit": "c15bbe9"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "a922c3a"}, "cmp-nvim-lsp-signature-help": {"commit": "57c4db7"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "4725867"}, "litee-calltree.nvim": {"commit": "7779988"}, "lsp_signature.nvim": {"commit": "4665921"}, "Comment.nvim": {"commit": "fe9bbdb"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "d55f095"}, "mason.nvim": {"commit": "6171213"}, "gh.nvim": {"commit": "a675ce6"}, "nvim-treesitter-textobjects": {"commit": "b8df8b0"}, "neovim-cmake": {"commit": "338fd2a"}, "cmp-nvim-lsp": {"commit": "affe808"}, "LuaSnip": {"commit": "c599c56"}, "nvim-dap-ui": {"commit": "225115a"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "426d4db"}, "nvim-web-devicons": {"commit": "2d02a56"}, "vim-repeat": {"commit": "24afe92"}, "cmp-dap": {"commit": "e21f0e5"}, "nvim-treesitter": {"commit": "501db14"}, "nui.nvim": {"commit": "9531977"}, "nvim-terminal": {"commit": "e058de4"}, "gruvbox-baby": {"commit": "a7dd15a"}, "cmp-emoji": {"commit": "19075c3"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "project.nvim": {"commit": "090bb11"}, "cmp-calc": {"commit": "f7efc20"}, "nvim-dap-python": {"commit": "86d2636"}, "toggleterm.nvim": {"commit": "dfce846"}, "plenary.nvim": {"commit": "31807ee"}, "nvim-cmp": {"commit": "b588569"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "cmp-path": {"commit": "447c87c"}, "nvim-ts-rainbow": {"commit": "d16220f"}, "cmp-nvim-lua": {"commit": "d276254"}, "cmp-buffer": {"commit": "62fc67a"}} -- 2.49.1 From a24b928433a9f1104a4a95a1d110f6bee42ddc22 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 16 Sep 2022 10:00:37 +0200 Subject: [PATCH 186/894] fixed comment shortcut --- lua/setup/my_command_center.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index d371965..bcdaa85 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -212,7 +212,7 @@ command_center.add({ }, { description = 'Comment line', - cmd = '(comment_toggle_current_linewise)', + cmd = '(comment_toggle_linewise_current)', keybindings = { { 'n', '', silent_noremap }, { 'n', '', silent_noremap }, -- 2.49.1 From a85b6341107c2558f90234774d3111dda59f52c2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 16 Sep 2022 10:18:07 +0200 Subject: [PATCH 187/894] fixed range formatting with ^>= 0.8 --- lua/setup/my_lspconfig.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 98bd57f..0bccc9a 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -70,7 +70,11 @@ local on_attach = function(client, bufnr) end end if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) + if vim.version().minor >= 8 then + vim.keymap.set('v', 'f', vim.lsp.buf.format, opts) + else + vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) + end end -- Set autocommands conditional on server_capabilities -- 2.49.1 From 0115553f37abff863166c28891bf8619c9c6920b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Sep 2022 10:49:04 +0200 Subject: [PATCH 188/894] make sure to set the leader in the beginning --- init.lua | 1 + lua/my_keymappings.lua | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e35c0ad..68dab0e 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +vim.g.mapleader = ',' require('my_plugins') require('my_keymappings') require('my_options') diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 5e750c0..3496eee 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,4 +1,3 @@ -vim.g.mapleader = ',' local opts = { noremap = true, silent = true } vim.keymap.set('n', '', 'nil', opts) -- 2.49.1 From 48acab5f4bb8268fb3b55efbbc9115044842187d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Sep 2022 10:50:43 +0200 Subject: [PATCH 189/894] format lsp config file --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 0bccc9a..d38fc6c 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -125,7 +125,7 @@ require('lspconfig')['cmake'].setup { on_attach = on_attach, } -require('lspconfig')['clangd'].setup{ +require('lspconfig')['clangd'].setup { capabilities = capabilities, on_attach = on_attach, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, -- 2.49.1 From 4ba64948eb18d6225869e13816f062012a064afe Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Sep 2022 10:51:40 +0200 Subject: [PATCH 190/894] formatted plugins file --- lua/my_plugins.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index b8d9226..9cd3bd4 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -220,11 +220,11 @@ return require('packer').startup(function() }, config = get_setup('my_dap') } - use { - 'sindrets/diffview.nvim', - requires = 'nvim-lua/plenary.nvim', - config = get_setup('my_diffview') - } + use { + 'sindrets/diffview.nvim', + requires = 'nvim-lua/plenary.nvim', + config = get_setup('my_diffview') + } if packer_bootstrap then require('packer').sync() end -- 2.49.1 From 89b1d534515d0c58a5fc1089e1741aa32b96e836 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Sep 2022 10:51:56 +0200 Subject: [PATCH 191/894] use lualine for winbar --- lua/setup/lualine.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index ebe45d2..5eaf810 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -17,12 +17,28 @@ if vim.version().minor >= 8 then end vim.opt.laststatus = 3 - vim.opt.winbar = status_line() + -- vim.opt.winbar = status_line() require('lualine').setup({ options = { theme = 'gruvbox-baby' }, - sections = { lualine_c = { 'getcwd' } }, + sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, globalstatus = true, + winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + inactive_winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, }) else require('lualine').setup({ -- 2.49.1 From 827adacc689e632e4001ca7b02cecbcdf8024701 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 15:38:02 +0200 Subject: [PATCH 192/894] clangd root dir detection with build_nvim --- lua/setup/my_lspconfig.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index d38fc6c..7ec3cff 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -129,6 +129,16 @@ require('lspconfig')['clangd'].setup { capabilities = capabilities, on_attach = on_attach, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + root_dir = require('lspconfig').util.root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim' + ) } -- require('clangd_extensions').setup({ -- server = { -- 2.49.1 From b4d08255a527754e8a593c90bfb093d532512020 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 15:38:25 +0200 Subject: [PATCH 193/894] enable old gruvbox again --- lua/my_plugins.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9cd3bd4..23e7780 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -56,14 +56,14 @@ return require('packer').startup(function() config = get_setup('my_gruvbox-material') }) use({ - 'ellisonleao/gruvbox.nvim', + 'luisiacc/gruvbox-baby', disable = true, - config = get_setup('gruvbox'), + config = get_setup('my_gruvbox-baby') }) use({ - 'luisiacc/gruvbox-baby', + 'ellisonleao/gruvbox.nvim', disable = false, - config = get_setup('my_gruvbox-baby') + config = get_setup('gruvbox'), }) use({ 'lukas-reineke/indent-blankline.nvim', -- 2.49.1 From dbfd744f97bccf2cf356fb9a2e3c25ade8702fe6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 15:38:52 +0200 Subject: [PATCH 194/894] also let project plugin detect build_nvim --- lua/setup/project.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 4140e8f..0edc6c7 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,5 +1,6 @@ -require('project_nvim').setup({ - silent_chdir = true, - ignore_lsp = { 'null-ls', 'cmake' }, -}) -require('telescope').load_extension('projects') +require('project_nvim').setup({ + silent_chdir = true, + ignore_lsp = { 'null-ls', 'cmake' }, + patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim" }, +}) +require('telescope').load_extension('projects') -- 2.49.1 From d3e3bbc9033c484630e0134ee905618649252988 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 18:52:15 +0200 Subject: [PATCH 195/894] disable everything for vscode --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 68dab0e..496a039 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,7 @@ vim.g.mapleader = ',' -require('my_plugins') -require('my_keymappings') -require('my_options') -require('my_autocommands') +if not vim.g.vscode then + require('my_plugins') + require('my_keymappings') + require('my_options') + require('my_autocommands') +end -- 2.49.1 From 67067bde77cd4bd2925d2ae1bd91d0eb578a00e1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 20:39:35 +0200 Subject: [PATCH 196/894] set lualine theme to gruvbox --- lua/setup/lualine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index 5eaf810..b425551 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -19,7 +19,7 @@ if vim.version().minor >= 8 then vim.opt.laststatus = 3 -- vim.opt.winbar = status_line() require('lualine').setup({ - options = { theme = 'gruvbox-baby' }, + options = { theme = 'gruvbox' }, sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, globalstatus = true, @@ -42,7 +42,7 @@ if vim.version().minor >= 8 then }) else require('lualine').setup({ - options = { theme = 'gruvbox-baby' }, + options = { theme = 'gruvbox' }, sections = { lualine_c = { 'filename' } }, globalstatus = false, -- inactive_sections = { lualine_c = { 'filename' } }, -- 2.49.1 From ea6e95aca822b61aa0ca0f8337b099c27972730c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Sep 2022 20:40:05 +0200 Subject: [PATCH 197/894] disable litee --- lua/my_plugins.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 23e7780..d9d3bf5 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -188,6 +188,7 @@ return require('packer').startup(function() }) use { 'ldelossa/litee.nvim', + disable = true, requires = { 'ldelossa/litee-calltree.nvim', 'ldelossa/litee-symboltree.nvim', -- 2.49.1 From a3942972d8c39e5a2877e2f10be91ff8cc816c78 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Sep 2022 09:07:15 +0200 Subject: [PATCH 198/894] fixed linux dap config --- lua/setup/my_dap.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index a031857..53b41ce 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -97,7 +97,13 @@ dap.adapters.codelldb = { dap.adapters.lldb = { type = 'executable', - command = os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe', + command = function() + if vim.loop.os_uname().sysname == 'Linux' then + return 'lldb-vscode' + else + return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' + end + end, name = 'lldb' } -- 2.49.1 From a7a5a41f8da627f3746af916c860b796a37635b3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Sep 2022 09:11:34 +0200 Subject: [PATCH 199/894] more detection methods for project plugin --- lua/setup/project.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 0edc6c7..0e735ff 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -1,6 +1,6 @@ require('project_nvim').setup({ silent_chdir = true, ignore_lsp = { 'null-ls', 'cmake' }, - patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim" }, + patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, }) require('telescope').load_extension('projects') -- 2.49.1 From 7e31d668ee9ecd58850543f9f9e48c42993c25da Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Sep 2022 13:36:14 +0200 Subject: [PATCH 200/894] fixed highlight groups for lsp highlight --- lua/setup/my_lspconfig.lua | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 7ec3cff..dbc1a29 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -79,11 +79,28 @@ local on_attach = function(client, bufnr) -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_exec( - [[ - hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen - hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed - ]], false) + vim.api.nvim_set_hl( + 0, + "LspReferenceText", + { bold = true, + ctermbg = 'red', + bg = 'DarkOrange', + fg = 'black' } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceRead", + { bold = true, + ctermbg = 'red', + bg = 'DarkGreen' } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceWrite", + { bold = true, + ctermbg = 'red', + bg = 'DarkRed' } + ) 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", { -- 2.49.1 From 74e6cc3bb452b2e6149c3a5eec56c91166ab0a88 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Sep 2022 13:45:33 +0200 Subject: [PATCH 201/894] fixed color for text highlight --- lua/setup/my_lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index dbc1a29..b2c4c28 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -79,13 +79,13 @@ local on_attach = function(client, bufnr) -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then + local colors = require('gruvbox.palette') vim.api.nvim_set_hl( 0, "LspReferenceText", { bold = true, ctermbg = 'red', - bg = 'DarkOrange', - fg = 'black' } + bg = colors.dark3 } ) vim.api.nvim_set_hl( 0, -- 2.49.1 From f9d34430aec54f19d614eac926e6da0108b4bd5f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Oct 2022 21:27:44 +0200 Subject: [PATCH 202/894] removed workarounds for old vim version --- lua/setup/lualine.lua | 73 ++++++++++++-------------------------- lua/setup/my_lspconfig.lua | 12 ++----- 2 files changed, 25 insertions(+), 60 deletions(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index b425551..a097b6f 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,50 +1,23 @@ -if vim.version().minor >= 8 then - local function status_line() - local file_name = "%-.32t" - local modified = " %-m" - local right_align = "%=" - local line_no = "%10([%l/%L%)]" - local pct_thru_file = "%5p%%" - - return string.format( - "%s%s%s%s%s", - file_name, - modified, - right_align, - line_no, - pct_thru_file - ) - end - - vim.opt.laststatus = 3 - -- vim.opt.winbar = status_line() - require('lualine').setup({ - options = { theme = 'gruvbox' }, - sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - globalstatus = true, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - }) -else - require('lualine').setup({ - options = { theme = 'gruvbox' }, - sections = { lualine_c = { 'filename' } }, - globalstatus = false, - -- inactive_sections = { lualine_c = { 'filename' } }, - }) -end +vim.opt.laststatus = 3 +require('lualine').setup({ + options = { theme = 'gruvbox' }, + sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + globalstatus = true, + winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + inactive_winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, +}) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 7ec3cff..b358981 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -63,18 +63,10 @@ local on_attach = function(client, bufnr) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - if vim.version().minor >= 8 then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) - else - vim.keymap.set('n', 'f', vim.lsp.buf.formatting, opts) - end + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) end if client.server_capabilities.documentRangeFormattingProvider then - if vim.version().minor >= 8 then - vim.keymap.set('v', 'f', vim.lsp.buf.format, opts) - else - vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) - end + vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) end -- Set autocommands conditional on server_capabilities -- 2.49.1 From d91ae17970e3b4bce275ab1a74c51af07949cadd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 11:52:28 +0200 Subject: [PATCH 203/894] fixed highlight keymapping --- lua/my_keymappings.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 3496eee..6b4405c 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -25,10 +25,14 @@ vim.keymap.set({ 'n', 'x' }, '', 'g', opts) vim.keymap.set('x', '<', '', '>gv') +local function hlWord() + local current_word = vim.call('expand','') + vim.fn.setreg('/', current_word) + vim.api.nvim_command "set hlsearch" +end -- Highlight word under cursor -vim.keymap.set('n', "'", ':let @/=\'\\<=expand("")\\>\':set hls', { noremap = true, silent = true }) --- vim.keymap.set('v', "'", "y:let @/='=escape(@\",'/\\')':set hls") -vim.keymap.set('x', "'", "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) +vim.keymap.set('n', "'", hlWord, { noremap = true, silent = false }) +vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true }) -- Close Buffer vim.keymap.set('n', '', ':bd') -- 2.49.1 From edc73d36390f43af979be62a67ab3180d58da4fd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 11:53:26 +0200 Subject: [PATCH 204/894] small fix for highlight word --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 6b4405c..24fcd6f 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -27,7 +27,7 @@ vim.keymap.set('x', '>', '>gv') local function hlWord() local current_word = vim.call('expand','') - vim.fn.setreg('/', current_word) + vim.fn.setreg('/', "\\<" .. current_word .. "\\>") vim.api.nvim_command "set hlsearch" end -- Highlight word under cursor -- 2.49.1 From 739b2154eb95f37526176d0f58351382578e0fb0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 11:59:35 +0200 Subject: [PATCH 205/894] use more lua functions --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 24fcd6f..f161bbb 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -28,7 +28,7 @@ vim.keymap.set('x', '>', '>gv') local function hlWord() local current_word = vim.call('expand','') vim.fn.setreg('/', "\\<" .. current_word .. "\\>") - vim.api.nvim_command "set hlsearch" + vim.opt.hlsearch = true end -- Highlight word under cursor vim.keymap.set('n', "'", hlWord, { noremap = true, silent = false }) -- 2.49.1 From 570b9fe329385c1b31d108dbf7036c023fcf3e69 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 12:02:21 +0200 Subject: [PATCH 206/894] highlight word to silent --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index f161bbb..f93b93a 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -31,7 +31,7 @@ local function hlWord() vim.opt.hlsearch = true end -- Highlight word under cursor -vim.keymap.set('n', "'", hlWord, { noremap = true, silent = false }) +vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true }) vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true }) -- Close Buffer -- 2.49.1 From d0c31ea3b73e0c9db1bcecf31c6fec3a1052b4b6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 19:36:13 +0200 Subject: [PATCH 207/894] lazy loading of dap and cmake --- lua/my_plugins.lua | 35 +++++++++++++++++++++++++++++------ lua/setup/my_dap.lua | 19 +++++++++++-------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index d9d3bf5..f8d5a50 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -105,12 +105,19 @@ return require('packer').startup(function() { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'p00f/clangd_extensions.nvim' }, }, + as = 'cmp', config = get_setup('cmp'), }) use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) - use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') }) + use({ 'Shatur/neovim-cmake', + requires = { 'mfussenegger/nvim-dap' }, + config = get_setup('cmake'), + opt = true, + module = 'cmake', + cmd = 'CMake' + }) use({ 'hoob3rt/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }, @@ -214,12 +221,28 @@ return require('packer').startup(function() 'mfussenegger/nvim-dap', requires = { 'mfussenegger/nvim-dap-python', - 'theHamsta/nvim-dap-virtual-text', - 'nvim-telescope/telescope-dap.nvim', - 'rcarriga/cmp-dap', - 'rcarriga/nvim-dap-ui' + { + 'theHamsta/nvim-dap-virtual-text', + module = 'nvim-dap-virtual-text' + }, + { + 'nvim-telescope/telescope-dap.nvim', + module = 'telescope._extensions.dap', + requires = 'telescope.nvim', + }, + { + 'rcarriga/cmp-dap', + requires = 'cmp' + }, + { + 'rcarriga/nvim-dap-ui', + module = 'dapui' + }, }, - config = get_setup('my_dap') + keys = { '', '' }, + module = 'dap', + config = get_setup('my_dap'), + opt = true, } use { 'sindrets/diffview.nvim', diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 53b41ce..b4f38a9 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,4 +1,5 @@ dap = require('dap') + local opts = { noremap = true, silent = false } -- vim.keymap.set('n', '', dap.continue(), opts) vim.keymap.set('n', '', ":lua require('dap').continue()", opts) @@ -28,7 +29,9 @@ dap.adapters.python = { }; } -local dap, dapui = require("dap"), require("dapui") +local dap= require("dap") +local dapui = require("dapui") +dapui.setup() dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() end @@ -149,11 +152,11 @@ dap.configurations.cpp = { -- EXTENSIONS -require("nvim-dap-virtual-text").setup() +require('nvim-dap-virtual-text').setup() require('telescope').load_extension('dap') --- require("cmp").setup.filetype({ "dap-repl", "dapui_watches" }, { --- sources = { --- { name = "dap" }, --- }, --- }) -require("dapui").setup() +require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { + sources = { + { name = 'dap' }, + }, +}) + -- 2.49.1 From 7629d6d57efc0472f18b732bf4c88eeea3e5bff0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 19:36:26 +0200 Subject: [PATCH 208/894] fixed format mode --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index b358981..4ed5411 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -66,7 +66,7 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) end if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) + vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) end -- Set autocommands conditional on server_capabilities -- 2.49.1 From 1e8201cd13ddc16e83d461cdb56114a3e1958219 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 22:26:37 +0200 Subject: [PATCH 209/894] lazy loading aerial --- lua/my_plugins.lua | 9 ++++++++- lua/setup/aerial.lua | 1 + lua/setup/telescope.lua | 1 - 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index f8d5a50..34c41cd 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -205,7 +205,14 @@ return require('packer').startup(function() } use { 'stevearc/aerial.nvim', - config = get_setup('aerial') + requires = { + 'telescope' + }, + config = get_setup('aerial'), + opt = true, + keys = { 's', 's' }, + module = 'aerial', + cmd = 'AerialToggle' } use { 'm-demare/hlargs.nvim', diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua index 2ddd243..a6be18f 100644 --- a/lua/setup/aerial.lua +++ b/lua/setup/aerial.lua @@ -4,3 +4,4 @@ require('aerial').setup({ filter_kind = false, show_guides = true, }) +require('telescope').load_extension('aerial') diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index c452716..f18d02f 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -49,4 +49,3 @@ require('telescope').setup({ }) require('telescope').load_extension('fzf') -require('telescope').load_extension('aerial') -- 2.49.1 From 3272e4067f6f851d378fe4f3a42964529d163c6c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 22:30:42 +0200 Subject: [PATCH 210/894] lazy load diffview --- lua/my_plugins.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 34c41cd..4c76dff 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -254,7 +254,10 @@ return require('packer').startup(function() use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim', - config = get_setup('my_diffview') + config = get_setup('my_diffview'), + opt = true, + cmd = 'DiffviewOpen', + module = { 'diffview', 'diffview.actions' } } if packer_bootstrap then require('packer').sync() -- 2.49.1 From 5b6ae547637c45adf07ecdcf07e2667ead19823d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 22:45:52 +0200 Subject: [PATCH 211/894] fixed aerial config --- lua/my_plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 4c76dff..9ecd2dd 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -206,7 +206,7 @@ return require('packer').startup(function() use { 'stevearc/aerial.nvim', requires = { - 'telescope' + 'nvim-telescope/telescope.nvim' }, config = get_setup('aerial'), opt = true, -- 2.49.1 From e2460a24252fd8af5cf2aa1611f97d0b384cf352 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Oct 2022 23:43:19 +0200 Subject: [PATCH 212/894] source selector for neo tree --- lua/setup/neo-tree.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index 94d38f5..bf78d31 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -47,5 +47,9 @@ require('neo-tree').setup({ hide_gitignored = false, }, }, + source_selector = { + winbar = true, + statusline = false + } }) vim.keymap.set('n', '\\', 'Neotree reveal') -- 2.49.1 From db1ad041ab3ca909c535e264962591e769f78c2b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Sep 2022 13:25:25 +0200 Subject: [PATCH 213/894] update nvim tree config --- lua/setup/nvim-tree.lua | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua index 3295d15..fa7bca7 100644 --- a/lua/setup/nvim-tree.lua +++ b/lua/setup/nvim-tree.lua @@ -1,27 +1,7 @@ -require('nvim-tree').setup({ - auto_close = true, - update_cwd = true, - update_to_buf_dir = { - -- enable the feature - enable = true, - -- allow to open the tree if it was previously closed - auto_open = false, - }, - update_focused_file = { - enable = true, - update_cwd = false, - ignore_list = {}, - }, - diagnostics = { - enable = true, - icons = { - hint = '', - info = '', - warning = '', - error = '', - }, - }, -}) -vim.keymap.set('n', 'tt', 'NvimTreeToggle') -vim.g.nvim_tree_highlight_opened_files = 1 -vim.g.nvim_tree_respect_buf_cwd = 1 +-- disable netrw at the very start of your init.lua (strongly advised) +vim.g.loaded = 1 +vim.g.loaded_netrwPlugin = 1 + +-- empty setup using defaults +require('nvim-tree').setup() +vim.keymap.set('n', '\\', 'NvimTreeToggle') -- 2.49.1 From 518f32d3bb2e32e44f0728a3a919a01e5fd6935a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 12:50:37 +0200 Subject: [PATCH 214/894] code format --- lua/setup/my_command_center.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index bcdaa85..6a6a0a9 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -6,8 +6,8 @@ local silent_noremap = { noremap = true, silent = true } project_files = function() local opts = {} -- define here if you want to define something - local ok = pcall(require"telescope.builtin".git_files, opts) - if not ok then require"telescope.builtin".find_files(opts) end + local ok = pcall(require "telescope.builtin".git_files, opts) + if not ok then require "telescope.builtin".find_files(opts) end end command_center.add({ @@ -230,8 +230,8 @@ command_center.add({ description = 'Symbols outline', cmd = 'AerialToggle', keybindings = { - { 'n', 's', silent_noremap }, - { 'n', 's', silent_noremap }, + { 'n', 's', silent_noremap }, + { 'n', 's', silent_noremap }, }, }, { @@ -243,7 +243,3 @@ command_center.add({ cmd = 'set guifont=JetBrainsMonoNL\\ NF:h9', }, }) - - - - -- 2.49.1 From 8ea3ed7a7963a452ac5dcb17ea6118e44b70d3d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 13:03:50 +0200 Subject: [PATCH 215/894] disable git for neo-tree --- lua/setup/neo-tree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index bf78d31..309ed03 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -18,6 +18,7 @@ require('neo-tree').setup({ -- you can also specify border here, if you want a different setting from -- the global popup_border_style. }, + enable_git_status = false, -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. -- You can also create your own commands by providing a function instead of a string. mappings = { -- 2.49.1 From 0dfcf42bebf543df571d03c33bcff98f1df1d151 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 13:04:04 +0200 Subject: [PATCH 216/894] fixed deprecated in lsp confiog --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index e48dd65..e1d297d 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -20,7 +20,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { 'additionalTextEdits', }, } -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) +capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do -- 2.49.1 From 3d0b66c7ab175c0b32feb808199bd37f946bc659 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Oct 2022 09:43:44 +0200 Subject: [PATCH 217/894] try to set the width for float popup --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index e48dd65..6bf931c 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -28,7 +28,7 @@ OpenDiagFloat = function() return end end - vim.diagnostic.open_float({ focusable = false }) + vim.diagnostic.open_float({ focusable = false, width=80 }) end local on_attach = function(client, bufnr) -- 2.49.1 From 476205ce4760dceb94519a1f9b71f21db4619439 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Oct 2022 23:09:53 +0200 Subject: [PATCH 218/894] cmp: do not select with return --- lua/setup/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 8d19dbc..5e03f38 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -39,7 +39,7 @@ cmp.setup({ [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), [''] = cmp.mapping({ - i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }), + i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), c = cmp.mapping.confirm({ select = false }), s = cmp.mapping.confirm({ select = false }), }), -- 2.49.1 From 8c672f19db04ac6f40f6bf12bfb89b83c23782be Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Oct 2022 23:10:11 +0200 Subject: [PATCH 219/894] setup cmp-dap correctly --- lua/my_plugins.lua | 5 +---- lua/setup/cmp.lua | 10 ++++++++++ lua/setup/my_dap.lua | 5 ----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9ecd2dd..d7ae7c9 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -104,6 +104,7 @@ return require('packer').startup(function() { 'ray-x/cmp-treesitter' }, { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'p00f/clangd_extensions.nvim' }, + { 'rcarriga/cmp-dap' }, }, as = 'cmp', config = get_setup('cmp'), @@ -237,10 +238,6 @@ return require('packer').startup(function() module = 'telescope._extensions.dap', requires = 'telescope.nvim', }, - { - 'rcarriga/cmp-dap', - requires = 'cmp' - }, { 'rcarriga/nvim-dap-ui', module = 'dapui' diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 5e03f38..1d85a57 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -83,6 +83,10 @@ cmp.setup({ -- { name = 'spell' }, -- { name = 'emoji' }, }, + enabled = function() + return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" + or require("cmp_dap").is_dap_buffer() + end, completion = { completeopt = 'menu,menuone,noinsert, noselect' }, sorting = { comparators = { @@ -117,6 +121,12 @@ cmp.setup.cmdline(':', { }), }) +require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { + sources = { + { name = 'dap' }, + }, +}) + -- Autopairs --require("nvim-autopairs.completion.cmp").setup({ -- map_cr = true, diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index b4f38a9..7236c4d 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -154,9 +154,4 @@ dap.configurations.cpp = { require('nvim-dap-virtual-text').setup() require('telescope').load_extension('dap') -require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { - sources = { - { name = 'dap' }, - }, -}) -- 2.49.1 From c23240ab03cac5bce4c87b5d0aca21f03315c607 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 30 Oct 2022 12:17:49 +0100 Subject: [PATCH 220/894] dont lazy load aerial --- lua/my_plugins.lua | 4 ---- lua/setup/aerial.lua | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9ecd2dd..d00cff4 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -209,10 +209,6 @@ return require('packer').startup(function() 'nvim-telescope/telescope.nvim' }, config = get_setup('aerial'), - opt = true, - keys = { 's', 's' }, - module = 'aerial', - cmd = 'AerialToggle' } use { 'm-demare/hlargs.nvim', diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua index a6be18f..1b7fe04 100644 --- a/lua/setup/aerial.lua +++ b/lua/setup/aerial.lua @@ -5,3 +5,4 @@ require('aerial').setup({ show_guides = true, }) require('telescope').load_extension('aerial') +vim.keymap.set('n', 's', 'AerialToggle', opts) -- 2.49.1 From ea267d690f153122553d71fb084fefce8c449aa7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 30 Oct 2022 12:18:43 +0100 Subject: [PATCH 221/894] validate yaml --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 623d1a0..27fc40e 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -202,7 +202,7 @@ require('lspconfig')['yamlls'].setup { on_attach = on_attach, settings = { yaml = { - validate = false + validate = true } } } -- 2.49.1 From 474fe4cb449840ff15fc3a804ff7ac70975aa463 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 30 Oct 2022 12:22:43 +0100 Subject: [PATCH 222/894] disable shada read on focusgained --- lua/my_autocommands.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index c79642c..b4d0c5b 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -54,7 +54,6 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { -- Read and write shada file api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) -api.nvim_create_autocmd({ 'FocusGained' }, { command = [[rshada]] }) -- go to last loc when opening a buffer -- api.nvim_create_autocmd( -- 2.49.1 From 9fc33c2b44b80cae2fbdb749f3e41b30f07e7252 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 30 Oct 2022 12:23:17 +0100 Subject: [PATCH 223/894] fixed clangd encoding warning --- lua/setup/my_lspconfig.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 27fc40e..7a84d74 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -12,7 +12,6 @@ capabilities.textDocument.completion.completionItem.labelDetailsSupport = true capabilities.textDocument.completion.completionItem.deprecatedSupport = true capabilities.textDocument.completion.completionItem.commitCharactersSupport = true capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.offsetEncoding = { 'utf-16' } capabilities.textDocument.completion.completionItem.resolveSupport = { properties = { 'documentation', @@ -134,8 +133,11 @@ require('lspconfig')['cmake'].setup { on_attach = on_attach, } +local clangd_capabilities = capabilities +clangd_capabilities.textDocument.semanticHighlighting = true +clangd_capabilities.offsetEncoding = { "utf-16" } require('lspconfig')['clangd'].setup { - capabilities = capabilities, + capabilities = clangd_capabilities, on_attach = on_attach, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, root_dir = require('lspconfig').util.root_pattern( -- 2.49.1 From 45f61cf7feab1417687b23f257069beccd9cde2c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Oct 2022 23:13:37 +0200 Subject: [PATCH 224/894] removed database and tabnine completion --- lua/setup/cmp.lua | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 1d85a57..21e1a8c 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -135,15 +135,3 @@ require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { --}) local cmp_autopairs = require('nvim-autopairs.completion.cmp') cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) - --- TabNine ---local tabnine = require('cmp_tabnine.config') ---tabnine:setup({max_lines = 1000, max_num_results = 20, sort = true}) - --- Database completion -vim.api.nvim_exec( - [[ -autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} }) -]], - false -) -- 2.49.1 From 350d42333a74e2c030ba0a106d786c8c6ca7a00e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Oct 2022 23:33:52 +0200 Subject: [PATCH 225/894] deleted lspinstall file --- lua/setup/lspinstall.lua | 192 --------------------------------------- 1 file changed, 192 deletions(-) delete mode 100644 lua/setup/lspinstall.lua diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua deleted file mode 100644 index 3c80522..0000000 --- a/lua/setup/lspinstall.lua +++ /dev/null @@ -1,192 +0,0 @@ -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.offsetEncoding = { 'utf-16' } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - 'documentation', - 'detail', - 'additionalTextEdits', - }, -} - -OpenDiagFloat = function() - for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end - end - vim.diagnostic.open_float({ focusable = false }) -end - -local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local opts = { noremap = true, silent = false, buffer = true } - vim.keymap.set('n', ',', vim.lsp.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.lsp.diagnostic.goto_next, opts) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', '', 'Telescope aerial', opts) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) - - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) - - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) - end - - -- Set autocommands conditional on server_capabilities - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_exec( - [[ - hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen - hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed - ]], false) - 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 - - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) - require("aerial").on_attach(client, bufnr) -end - -local lsp_installer = require('nvim-lsp-installer') - -local servers = { - 'pyright', - 'cmake', - 'clangd', - 'jsonls', - 'sumneko_lua', - 'dockerls', -} - -for _, name in pairs(servers) do - local server_is_found, server = lsp_installer.get_server(name) - if server_is_found then - if not server:is_installed() then - print('Installing ' .. name) - server:install() - end - end -end - -lsp_installer.on_server_ready(function(server) - local opts = { - on_attach = on_attach, - capabilities = capabilities, - } - - -- (optional) Customize the options passed to the server - if server.name == 'clangd' then - return - end - - if server.name == 'sumneko_lua' then - local lua_rtp = vim.split(package.path, ';') - table.insert(lua_rtp, 'lua/?.lua') - table.insert(lua_rtp, 'lua/?/init.lua') - opts.settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - } - end - if server.name == 'yamlls' then - opts.settings = { - yaml = { - validate = false - } - } - end - - -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) - server:setup(opts) - vim.cmd([[ do User LspAttachBuffers ]]) -end) - -local null_ls = require('null-ls') -null_ls.setup({ - sources = { - null_ls.builtins.code_actions.gitsigns, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format, - }, - on_attach = on_attach, - capabilities = capabilities, -}) -vim.diagnostic.config({ virtual_text = false }) - -require('clangd_extensions').setup({ - server = { - on_attach = on_attach, - capabilities = capabilities, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - }, -}) -- 2.49.1 From a64aeb9dd697a7adae4ac69c9f660dbd116083ac Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 11:59:44 +0100 Subject: [PATCH 226/894] fixed python path if venv env variable is set --- lua/setup/my_dap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 7236c4d..f8373d0 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -45,7 +45,7 @@ end local function getPythonEnv() local venv = os.getenv("VIRTUAL_ENV") if venv ~= nil then - return string.format("%s\\bin\\python.exe", venv) + return string.format("%s/%s", venv, getVenvSuffix()) end local cwd = vim.fn.getcwd() -- 2.49.1 From 56797a2564d141d8f528ca75b165727334736d16 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 20:26:29 +0100 Subject: [PATCH 227/894] add support for conda --- lua/setup/my_dap.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index f8373d0..753bd2f 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -47,6 +47,10 @@ local function getPythonEnv() if venv ~= nil then return string.format("%s/%s", venv, getVenvSuffix()) end + local conda = os.getenv("CONDA_PREFIX") + if conda ~= nil then + return string.format("%s/%s", conda, 'python.exe') + end local cwd = vim.fn.getcwd() if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then -- 2.49.1 From a09b75f16e2904c4d67309dc3c6e77af9bde25a7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 20:27:06 +0100 Subject: [PATCH 228/894] support for launch.json --- lua/setup/my_dap.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 753bd2f..fafc94b 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,8 +1,17 @@ dap = require('dap') +local function loadConfigs () + require('dap.ext.vscode').load_launchjs() + -- Make sure we use the correct python env even for the configs from launch.json + for nr,config in pairs(dap.configurations.python) do + config.pythonPath = getPythonEnv() + end + require'telescope'.extensions.dap.configurations{} +end local opts = { noremap = true, silent = false } -- vim.keymap.set('n', '', dap.continue(), opts) vim.keymap.set('n', '', ":lua require('dap').continue()", opts) +vim.keymap.set('n', '', loadConfigs, opts) vim.keymap.set('n', '', ":lua require('dap').toggle_breakpoint()", opts) vim.keymap.set('n', '', ":lua require('dap').step_over()", opts) vim.keymap.set('n', '', ":lua require('dap').step_into()", opts) -- 2.49.1 From f7536e94aee3de4e4ad444541e39f9e52d584a9e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 20:27:14 +0100 Subject: [PATCH 229/894] set working dir --- lua/setup/my_dap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index fafc94b..7bc6712 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -82,6 +82,7 @@ dap.configurations.python = { name = "Launch file with venv"; justMyCode = false; program = "${file}"; + cwd = vim.fn.getcwd(); pythonPath = getPythonEnv }, } -- 2.49.1 From c8bbbe4057deb659be47a36675fb53eac6c434db Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 20:32:02 +0100 Subject: [PATCH 230/894] fixed access to a local function --- lua/setup/my_dap.lua | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 7bc6712..470ef5c 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,5 +1,29 @@ dap = require('dap') +local function getPythonEnv() + local venv = os.getenv("VIRTUAL_ENV") + if venv ~= nil then + return string.format("%s/%s", venv, getVenvSuffix()) + end + local conda = os.getenv("CONDA_PREFIX") + if conda ~= nil then + return string.format("%s/%s", conda, 'python.exe') + end + + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/venv/' .. getVenvSuffix() + elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/.venv/' .. getVenvSuffix() + else + if vim.loop.os_uname().sysname == 'Linux' then + return '/usr/bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return os.getenv('SCOOP') .. '/apps/python/current/python.exe' + end + end +end + local function loadConfigs () require('dap.ext.vscode').load_launchjs() -- Make sure we use the correct python env even for the configs from launch.json @@ -51,30 +75,6 @@ dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end -local function getPythonEnv() - local venv = os.getenv("VIRTUAL_ENV") - if venv ~= nil then - return string.format("%s/%s", venv, getVenvSuffix()) - end - local conda = os.getenv("CONDA_PREFIX") - if conda ~= nil then - return string.format("%s/%s", conda, 'python.exe') - end - - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/venv/' .. getVenvSuffix() - elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/.venv/' .. getVenvSuffix() - else - if vim.loop.os_uname().sysname == 'Linux' then - return '/usr/bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return os.getenv('SCOOP') .. '/apps/python/current/python.exe' - end - end -end - dap.configurations.python = { { type = 'python'; -- 2.49.1 From 66477e10a02ef61a2528acdca3c27fd764de4253 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Nov 2022 20:32:16 +0100 Subject: [PATCH 231/894] also set cwd for launch.json configs --- lua/setup/my_dap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 470ef5c..19a3df8 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -29,6 +29,7 @@ local function loadConfigs () -- Make sure we use the correct python env even for the configs from launch.json for nr,config in pairs(dap.configurations.python) do config.pythonPath = getPythonEnv() + config.cwd = vim.fn.getcwd() end require'telescope'.extensions.dap.configurations{} end -- 2.49.1 From a2f360ddb4aa109dda1daefde1ec4e44d9854299 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Nov 2022 19:00:38 +0100 Subject: [PATCH 232/894] fixed missing function getVenvSuffix --- lua/setup/my_dap.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 19a3df8..1450882 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,5 +1,13 @@ dap = require('dap') +local function getVenvSuffix() + if vim.loop.os_uname().sysname == 'Linux' then + return 'bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return 'Scripts/python.exe' + end +end + local function getPythonEnv() local venv = os.getenv("VIRTUAL_ENV") if venv ~= nil then @@ -46,14 +54,6 @@ local initDir = vim.api.nvim_list_runtime_paths()[1] local masonpath = vim.fn.stdpath('data') .. '/mason' -- PYTHON -local function getVenvSuffix() - if vim.loop.os_uname().sysname == 'Linux' then - return 'bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return 'Scripts/python.exe' - end -end - dap.adapters.python = { type = 'executable'; command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix(); -- 2.49.1 From ff7a190162124a64779c58a68b149b08921bbff7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Nov 2022 18:24:17 +0100 Subject: [PATCH 233/894] added gruvbox-flat --- lua/my_plugins.lua | 7 ++++++- lua/setup/lualine.lua | 2 +- lua/setup/my_lspconfig.lua | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 0c5ae42..97ff677 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -62,9 +62,14 @@ return require('packer').startup(function() }) use({ 'ellisonleao/gruvbox.nvim', - disable = false, + disable = true, config = get_setup('gruvbox'), }) + use({ + 'eddyekofo94/gruvbox-flat.nvim', + disable = false, + config = get_setup('my_gruvbox_flat') + }) use({ 'lukas-reineke/indent-blankline.nvim', requires = { diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index a097b6f..f5427ed 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,6 +1,6 @@ vim.opt.laststatus = 3 require('lualine').setup({ - options = { theme = 'gruvbox' }, + options = { theme = 'gruvbox-flat' }, sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, globalstatus = true, diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 7a84d74..b897751 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -70,13 +70,12 @@ local on_attach = function(client, bufnr) -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - local colors = require('gruvbox.palette') vim.api.nvim_set_hl( 0, "LspReferenceText", { bold = true, ctermbg = 'red', - bg = colors.dark3 } + bg = "#5a524c"} ) vim.api.nvim_set_hl( 0, -- 2.49.1 From 861b60e4f7b5f7b0f1185f044882ece9ca28c910 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 7 Nov 2022 22:54:28 +0100 Subject: [PATCH 234/894] added missing gruvbox flat config file --- lua/setup/my_gruvbox_flat.lua | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lua/setup/my_gruvbox_flat.lua diff --git a/lua/setup/my_gruvbox_flat.lua b/lua/setup/my_gruvbox_flat.lua new file mode 100644 index 0000000..d57c6c4 --- /dev/null +++ b/lua/setup/my_gruvbox_flat.lua @@ -0,0 +1,2 @@ +vim.g.gruvbox_flat_style = "dark" +vim.cmd('colorscheme gruvbox-flat') -- 2.49.1 From 4b3bc84837b989f2e648022013efab0bd162578a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Nov 2022 14:15:49 +0100 Subject: [PATCH 235/894] fixed esc for terminals --- lua/setup/toggleterm.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua index b0b22c4..5ffa66c 100644 --- a/lua/setup/toggleterm.lua +++ b/lua/setup/toggleterm.lua @@ -12,8 +12,12 @@ function _G.set_terminal_keymaps() vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) end --- Disbled for the moment because it is also set for lazygit --- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') +vim.api.nvim_create_autocmd({ "TermOpen" }, { + pattern = { 'term://*' }, + callback = function() + set_terminal_keymaps() + end +}) local lazygit = Terminal:new({ cmd = 'lazygit', @@ -22,6 +26,7 @@ local lazygit = Terminal:new({ direction = 'float', on_open = function(term) vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", {noremap = true, silent = true}) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) end, }) -- 2.49.1 From 15b03ee11fcb9022dcbd80fea5578e7c771c5798 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Nov 2022 15:00:43 +0100 Subject: [PATCH 236/894] make sure we can exit dap terminal with esc --- lua/setup/my_dap.lua | 10 ++++++++++ lua/setup/toggleterm.lua | 30 ++++++++++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index 1450882..d13a4b7 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,5 +1,15 @@ dap = require('dap') + +-- make sure we can exit the terminal with esc +vim.api.nvim_create_autocmd({ "TermOpen" }, { + pattern = { '*dap-terminal*' }, + callback = function() + local opts = { noremap = true } + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + end +}) + local function getVenvSuffix() if vim.loop.os_uname().sysname == 'Linux' then return 'bin/python' diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua index 5ffa66c..11aab75 100644 --- a/lua/setup/toggleterm.lua +++ b/lua/setup/toggleterm.lua @@ -1,24 +1,22 @@ -require('toggleterm').setup({}) -local Terminal = require('toggleterm.terminal').Terminal - -function _G.set_terminal_keymaps() +function _G.set_terminal_keymaps(term) local opts = { noremap = true } - vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) - vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts) - vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts) - vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts) - vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) - vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) + if (term.cmd ~= 'lazygit') then + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[]], opts) + end + vim.api.nvim_buf_set_keymap(term.bufnr, 't', 'jk', [[]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[h]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[j]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[k]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[l]], opts) end -vim.api.nvim_create_autocmd({ "TermOpen" }, { - pattern = { 'term://*' }, - callback = function() - set_terminal_keymaps() - end +require('toggleterm').setup({ + on_open = set_terminal_keymaps }) +local Terminal = require('toggleterm.terminal').Terminal + local lazygit = Terminal:new({ cmd = 'lazygit', -- dir = vim.fn.getcwd(), @@ -26,7 +24,7 @@ local lazygit = Terminal:new({ direction = 'float', on_open = function(term) vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", {noremap = true, silent = true}) - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) + -- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) end, }) -- 2.49.1 From 9b8097dc366f635278b0d0ec971058a7527e2e30 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 10:35:47 +0100 Subject: [PATCH 237/894] disable lualine winbar for dap repl and console --- lua/setup/lualine.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index f5427ed..a05db60 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,6 +1,12 @@ vim.opt.laststatus = 3 require('lualine').setup({ - options = { theme = 'gruvbox-flat' }, + options = { + theme = 'gruvbox-flat', + disabled_filetypes = { + statusline = {}, + winbar = { 'dap-repl', 'dapui_console' }, + }, + }, sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, globalstatus = true, -- 2.49.1 From 9c86c2a32edf3751eef40ab11f8a7534d229a314 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 10:36:10 +0100 Subject: [PATCH 238/894] removed some deprecated messages --- lua/setup/aerial.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua index 1b7fe04..882a25c 100644 --- a/lua/setup/aerial.lua +++ b/lua/setup/aerial.lua @@ -1,6 +1,8 @@ require('aerial').setup({ backends = { 'lsp', 'treesitter','markdown' }, - default_direction = "prefer_left", + layout = { + default_direction = "prefer_left" + }, filter_kind = false, show_guides = true, }) -- 2.49.1 From 51eab5c6ea6d5c1926e0b6d952872a17124c93a4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 10:52:14 +0100 Subject: [PATCH 239/894] fixed deprecated message for aerial --- lua/setup/my_lspconfig.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index b897751..d8574a5 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -114,7 +114,6 @@ local on_attach = function(client, bufnr) }, hi_parameter = 'IncSearch', }, bufnr) - require("aerial").on_attach(client, bufnr) end require('lspconfig')['pyright'].setup { -- 2.49.1 From c8f9050caf7f5a9dafe1185d4adea037ac403f55 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 11:09:56 +0100 Subject: [PATCH 240/894] reworked dap keymaps --- lua/setup/my_dap.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index d13a4b7..a528446 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -53,12 +53,13 @@ local function loadConfigs () end local opts = { noremap = true, silent = false } -- vim.keymap.set('n', '', dap.continue(), opts) -vim.keymap.set('n', '', ":lua require('dap').continue()", opts) +vim.keymap.set('n', '', dap.continue, opts) vim.keymap.set('n', '', loadConfigs, opts) -vim.keymap.set('n', '', ":lua require('dap').toggle_breakpoint()", opts) -vim.keymap.set('n', '', ":lua require('dap').step_over()", opts) -vim.keymap.set('n', '', ":lua require('dap').step_into()", opts) -vim.keymap.set('n', '', ":lua require('dap').step_out()", opts) +vim.keymap.set('n', '', dap.goto_, opts) +vim.keymap.set('n', '', dap.toggle_breakpoint, opts) +vim.keymap.set('n', '', dap.step_over, opts) +vim.keymap.set('n', '', dap.step_into, opts) +vim.keymap.set('n', '', dap.step_out, opts) local initDir = vim.api.nvim_list_runtime_paths()[1] local masonpath = vim.fn.stdpath('data') .. '/mason' -- 2.49.1 From 11140c602e4d6284b7f82a9eb607b33b98f6cd9d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 12:59:12 +0100 Subject: [PATCH 241/894] added shortcut for dap hover --- lua/setup/my_dap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index a528446..eb0f3eb 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -56,6 +56,7 @@ local opts = { noremap = true, silent = false } vim.keymap.set('n', '', dap.continue, opts) vim.keymap.set('n', '', loadConfigs, opts) vim.keymap.set('n', '', dap.goto_, opts) +vim.keymap.set('n', '', require('dap.ui.widgets').hover, opts) vim.keymap.set('n', '', dap.toggle_breakpoint, opts) vim.keymap.set('n', '', dap.step_over, opts) vim.keymap.set('n', '', dap.step_into, opts) -- 2.49.1 From 0b17bf0cfb3333f959bf468a8cc1213470b9cf77 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 13:14:36 +0100 Subject: [PATCH 242/894] set search color with more contrast --- lua/setup/my_gruvbox_flat.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/my_gruvbox_flat.lua b/lua/setup/my_gruvbox_flat.lua index d57c6c4..bdb5c5f 100644 --- a/lua/setup/my_gruvbox_flat.lua +++ b/lua/setup/my_gruvbox_flat.lua @@ -1,2 +1,3 @@ vim.g.gruvbox_flat_style = "dark" +vim.g.gruvbox_colors = { bg_search = 'purple', fg_search = 'black'} vim.cmd('colorscheme gruvbox-flat') -- 2.49.1 From fb5373f0a7af7908a2b20c898755dfa4eece1673 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 19 Nov 2022 13:33:03 +0100 Subject: [PATCH 243/894] added cmd line history cmp --- lua/my_plugins.lua | 1 + lua/setup/cmp.lua | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 97ff677..a17c2a1 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -106,6 +106,7 @@ return require('packer').startup(function() { 'f3fora/cmp-spell' }, { 'hrsh7th/cmp-emoji' }, { 'hrsh7th/cmp-cmdline' }, + { 'dmitmel/cmp-cmdline-history'}, { 'ray-x/cmp-treesitter' }, { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'p00f/clangd_extensions.nvim' }, diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 21e1a8c..5cf2b51 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -112,13 +112,12 @@ cmp.setup.cmdline('/', { -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { - sources = cmp.config.sources({ - { name = 'path' }, - }, { + sources = { { name = 'cmdline' }, - }, { + { name = 'cmdline_history' }, + { name = 'path' }, { name = 'buffer' }, - }), + }, }) require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { -- 2.49.1 From 2ff32c06fd6500928ff7ac423408a5298c92a2d0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 30 Nov 2022 21:09:02 +0100 Subject: [PATCH 244/894] added overseer --- lua/my_plugins.lua | 4 ++++ lua/overseer/template/user/cmake/build.lua | 12 ++++++++++++ lua/overseer/template/user/cmake/clean.lua | 12 ++++++++++++ lua/overseer/template/user/cmake/cmake.lua | 4 ++++ lua/overseer/template/user/cmake/configure.lua | 13 +++++++++++++ lua/setup/my_overseer.lua | 3 +++ 6 files changed, 48 insertions(+) create mode 100644 lua/overseer/template/user/cmake/build.lua create mode 100644 lua/overseer/template/user/cmake/clean.lua create mode 100644 lua/overseer/template/user/cmake/cmake.lua create mode 100644 lua/overseer/template/user/cmake/configure.lua create mode 100644 lua/setup/my_overseer.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index a17c2a1..46b7f6e 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -258,6 +258,10 @@ return require('packer').startup(function() cmd = 'DiffviewOpen', module = { 'diffview', 'diffview.actions' } } + use { + 'stevearc/overseer.nvim', + config = get_setup('my_overseer') + } if packer_bootstrap then require('packer').sync() end diff --git a/lua/overseer/template/user/cmake/build.lua b/lua/overseer/template/user/cmake/build.lua new file mode 100644 index 0000000..0de82db --- /dev/null +++ b/lua/overseer/template/user/cmake/build.lua @@ -0,0 +1,12 @@ + +return { + name = 'CMake Build for nvim', + builder = function() + return { + cmd = { 'cmake' }, + args = { '--build', '.', + '--', '-j8' }, + cwd = 'build_nvim', + } + end, +} diff --git a/lua/overseer/template/user/cmake/clean.lua b/lua/overseer/template/user/cmake/clean.lua new file mode 100644 index 0000000..37d9ad2 --- /dev/null +++ b/lua/overseer/template/user/cmake/clean.lua @@ -0,0 +1,12 @@ + +return { + name = 'CMake Clean for nvim', + builder = function() + return { + cmd = { 'cmake' }, + args = { '--build', '.', + '-t', 'clean' }, + cwd = 'build_nvim', + } + end, +} diff --git a/lua/overseer/template/user/cmake/cmake.lua b/lua/overseer/template/user/cmake/cmake.lua new file mode 100644 index 0000000..d6dba2c --- /dev/null +++ b/lua/overseer/template/user/cmake/cmake.lua @@ -0,0 +1,4 @@ +return { +'user.cmake.configure', +'user.cmake.build', +'user.cmake.clean'} diff --git a/lua/overseer/template/user/cmake/configure.lua b/lua/overseer/template/user/cmake/configure.lua new file mode 100644 index 0000000..a963c7d --- /dev/null +++ b/lua/overseer/template/user/cmake/configure.lua @@ -0,0 +1,13 @@ +return { + name = 'CMake Configure for nvim', + builder = function() + local cwd = vim.fn.getcwd() + return { + cmd = { 'cmake' }, + args = { '-B', 'build_nvim', + '-S', cwd, + '-G', 'Ninja' }, + cwd = build_nvim, + } + end, +} diff --git a/lua/setup/my_overseer.lua b/lua/setup/my_overseer.lua new file mode 100644 index 0000000..07aac09 --- /dev/null +++ b/lua/setup/my_overseer.lua @@ -0,0 +1,3 @@ +require("overseer").setup({ + templates = { "builtin", "user.cmake.cmake" }, +}) -- 2.49.1 From e93e47bd69174dfa05b300645b0d012c9965cd78 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 30 Nov 2022 21:19:22 +0100 Subject: [PATCH 245/894] only run when cmake available --- lua/overseer/template/user/cmake/build.lua | 11 +++++++++++ lua/overseer/template/user/cmake/clean.lua | 11 +++++++++++ lua/overseer/template/user/cmake/cmake.lua | 1 + lua/overseer/template/user/cmake/configure.lua | 11 +++++++++++ 4 files changed, 34 insertions(+) diff --git a/lua/overseer/template/user/cmake/build.lua b/lua/overseer/template/user/cmake/build.lua index 0de82db..a43b3be 100644 --- a/lua/overseer/template/user/cmake/build.lua +++ b/lua/overseer/template/user/cmake/build.lua @@ -9,4 +9,15 @@ return { cwd = 'build_nvim', } end, + condition = { + callback = function(opts) + if vim.fn.executable("cmake") == 0 then + return false, 'Command "cmake" not found' + end + if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then + return false, "No CMakeLists.txt found" + end + return true + end, + }, } diff --git a/lua/overseer/template/user/cmake/clean.lua b/lua/overseer/template/user/cmake/clean.lua index 37d9ad2..5b8a28d 100644 --- a/lua/overseer/template/user/cmake/clean.lua +++ b/lua/overseer/template/user/cmake/clean.lua @@ -9,4 +9,15 @@ return { cwd = 'build_nvim', } end, + condition = { + callback = function(opts) + if vim.fn.executable("cmake") == 0 then + return false, 'Command "cmake" not found' + end + if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then + return false, "No CMakeLists.txt found" + end + return true + end, + }, } diff --git a/lua/overseer/template/user/cmake/cmake.lua b/lua/overseer/template/user/cmake/cmake.lua index d6dba2c..45215d9 100644 --- a/lua/overseer/template/user/cmake/cmake.lua +++ b/lua/overseer/template/user/cmake/cmake.lua @@ -1,4 +1,5 @@ return { +'builtin', 'user.cmake.configure', 'user.cmake.build', 'user.cmake.clean'} diff --git a/lua/overseer/template/user/cmake/configure.lua b/lua/overseer/template/user/cmake/configure.lua index a963c7d..6075f5c 100644 --- a/lua/overseer/template/user/cmake/configure.lua +++ b/lua/overseer/template/user/cmake/configure.lua @@ -10,4 +10,15 @@ return { cwd = build_nvim, } end, + condition = { + callback = function(opts) + if vim.fn.executable("cmake") == 0 then + return false, 'Command "cmake" not found' + end + if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then + return false, "No CMakeLists.txt found" + end + return true + end, + }, } -- 2.49.1 From 8f26b25bef599ea0f6ceafcf6594a50f3a553c7c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 30 Nov 2022 21:56:30 +0100 Subject: [PATCH 246/894] try components --- lua/overseer/template/user/cmake/build.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/overseer/template/user/cmake/build.lua b/lua/overseer/template/user/cmake/build.lua index a43b3be..a62f2d6 100644 --- a/lua/overseer/template/user/cmake/build.lua +++ b/lua/overseer/template/user/cmake/build.lua @@ -7,6 +7,11 @@ return { args = { '--build', '.', '--', '-j8' }, cwd = 'build_nvim', + -- components = {"on_output_parse", problem_matcher = "$gcc"} + -- components = {'on_output_quickfix', set_diagnostics = true, open = true} + components = { { "on_output_quickfix", open = true, open_on_match = true }, + { 'on_output_parse', problem_matcher = '$gcc' }, + 'default' }, } end, condition = { -- 2.49.1 From 4c3fce3ba275bc7a7301633bc3d20a276d1439c8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 15:13:18 +0100 Subject: [PATCH 247/894] added small link to cmake overseer example --- lua/overseer/template/user/cmake/cmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/overseer/template/user/cmake/cmake.lua b/lua/overseer/template/user/cmake/cmake.lua index 45215d9..c970b46 100644 --- a/lua/overseer/template/user/cmake/cmake.lua +++ b/lua/overseer/template/user/cmake/cmake.lua @@ -3,3 +3,4 @@ return { 'user.cmake.configure', 'user.cmake.build', 'user.cmake.clean'} +-- https://gitlab.com/ranjithshegde/dotbare/-/tree/master/.config/nvim/lua/overseer -- 2.49.1 From fa5c5f32a4b9727e9879251118eff1b1132a4955 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 15:21:43 +0100 Subject: [PATCH 248/894] first try fixing sorting in cmp --- lua/setup/cmp.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 5cf2b51..e3ce5e6 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -70,11 +70,11 @@ cmp.setup({ end, }, sources = { - { name = 'luasnip' }, - { name = 'nvim_lsp' }, - { name = 'nvim_lsp_signature_help' }, - { name = 'treesitter' }, - { name = 'buffer' }, + { name = 'luasnip', priority = 8 }, + { name = 'nvim_lsp', priority = 7}, + { name = 'nvim_lsp_signature_help', priority = 7 }, + { name = 'treesitter', priority = 6 }, + { name = 'buffer', priority = 5 }, -- { name = 'nvim_lua' }, -- { name = 'look' }, -- { name = 'path' }, @@ -90,14 +90,16 @@ cmp.setup({ completion = { completeopt = 'menu,menuone,noinsert, noselect' }, sorting = { comparators = { - cmp.config.compare.offset, - cmp.config.compare.exact, require('clangd_extensions.cmp_scores'), - cmp.config.compare.recently_used, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, + cmp.config.compare.locality, + -- cmp.config.compare.recently_used, + -- -- cmp.config.compare.offset, + -- cmp.config.compare.exact, + -- cmp.config.compare.recently_used, + -- cmp.config.compare.kind, + -- cmp.config.compare.sort_text, + -- cmp.config.compare.length, + -- cmp.config.compare.order, }, }, -- experimental = { native_menu = true } -- 2.49.1 From d8dee9c8783f48a7b2ca38c5a5c057329e284089 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 16:55:05 +0100 Subject: [PATCH 249/894] use capabilities from cmp --- lua/setup/my_lspconfig.lua | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index d8574a5..a2599e3 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -3,23 +3,7 @@ require('mason-lspconfig').setup({ automatic_installation = true, }) -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - 'documentation', - 'detail', - 'additionalTextEdits', - }, -} -capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) +local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do -- 2.49.1 From 78544dcdbfc0f0ec723679c8f568d14129ad1901 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 16:55:18 +0100 Subject: [PATCH 250/894] use clangd extensions --- lua/setup/my_lspconfig.lua | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index a2599e3..6b2b379 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -118,20 +118,30 @@ require('lspconfig')['cmake'].setup { local clangd_capabilities = capabilities clangd_capabilities.textDocument.semanticHighlighting = true clangd_capabilities.offsetEncoding = { "utf-16" } -require('lspconfig')['clangd'].setup { - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - root_dir = require('lspconfig').util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) +require("clangd_extensions").setup { + server = { + capabilities = clangd_capabilities, + on_attach = on_attach, + cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + root_dir = require('lspconfig').util.root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim' + ) + }, + extensions = + { + inlay_hints = { + -- Only show inlay hints for the current line + only_current_line = true, + } + } + } -- require('clangd_extensions').setup({ -- server = { -- 2.49.1 From 0fcdf98cf33fb6be704b46582a3bd241e58e5e73 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 17:03:15 +0100 Subject: [PATCH 251/894] fixed popup icosn --- lua/setup/cmp.lua | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index e3ce5e6..9766249 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -12,24 +12,11 @@ end cmp.setup({ formatting = { - format = function(entry, vim_item) - -- fancy icons and a name of kind - vim_item.kind = require('lspkind').presets.default[vim_item.kind] .. ' ' .. vim_item.kind - -- set a name for each source - vim_item.menu = ({ - buffer = '[Buffer]', - nvim_lsp = '[LSP]', - ultisnips = '[UltiSnips]', - nvim_lua = '[Lua]', - cmp_tabnine = '[TabNine]', - look = '[Look]', - path = '[Path]', - spell = '[Spell]', - calc = '[Calc]', - emoji = '[Emoji]', - })[entry.source.name] - return vim_item - end, + format = require('lspkind').cmp_format({ + mode = 'symbol_text', -- show only symbol annotations + maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + }) }, mapping = { [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), -- 2.49.1 From 8ef35063dd9c890a74dd618aa4fc1bbbcde355e3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 17:03:19 +0100 Subject: [PATCH 252/894] format --- lua/setup/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 9766249..5b12cfb 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -58,7 +58,7 @@ cmp.setup({ }, sources = { { name = 'luasnip', priority = 8 }, - { name = 'nvim_lsp', priority = 7}, + { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, { name = 'treesitter', priority = 6 }, { name = 'buffer', priority = 5 }, -- 2.49.1 From 3546f84367d1b4c16926996d4c013f8a7319867a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 20:55:24 +0100 Subject: [PATCH 253/894] some colortheme fixes --- lua/setup/my_gruvbox_flat.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_gruvbox_flat.lua b/lua/setup/my_gruvbox_flat.lua index bdb5c5f..668c550 100644 --- a/lua/setup/my_gruvbox_flat.lua +++ b/lua/setup/my_gruvbox_flat.lua @@ -1,3 +1,12 @@ +local colors = require('gruvbox.colors') vim.g.gruvbox_flat_style = "dark" -vim.g.gruvbox_colors = { bg_search = 'purple', fg_search = 'black'} +vim.g.gruvbox_colors = { + bg_search = 'purple', + fg_search = 'black', +} +vim.g.gruvbox_theme = { + Pmenu = { bg = 'bg_visual'}, + NormalFloat = { bg = 'bg_visual'} +} +vim.g.gruvbox_dark_float = false vim.cmd('colorscheme gruvbox-flat') -- 2.49.1 From c0dc96fd9db59050f5bc18e325d05fb2d684430e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 21:18:20 +0100 Subject: [PATCH 254/894] option for borders in pmenu --- lua/setup/cmp.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/cmp.lua b/lua/setup/cmp.lua index 5b12cfb..529cdfa 100644 --- a/lua/setup/cmp.lua +++ b/lua/setup/cmp.lua @@ -75,6 +75,10 @@ cmp.setup({ or require("cmp_dap").is_dap_buffer() end, completion = { completeopt = 'menu,menuone,noinsert, noselect' }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, sorting = { comparators = { require('clangd_extensions.cmp_scores'), -- 2.49.1 From f638d730adb3db5bc02f87ab326d6ccc4565baa7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 23:06:19 +0100 Subject: [PATCH 255/894] removed unused plugins --- lua/my_plugins.lua | 17 ----------------- lua/setup/terminal.lua | 3 --- 2 files changed, 20 deletions(-) delete mode 100644 lua/setup/terminal.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 46b7f6e..d23d9f0 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -142,19 +142,6 @@ return require('packer').startup(function() config = get_setup('nvim-autopairs'), }) use({ 'ray-x/lsp_signature.nvim' }) - use({ - 's1n7ax/nvim-terminal', - config = get_setup('terminal'), - }) - use({ - 'williamboman/nvim-lsp-installer', - requires = { - 'neovim/nvim-lspconfig', - 'p00f/clangd_extensions.nvim', - }, - config = get_setup('lspinstall'), - disable = true, - }) use({ 'neovim/nvim-lspconfig', requires = { @@ -174,10 +161,6 @@ return require('packer').startup(function() config = get_setup('neogen'), }) use({ 'stevearc/dressing.nvim' }) - use({ - 'nvim-treesitter/nvim-treesitter-textobjects', - requires = 'nvim-treesitter/nvim-treesitter', - }) use({ 'nvim-neo-tree/neo-tree.nvim', requires = { diff --git a/lua/setup/terminal.lua b/lua/setup/terminal.lua deleted file mode 100644 index f3bae43..0000000 --- a/lua/setup/terminal.lua +++ /dev/null @@ -1,3 +0,0 @@ -require('nvim-terminal').setup({ - toggle_keymap = 'z', -}) -- 2.49.1 From cdd13eeccc9d4edbce396aa9d6f6aa6c2368591f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Dec 2022 13:22:01 +0100 Subject: [PATCH 256/894] added overseer keybinding --- lua/setup/my_overseer.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_overseer.lua b/lua/setup/my_overseer.lua index 07aac09..9954872 100644 --- a/lua/setup/my_overseer.lua +++ b/lua/setup/my_overseer.lua @@ -1,3 +1,9 @@ -require("overseer").setup({ +local overseer = require('overseer') +overseer.setup({ templates = { "builtin", "user.cmake.cmake" }, }) + +vim.keymap.set({ 'n', 'x' }, '', function() + overseer.open() + overseer.run_template() +end, opts) -- 2.49.1 From 814ebfa3cedada3df91cc5aba9587434530051e4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Dec 2022 17:01:43 +0100 Subject: [PATCH 257/894] renamed cmp.lua to my_cmp.lua --- lua/my_plugins.lua | 3 +-- lua/setup/{cmp.lua => my_cmp.lua} | 0 2 files changed, 1 insertion(+), 2 deletions(-) rename lua/setup/{cmp.lua => my_cmp.lua} (100%) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index d23d9f0..fb4f9df 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -112,8 +112,7 @@ return require('packer').startup(function() { 'p00f/clangd_extensions.nvim' }, { 'rcarriga/cmp-dap' }, }, - as = 'cmp', - config = get_setup('cmp'), + config = get_setup('my_cmp'), }) use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) diff --git a/lua/setup/cmp.lua b/lua/setup/my_cmp.lua similarity index 100% rename from lua/setup/cmp.lua rename to lua/setup/my_cmp.lua -- 2.49.1 From 64f65a1d57138f24d93bdf1842c89e0bf25a5507 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 3 Dec 2022 00:40:02 +0100 Subject: [PATCH 258/894] removed cmake plugin --- lua/my_plugins.lua | 7 ------- lua/setup/cmake.lua | 10 ---------- 2 files changed, 17 deletions(-) delete mode 100644 lua/setup/cmake.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index fb4f9df..9ce44b5 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -117,13 +117,6 @@ return require('packer').startup(function() use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) - use({ 'Shatur/neovim-cmake', - requires = { 'mfussenegger/nvim-dap' }, - config = get_setup('cmake'), - opt = true, - module = 'cmake', - cmd = 'CMake' - }) use({ 'hoob3rt/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }, diff --git a/lua/setup/cmake.lua b/lua/setup/cmake.lua deleted file mode 100644 index 0400e6f..0000000 --- a/lua/setup/cmake.lua +++ /dev/null @@ -1,10 +0,0 @@ -local opt = vim.opt -- to set options --- require('telescope').load_extension('cmake') -require('cmake').setup({ - parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type. - build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values. -}) --- msbuild errorformat -opt.errorformat:append('\\ %#%f(%l\\\\\\,%c):\\ %m') --- cl.exe errorformat --- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m') -- 2.49.1 From a188cf2c9f0964f20deeaa3410ff4199b7ade57b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Dec 2022 23:24:49 +0100 Subject: [PATCH 259/894] removed hlargs --- lua/my_plugins.lua | 5 ----- lua/setup/my_hlargs.lua | 1 - 2 files changed, 6 deletions(-) delete mode 100644 lua/setup/my_hlargs.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9ce44b5..49971cf 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -192,11 +192,6 @@ return require('packer').startup(function() }, config = get_setup('aerial'), } - use { - 'm-demare/hlargs.nvim', - requires = { 'nvim-treesitter/nvim-treesitter' }, - config = get_setup('my_hlargs') - } use { 'ggandor/leap.nvim', requires = { 'tpope/vim-repeat' }, diff --git a/lua/setup/my_hlargs.lua b/lua/setup/my_hlargs.lua deleted file mode 100644 index ba0e4dd..0000000 --- a/lua/setup/my_hlargs.lua +++ /dev/null @@ -1 +0,0 @@ -require('hlargs').setup() -- 2.49.1 From 62a276a336fb32d6ef6ea724dc556ab9385dab8b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 4 Dec 2022 01:30:48 +0100 Subject: [PATCH 260/894] remove luarc.json --- .gitignore | 2 ++ .luarc.json | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 .luarc.json diff --git a/.gitignore b/.gitignore index 62b7e09..add2517 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ plugged rplugin.vim plugin/packer_compiled.lua venv_debugpy +.luarc.json +.luarc.json diff --git a/.luarc.json b/.luarc.json deleted file mode 100644 index 8f4a02f..0000000 --- a/.luarc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", - "Lua.diagnostics.disable": ["undefined-global"] -} - -- 2.49.1 From c5073fe73e0c73b88c8cd590ce48ed7b22a5ff9d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 5 Dec 2022 11:26:09 +0100 Subject: [PATCH 261/894] refine telescope references view --- lua/setup/telescope.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index f18d02f..d379eb6 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -44,6 +44,10 @@ require('telescope').setup({ theme = 'ivy', previewer = false, }, + lsp_references = { + show_line = false; + include_declaration = false, + }, lsp_dynamic_workspace_symbols = {}, }, }) -- 2.49.1 From e111deabc902e64f09dfd80eec11cb63f99c9086 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 5 Dec 2022 14:13:55 +0100 Subject: [PATCH 262/894] move to legendary --- lua/my_plugins.lua | 5 ++ lua/setup/my_legendary.lua | 176 +++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 lua/setup/my_legendary.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 49971cf..2219726 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -170,6 +170,11 @@ return require('packer').startup(function() 'gfeiyou/command-center.nvim', requires = { 'nvim-telescope/telescope.nvim' }, config = get_setup('my_command_center'), + disable = true + }) + use({ + 'mrjones2014/legendary.nvim', + config = get_setup('my_legendary') }) use({ 'gbprod/yanky.nvim', diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua new file mode 100644 index 0000000..63f01b1 --- /dev/null +++ b/lua/setup/my_legendary.lua @@ -0,0 +1,176 @@ +require('legendary').setup({ + keymaps = { + { + 'p', + ':Legendary keymaps', + description = 'legendary keymaps', + mode = { 'n', 'x', 'i' } + }, + { + 'F2', + 'tabnew .', + description = 'Open a new tab', + }, + { + '', + 'vsplit .', + description = 'Open a new vertical split', + }, + { + '', + 'split .', + description = 'Open a new horizontal split', + }, + { + 'n', + 'Neogen', + description = 'Add comment', + }, + { + 'p', + 'Telescope projects', + description = 'Select project', + }, + { + 'f', + 'lua require("telescope.builtin").find_files({no_ignore=true})', + description = 'Find file', + }, + { + 'g', + 'lua project_files()', + description = 'Find git files', + }, + { + 'o', + 'Telescope oldfiles', + description = 'Find old files', + }, + { + 'h', + 'Telescope command_history', + description = 'Open command history', + }, + { + 'b', + 'Telescope buffers', + description = 'Select buffer', + }, + { + 'q', + 'Telescope quickfix', + description = 'Quickfix list with telescope', + }, + { + 'l', + 'Telescope live_grep', + description = 'Search in project', + }, + { + '', + 'Telescope neoclip', + description = 'Open clipboard history', + }, + { + 'j', + 'Telescope jumplist', + description = 'Open jumplist', + }, + { + '', + 'Telescope current_buffer_fuzzy_find', + description = 'Find in buffer', + }, + { + 'd', + 'Telescope grep_string', + description = 'Find in workspace', + }, + { + 'g', + 'lua _lazygit_toggle()', + description = 'Open lazygit', + }, + { + 'a', + '"ayiw', + description = 'Word under cursor into register a', + }, + { + 'x', + 'za', + description = 'Toggle fold', + }, + { + '', + '(YankyCycleForward)', + description = 'Yanky cycle forward', + }, + { + '', + '(YankyCycleBackward)', + description = 'Yanky cycle backward', + }, + { + '', + { + n = '(comment_toggle_linewise_current)', + v = '(comment_toggle_linewise_visual)gv' + }, + description = 'Toggle comment' + }, + { + 's', + 'AerialToggle', + description = 'Symbols outline', + }, + }, + commands = + { + { + 'Octo pr list', + description = 'Github list PRs', + }, + { + 'Octo pr checkout', + description = 'Github checkout PR', + }, + { + 'Octo pr browser', + description = 'Github open PR in browser', + }, + { + 'set guifont=JetBrainsMonoNL\\ NF:h12', + description = 'Big font size', + }, + { + 'set guifont=JetBrainsMonoNL\\ NF:h9', + description = 'Reset font size', + }, + { + 'CMake build_all', + description = 'CMake build all', + }, + { + 'CMake configure', + description = 'CMake configure', + }, + { + 'CMake select_target', + description = 'CMake select target', + }, + { + 'CMake clear_cache', + description = 'CMake clear cache', + }, + { + 'LuaSnipListAvailable', + description = 'List snippets', + }, + { + "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", + description = 'Search in open files', + }, + + } +}) -- 2.49.1 From bce0373dfbf7c9f70608a4baa46833fcb8f65f17 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 5 Dec 2022 14:44:29 +0100 Subject: [PATCH 263/894] move some keymaps to the corresponding plugin configs --- lua/setup/comment.lua | 16 ++++- lua/setup/my_legendary.lua | 116 ++++++++----------------------------- lua/setup/neogen.lua | 49 +++++++++------- lua/setup/telescope.lua | 71 +++++++++++++++++++++++ 4 files changed, 138 insertions(+), 114 deletions(-) diff --git a/lua/setup/comment.lua b/lua/setup/comment.lua index 9438d50..09302fb 100644 --- a/lua/setup/comment.lua +++ b/lua/setup/comment.lua @@ -1,3 +1,13 @@ -require('Comment').setup({ - mappings = false, -}) +require('Comment').setup({ + mappings = false, +}) +require('legendary').keymap( + { + '', + { + n = '(comment_toggle_linewise_current)', + v = '(comment_toggle_linewise_visual)gv' + }, + description = 'Toggle comment' + } +) diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua index 63f01b1..221bd8e 100644 --- a/lua/setup/my_legendary.lua +++ b/lua/setup/my_legendary.lua @@ -1,94 +1,36 @@ require('legendary').setup({ + default_opts = { + keymaps = { silent = true }, + commands = {}, + autocmds = {}, + }, keymaps = { { 'p', - ':Legendary keymaps', + function() + require("legendary").find() + end, description = 'legendary keymaps', mode = { 'n', 'x', 'i' } }, { - 'F2', - 'tabnew .', + '', + ':tabnew .', description = 'Open a new tab', }, { '', - 'vsplit .', + ':vsplit .', description = 'Open a new vertical split', }, { '', - 'split .', + ':split .', description = 'Open a new horizontal split', }, - { - 'n', - 'Neogen', - description = 'Add comment', - }, - { - 'p', - 'Telescope projects', - description = 'Select project', - }, - { - 'f', - 'lua require("telescope.builtin").find_files({no_ignore=true})', - description = 'Find file', - }, - { - 'g', - 'lua project_files()', - description = 'Find git files', - }, - { - 'o', - 'Telescope oldfiles', - description = 'Find old files', - }, - { - 'h', - 'Telescope command_history', - description = 'Open command history', - }, - { - 'b', - 'Telescope buffers', - description = 'Select buffer', - }, - { - 'q', - 'Telescope quickfix', - description = 'Quickfix list with telescope', - }, - { - 'l', - 'Telescope live_grep', - description = 'Search in project', - }, - { - '', - 'Telescope neoclip', - description = 'Open clipboard history', - }, - { - 'j', - 'Telescope jumplist', - description = 'Open jumplist', - }, - { - '', - 'Telescope current_buffer_fuzzy_find', - description = 'Find in buffer', - }, - { - 'd', - 'Telescope grep_string', - description = 'Find in workspace', - }, { 'g', - 'lua _lazygit_toggle()', + ':lua _lazygit_toggle()', description = 'Open lazygit', }, { @@ -111,64 +53,56 @@ require('legendary').setup({ '(YankyCycleBackward)', description = 'Yanky cycle backward', }, - { - '', - { - n = '(comment_toggle_linewise_current)', - v = '(comment_toggle_linewise_visual)gv' - }, - description = 'Toggle comment' - }, { 's', - 'AerialToggle', + ':AerialToggle', description = 'Symbols outline', }, }, commands = { { - 'Octo pr list', + ':Octo pr list', description = 'Github list PRs', }, { - 'Octo pr checkout', + ':Octo pr checkout', description = 'Github checkout PR', }, { - 'Octo pr browser', + ':Octo pr browser', description = 'Github open PR in browser', }, { - 'set guifont=JetBrainsMonoNL\\ NF:h12', + ':set guifont=JetBrainsMonoNL\\ NF:h12', description = 'Big font size', }, { - 'set guifont=JetBrainsMonoNL\\ NF:h9', + ':set guifont=JetBrainsMonoNL\\ NF:h9', description = 'Reset font size', }, { - 'CMake build_all', + ':CMake build_all', description = 'CMake build all', }, { - 'CMake configure', + ':CMake configure', description = 'CMake configure', }, { - 'CMake select_target', + ':CMake select_target', description = 'CMake select target', }, { - 'CMake clear_cache', + ':CMake clear_cache', description = 'CMake clear cache', }, { - 'LuaSnipListAvailable', + ':LuaSnipListAvailable', description = 'List snippets', }, { - "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", + ":lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", description = 'Search in open files', }, diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua index 4968fec..df16773 100644 --- a/lua/setup/neogen.lua +++ b/lua/setup/neogen.lua @@ -1,20 +1,29 @@ -require('neogen').setup({ - enabled = true, - languages = { - cpp = { - template = { - annotation_convention = 'custom', - custom = { - { nil, '/// file', { no_results = true, type = { 'file' } } }, - { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, - { nil, '', { no_results = true, type = { 'file' } } }, - - { nil, '/// $1', { type = { 'func' } } }, - { 'tparam', '/// \\tparam %s $1' }, - { 'parameters', '/// \\param %s $1' }, - { 'return_statement', '/// \\return $1' }, - }, - }, - }, - }, -}) +require('neogen').setup({ + enabled = true, + languages = { + cpp = { + template = { + annotation_convention = 'custom', + custom = { + { nil, '/// file', { no_results = true, type = { 'file' } } }, + { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, + { nil, '', { no_results = true, type = { 'file' } } }, + + { nil, '/// $1', { type = { 'func' } } }, + { 'tparam', '/// \\tparam %s $1' }, + { 'parameters', '/// \\param %s $1' }, + { 'return_statement', '/// \\return $1' }, + }, + }, + }, + }, +}) +require('legendary').keymaps( + { + { + 'n', + ':Neogen', + description = 'Add comment', + } + } +) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index d379eb6..ce7abbc 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -53,3 +53,74 @@ require('telescope').setup({ }) require('telescope').load_extension('fzf') + +Project_files = function() + local opts = {} -- define here if you want to define something + local ok = pcall(require "telescope.builtin".git_files, opts) + if not ok then require "telescope.builtin".find_files(opts) end +end + +require('legendary').keymaps( + { + { + 'p', + ':Telescope projects', + description = 'Select project', + }, + { + 'f', + ':lua require("telescope.builtin").find_files({no_ignore=true})', + description = 'Find file', + }, + { + 'g', + ':lua Project_files()', + description = 'Find git files', + }, + { + 'o', + ':Telescope oldfiles', + description = 'Find old files', + }, + { + 'h', + ':Telescope command_history', + description = 'Open command history', + }, + { + 'b', + ':Telescope buffers', + description = 'Select buffer', + }, + { + 'q', + ':Telescope quickfix', + description = 'Quickfix list with telescope', + }, + { + 'l', + ':Telescope live_grep', + description = 'Search in project', + }, + { + '', + ':Telescope neoclip', + description = 'Open clipboard history', + }, + { + 'j', + ':Telescope jumplist', + description = 'Open jumplist', + }, + { + '', + ':Telescope current_buffer_fuzzy_find', + description = 'Find in buffer', + }, + { + 'd', + ':Telescope grep_string', + description = 'Find in workspace', + } + } +) -- 2.49.1 From 11b954ff331b7ad79c93e6fcf756be02b1205070 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 5 Dec 2022 15:12:09 +0100 Subject: [PATCH 264/894] extract some keys to the plugin configs --- lua/setup/aerial.lua | 12 ++++++-- lua/setup/luasnip.lua | 10 +++++++ lua/setup/my_legendary.lua | 56 -------------------------------------- lua/setup/telescope.lua | 9 ++++++ lua/setup/toggleterm.lua | 13 +++++++-- lua/setup/yanky.lua | 14 ++++++++++ 6 files changed, 54 insertions(+), 60 deletions(-) diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua index 882a25c..0978b72 100644 --- a/lua/setup/aerial.lua +++ b/lua/setup/aerial.lua @@ -1,5 +1,5 @@ require('aerial').setup({ - backends = { 'lsp', 'treesitter','markdown' }, + backends = { 'lsp', 'treesitter', 'markdown' }, layout = { default_direction = "prefer_left" }, @@ -7,4 +7,12 @@ require('aerial').setup({ show_guides = true, }) require('telescope').load_extension('aerial') -vim.keymap.set('n', 's', 'AerialToggle', opts) +require('legendary').keymaps( + { + { + 's', + ':AerialToggle', + description = 'Symbols outline', + } + } +) diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index a146428..33a5a06 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -55,3 +55,13 @@ ls.snippets = { require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } }) + + +require('legendary').commands( + { + { + ':LuaSnipListAvailable', + description = 'List snippets', + } + } +) diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua index 221bd8e..8f9a429 100644 --- a/lua/setup/my_legendary.lua +++ b/lua/setup/my_legendary.lua @@ -28,11 +28,6 @@ require('legendary').setup({ ':split .', description = 'Open a new horizontal split', }, - { - 'g', - ':lua _lazygit_toggle()', - description = 'Open lazygit', - }, { 'a', '"ayiw', @@ -43,36 +38,9 @@ require('legendary').setup({ 'za', description = 'Toggle fold', }, - { - '', - '(YankyCycleForward)', - description = 'Yanky cycle forward', - }, - { - '', - '(YankyCycleBackward)', - description = 'Yanky cycle backward', - }, - { - 's', - ':AerialToggle', - description = 'Symbols outline', - }, }, commands = { - { - ':Octo pr list', - description = 'Github list PRs', - }, - { - ':Octo pr checkout', - description = 'Github checkout PR', - }, - { - ':Octo pr browser', - description = 'Github open PR in browser', - }, { ':set guifont=JetBrainsMonoNL\\ NF:h12', description = 'Big font size', @@ -81,30 +49,6 @@ require('legendary').setup({ ':set guifont=JetBrainsMonoNL\\ NF:h9', description = 'Reset font size', }, - { - ':CMake build_all', - description = 'CMake build all', - }, - { - ':CMake configure', - description = 'CMake configure', - }, - { - ':CMake select_target', - description = 'CMake select target', - }, - { - ':CMake clear_cache', - description = 'CMake clear cache', - }, - { - ':LuaSnipListAvailable', - description = 'List snippets', - }, - { - ":lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", - description = 'Search in open files', - }, } }) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index ce7abbc..367d1c2 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -124,3 +124,12 @@ require('legendary').keymaps( } } ) + +require('legendary').func( + { + function() + require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) + end, + description = 'Search in open files', + } +) diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua index 11aab75..09efcd4 100644 --- a/lua/setup/toggleterm.lua +++ b/lua/setup/toggleterm.lua @@ -1,4 +1,3 @@ - function _G.set_terminal_keymaps(term) local opts = { noremap = true } if (term.cmd ~= 'lazygit') then @@ -23,7 +22,7 @@ local lazygit = Terminal:new({ hidden = true, direction = 'float', on_open = function(term) - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", {noremap = true, silent = true}) + vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) -- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) end, }) @@ -31,3 +30,13 @@ local lazygit = Terminal:new({ function _lazygit_toggle() lazygit:toggle() end + +require('legendary').keymaps( + { + { + 'g', + ':lua _lazygit_toggle()', + description = 'Open lazygit', + } + } +) diff --git a/lua/setup/yanky.lua b/lua/setup/yanky.lua index 74a3d34..bfcf475 100644 --- a/lua/setup/yanky.lua +++ b/lua/setup/yanky.lua @@ -11,3 +11,17 @@ vim.keymap.set("n", "", "(YankyCycleForward)", {}) vim.keymap.set("n", "", "(YankyCycleBackward)", {}) require("telescope").load_extension('yank_history') +require('legendary').keymaps( + { + { + '', + '(YankyCycleForward)', + description = 'Yanky cycle forward', + }, + { + '', + '(YankyCycleBackward)', + description = 'Yanky cycle backward', + }, + } +) -- 2.49.1 From 186052c31a8f7d560fc809a33eba56f384300ca3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Dec 2022 08:32:36 +0100 Subject: [PATCH 265/894] remove command center --- lua/my_plugins.lua | 6 - lua/setup/my_command_center.lua | 245 -------------------------------- 2 files changed, 251 deletions(-) delete mode 100644 lua/setup/my_command_center.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 2219726..623b640 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -166,12 +166,6 @@ return require('packer').startup(function() 'akinsho/toggleterm.nvim', config = get_setup('toggleterm'), }) - use({ - 'gfeiyou/command-center.nvim', - requires = { 'nvim-telescope/telescope.nvim' }, - config = get_setup('my_command_center'), - disable = true - }) use({ 'mrjones2014/legendary.nvim', config = get_setup('my_legendary') diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua deleted file mode 100644 index 6a6a0a9..0000000 --- a/lua/setup/my_command_center.lua +++ /dev/null @@ -1,245 +0,0 @@ -require('telescope').load_extension('command_center') - -local command_center = require('command_center') -local noremap = { noremap = true } -local silent_noremap = { noremap = true, silent = true } - -project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end -end - -command_center.add({ - { - description = 'Open command_center', - cmd = 'Telescope command_center', - keybindings = { - { 'n', 'p', noremap }, - { 'x', 'p', noremap }, - }, - }, - { - description = 'Open a new tab', - cmd = 'tabnew .', - keybindings = { - { 'n', 'F2', silent_noremap }, - }, - }, - { - description = 'Open a new vertical split', - cmd = 'vsplit .', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Open a new horizontal split', - cmd = 'split .', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'CMake build all', - cmd = 'CMake build_all', - }, - { - description = 'CMake build selected target', - cmd = 'CMake build', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'CMake configure', - cmd = 'CMake configure', - }, - { - description = 'CMake select target', - cmd = 'CMake select_target', - }, - { - description = 'CMake clear cache', - cmd = 'CMake clear_cache', - }, - { - description = 'List snippets', - cmd = 'LuaSnipListAvailable', - }, - { - description = 'Add comment', - cmd = 'Neogen', - keybindings = { - { 'n', 'n', silent_noremap }, - }, - }, - { - description = 'Select project', - cmd = 'Telescope projects', - keybindings = { - { 'n', 'p', silent_noremap }, - }, - }, - { - description = 'Find file', - cmd = 'lua require("telescope.builtin").find_files({no_ignore=true})', - keybindings = { - { 'n', 'f', silent_noremap }, - }, - }, - { - description = 'Find git files', - cmd = 'lua project_files()', - keybindings = { - { 'n', 'g', silent_noremap }, - }, - }, - { - description = 'Find old files', - cmd = 'Telescope oldfiles', - keybindings = { - { 'n', 'o', silent_noremap }, - }, - }, - { - description = 'Open command history', - cmd = 'Telescope command_history', - keybindings = { - { 'n', 'h', silent_noremap }, - }, - }, - { - description = 'Select buffer', - cmd = 'Telescope buffers', - keybindings = { - { 'n', 'b', silent_noremap }, - }, - }, - { - description = 'Quickfix list with telescope', - cmd = 'Telescope quickfix', - keybindings = { - { 'n', 'q', silent_noremap }, - }, - }, - { - description = 'Search in project', - cmd = 'Telescope live_grep', - keybindings = { - { 'n', 'l', silent_noremap }, - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Search in open files', - cmd = "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", - }, - { - description = 'Open clipboard history', - cmd = 'Telescope neoclip', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Open jumplist', - cmd = 'Telescope jumplist', - keybindings = { - { 'n', 'j', silent_noremap }, - }, - }, - { - description = 'Find in buffer', - cmd = 'Telescope current_buffer_fuzzy_find', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Find in workspace', - cmd = 'Telescope grep_string', - keybindings = { - { 'n', 'd', silent_noremap }, - }, - }, - { - description = 'Open lazygit', - cmd = 'lua _lazygit_toggle()', - keybindings = { - { 'n', 'g', silent_noremap }, - }, - }, - { - description = 'Word under cursor into register a', - cmd = '"ayiw', - keybindings = { - { 'n', 'a', silent_noremap }, - }, - }, - { - description = 'Toggle fold', - cmd = 'za', - keybindings = { - { 'n', 'x', silent_noremap }, - }, - }, - { - description = 'Yanky cycle forward', - cmd = '(YankyCycleForward)', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Yanky cycle backward', - cmd = '(YankyCycleBackward)', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Github list PRs', - cmd = 'Octo pr list', - }, - { - description = 'Github checkout PR', - cmd = 'Octo pr checkout', - }, - { - description = 'Github open PR in browser', - cmd = 'Octo pr browser', - }, - { - description = 'Comment line', - cmd = '(comment_toggle_linewise_current)', - keybindings = { - { 'n', '', silent_noremap }, - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Comment line', - cmd = '(comment_toggle_linewise_visual)gv', - keybindings = { - { 'x', '', silent_noremap }, - { 'x', '', silent_noremap }, - }, - }, - { - description = 'Symbols outline', - cmd = 'AerialToggle', - keybindings = { - { 'n', 's', silent_noremap }, - { 'n', 's', silent_noremap }, - }, - }, - { - description = 'Big font size', - cmd = 'set guifont=JetBrainsMonoNL\\ NF:h12', - }, - { - description = 'Reset font size', - cmd = 'set guifont=JetBrainsMonoNL\\ NF:h9', - }, -}) -- 2.49.1 From 45ea60d68967ffe6ff768e5c51f72a0f43c3e4d3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 11:47:16 +0100 Subject: [PATCH 266/894] fixed lazy loading of dap --- lua/my_plugins.lua | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 623b640..6a42689 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -110,7 +110,9 @@ return require('packer').startup(function() { 'ray-x/cmp-treesitter' }, { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'p00f/clangd_extensions.nvim' }, - { 'rcarriga/cmp-dap' }, + { 'rcarriga/cmp-dap', + opt = true, + module = 'cmp_dap' }, }, config = get_setup('my_cmp'), }) @@ -214,9 +216,20 @@ return require('packer').startup(function() module = 'dapui' }, }, - keys = { '', '' }, - module = 'dap', - config = get_setup('my_dap'), + keys = { + { 'n', '' }, + { 'n', '' }, + { 'n', '' }, + { 'n', '' }, + { 'n', '' }, + { 'n', '' }, + { 'n', '' }, + { 'n', '' } + }, + -- module = 'dap', + config = function () + require('setup/my_dap') + end, opt = true, } use { -- 2.49.1 From 2d5f71805e791eae542befb23f7deaf8ab9a1cdb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 11:47:29 +0100 Subject: [PATCH 267/894] removed commented line --- lua/setup/my_dap.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index eb0f3eb..fee079c 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -52,7 +52,6 @@ local function loadConfigs () require'telescope'.extensions.dap.configurations{} end local opts = { noremap = true, silent = false } --- vim.keymap.set('n', '', dap.continue(), opts) vim.keymap.set('n', '', dap.continue, opts) vim.keymap.set('n', '', loadConfigs, opts) vim.keymap.set('n', '', dap.goto_, opts) -- 2.49.1 From 49edb9e20294b6375b239a98dbecc604276fd3c1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 11:53:15 +0100 Subject: [PATCH 268/894] lazy load neotree --- lua/my_plugins.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 6a42689..e06b856 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -160,9 +160,13 @@ return require('packer').startup(function() requires = { 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons', - 'MunifTanjim/nui.nvim', + {'MunifTanjim/nui.nvim', module='nui'}, }, config = get_setup('neo-tree'), + opt = true, + keys = { + { 'n', '\\' } + } }) use({ 'akinsho/toggleterm.nvim', -- 2.49.1 From 8fa2f0f0e17cc7994c21db3903a52e55f61facef Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 11:53:36 +0100 Subject: [PATCH 269/894] format plugins file --- lua/my_plugins.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index e06b856..b7132cb 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -106,7 +106,7 @@ return require('packer').startup(function() { 'f3fora/cmp-spell' }, { 'hrsh7th/cmp-emoji' }, { 'hrsh7th/cmp-cmdline' }, - { 'dmitmel/cmp-cmdline-history'}, + { 'dmitmel/cmp-cmdline-history' }, { 'ray-x/cmp-treesitter' }, { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'p00f/clangd_extensions.nvim' }, @@ -160,7 +160,7 @@ return require('packer').startup(function() requires = { 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons', - {'MunifTanjim/nui.nvim', module='nui'}, + { 'MunifTanjim/nui.nvim', module = 'nui' }, }, config = get_setup('neo-tree'), opt = true, @@ -172,7 +172,7 @@ return require('packer').startup(function() 'akinsho/toggleterm.nvim', config = get_setup('toggleterm'), }) - use({ + use({ 'mrjones2014/legendary.nvim', config = get_setup('my_legendary') }) @@ -231,7 +231,7 @@ return require('packer').startup(function() { 'n', '' } }, -- module = 'dap', - config = function () + config = function() require('setup/my_dap') end, opt = true, -- 2.49.1 From 74c87cee8858ce2de2ca49f9a77e145a5da104df Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 12:05:44 +0100 Subject: [PATCH 270/894] lazy load neogen --- lua/my_plugins.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index b7132cb..4168e6b 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -153,6 +153,8 @@ return require('packer').startup(function() 'danymat/neogen', requires = 'nvim-treesitter/nvim-treesitter', config = get_setup('neogen'), + opt = true, + module = 'neogen' }) use({ 'stevearc/dressing.nvim' }) use({ -- 2.49.1 From d7705f1decf6ac48cfce19d46443de57ec5c3069 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 12:15:44 +0100 Subject: [PATCH 271/894] fixed dap lazy loading --- lua/setup/my_cmp.lua | 4 +++- lua/setup/my_dap.lua | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_cmp.lua b/lua/setup/my_cmp.lua index 529cdfa..84c888f 100644 --- a/lua/setup/my_cmp.lua +++ b/lua/setup/my_cmp.lua @@ -72,7 +72,9 @@ cmp.setup({ }, enabled = function() return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" - or require("cmp_dap").is_dap_buffer() + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' end, completion = { completeopt = 'menu,menuone,noinsert, noselect' }, window = { diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index fee079c..a064311 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -1,5 +1,7 @@ dap = require('dap') +require("cmp_dap").is_dap_buffer() + -- make sure we can exit the terminal with esc vim.api.nvim_create_autocmd({ "TermOpen" }, { -- 2.49.1 From 15f8c3ecf7327ffd9b7454a5e0a061f05a3e32a3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 13:18:39 +0100 Subject: [PATCH 272/894] complete text from all visible buffers --- lua/setup/my_cmp.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/setup/my_cmp.lua b/lua/setup/my_cmp.lua index 84c888f..6abbac6 100644 --- a/lua/setup/my_cmp.lua +++ b/lua/setup/my_cmp.lua @@ -61,7 +61,17 @@ cmp.setup({ { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, { name = 'treesitter', priority = 6 }, - { name = 'buffer', priority = 5 }, + { name = 'buffer', priority = 5, + option = { + get_bufnrs = function() + local bufs = {} + for _, win in ipairs(vim.api.nvim_list_wins()) do + bufs[vim.api.nvim_win_get_buf(win)] = true + end + return vim.tbl_keys(bufs) + end + } + }, -- { name = 'nvim_lua' }, -- { name = 'look' }, -- { name = 'path' }, -- 2.49.1 From b91b0b48b41ab95f5576c07b1605834a58677280 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 9 Dec 2022 13:18:58 +0100 Subject: [PATCH 273/894] lazy load overseer and aerial --- lua/my_plugins.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 4168e6b..f978465 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -198,6 +198,11 @@ return require('packer').startup(function() 'nvim-telescope/telescope.nvim' }, config = get_setup('aerial'), + opt = true, + module = 'aerial', + keys = { + { 'n', 's' } + } } use { 'ggandor/leap.nvim', @@ -248,7 +253,12 @@ return require('packer').startup(function() } use { 'stevearc/overseer.nvim', - config = get_setup('my_overseer') + config = get_setup('my_overseer'), + opt = true, + keys = { + { 'n', '' } + }, + module = 'overseer' } if packer_bootstrap then require('packer').sync() -- 2.49.1 From 1d436a3df782f340fa5a1698079f03997511c6b3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Dec 2022 19:28:33 +0100 Subject: [PATCH 274/894] lazy load yanky --- lua/my_plugins.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index f978465..4a1dfdc 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -180,7 +180,14 @@ return require('packer').startup(function() }) use({ 'gbprod/yanky.nvim', - config = get_setup('yanky') + config = get_setup('yanky'), + keys = { + { 'n', '' }, + { 'n', '' } + }, + requires = { + 'nvim-telescope/telescope.nvim' + } }) use { 'ldelossa/litee.nvim', -- 2.49.1 From 5d7231efa2f34cd162b80eda310071715a2a655b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Dec 2022 19:28:55 +0100 Subject: [PATCH 275/894] lazy load lspconfig --- lua/my_plugins.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 4a1dfdc..0534a4b 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -144,6 +144,8 @@ return require('packer').startup(function() 'p00f/clangd_extensions.nvim', }, config = get_setup('my_lspconfig'), + module_pattern = { "lspconfig.*" }, + event = { "InsertEnter", "CursorMoved" }, }) use({ 'jose-elias-alvarez/null-ls.nvim', -- 2.49.1 From 1d9f94e650d1f4993a464fc430914112ebc4b72e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Dec 2022 19:29:16 +0100 Subject: [PATCH 276/894] lazy load luasnip --- lua/my_plugins.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 0534a4b..9fa6d4f 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -115,8 +115,11 @@ return require('packer').startup(function() module = 'cmp_dap' }, }, config = get_setup('my_cmp'), + use({ + 'L3MON4D3/LuaSnip', + config = get_setup('luasnip'), + module = { "luasnip", "LuaSnip" } }) - use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) use({ -- 2.49.1 From 58ae25ee12273c9175409bb1b337eefacf099fa8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Dec 2022 19:29:28 +0100 Subject: [PATCH 277/894] lazy load cmp --- lua/my_plugins.lua | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9fa6d4f..9a62fc3 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -95,26 +95,26 @@ return require('packer').startup(function() use({ 'hrsh7th/nvim-cmp', requires = { - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { 'L3MON4D3/LuaSnip' }, - { 'saadparwaiz1/cmp_luasnip' }, - { 'hrsh7th/cmp-nvim-lua' }, - { 'octaltree/cmp-look' }, - { 'hrsh7th/cmp-path' }, - { 'hrsh7th/cmp-calc' }, - { 'f3fora/cmp-spell' }, - { 'hrsh7th/cmp-emoji' }, - { 'hrsh7th/cmp-cmdline' }, - { 'dmitmel/cmp-cmdline-history' }, - { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, + { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, + { 'octaltree/cmp-look', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-calc', after = 'nvim-cmp' }, + { 'f3fora/cmp-spell', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, + { 'dmitmel/cmp-cmdline-history', after = 'nvim-cmp' }, + { 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' }, { 'p00f/clangd_extensions.nvim' }, - { 'rcarriga/cmp-dap', - opt = true, - module = 'cmp_dap' }, }, config = get_setup('my_cmp'), + module = { "nvim-cmp", "cmp" }, + event = "InsertEnter *", + }) use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip'), @@ -238,6 +238,10 @@ return require('packer').startup(function() 'rcarriga/nvim-dap-ui', module = 'dapui' }, + { + 'rcarriga/cmp-dap', + module = 'cmp_dap' + }, }, keys = { { 'n', '' }, -- 2.49.1 From 51183ffd55a05855841f09130d3ea1babfa0dba4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 11 Dec 2022 13:05:34 +0100 Subject: [PATCH 278/894] move project keymap to its config file --- lua/setup/project.lua | 11 +++++++++++ lua/setup/telescope.lua | 5 ----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lua/setup/project.lua b/lua/setup/project.lua index 0e735ff..bc289c5 100644 --- a/lua/setup/project.lua +++ b/lua/setup/project.lua @@ -4,3 +4,14 @@ require('project_nvim').setup({ patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, }) require('telescope').load_extension('projects') +require('legendary').keymaps( + { + { + 'p', + function () + require('telescope').extensions.projects.projects() + end, + description = 'Select project', + }, + } +) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index 367d1c2..b23fe64 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -62,11 +62,6 @@ end require('legendary').keymaps( { - { - 'p', - ':Telescope projects', - description = 'Select project', - }, { 'f', ':lua require("telescope.builtin").find_files({no_ignore=true})', -- 2.49.1 From dc534b5a3839af696b2daac412b99a9e37808d0f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 20 Dec 2022 10:57:56 +0100 Subject: [PATCH 279/894] fixed loading of aerial --- lua/my_plugins.lua | 4 +++- lua/setup/aerial.lua | 5 +++++ lua/setup/my_lspconfig.lua | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index f978465..cd16c7b 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -200,8 +200,10 @@ return require('packer').startup(function() config = get_setup('aerial'), opt = true, module = 'aerial', + cmd = {'Telescope aerial', 'AerialToggle'}, keys = { - { 'n', 's' } + { 'n', 's' }, + { 'n', '' } } } use { diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua index 0978b72..ed6e412 100644 --- a/lua/setup/aerial.lua +++ b/lua/setup/aerial.lua @@ -13,6 +13,11 @@ require('legendary').keymaps( 's', ':AerialToggle', description = 'Symbols outline', + }, + { + '', + ':Telescope aerial', + description = 'Telescope symbols', } } ) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 6b2b379..dc92e27 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -38,7 +38,6 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', '', 'Telescope aerial', opts) vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) -- 2.49.1 From 738bcabefe987f36a1110cd988dd9ddb0c2d41a8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 13:36:12 +0100 Subject: [PATCH 280/894] start migrating to lazy plugin manager --- lua/my_lazy.lua | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 lua/my_lazy.lua diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua new file mode 100644 index 0000000..91897f4 --- /dev/null +++ b/lua/my_lazy.lua @@ -0,0 +1,51 @@ +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 = { + { + 'mrjones2014/legendary.nvim', + config = function() + require('setup/my_legendary') + end + }, + { + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + config = function() + require('setup/treesitter') + end + }, + { + 'nvim-telescope/telescope.nvim', + dependencies = { + { 'nvim-lua/plenary.nvim' }, + { 'kyazdani42/nvim-web-devicons' }, + }, + config = function() + require('setup/telescope') + end + }, + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" -G Ninja && cmake --build build --config Release && cmake --install build --prefix build', + dependencies = { + 'nvim-telescope/telescope.nvim', + }, + config = function() + require('telescope').load_extension('fzf') + end + }, +} +local opts = {} +require("lazy").setup(plugins, opts) -- 2.49.1 From 8fb7e9ad0a4274594391f88a42519fb05b9d62e4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 14:46:00 +0100 Subject: [PATCH 281/894] added all plugins to lazy --- lua/my_lazy.lua | 202 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 194 insertions(+), 8 deletions(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index 91897f4..edfc8c1 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -26,26 +26,212 @@ local plugins = { require('setup/treesitter') end }, + { + 'p00f/nvim-ts-rainbow', + dependencies = 'nvim-treesitter/nvim-treesitter', + }, { 'nvim-telescope/telescope.nvim', dependencies = { - { 'nvim-lua/plenary.nvim' }, - { 'kyazdani42/nvim-web-devicons' }, + 'nvim-lua/plenary.nvim', + 'kyazdani42/nvim-web-devicons', + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = { + 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" + 'cmake --build build --config Release', + 'cmake --install build --prefix build' + }, + config = function() + require('telescope').load_extension('fzf') + end + }, }, config = function() require('setup/telescope') end }, { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" -G Ninja && cmake --build build --config Release && cmake --install build --prefix build', - dependencies = { - 'nvim-telescope/telescope.nvim', - }, + 'eddyekofo94/gruvbox-flat.nvim', + disable = false, config = function() - require('telescope').load_extension('fzf') + require('setup/my_gruvbox_flat') end }, + { + 'lukas-reineke/indent-blankline.nvim', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + }, + config = function() + require('setup/indent_blankline') + end, + }, + + { + 'lewis6991/gitsigns.nvim', + config = function() + require('setup/gitsigns') + end, + }, + { + 'numToStr/Comment.nvim', + config = function() + require('setup/comment') + end, + }, + { + 'hoob3rt/lualine.nvim', + dependencies = { 'kyazdani42/nvim-web-devicons' }, + config = function() + require('setup/lualine') + end, + }, + { + 'hrsh7th/nvim-cmp', + dependencies = { + { 'onsails/lspkind-nvim' }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { + 'L3MON4D3/LuaSnip', + config = function() + require('setup/luasnip') + end, + dependencies = + { + 'rafamadriz/friendly-snippets' + } + }, + { 'saadparwaiz1/cmp_luasnip' }, + { 'hrsh7th/cmp-nvim-lua' }, + { 'octaltree/cmp-look' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-calc' }, + { 'f3fora/cmp-spell' }, + { 'hrsh7th/cmp-emoji' }, + { 'hrsh7th/cmp-cmdline' }, + { 'dmitmel/cmp-cmdline-history' }, + { 'ray-x/cmp-treesitter' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { 'p00f/clangd_extensions.nvim' }, + { + 'windwp/nvim-autopairs', + config = function() + require('setup/nvim-autopairs') + end + }, + }, + config = function() + require('setup/my_cmp') + end, + event = "InsertEnter", + }, + -- { + -- 'L3MON4D3/LuaSnip', + -- config = function() + -- require('setup/luasnip') + -- end, + -- dependencies = + -- { + -- 'rafamadriz/friendly-snippets' + -- } + { + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'p00f/clangd_extensions.nvim', + 'jose-elias-alvarez/null-ls.nvim', + 'ray-x/lsp_signature.nvim', + }, + config = function() + require('setup/my_lspconfig') + end, + event = { "InsertEnter", "CursorMoved" }, + }, + { + 'akinsho/toggleterm.nvim', + config = function() + require('setup/toggleterm') + end, + cmd = 'ToggleTerm' + }, + { + 'gbprod/yanky.nvim', + config = function() + require('setup/yanky') + end, + keys = { + { 'n', '' }, + { 'n', '' } + }, + dependencies = { + 'nvim-telescope/telescope.nvim' + } + }, + { + 'stevearc/aerial.nvim', + dependencies = { + 'nvim-telescope/telescope.nvim' + }, + config = function() + require('setup/aerial') + end, + keys = { + { 'n', 's' } + } + }, + { + 'ggandor/leap.nvim', + dependencies = { 'tpope/vim-repeat' }, + config = function() + require('setup/my_leap') + end + }, + { + 'mfussenegger/nvim-dap', + dependencies = { + 'mfussenegger/nvim-dap-python', + 'theHamsta/nvim-dap-virtual-text', + { + 'nvim-telescope/telescope-dap.nvim', + dependencies = 'telescope.nvim', + }, + 'rcarriga/nvim-dap-ui', + 'rcarriga/cmp-dap', + }, + keys = { + { '' }, + { '' }, + { '' }, + { '' }, + { '' }, + { '' }, + { '' }, + { '' } + }, + config = function() + require('setup/my_dap') + end, + }, + { + 'sindrets/diffview.nvim', + dependencies = 'nvim-lua/plenary.nvim', + config = function() + require('setup/my_diffview') + end, + cmd = 'DiffviewOpen', + }, + { + 'stevearc/overseer.nvim', + config = function() + require('setup/my_overseer') + end, + keys = { + { '' } + }, + } } local opts = {} require("lazy").setup(plugins, opts) -- 2.49.1 From 6b9089ee85dd8365e97b260d0c399be9e2a782f7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 15:05:11 +0100 Subject: [PATCH 282/894] fixed events and keys in lazy --- lua/my_lazy.lua | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index edfc8c1..a375471 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -125,17 +125,8 @@ local plugins = { config = function() require('setup/my_cmp') end, - event = "InsertEnter", + event = {'InsertEnter', 'CmdLineEnter'}, }, - -- { - -- 'L3MON4D3/LuaSnip', - -- config = function() - -- require('setup/luasnip') - -- end, - -- dependencies = - -- { - -- 'rafamadriz/friendly-snippets' - -- } { 'neovim/nvim-lspconfig', dependencies = { @@ -163,8 +154,8 @@ local plugins = { require('setup/yanky') end, keys = { - { 'n', '' }, - { 'n', '' } + { '' }, + { '' } }, dependencies = { 'nvim-telescope/telescope.nvim' @@ -178,8 +169,9 @@ local plugins = { config = function() require('setup/aerial') end, + cmd = 'AerialToggle', keys = { - { 'n', 's' } + { 's' } } }, { -- 2.49.1 From a62b9ca215c8cdc5e735f7fed33b6878f0b3a54c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 15:05:48 +0100 Subject: [PATCH 283/894] don't load the fzf extension in the telescope setup --- lua/setup/telescope.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index b23fe64..fe82bea 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -52,8 +52,6 @@ require('telescope').setup({ }, }) -require('telescope').load_extension('fzf') - Project_files = function() local opts = {} -- define here if you want to define something local ok = pcall(require "telescope.builtin".git_files, opts) -- 2.49.1 From e1e32cf52c6200a1e37f026ff3e5b124519a72b2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 15:05:56 +0100 Subject: [PATCH 284/894] use lazy --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 496a039..2bf6d5a 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ vim.g.mapleader = ',' if not vim.g.vscode then - require('my_plugins') + require('my_lazy') require('my_keymappings') require('my_options') require('my_autocommands') -- 2.49.1 From c52f6304d41b41160b9b88a5a3ca490a580a53f3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 22:36:32 +0100 Subject: [PATCH 285/894] added project.nvim --- lua/my_lazy.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index a375471..894146c 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -51,6 +51,12 @@ local plugins = { require('setup/telescope') end }, + { + 'ahmedkhalf/project.nvim', + config = function() + require('setup/project') + end, + }, { 'eddyekofo94/gruvbox-flat.nvim', disable = false, -- 2.49.1 From fa41d32ae14e3f1a7c73f57794598f66bf668346 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 22:36:47 +0100 Subject: [PATCH 286/894] fixed lazygit keybinding --- lua/my_lazy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index 894146c..6564de4 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -152,7 +152,8 @@ local plugins = { config = function() require('setup/toggleterm') end, - cmd = 'ToggleTerm' + cmd = 'ToggleTerm', + keys = 'g' }, { 'gbprod/yanky.nvim', -- 2.49.1 From 62734cac5c52a0dfcd11d17b11808f18cea6b408 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 22:38:53 +0100 Subject: [PATCH 287/894] keybinding for lazy and fixed legendary --- lua/my_lazy.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index 6564de4..1249476 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -17,7 +17,23 @@ local plugins = { 'mrjones2014/legendary.nvim', config = function() require('setup/my_legendary') - end + require('legendary').keymaps( + { + { + 'i', + function() + require("lazy").home() + end, + description = 'Start lazy home' + } + } + ) + end, + dependencies = { + 'stevearc/dressing.nvim', + 'nvim-telescope/telescope.nvim', + }, + keys = { 'p', 'i' } }, { 'nvim-treesitter/nvim-treesitter', -- 2.49.1 From b7167a3a47dc6f2ecc9e869dd083191d8ff909ff Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 22:39:05 +0100 Subject: [PATCH 288/894] format --- lua/my_lazy.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index 1249476..e5ca3f4 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -89,7 +89,6 @@ local plugins = { require('setup/indent_blankline') end, }, - { 'lewis6991/gitsigns.nvim', config = function() @@ -147,7 +146,7 @@ local plugins = { config = function() require('setup/my_cmp') end, - event = {'InsertEnter', 'CmdLineEnter'}, + event = { 'InsertEnter', 'CmdLineEnter' }, }, { 'neovim/nvim-lspconfig', -- 2.49.1 From 1adb3c8ff2b53291c034ae82826a17afd4afe366 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 22:55:37 +0100 Subject: [PATCH 289/894] don't autoinstall lsp server --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 6b2b379..b16a0c0 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -1,6 +1,6 @@ require('mason').setup() require('mason-lspconfig').setup({ - automatic_installation = true, + automatic_installation = false, }) local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- 2.49.1 From c136b87b7b6bf215e6a3e4cac8931307490c2e23 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 23:07:24 +0100 Subject: [PATCH 290/894] fixed overseer keybinding --- lua/setup/my_overseer.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lua/setup/my_overseer.lua b/lua/setup/my_overseer.lua index 9954872..82b9060 100644 --- a/lua/setup/my_overseer.lua +++ b/lua/setup/my_overseer.lua @@ -3,7 +3,16 @@ overseer.setup({ templates = { "builtin", "user.cmake.cmake" }, }) -vim.keymap.set({ 'n', 'x' }, '', function() - overseer.open() - overseer.run_template() -end, opts) +require('legendary').keymaps( + { + { + '', + function() + overseer.open() + overseer.run_template() + end, + mode = { 'n', 'x' }, + description = 'Start task (overseer)', + }, + } +) -- 2.49.1 From 17b3f53e11af9749b3992ec0b85146109a841fef Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 24 Dec 2022 23:25:17 +0100 Subject: [PATCH 291/894] add telescope ui select --- lua/my_lazy.lua | 1 + lua/setup/telescope.lua | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index e5ca3f4..b9f8dd2 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -53,6 +53,7 @@ local plugins = { 'kyazdani42/nvim-web-devicons', { 'nvim-telescope/telescope-fzf-native.nvim', + 'nvim-telescope/telescope-ui-select.nvim', build = { 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" 'cmake --build build --config Release', diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index fe82bea..818a82e 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -50,8 +50,16 @@ require('telescope').setup({ }, lsp_dynamic_workspace_symbols = {}, }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + } + } + } }) +require("telescope").load_extension("ui-select") + Project_files = function() local opts = {} -- define here if you want to define something local ok = pcall(require "telescope.builtin".git_files, opts) -- 2.49.1 From e562f3b996725182b6faf91491694739aa826c2a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 27 Dec 2022 14:33:28 +0100 Subject: [PATCH 292/894] added lazy lock file --- lazy-lock.json | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..dcfc50d --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,55 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "45dc21a71ad1450606f5e98261badb28db59d74c" }, + "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, + "aerial.nvim": { "branch": "master", "commit": "7e2fef6ec501a3fe8bc6c4051b3a1014dc098a06" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "9bd6073dd1230e667f97760b5a73f81547a19528" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, + "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, + "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, + "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, + "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" }, + "cmp-nvim-lua": { "branch": "main", "commit": "d276254e7198ab7d00f117e88e223b4bd8c02d21" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "diffview.nvim": { "branch": "main", "commit": "3812e296d3977a24db62f7c18025755b40968d3a" }, + "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, + "friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" }, + "gitsigns.nvim": { "branch": "main", "commit": "2ab3bdf0a40bab53033048c6be75bda86316b55d" }, + "gruvbox-flat.nvim": { "branch": "master", "commit": "172269867994c0da7adcf02e89a068cda85eb805" }, + "indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" }, + "lazy.nvim": { "branch": "main", "commit": "5a5487b015743c69d6a275156a90af35c2905c47" }, + "leap.nvim": { "branch": "main", "commit": "a5c9504290832e6bdbbb6265fd1ff02fc6485d20" }, + "legendary.nvim": { "branch": "master", "commit": "f53ef425b1b6cb9dc907a054755138345fd2fd57" }, + "lsp_signature.nvim": { "branch": "master", "commit": "1979f1118e2b38084e7c148f279eed6e9300a342" }, + "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, + "lualine.nvim": { "branch": "master", "commit": "fffbcb829288c3ca366f17cdb8d46aefb5c1d6f3" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "31d8ed0dd3daf6cc64e35d710a190b64080bdc86" }, + "mason.nvim": { "branch": "main", "commit": "5f82a4e5618ebb0f3197141e9f14a07b56d5390f" }, + "null-ls.nvim": { "branch": "main", "commit": "b26851b3e7ac1c0c85666f8a74e36aef2acb89c6" }, + "nvim-autopairs": { "branch": "master", "commit": "03580d758231956d33c8dd91e2be195106a79fa4" }, + "nvim-cmp": { "branch": "main", "commit": "e55033fce468c9c578b946948807f2ac48a6ee08" }, + "nvim-dap": { "branch": "master", "commit": "6f2ea9e33b48a51849ec93c6c38148a5372018e4" }, + "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, + "nvim-dap-ui": { "branch": "master", "commit": "54365d2eb4cb9cfab0371306c6a76c913c5a67e3" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" }, + "nvim-lspconfig": { "branch": "master", "commit": "42ca8ce0f2252be795da4789fadfa91f6c3f7464" }, + "nvim-treesitter": { "branch": "master", "commit": "0cb637ca9f4389172933e5aba36387ab8430b6fb" }, + "nvim-ts-rainbow": { "branch": "master", "commit": "064fd6c0a15fae7f876c2c6dd4524ca3fad96750" }, + "nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" }, + "overseer.nvim": { "branch": "master", "commit": "82ed207195b58a73b9f7d013d6eb3c7d78674ac9" }, + "plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" }, + "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, + "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, + "telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" }, + "toggleterm.nvim": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "yanky.nvim": { "branch": "main", "commit": "2bb05abe20b5d7af917a48785acfacb602248e36" } +} \ No newline at end of file -- 2.49.1 From 4f0bab54b5467275021cc348523468ef37c08682 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 27 Dec 2022 14:33:46 +0100 Subject: [PATCH 293/894] lazy load comment nvim --- lua/my_lazy.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index b9f8dd2..a4de69f 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -101,6 +101,7 @@ local plugins = { config = function() require('setup/comment') end, + keys = '' }, { 'hoob3rt/lualine.nvim', -- 2.49.1 From 9361934d8a6848d0cf740cfeaf54eef070382c32 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 27 Dec 2022 14:55:11 +0100 Subject: [PATCH 294/894] use some very lazy things --- lua/my_lazy.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/my_lazy.lua b/lua/my_lazy.lua index a4de69f..fba444b 100644 --- a/lua/my_lazy.lua +++ b/lua/my_lazy.lua @@ -45,6 +45,7 @@ local plugins = { { 'p00f/nvim-ts-rainbow', dependencies = 'nvim-treesitter/nvim-treesitter', + event = 'VeryLazy' }, { 'nvim-telescope/telescope.nvim', @@ -73,6 +74,7 @@ local plugins = { config = function() require('setup/project') end, + event = 'VeryLazy' }, { 'eddyekofo94/gruvbox-flat.nvim', @@ -162,7 +164,7 @@ local plugins = { config = function() require('setup/my_lspconfig') end, - event = { "InsertEnter", "CursorMoved" }, + event = 'VeryLazy' }, { 'akinsho/toggleterm.nvim', @@ -203,7 +205,8 @@ local plugins = { dependencies = { 'tpope/vim-repeat' }, config = function() require('setup/my_leap') - end + end, + event = 'VeryLazy' }, { 'mfussenegger/nvim-dap', -- 2.49.1 From 5dd99d7085c396a6619129e5219235299c3741a7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 27 Dec 2022 14:57:08 +0100 Subject: [PATCH 295/894] remove esc to quit for telescope --- lua/setup/telescope.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index 818a82e..29bcf65 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -11,7 +11,6 @@ require('telescope').setup({ defaults = { mappings = { i = { - [''] = actions.close, [''] = actions.select_default + actions.center, [''] = actions.send_selected_to_loclist, [''] = actions.smart_send_to_qflist, -- 2.49.1 From fd16ef223a829449802c7b00755f01502d383f9c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 13:52:17 +0100 Subject: [PATCH 296/894] start restructering of lazy --- init.lua | 4 +- lua/config/lazy.lua | 14 + lua/{my_options.lua => config/options.lua} | 124 ++++----- lua/my_plugins.lua | 282 --------------------- lua/{my_lazy.lua => plugins/init.lua} | 47 +--- lua/plugins/neotree.lua | 62 +++++ lua/plugins/telescope.lua | 161 ++++++++++++ lua/plugins/treesitter.lua | 50 ++++ lua/setup/neo-tree.lua | 56 ---- lua/setup/telescope.lua | 135 ---------- lua/setup/treesitter.lua | 48 ---- 11 files changed, 352 insertions(+), 631 deletions(-) create mode 100644 lua/config/lazy.lua rename lua/{my_options.lua => config/options.lua} (97%) delete mode 100644 lua/my_plugins.lua rename lua/{my_lazy.lua => plugins/init.lua} (75%) create mode 100644 lua/plugins/neotree.lua create mode 100644 lua/plugins/telescope.lua create mode 100644 lua/plugins/treesitter.lua delete mode 100644 lua/setup/neo-tree.lua delete mode 100644 lua/setup/telescope.lua delete mode 100644 lua/setup/treesitter.lua diff --git a/init.lua b/init.lua index 2bf6d5a..93e408b 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ vim.g.mapleader = ',' if not vim.g.vscode then - require('my_lazy') + require('config.lazy') require('my_keymappings') - require('my_options') require('my_autocommands') + require('config.options') end diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..0d36981 --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,14 @@ +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) + +require('lazy').setup('plugins', {}) diff --git a/lua/my_options.lua b/lua/config/options.lua similarity index 97% rename from lua/my_options.lua rename to lua/config/options.lua index dc33c6b..ec3c295 100644 --- a/lua/my_options.lua +++ b/lua/config/options.lua @@ -1,62 +1,62 @@ -vim.cmd('filetype plugin indent on') -vim.cmd('language en_US.utf-8') - -local opt = vim.opt -local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default -opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. -opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line -opt.list = true -opt.hidden= true -opt.scrolloff= 4 -opt.shiftround= true -opt.relativenumber= false -opt.splitbelow= true -opt.splitright= true -opt.wildmode= 'longest:full,full' -opt.splitbelow= true -opt.splitright= true -opt.shiftwidth = indent -opt.tabstop = indent -if vim.loop.os_uname().sysname == 'Linux' then - opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' -else - opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf -end -opt.swapfile= false -opt.backup= false -opt.spelllang= 'en,de' -opt.completeopt= 'menu,menuone,noselect' -opt.expandtab= true -opt.smartindent= true -opt.title = true -opt.titlestring = '%{getcwd()} - %t' - --- go to previous/next line with h,l,left arrow and right arrow --- when cursor reaches end/beginning of line --- opt.whichwrap:append('<>[]hl') - --- disable nvim intro -opt.shortmess:append('sI') - --- Treesitter based folding -opt.foldlevel = 20 -opt.foldmethod = 'expr' -opt.foldexpr = 'nvim_treesitter#foldexpr()' - + +vim.cmd('filetype plugin indent on') +vim.cmd('language en_US.utf-8') + +local opt = vim.opt +local indent = 2 +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default +opt.relativenumber = false --Make relative number default +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.ttimeoutlen = 10 +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.list = true +opt.hidden= true +opt.scrolloff= 4 +opt.shiftround= true +opt.relativenumber= false +opt.splitbelow= true +opt.splitright= true +opt.wildmode= 'longest:full,full' +opt.splitbelow= true +opt.splitright= true +opt.shiftwidth = indent +opt.tabstop = indent +if vim.loop.os_uname().sysname == 'Linux' then + opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' +else + opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +end +opt.swapfile= false +opt.backup= false +opt.spelllang= 'en,de' +opt.completeopt= 'menu,menuone,noselect' +opt.expandtab= true +opt.smartindent= true +opt.title = true +opt.titlestring = '%{getcwd()} - %t' + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +-- opt.whichwrap:append('<>[]hl') + +-- disable nvim intro +opt.shortmess:append('sI') + +-- Treesitter based folding +opt.foldlevel = 20 +opt.foldmethod = 'expr' +opt.foldexpr = 'nvim_treesitter#foldexpr()' diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua deleted file mode 100644 index 9a62fc3..0000000 --- a/lua/my_plugins.lua +++ /dev/null @@ -1,282 +0,0 @@ -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost my_plugins.lua source | PackerCompile - augroup end -]]) - -local fn = vim.fn -local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' -if fn.empty(fn.glob(install_path)) > 0 then - packer_bootstrap = fn.system({ - 'git', - 'clone', - '--depth', - '1', - 'https://github.com/wbthomason/packer.nvim', - install_path, - }) -end -vim.api.nvim_command('packadd packer.nvim') - -local function get_setup(name) - return string.format('require("setup/%s")', name) -end - -local packerUtil = require('packer.util') -require('packer').init({ - snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'), - display = { - open_fn = require('packer.util').float, - }, -}) - -return require('packer').startup(function() - -- Packer can manage itself as an optional plugin - use({ 'wbthomason/packer.nvim' }) - use({ - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate', - config = get_setup('treesitter'), - }) - use({ - 'nvim-telescope/telescope.nvim', - requires = { - { 'nvim-lua/popup.nvim' }, - { 'nvim-lua/plenary.nvim' }, - { 'kyazdani42/nvim-web-devicons' }, - { 'nvim-telescope/telescope-fzf-native.nvim', - run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build --config Release && cmake --install build --prefix build' }, - }, - config = get_setup('telescope'), - }) - use({ - 'sainnhe/gruvbox-material', - disable = true, - config = get_setup('my_gruvbox-material') - }) - use({ - 'luisiacc/gruvbox-baby', - disable = true, - config = get_setup('my_gruvbox-baby') - }) - use({ - 'ellisonleao/gruvbox.nvim', - disable = true, - config = get_setup('gruvbox'), - }) - use({ - 'eddyekofo94/gruvbox-flat.nvim', - disable = false, - config = get_setup('my_gruvbox_flat') - }) - use({ - 'lukas-reineke/indent-blankline.nvim', - requires = { - 'nvim-treesitter/nvim-treesitter', - }, - config = get_setup('indent_blankline'), - }) - use({ 'nvim-lua/plenary.nvim' }) - use({ - 'lewis6991/gitsigns.nvim', - config = get_setup('gitsigns'), - }) - use({ - 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons', - config = get_setup('nvim-tree'), - disable = true, - }) - use({ - 'numToStr/Comment.nvim', - config = get_setup('comment'), - }) - use({ - 'hrsh7th/nvim-cmp', - requires = { - { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, - { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, - { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, - { 'octaltree/cmp-look', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-calc', after = 'nvim-cmp' }, - { 'f3fora/cmp-spell', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, - { 'dmitmel/cmp-cmdline-history', after = 'nvim-cmp' }, - { 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' }, - { 'p00f/clangd_extensions.nvim' }, - }, - config = get_setup('my_cmp'), - module = { "nvim-cmp", "cmp" }, - event = "InsertEnter *", - }) - use({ - 'L3MON4D3/LuaSnip', - config = get_setup('luasnip'), - module = { "luasnip", "LuaSnip" } - }) - use({ 'rafamadriz/friendly-snippets' }) - use({ 'onsails/lspkind-nvim' }) - use({ - 'hoob3rt/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true }, - config = get_setup('lualine'), - }) - use({ - 'ahmedkhalf/project.nvim', - config = get_setup('project'), - }) - use({ 'p00f/nvim-ts-rainbow', - requires = 'nvim-treesitter/nvim-treesitter', - }) - use({ - 'windwp/nvim-autopairs', - config = get_setup('nvim-autopairs'), - }) - use({ 'ray-x/lsp_signature.nvim' }) - use({ - 'neovim/nvim-lspconfig', - requires = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - 'p00f/clangd_extensions.nvim', - }, - config = get_setup('my_lspconfig'), - module_pattern = { "lspconfig.*" }, - event = { "InsertEnter", "CursorMoved" }, - }) - use({ - 'jose-elias-alvarez/null-ls.nvim', - requires = { 'nvim-lua/plenary.nvim' }, - }) - use({ - 'danymat/neogen', - requires = 'nvim-treesitter/nvim-treesitter', - config = get_setup('neogen'), - opt = true, - module = 'neogen' - }) - use({ 'stevearc/dressing.nvim' }) - use({ - 'nvim-neo-tree/neo-tree.nvim', - requires = { - 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', - { 'MunifTanjim/nui.nvim', module = 'nui' }, - }, - config = get_setup('neo-tree'), - opt = true, - keys = { - { 'n', '\\' } - } - }) - use({ - 'akinsho/toggleterm.nvim', - config = get_setup('toggleterm'), - }) - use({ - 'mrjones2014/legendary.nvim', - config = get_setup('my_legendary') - }) - use({ - 'gbprod/yanky.nvim', - config = get_setup('yanky'), - keys = { - { 'n', '' }, - { 'n', '' } - }, - requires = { - 'nvim-telescope/telescope.nvim' - } - }) - use { - 'ldelossa/litee.nvim', - disable = true, - requires = { - 'ldelossa/litee-calltree.nvim', - 'ldelossa/litee-symboltree.nvim', - 'ldelossa/gh.nvim' - }, - config = get_setup('my_litee') - } - use { - 'stevearc/aerial.nvim', - requires = { - 'nvim-telescope/telescope.nvim' - }, - config = get_setup('aerial'), - opt = true, - module = 'aerial', - keys = { - { 'n', 's' } - } - } - use { - 'ggandor/leap.nvim', - requires = { 'tpope/vim-repeat' }, - config = get_setup('my_leap') - } - use { - 'mfussenegger/nvim-dap', - requires = { - 'mfussenegger/nvim-dap-python', - { - 'theHamsta/nvim-dap-virtual-text', - module = 'nvim-dap-virtual-text' - }, - { - 'nvim-telescope/telescope-dap.nvim', - module = 'telescope._extensions.dap', - requires = 'telescope.nvim', - }, - { - 'rcarriga/nvim-dap-ui', - module = 'dapui' - }, - { - 'rcarriga/cmp-dap', - module = 'cmp_dap' - }, - }, - keys = { - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' } - }, - -- module = 'dap', - config = function() - require('setup/my_dap') - end, - opt = true, - } - use { - 'sindrets/diffview.nvim', - requires = 'nvim-lua/plenary.nvim', - config = get_setup('my_diffview'), - opt = true, - cmd = 'DiffviewOpen', - module = { 'diffview', 'diffview.actions' } - } - use { - 'stevearc/overseer.nvim', - config = get_setup('my_overseer'), - opt = true, - keys = { - { 'n', '' } - }, - module = 'overseer' - } - if packer_bootstrap then - require('packer').sync() - end -end) diff --git a/lua/my_lazy.lua b/lua/plugins/init.lua similarity index 75% rename from lua/my_lazy.lua rename to lua/plugins/init.lua index fba444b..10e92d4 100644 --- a/lua/my_lazy.lua +++ b/lua/plugins/init.lua @@ -1,18 +1,4 @@ -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 = { +return { { 'mrjones2014/legendary.nvim', config = function() @@ -35,40 +21,11 @@ local plugins = { }, keys = { 'p', 'i' } }, - { - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - config = function() - require('setup/treesitter') - end - }, { 'p00f/nvim-ts-rainbow', dependencies = 'nvim-treesitter/nvim-treesitter', event = 'VeryLazy' }, - { - 'nvim-telescope/telescope.nvim', - dependencies = { - 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', - { - 'nvim-telescope/telescope-fzf-native.nvim', - 'nvim-telescope/telescope-ui-select.nvim', - build = { - 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" - 'cmake --build build --config Release', - 'cmake --install build --prefix build' - }, - config = function() - require('telescope').load_extension('fzf') - end - }, - }, - config = function() - require('setup/telescope') - end - }, { 'ahmedkhalf/project.nvim', config = function() @@ -252,5 +209,3 @@ local plugins = { }, } } -local opts = {} -require("lazy").setup(plugins, opts) diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua new file mode 100644 index 0000000..d0580c8 --- /dev/null +++ b/lua/plugins/neotree.lua @@ -0,0 +1,62 @@ +return { + 'nvim-neo-tree/neo-tree.nvim', + cmd = 'Neotree', + keys = { + { '\\', 'Neotree reveal', desc = 'NeoTree' }, + }, + dependencies = { + 'nvim-lua/plenary.nvim', + -- 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'kyazdani42/nvim-web-devicons', + 'MunifTanjim/nui.nvim', + }, + config = { + window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for + -- possible options. These can also be functions that return these options. + position = 'float', -- left, right, float, current + width = 40, -- applies to left and right positions + popup = { -- settings that apply to float position only + size = { + height = '80%', + width = '50%', + }, + position = '50%', -- 50% means center it + -- you can also specify border here, if you want a different setting from + -- the global popup_border_style. + }, + enable_git_status = false, + -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. + -- You can also create your own commands by providing a function instead of a string. + mappings = { + [''] = 'toggle_node', + ['<2-LeftMouse>'] = 'open', + [''] = 'open', + ['s'] = 'open_split', + ['v'] = 'open_vsplit', + ['C'] = 'close_node', + ['z'] = 'close_all_nodes', + ['R'] = 'refresh', + ['a'] = 'add', + ['A'] = 'add_directory', + ['d'] = 'delete', + ['r'] = 'rename', + ['y'] = 'copy_to_clipboard', + ['x'] = 'cut_to_clipboard', + ['p'] = 'paste_from_clipboard', + ['c'] = 'copy', -- takes text input for destination + ['m'] = 'move', -- takes text input for destination + ['q'] = 'close_window', + }, + }, + filesystem = { + filtered_items = { + hide_dotfiles = false, + hide_gitignored = false, + }, + }, + source_selector = { + winbar = true, + statusline = false + } + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..4f40d42 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,161 @@ +return { + 'nvim-telescope/telescope.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'kyazdani42/nvim-web-devicons', + { + 'nvim-telescope/telescope-fzf-native.nvim', + 'nvim-telescope/telescope-ui-select.nvim', + build = { + 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" + 'cmake --build build --config Release', + 'cmake --install build --prefix build' + }, + config = function() + end + }, + }, + cmd = { "Telescope" }, + keys = { + { + 'f', + function() + require("telescope.builtin").find_files({ no_ignore = true }) + end, + desc = 'Find file', + }, + { + 'g', + function() + Project_files() + end, + desc = 'Find git files', + }, + { + 'o', + function() + require("telescope.builtin").oldfiles() + end, + desc = 'Find old files', + }, + { + 'h', + function() + require("telescope.builtin").command_history() + end, + desc = 'Open command history', + }, + { + 'b', + function() + require("telescope.builtin").buffers() + end, + desc = 'Select buffer', + }, + { + 'q', + function() + require("telescope.builtin").quickfix() + end, + desc = 'Quickfix list with telescope', + }, + { + 'l', + function() + require("telescope.builtin").live_grep() + end, + desc = 'Search in project', + }, + { + 'j', + function() + require("telescope.builtin").jumplist() + end, + desc = 'Open jumplist', + }, + { + '', + function() + require("telescope.builtin").current_buffer_fuzzy_find() + end, + desc = 'Find in buffer', + }, + { + 'd', + function() + require("telescope.builtin").grep_string() + end, + desc = 'Find in workspace', + } + }, + config = function() + local actions = require('telescope.actions') + + local mappingTab = { + i = { + [''] = actions.select_tab, + [''] = actions.select_default, + }, + } + + require('telescope').setup({ + defaults = { + mappings = { + i = { + [''] = actions.select_default + actions.center, + [''] = actions.send_selected_to_loclist, + [''] = actions.smart_send_to_qflist, + }, + }, + }, + pickers = { + -- Your special builtin config goes in here + buffers = { + sort_lastused = true, + theme = 'ivy', + mappings = { + i = { + [''] = actions.delete_buffer, + [''] = actions.select_default, + }, + n = { + [''] = actions.delete_buffer, + }, + }, + }, + find_files = { + theme = 'ivy', + previewer = false, + }, + oldfiles = { + theme = 'ivy', + }, + git_files = { + theme = 'ivy', + previewer = false, + }, + lsp_references = { + show_line = false; + include_declaration = false, + }, + lsp_dynamic_workspace_symbols = {}, + }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + } + } + } + }) + + require("telescope").load_extension("ui-select") + + Project_files = function() + local opts = {} -- define here if you want to define something + local ok = pcall(require "telescope.builtin".git_files, opts) + if not ok then require "telescope.builtin".find_files(opts) end + end + + require('telescope').load_extension('fzf') + end +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..3b916e4 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,50 @@ +return { + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + config = function() + require('nvim-treesitter.configs').setup({ + ensure_installed = 'all', + highlight = { + enable = true + }, + 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 + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + }, + indent = { + enable = false -- maybe buggy + }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + lsp_interop = { + enable = true, + border = 'none', + peek_definition_code = { + ["df"] = "@function.outer", + ["dF"] = "@class.outer", + }, + }, + }, + }) + local parser = require('nvim-treesitter.parsers').filetype_to_parsername + parser.groovy = 'java' -- the someft filetype will use the python parser and queries. + require("nvim-treesitter.install").prefer_git = true + end +} + diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua deleted file mode 100644 index 309ed03..0000000 --- a/lua/setup/neo-tree.lua +++ /dev/null @@ -1,56 +0,0 @@ --- If you want icons for diagnostic errors, you'll need to define them somewhere: -vim.fn.sign_define('DiagnosticSignError', { text = ' ', texthl = 'DiagnosticSignError' }) -vim.fn.sign_define('DiagnosticSignWarn', { text = ' ', texthl = 'DiagnosticSignWarn' }) -vim.fn.sign_define('DiagnosticSignInfo', { text = ' ', texthl = 'DiagnosticSignInfo' }) -vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' }) - -require('neo-tree').setup({ - window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for - -- possible options. These can also be functions that return these options. - position = 'float', -- left, right, float, current - width = 40, -- applies to left and right positions - popup = { -- settings that apply to float position only - size = { - height = '80%', - width = '50%', - }, - position = '50%', -- 50% means center it - -- you can also specify border here, if you want a different setting from - -- the global popup_border_style. - }, - enable_git_status = false, - -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. - -- You can also create your own commands by providing a function instead of a string. - mappings = { - [''] = 'toggle_node', - ['<2-LeftMouse>'] = 'open', - [''] = 'open', - ['s'] = 'open_split', - ['v'] = 'open_vsplit', - ['C'] = 'close_node', - ['z'] = 'close_all_nodes', - ['R'] = 'refresh', - ['a'] = 'add', - ['A'] = 'add_directory', - ['d'] = 'delete', - ['r'] = 'rename', - ['y'] = 'copy_to_clipboard', - ['x'] = 'cut_to_clipboard', - ['p'] = 'paste_from_clipboard', - ['c'] = 'copy', -- takes text input for destination - ['m'] = 'move', -- takes text input for destination - ['q'] = 'close_window', - }, - }, - filesystem = { - filtered_items = { - hide_dotfiles = false, - hide_gitignored = false, - }, - }, - source_selector = { - winbar = true, - statusline = false - } -}) -vim.keymap.set('n', '\\', 'Neotree reveal') diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua deleted file mode 100644 index 29bcf65..0000000 --- a/lua/setup/telescope.lua +++ /dev/null @@ -1,135 +0,0 @@ -local actions = require('telescope.actions') - -local mappingTab = { - i = { - [''] = actions.select_tab, - [''] = actions.select_default, - }, -} - -require('telescope').setup({ - defaults = { - mappings = { - i = { - [''] = actions.select_default + actions.center, - [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist, - }, - }, - }, - pickers = { - -- Your special builtin config goes in here - buffers = { - sort_lastused = true, - theme = 'ivy', - mappings = { - i = { - [''] = actions.delete_buffer, - [''] = actions.select_default, - }, - n = { - [''] = actions.delete_buffer, - }, - }, - }, - find_files = { - theme = 'ivy', - previewer = false, - }, - oldfiles = { - theme = 'ivy', - }, - git_files = { - theme = 'ivy', - previewer = false, - }, - lsp_references = { - show_line = false; - include_declaration = false, - }, - lsp_dynamic_workspace_symbols = {}, - }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - } - } - } -}) - -require("telescope").load_extension("ui-select") - -Project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end -end - -require('legendary').keymaps( - { - { - 'f', - ':lua require("telescope.builtin").find_files({no_ignore=true})', - description = 'Find file', - }, - { - 'g', - ':lua Project_files()', - description = 'Find git files', - }, - { - 'o', - ':Telescope oldfiles', - description = 'Find old files', - }, - { - 'h', - ':Telescope command_history', - description = 'Open command history', - }, - { - 'b', - ':Telescope buffers', - description = 'Select buffer', - }, - { - 'q', - ':Telescope quickfix', - description = 'Quickfix list with telescope', - }, - { - 'l', - ':Telescope live_grep', - description = 'Search in project', - }, - { - '', - ':Telescope neoclip', - description = 'Open clipboard history', - }, - { - 'j', - ':Telescope jumplist', - description = 'Open jumplist', - }, - { - '', - ':Telescope current_buffer_fuzzy_find', - description = 'Find in buffer', - }, - { - 'd', - ':Telescope grep_string', - description = 'Find in workspace', - } - } -) - -require('legendary').func( - { - function() - require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) - end, - description = 'Search in open files', - } -) diff --git a/lua/setup/treesitter.lua b/lua/setup/treesitter.lua deleted file mode 100644 index 771d4ea..0000000 --- a/lua/setup/treesitter.lua +++ /dev/null @@ -1,48 +0,0 @@ -local parser = require('nvim-treesitter.parsers').filetype_to_parsername -parser.groovy = 'java' -- the someft filetype will use the python parser and queries. - -require('nvim-treesitter.configs').setup({ - ensure_installed = all, - highlight = { - enable = true - }, - 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 - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - indent = { - enable = false -- maybe buggy - }, - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - lsp_interop = { - enable = true, - border = 'none', - peek_definition_code = { - ["df"] = "@function.outer", - ["dF"] = "@class.outer", - }, - }, - }, -}) - -require("nvim-treesitter.install").prefer_git = true - --- local groovy_parser = require('nvim-treesitter.parsers').groovy --- groovy_parser.groovy = 'java' -- the someft filetype will use the python parser and queries. -- 2.49.1 From ce61facff9cbedf10ad8d441cdd39d295ce48bf7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 14:29:23 +0100 Subject: [PATCH 297/894] more restructure --- lua/config/options.lua | 1 + lua/plugins/cmp.lua | 180 ++++++++++++++++++++++++ lua/plugins/comment.lua | 22 +++ lua/plugins/gitsigns.lua | 12 ++ lua/plugins/indent_blankline.lua | 20 +++ lua/plugins/init.lua | 96 +------------ lua/plugins/lspconfig.lua | 231 +++++++++++++++++++++++++++++++ lua/plugins/lualine.lua | 32 +++++ lua/plugins/nvim-ts-rainbow.lua | 5 + lua/plugins/project.lua | 12 ++ lua/plugins/telescope.lua | 28 ++-- lua/setup/comment.lua | 13 -- lua/setup/gitsigns.lua | 9 -- lua/setup/indent_blankline.lua | 12 -- lua/setup/lualine.lua | 29 ---- lua/setup/my_cmp.lua | 141 ------------------- lua/setup/my_lspconfig.lua | 218 ----------------------------- lua/setup/project.lua | 17 --- 18 files changed, 533 insertions(+), 545 deletions(-) create mode 100644 lua/plugins/cmp.lua create mode 100644 lua/plugins/comment.lua create mode 100644 lua/plugins/gitsigns.lua create mode 100644 lua/plugins/indent_blankline.lua create mode 100644 lua/plugins/lspconfig.lua create mode 100644 lua/plugins/lualine.lua create mode 100644 lua/plugins/nvim-ts-rainbow.lua create mode 100644 lua/plugins/project.lua delete mode 100644 lua/setup/comment.lua delete mode 100644 lua/setup/gitsigns.lua delete mode 100644 lua/setup/indent_blankline.lua delete mode 100644 lua/setup/lualine.lua delete mode 100644 lua/setup/my_cmp.lua delete mode 100644 lua/setup/my_lspconfig.lua delete mode 100644 lua/setup/project.lua diff --git a/lua/config/options.lua b/lua/config/options.lua index ec3c295..e2aa99f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -48,6 +48,7 @@ opt.expandtab= true opt.smartindent= true opt.title = true opt.titlestring = '%{getcwd()} - %t' +opt.laststatus = 3 -- for lualine -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua new file mode 100644 index 0000000..1994d04 --- /dev/null +++ b/lua/plugins/cmp.lua @@ -0,0 +1,180 @@ +return { + 'hrsh7th/nvim-cmp', + dependencies = { + { 'onsails/lspkind-nvim' }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { + 'L3MON4D3/LuaSnip', + config = function() + require('setup/luasnip') + end, + dependencies = + { + 'rafamadriz/friendly-snippets' + } + }, + { 'saadparwaiz1/cmp_luasnip' }, + { 'hrsh7th/cmp-nvim-lua' }, + { 'octaltree/cmp-look' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-calc' }, + { 'f3fora/cmp-spell' }, + { 'hrsh7th/cmp-emoji' }, + { 'hrsh7th/cmp-cmdline' }, + { 'dmitmel/cmp-cmdline-history' }, + { 'ray-x/cmp-treesitter' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { 'p00f/clangd_extensions.nvim' }, + { + 'windwp/nvim-autopairs', + config = function() + require('setup/nvim-autopairs') + end + }, + }, + config = function() + local cmp = require('cmp') + local luasnip = require('luasnip') + + local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) + end + + local check_back_space = function() + local col = vim.fn.col('.') - 1 + return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil + end + + cmp.setup({ + formatting = { + format = require('lspkind').cmp_format({ + mode = 'symbol_text', -- show only symbol annotations + maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + }) + }, + mapping = { + [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), + [''] = cmp.mapping({ + i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), + c = cmp.mapping.confirm({ select = false }), + s = cmp.mapping.confirm({ select = false }), + }), + [''] = cmp.mapping(function(fallback) + if luasnip.expand_or_jumpable() then + vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) + else + fallback() + end + end, { + 'i', + 's', + }), + [''] = cmp.mapping(function(fallback) + if luasnip.jumpable(-1) then + vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) + else + fallback() + end + end, { + 'i', + 's', + }), + }, + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + sources = { + { name = 'luasnip', priority = 8 }, + { name = 'nvim_lsp', priority = 7 }, + { name = 'nvim_lsp_signature_help', priority = 7 }, + { name = 'treesitter', priority = 6 }, + { name = 'buffer', priority = 5, + option = { + get_bufnrs = function() + local bufs = {} + for _, win in ipairs(vim.api.nvim_list_wins()) do + bufs[vim.api.nvim_win_get_buf(win)] = true + end + return vim.tbl_keys(bufs) + end + } + }, + -- { name = 'nvim_lua' }, + -- { name = 'look' }, + -- { name = 'path' }, + -- { name = 'cmp_tabnine' }, + -- { name = 'calc' }, + -- { name = 'spell' }, + -- { name = 'emoji' }, + }, + enabled = function() + return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' + end, + completion = { completeopt = 'menu,menuone,noinsert, noselect' }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + sorting = { + comparators = { + require('clangd_extensions.cmp_scores'), + cmp.config.compare.locality, + -- cmp.config.compare.recently_used, + -- -- cmp.config.compare.offset, + -- cmp.config.compare.exact, + -- cmp.config.compare.recently_used, + -- cmp.config.compare.kind, + -- cmp.config.compare.sort_text, + -- cmp.config.compare.length, + -- cmp.config.compare.order, + }, + }, + -- experimental = { native_menu = true } + }) + + -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline('/', { + sources = { + { name = 'buffer' }, + }, + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + sources = { + { name = 'cmdline' }, + { name = 'cmdline_history' }, + { name = 'path' }, + { name = 'buffer' }, + }, + }) + + require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { + sources = { + { name = 'dap' }, + }, + }) + + -- Autopairs + --require("nvim-autopairs.completion.cmp").setup({ + -- map_cr = true, + -- map_complete = true, + -- auto_select = true + --}) + local cmp_autopairs = require('nvim-autopairs.completion.cmp') + cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) + end, + event = { 'InsertEnter', 'CmdLineEnter' }, +} diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua new file mode 100644 index 0000000..c1eedc9 --- /dev/null +++ b/lua/plugins/comment.lua @@ -0,0 +1,22 @@ +return { + 'numToStr/Comment.nvim', + config = function() + require('Comment').setup({ + mappings = false, + }) + end, + keys = { + { + '', + '(comment_toggle_linewise_current)', + desc= 'Toggle comment' + }, + + { + '', + '(comment_toggle_linewise_visual)gv', + mode = 'v', + desc= 'Toggle comment' + } + } +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..27f6339 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,12 @@ +return { + 'lewis6991/gitsigns.nvim', + config = { + current_line_blame = false, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + } +} diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua new file mode 100644 index 0000000..c7c41d0 --- /dev/null +++ b/lua/plugins/indent_blankline.lua @@ -0,0 +1,20 @@ +return { + 'lukas-reineke/indent-blankline.nvim', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + }, + config = function() + local opt = vim.opt -- to set options + opt.listchars:append('eol:↴') + -- opt.listchars:append("space: ") + opt.listchars:append('trail: ') + opt.listchars:append('tab:→ ') + + require('indent_blankline').setup({ + show_end_of_line = true, + use_treesitter = true, + show_current_context = true, + context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, + }) + end, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 10e92d4..c039499 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -21,108 +21,14 @@ return { }, keys = { 'p', 'i' } }, - { - 'p00f/nvim-ts-rainbow', - dependencies = 'nvim-treesitter/nvim-treesitter', - event = 'VeryLazy' - }, - { - 'ahmedkhalf/project.nvim', - config = function() - require('setup/project') - end, - event = 'VeryLazy' - }, { 'eddyekofo94/gruvbox-flat.nvim', disable = false, + priority = 1000, config = function() require('setup/my_gruvbox_flat') end }, - { - 'lukas-reineke/indent-blankline.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - }, - config = function() - require('setup/indent_blankline') - end, - }, - { - 'lewis6991/gitsigns.nvim', - config = function() - require('setup/gitsigns') - end, - }, - { - 'numToStr/Comment.nvim', - config = function() - require('setup/comment') - end, - keys = '' - }, - { - 'hoob3rt/lualine.nvim', - dependencies = { 'kyazdani42/nvim-web-devicons' }, - config = function() - require('setup/lualine') - end, - }, - { - 'hrsh7th/nvim-cmp', - dependencies = { - { 'onsails/lspkind-nvim' }, - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { - 'L3MON4D3/LuaSnip', - config = function() - require('setup/luasnip') - end, - dependencies = - { - 'rafamadriz/friendly-snippets' - } - }, - { 'saadparwaiz1/cmp_luasnip' }, - { 'hrsh7th/cmp-nvim-lua' }, - { 'octaltree/cmp-look' }, - { 'hrsh7th/cmp-path' }, - { 'hrsh7th/cmp-calc' }, - { 'f3fora/cmp-spell' }, - { 'hrsh7th/cmp-emoji' }, - { 'hrsh7th/cmp-cmdline' }, - { 'dmitmel/cmp-cmdline-history' }, - { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' }, - { 'p00f/clangd_extensions.nvim' }, - { - 'windwp/nvim-autopairs', - config = function() - require('setup/nvim-autopairs') - end - }, - }, - config = function() - require('setup/my_cmp') - end, - event = { 'InsertEnter', 'CmdLineEnter' }, - }, - { - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - 'p00f/clangd_extensions.nvim', - 'jose-elias-alvarez/null-ls.nvim', - 'ray-x/lsp_signature.nvim', - }, - config = function() - require('setup/my_lspconfig') - end, - event = 'VeryLazy' - }, { 'akinsho/toggleterm.nvim', config = function() diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..51f3dde --- /dev/null +++ b/lua/plugins/lspconfig.lua @@ -0,0 +1,231 @@ +return { + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'p00f/clangd_extensions.nvim', + 'jose-elias-alvarez/null-ls.nvim', + 'ray-x/lsp_signature.nvim', + }, + config = function() + require('mason').setup() + require('mason-lspconfig').setup({ + automatic_installation = false, + }) + + local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + + OpenDiagFloat = function() + for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do + if vim.api.nvim_win_get_config(winid).zindex then + return + end + end + vim.diagnostic.open_float({ focusable = false, width = 80 }) + end + + local on_attach = function(client, bufnr) + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + + -- Mappings. + local opts = { noremap = true, silent = false, buffer = bufnr } + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) + vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) + local tele_builtins = require('telescope.builtin') + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) + vim.keymap.set('n', '', 'Telescope aerial', opts) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) + + vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) + + -- Set some keybinds conditional on server capabilities + if client.server_capabilities.documentFormattingProvider then + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) + end + if client.server_capabilities.documentRangeFormattingProvider then + vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) + end + + -- Set autocommands conditional on server_capabilities + if client.server_capabilities.documentHighlightProvider then + vim.api.nvim_set_hl( + 0, + "LspReferenceText", + { bold = true, + ctermbg = 'red', + bg = "#5a524c" } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceRead", + { bold = true, + ctermbg = 'red', + bg = 'DarkGreen' } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceWrite", + { bold = true, + ctermbg = 'red', + bg = 'DarkRed' } + ) + 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 + + require('lsp_signature').on_attach({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = 'single', + }, + hi_parameter = 'IncSearch', + }, bufnr) + end + + require('lspconfig')['pyright'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + + require('lspconfig')['groovyls'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + + require('lspconfig')['cmake'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + + local clangd_capabilities = capabilities + clangd_capabilities.textDocument.semanticHighlighting = true + clangd_capabilities.offsetEncoding = { "utf-16" } + require("clangd_extensions").setup { + server = { + capabilities = clangd_capabilities, + on_attach = on_attach, + cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + root_dir = require('lspconfig').util.root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim' + ) + }, + extensions = + { + inlay_hints = { + -- Only show inlay hints for the current line + only_current_line = true, + } + } + + } + -- require('clangd_extensions').setup({ + -- server = { + -- on_attach = on_attach, + -- capabilities = capabilities, + -- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + -- }, + -- }) + + require('lspconfig')['jsonls'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + + local lua_rtp = vim.split(package.path, ';') + table.insert(lua_rtp, 'lua/?.lua') + table.insert(lua_rtp, 'lua/?/init.lua') + require('lspconfig').sumneko_lua.setup { + capabilities = capabilities, + on_attach = on_attach, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = lua_rtp, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim', 'use' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file('', true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + } + } + + require('lspconfig')['dockerls'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + + require('lspconfig')['yamlls'].setup { + capabilities = capabilities, + on_attach = on_attach, + settings = { + yaml = { + validate = true + } + } + } + + local null_ls = require('null-ls') + null_ls.setup({ + sources = { + null_ls.builtins.code_actions.gitsigns, + null_ls.builtins.formatting.autopep8, + null_ls.builtins.formatting.prettier, + null_ls.builtins.diagnostics.flake8, + null_ls.builtins.formatting.isort, + null_ls.builtins.formatting.cmake_format, + }, + on_attach = on_attach, + capabilities = capabilities, + }) + + vim.diagnostic.config({ virtual_text = false }) + end, + event = 'VeryLazy' +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..00731c2 --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,32 @@ +return { + 'hoob3rt/lualine.nvim', + dependencies = { 'kyazdani42/nvim-web-devicons' }, + config = { + options = { + theme = 'gruvbox-flat', + disabled_filetypes = { + statusline = {}, + winbar = { 'dap-repl', 'dapui_console' }, + }, + }, + sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + globalstatus = true, + winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + inactive_winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + } +} diff --git a/lua/plugins/nvim-ts-rainbow.lua b/lua/plugins/nvim-ts-rainbow.lua new file mode 100644 index 0000000..2c27644 --- /dev/null +++ b/lua/plugins/nvim-ts-rainbow.lua @@ -0,0 +1,5 @@ +return { + 'p00f/nvim-ts-rainbow', + dependencies = 'nvim-treesitter/nvim-treesitter', + event = 'VeryLazy' +} diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua new file mode 100644 index 0000000..5330c8b --- /dev/null +++ b/lua/plugins/project.lua @@ -0,0 +1,12 @@ +return { + 'ahmedkhalf/project.nvim', + config = function() + require("project_nvim").setup( + { + silent_chdir = true, + ignore_lsp = { 'null-ls', 'cmake' }, + patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, + }) + end, + -- event = 'BufReadPre' +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4f40d42..b9e78a0 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -5,15 +5,14 @@ return { 'kyazdani42/nvim-web-devicons', { 'nvim-telescope/telescope-fzf-native.nvim', - 'nvim-telescope/telescope-ui-select.nvim', build = { 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" 'cmake --build build --config Release', 'cmake --install build --prefix build' }, - config = function() - end }, + 'nvim-telescope/telescope-ui-select.nvim', + 'ahmedkhalf/project.nvim', }, cmd = { "Telescope" }, keys = { @@ -86,7 +85,14 @@ return { require("telescope.builtin").grep_string() end, desc = 'Find in workspace', - } + }, + { + 'p', + function() + require('telescope').extensions.projects.projects() + end, + desc = 'Select project', + }, }, config = function() local actions = require('telescope.actions') @@ -98,6 +104,12 @@ return { }, } + Project_files = function() + local opts = {} -- define here if you want to define something + local ok = pcall(require "telescope.builtin".git_files, opts) + if not ok then require "telescope.builtin".find_files(opts) end + end + require('telescope').setup({ defaults = { mappings = { @@ -149,13 +161,7 @@ return { }) require("telescope").load_extension("ui-select") - - Project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end - end - require('telescope').load_extension('fzf') + -- require('telescope').load_extension('projects') end } diff --git a/lua/setup/comment.lua b/lua/setup/comment.lua deleted file mode 100644 index 09302fb..0000000 --- a/lua/setup/comment.lua +++ /dev/null @@ -1,13 +0,0 @@ -require('Comment').setup({ - mappings = false, -}) -require('legendary').keymap( - { - '', - { - n = '(comment_toggle_linewise_current)', - v = '(comment_toggle_linewise_visual)gv' - }, - description = 'Toggle comment' - } -) diff --git a/lua/setup/gitsigns.lua b/lua/setup/gitsigns.lua deleted file mode 100644 index e4fb000..0000000 --- a/lua/setup/gitsigns.lua +++ /dev/null @@ -1,9 +0,0 @@ -require('gitsigns').setup({ - current_line_blame = false, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, -}) diff --git a/lua/setup/indent_blankline.lua b/lua/setup/indent_blankline.lua deleted file mode 100644 index fa14302..0000000 --- a/lua/setup/indent_blankline.lua +++ /dev/null @@ -1,12 +0,0 @@ -local opt = vim.opt -- to set options -opt.listchars:append('eol:↴') --- opt.listchars:append("space: ") -opt.listchars:append('trail: ') -opt.listchars:append('tab:→ ') - -require('indent_blankline').setup({ - show_end_of_line = true, - use_treesitter = true, - show_current_context = true, - context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, -}) diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua deleted file mode 100644 index a05db60..0000000 --- a/lua/setup/lualine.lua +++ /dev/null @@ -1,29 +0,0 @@ -vim.opt.laststatus = 3 -require('lualine').setup({ - options = { - theme = 'gruvbox-flat', - disabled_filetypes = { - statusline = {}, - winbar = { 'dap-repl', 'dapui_console' }, - }, - }, - sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - globalstatus = true, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, -}) diff --git a/lua/setup/my_cmp.lua b/lua/setup/my_cmp.lua deleted file mode 100644 index 6abbac6..0000000 --- a/lua/setup/my_cmp.lua +++ /dev/null @@ -1,141 +0,0 @@ -local cmp = require('cmp') -local luasnip = require('luasnip') - -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col('.') - 1 - return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil -end - -cmp.setup({ - formatting = { - format = require('lspkind').cmp_format({ - mode = 'symbol_text', -- show only symbol annotations - maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) - ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) - }) - }, - mapping = { - [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), - [''] = cmp.mapping({ - i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), - c = cmp.mapping.confirm({ select = false }), - s = cmp.mapping.confirm({ select = false }), - }), - [''] = cmp.mapping(function(fallback) - if luasnip.expand_or_jumpable() then - vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) - else - fallback() - end - end, { - 'i', - 's', - }), - [''] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) - else - fallback() - end - end, { - 'i', - 's', - }), - }, - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - sources = { - { name = 'luasnip', priority = 8 }, - { name = 'nvim_lsp', priority = 7 }, - { name = 'nvim_lsp_signature_help', priority = 7 }, - { name = 'treesitter', priority = 6 }, - { name = 'buffer', priority = 5, - option = { - get_bufnrs = function() - local bufs = {} - for _, win in ipairs(vim.api.nvim_list_wins()) do - bufs[vim.api.nvim_win_get_buf(win)] = true - end - return vim.tbl_keys(bufs) - end - } - }, - -- { name = 'nvim_lua' }, - -- { name = 'look' }, - -- { name = 'path' }, - -- { name = 'cmp_tabnine' }, - -- { name = 'calc' }, - -- { name = 'spell' }, - -- { name = 'emoji' }, - }, - enabled = function() - return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' - end, - completion = { completeopt = 'menu,menuone,noinsert, noselect' }, - window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), - }, - sorting = { - comparators = { - require('clangd_extensions.cmp_scores'), - cmp.config.compare.locality, - -- cmp.config.compare.recently_used, - -- -- cmp.config.compare.offset, - -- cmp.config.compare.exact, - -- cmp.config.compare.recently_used, - -- cmp.config.compare.kind, - -- cmp.config.compare.sort_text, - -- cmp.config.compare.length, - -- cmp.config.compare.order, - }, - }, - -- experimental = { native_menu = true } -}) - --- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline('/', { - sources = { - { name = 'buffer' }, - }, -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - sources = { - { name = 'cmdline' }, - { name = 'cmdline_history' }, - { name = 'path' }, - { name = 'buffer' }, - }, -}) - -require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { - sources = { - { name = 'dap' }, - }, -}) - --- Autopairs ---require("nvim-autopairs.completion.cmp").setup({ --- map_cr = true, --- map_complete = true, --- auto_select = true ---}) -local cmp_autopairs = require('nvim-autopairs.completion.cmp') -cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua deleted file mode 100644 index b16a0c0..0000000 --- a/lua/setup/my_lspconfig.lua +++ /dev/null @@ -1,218 +0,0 @@ -require('mason').setup() -require('mason-lspconfig').setup({ - automatic_installation = false, -}) - -local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -OpenDiagFloat = function() - for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end - end - vim.diagnostic.open_float({ focusable = false, width=80 }) -end - -local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local opts = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', '', 'Telescope aerial', opts) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) - - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) - - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) - end - - -- Set autocommands conditional on server_capabilities - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_set_hl( - 0, - "LspReferenceText", - { bold = true, - ctermbg = 'red', - bg = "#5a524c"} - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceRead", - { bold = true, - ctermbg = 'red', - bg = 'DarkGreen' } - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceWrite", - { bold = true, - ctermbg = 'red', - bg = 'DarkRed' } - ) - 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 - - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) -end - -require('lspconfig')['pyright'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['groovyls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['cmake'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local clangd_capabilities = capabilities -clangd_capabilities.textDocument.semanticHighlighting = true -clangd_capabilities.offsetEncoding = { "utf-16" } -require("clangd_extensions").setup { - server = { - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - root_dir = require('lspconfig').util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) - }, - extensions = - { - inlay_hints = { - -- Only show inlay hints for the current line - only_current_line = true, - } - } - -} --- require('clangd_extensions').setup({ --- server = { --- on_attach = on_attach, --- capabilities = capabilities, --- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, --- }, --- }) - -require('lspconfig')['jsonls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local lua_rtp = vim.split(package.path, ';') -table.insert(lua_rtp, 'lua/?.lua') -table.insert(lua_rtp, 'lua/?/init.lua') -require('lspconfig').sumneko_lua.setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - } -} - -require('lspconfig')['dockerls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['yamlls'].setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - yaml = { - validate = true - } - } -} - -local null_ls = require('null-ls') -null_ls.setup({ - sources = { - null_ls.builtins.code_actions.gitsigns, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format, - }, - on_attach = on_attach, - capabilities = capabilities, -}) - -vim.diagnostic.config({ virtual_text = false }) diff --git a/lua/setup/project.lua b/lua/setup/project.lua deleted file mode 100644 index bc289c5..0000000 --- a/lua/setup/project.lua +++ /dev/null @@ -1,17 +0,0 @@ -require('project_nvim').setup({ - silent_chdir = true, - ignore_lsp = { 'null-ls', 'cmake' }, - patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, -}) -require('telescope').load_extension('projects') -require('legendary').keymaps( - { - { - 'p', - function () - require('telescope').extensions.projects.projects() - end, - description = 'Select project', - }, - } -) -- 2.49.1 From 4916c4eca2c911d052973a72fe9638ca9154e4f0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 20:29:41 +0100 Subject: [PATCH 298/894] more restructering --- lua/plugins/aerial.lua | 27 ++++++++++++++++++++++ lua/plugins/init.lua | 34 --------------------------- lua/plugins/neoclip.lua | 18 +++++++++++++++ lua/plugins/toggleterm.lua | 47 ++++++++++++++++++++++++++++++++++++++ lua/setup/aerial.lua | 18 --------------- lua/setup/toggleterm.lua | 42 ---------------------------------- lua/setup/yanky.lua | 27 ---------------------- 7 files changed, 92 insertions(+), 121 deletions(-) create mode 100644 lua/plugins/aerial.lua create mode 100644 lua/plugins/neoclip.lua create mode 100644 lua/plugins/toggleterm.lua delete mode 100644 lua/setup/aerial.lua delete mode 100644 lua/setup/toggleterm.lua delete mode 100644 lua/setup/yanky.lua diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua new file mode 100644 index 0000000..94f0130 --- /dev/null +++ b/lua/plugins/aerial.lua @@ -0,0 +1,27 @@ +return { + 'stevearc/aerial.nvim', + dependencies = { + 'nvim-telescope/telescope.nvim' + }, + config = function() + require('aerial').setup({ + backends = { 'lsp', 'treesitter', 'markdown' }, + layout = { + default_direction = "prefer_left" + }, + filter_kind = false, + show_guides = true, + }) + require('telescope').load_extension('aerial') + end, + cmd = 'AerialToggle', + keys = { + { + 's', + function () + require('aerial').toggle() + end, + desc = 'Symbols outline', + } + } +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c039499..b5d6341 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,40 +29,6 @@ return { require('setup/my_gruvbox_flat') end }, - { - 'akinsho/toggleterm.nvim', - config = function() - require('setup/toggleterm') - end, - cmd = 'ToggleTerm', - keys = 'g' - }, - { - 'gbprod/yanky.nvim', - config = function() - require('setup/yanky') - end, - keys = { - { '' }, - { '' } - }, - dependencies = { - 'nvim-telescope/telescope.nvim' - } - }, - { - 'stevearc/aerial.nvim', - dependencies = { - 'nvim-telescope/telescope.nvim' - }, - config = function() - require('setup/aerial') - end, - cmd = 'AerialToggle', - keys = { - { 's' } - } - }, { 'ggandor/leap.nvim', dependencies = { 'tpope/vim-repeat' }, diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua new file mode 100644 index 0000000..b38b77e --- /dev/null +++ b/lua/plugins/neoclip.lua @@ -0,0 +1,18 @@ +return { + "AckslD/nvim-neoclip.lua", + dependencies = { + { 'kkharji/sqlite.lua', module = 'sqlite' }, + -- { 'nvim-telescope/telescope.nvim' }, + }, + config = true, + keys = { + { + '[', + function () + require('telescope').extensions.neoclip.default({initial_mode='normal'}) + end, + desc = 'NeoClip' + } + }, + event = 'VeryLazy' +} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua new file mode 100644 index 0000000..cbd372f --- /dev/null +++ b/lua/plugins/toggleterm.lua @@ -0,0 +1,47 @@ +return { + 'akinsho/toggleterm.nvim', + config = function() + function _G.set_terminal_keymaps(term) + local opts = { noremap = true } + if (term.cmd ~= 'lazygit') then + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[]], opts) + end + vim.api.nvim_buf_set_keymap(term.bufnr, 't', 'jk', [[]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[h]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[j]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[k]], opts) + vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[l]], opts) + end + + require('toggleterm').setup({ + on_open = set_terminal_keymaps + }) + + local Terminal = require('toggleterm.terminal').Terminal + + local lazygit = Terminal:new({ + cmd = 'lazygit', + -- dir = vim.fn.getcwd(), + hidden = true, + direction = 'float', + on_open = function(term) + vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) + -- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) + end, + }) + + function _lazygit_toggle() + lazygit:toggle() + end + end, + cmd = 'ToggleTerm', + keys = { + { + 'g', + function() + _lazygit_toggle() + end, + desc= 'Open lazygit', + } + } +} diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua deleted file mode 100644 index 0978b72..0000000 --- a/lua/setup/aerial.lua +++ /dev/null @@ -1,18 +0,0 @@ -require('aerial').setup({ - backends = { 'lsp', 'treesitter', 'markdown' }, - layout = { - default_direction = "prefer_left" - }, - filter_kind = false, - show_guides = true, -}) -require('telescope').load_extension('aerial') -require('legendary').keymaps( - { - { - 's', - ':AerialToggle', - description = 'Symbols outline', - } - } -) diff --git a/lua/setup/toggleterm.lua b/lua/setup/toggleterm.lua deleted file mode 100644 index 09efcd4..0000000 --- a/lua/setup/toggleterm.lua +++ /dev/null @@ -1,42 +0,0 @@ -function _G.set_terminal_keymaps(term) - local opts = { noremap = true } - if (term.cmd ~= 'lazygit') then - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[]], opts) - end - vim.api.nvim_buf_set_keymap(term.bufnr, 't', 'jk', [[]], opts) - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[h]], opts) - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[j]], opts) - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[k]], opts) - vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[l]], opts) -end - -require('toggleterm').setup({ - on_open = set_terminal_keymaps -}) - -local Terminal = require('toggleterm.terminal').Terminal - -local lazygit = Terminal:new({ - cmd = 'lazygit', - -- dir = vim.fn.getcwd(), - hidden = true, - direction = 'float', - on_open = function(term) - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) - -- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) - end, -}) - -function _lazygit_toggle() - lazygit:toggle() -end - -require('legendary').keymaps( - { - { - 'g', - ':lua _lazygit_toggle()', - description = 'Open lazygit', - } - } -) diff --git a/lua/setup/yanky.lua b/lua/setup/yanky.lua deleted file mode 100644 index bfcf475..0000000 --- a/lua/setup/yanky.lua +++ /dev/null @@ -1,27 +0,0 @@ -require('yanky').setup() -vim.api.nvim_set_keymap('n', 'p', '(YankyPutAfter)', {}) -vim.api.nvim_set_keymap('n', 'P', '(YankyPutBefore)', {}) -vim.api.nvim_set_keymap('x', 'p', '(YankyPutAfter)', {}) -vim.api.nvim_set_keymap('x', 'P', '(YankyPutBefore)', {}) -vim.api.nvim_set_keymap('n', 'gp', '(YankyGPutAfter)', {}) -vim.api.nvim_set_keymap('n', 'gP', '(YankyGPutBefore)', {}) -vim.api.nvim_set_keymap('x', 'gp', '(YankyGPutAfter)', {}) -vim.api.nvim_set_keymap('x', 'gP', '(YankyGPutBefore)', {}) -vim.keymap.set("n", "", "(YankyCycleForward)", {}) -vim.keymap.set("n", "", "(YankyCycleBackward)", {}) - -require("telescope").load_extension('yank_history') -require('legendary').keymaps( - { - { - '', - '(YankyCycleForward)', - description = 'Yanky cycle forward', - }, - { - '', - '(YankyCycleBackward)', - description = 'Yanky cycle backward', - }, - } -) -- 2.49.1 From 9055e4e8768e04fd5035d94d51986fa74b5c79c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 20:44:18 +0100 Subject: [PATCH 299/894] dap and leap --- lua/plugins/dap.lua | 249 ++++++++++++++++++++++++++++++++++++++++++ lua/plugins/init.lua | 34 ------ lua/plugins/leap.lua | 8 ++ lua/setup/my_dap.lua | 185 ------------------------------- lua/setup/my_leap.lua | 1 - 5 files changed, 257 insertions(+), 220 deletions(-) create mode 100644 lua/plugins/dap.lua create mode 100644 lua/plugins/leap.lua delete mode 100644 lua/setup/my_dap.lua delete mode 100644 lua/setup/my_leap.lua diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua new file mode 100644 index 0000000..b62079e --- /dev/null +++ b/lua/plugins/dap.lua @@ -0,0 +1,249 @@ +return { + 'mfussenegger/nvim-dap', + dependencies = { + 'mfussenegger/nvim-dap-python', + 'theHamsta/nvim-dap-virtual-text', + { + 'nvim-telescope/telescope-dap.nvim', + dependencies = 'telescope.nvim', + }, + 'rcarriga/nvim-dap-ui', + 'rcarriga/cmp-dap', + }, + keys = { + { + '', + function() + require('dap').continue() + end, + desc = 'DAP continue' + }, + { + '', + function() + loadConfigs() + end, + desc = 'DAP configs' + }, + { + '', + function() + require('dap').goto_() + end, + desc = 'DAP goto' + }, + { + '', + function() + require('dap.ui.widgets').hover() + end, + desc = 'DAP Hover' + }, + { + '', + function() + require('dap').toggle_breakpoint() + end, + desc = 'DAP breakpoint' + }, + { + '', + function() + require('dap').step_over() + end, + desc = 'DAP step_over' + }, + { + '', + function() + require('dap').step_into() + end, + desc = 'DAP step_into' + }, + { + '', + function() + require('dap').step_out() + end, + desc = 'DAP step_out' + }, + }, + config = function() + local dap = require('dap') + + require("cmp_dap").is_dap_buffer() + + + -- make sure we can exit the terminal with esc + vim.api.nvim_create_autocmd({ "TermOpen" }, { + pattern = { '*dap-terminal*' }, + callback = function() + local opts = { noremap = true } + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + end + }) + + local function getVenvSuffix() + if vim.loop.os_uname().sysname == 'Linux' then + return 'bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return 'Scripts/python.exe' + end + end + + local function getPythonEnv() + local venv = os.getenv("VIRTUAL_ENV") + if venv ~= nil then + return string.format("%s/%s", venv, getVenvSuffix()) + end + local conda = os.getenv("CONDA_PREFIX") + if conda ~= nil then + return string.format("%s/%s", conda, 'python.exe') + end + + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/venv/' .. getVenvSuffix() + elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then + return cwd .. '/.venv/' .. getVenvSuffix() + else + if vim.loop.os_uname().sysname == 'Linux' then + return '/usr/bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return os.getenv('SCOOP') .. '/apps/python/current/python.exe' + end + end + end + + function loadConfigs() + require('dap.ext.vscode').load_launchjs() + -- Make sure we use the correct python env even for the configs from launch.json + for nr, config in pairs(dap.configurations.python) do + config.pythonPath = getPythonEnv() + config.cwd = vim.fn.getcwd() + end + require 'telescope'.extensions.dap.configurations {} + end + + local initDir = vim.api.nvim_list_runtime_paths()[1] + local masonpath = vim.fn.stdpath('data') .. '/mason' + + -- PYTHON + dap.adapters.python = { + type = 'executable'; + command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix(); + args = { '-m', 'debugpy.adapter' }; + options = { + detached = true; + }; + } + + local dap = require("dap") + local dapui = require("dapui") + dapui.setup() + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() + end + + dap.configurations.python = { + { + type = 'python'; + request = 'launch'; + name = "Launch file with venv"; + justMyCode = false; + program = "${file}"; + cwd = vim.fn.getcwd(); + pythonPath = getPythonEnv + }, + } + + -- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') + -- table.insert(require('dap').configurations.python, { + -- -- type = 'python', + -- -- request = 'launch', + -- -- name = 'My custom launch configuration', + -- -- program = '${file}', + -- justMyCode = false + -- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings + -- }) + -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') + + -- CPP + dap.adapters.codelldb = { + type = 'server', + port = "${port}", + executable = { + -- CHANGE THIS to your path! + command = masonpath .. '/bin/codelldb.cmd', + args = { '--port', '${port}' }, + + -- On windows you may have to uncomment this: + detached = false, + } + } + + dap.adapters.lldb = { + type = 'executable', + command = function() + if vim.loop.os_uname().sysname == 'Linux' then + return 'lldb-vscode' + else + return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' + end + end, + name = 'lldb' + } + + dap.configurations.cpp = { + { + name = "Launch codelldb", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = true, + }, + } + + dap.configurations.cpp = { + { + name = 'Launch lldb', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + args = {}, + + -- 💀 + -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: + -- + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + -- + -- Otherwise you might get the following error: + -- + -- Error on launch: Failed to attach to the target process + -- + -- But you should be aware of the implications: + -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html + -- runInTerminal = false, + }, + } + + -- EXTENSIONS + + require('nvim-dap-virtual-text').setup() + require('telescope').load_extension('dap') + + end, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b5d6341..882f71e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,40 +29,6 @@ return { require('setup/my_gruvbox_flat') end }, - { - 'ggandor/leap.nvim', - dependencies = { 'tpope/vim-repeat' }, - config = function() - require('setup/my_leap') - end, - event = 'VeryLazy' - }, - { - 'mfussenegger/nvim-dap', - dependencies = { - 'mfussenegger/nvim-dap-python', - 'theHamsta/nvim-dap-virtual-text', - { - 'nvim-telescope/telescope-dap.nvim', - dependencies = 'telescope.nvim', - }, - 'rcarriga/nvim-dap-ui', - 'rcarriga/cmp-dap', - }, - keys = { - { '' }, - { '' }, - { '' }, - { '' }, - { '' }, - { '' }, - { '' }, - { '' } - }, - config = function() - require('setup/my_dap') - end, - }, { 'sindrets/diffview.nvim', dependencies = 'nvim-lua/plenary.nvim', diff --git a/lua/plugins/leap.lua b/lua/plugins/leap.lua new file mode 100644 index 0000000..830b40d --- /dev/null +++ b/lua/plugins/leap.lua @@ -0,0 +1,8 @@ +return { + 'ggandor/leap.nvim', + dependencies = { 'tpope/vim-repeat' }, + config = function() + require('leap').set_default_keymaps() + end, + event = 'VeryLazy' +} diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua deleted file mode 100644 index a064311..0000000 --- a/lua/setup/my_dap.lua +++ /dev/null @@ -1,185 +0,0 @@ -dap = require('dap') - -require("cmp_dap").is_dap_buffer() - - --- make sure we can exit the terminal with esc -vim.api.nvim_create_autocmd({ "TermOpen" }, { - pattern = { '*dap-terminal*' }, - callback = function() - local opts = { noremap = true } - vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) - end -}) - -local function getVenvSuffix() - if vim.loop.os_uname().sysname == 'Linux' then - return 'bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return 'Scripts/python.exe' - end -end - -local function getPythonEnv() - local venv = os.getenv("VIRTUAL_ENV") - if venv ~= nil then - return string.format("%s/%s", venv, getVenvSuffix()) - end - local conda = os.getenv("CONDA_PREFIX") - if conda ~= nil then - return string.format("%s/%s", conda, 'python.exe') - end - - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/venv/' .. getVenvSuffix() - elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/.venv/' .. getVenvSuffix() - else - if vim.loop.os_uname().sysname == 'Linux' then - return '/usr/bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return os.getenv('SCOOP') .. '/apps/python/current/python.exe' - end - end -end - -local function loadConfigs () - require('dap.ext.vscode').load_launchjs() - -- Make sure we use the correct python env even for the configs from launch.json - for nr,config in pairs(dap.configurations.python) do - config.pythonPath = getPythonEnv() - config.cwd = vim.fn.getcwd() - end - require'telescope'.extensions.dap.configurations{} -end -local opts = { noremap = true, silent = false } -vim.keymap.set('n', '', dap.continue, opts) -vim.keymap.set('n', '', loadConfigs, opts) -vim.keymap.set('n', '', dap.goto_, opts) -vim.keymap.set('n', '', require('dap.ui.widgets').hover, opts) -vim.keymap.set('n', '', dap.toggle_breakpoint, opts) -vim.keymap.set('n', '', dap.step_over, opts) -vim.keymap.set('n', '', dap.step_into, opts) -vim.keymap.set('n', '', dap.step_out, opts) - -local initDir = vim.api.nvim_list_runtime_paths()[1] -local masonpath = vim.fn.stdpath('data') .. '/mason' - --- PYTHON -dap.adapters.python = { - type = 'executable'; - command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix(); - args = { '-m', 'debugpy.adapter' }; - options = { - detached = true; - }; -} - -local dap= require("dap") -local dapui = require("dapui") -dapui.setup() -dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open() -end -dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close() -end -dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close() -end - -dap.configurations.python = { - { - type = 'python'; - request = 'launch'; - name = "Launch file with venv"; - justMyCode = false; - program = "${file}"; - cwd = vim.fn.getcwd(); - pythonPath = getPythonEnv - }, -} - --- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') --- table.insert(require('dap').configurations.python, { --- -- type = 'python', --- -- request = 'launch', --- -- name = 'My custom launch configuration', --- -- program = '${file}', --- justMyCode = false --- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings --- }) --- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') - --- CPP -dap.adapters.codelldb = { - type = 'server', - port = "${port}", - executable = { - -- CHANGE THIS to your path! - command = masonpath .. '/bin/codelldb.cmd', - args = { '--port', '${port}' }, - - -- On windows you may have to uncomment this: - detached = false, - } -} - -dap.adapters.lldb = { - type = 'executable', - command = function() - if vim.loop.os_uname().sysname == 'Linux' then - return 'lldb-vscode' - else - return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' - end - end, - name = 'lldb' -} - -dap.configurations.cpp = { - { - name = "Launch codelldb", - type = "codelldb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = true, - }, -} - -dap.configurations.cpp = { - { - name = 'Launch lldb', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - - -- 💀 - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - -- runInTerminal = false, - }, -} - --- EXTENSIONS - -require('nvim-dap-virtual-text').setup() -require('telescope').load_extension('dap') - diff --git a/lua/setup/my_leap.lua b/lua/setup/my_leap.lua deleted file mode 100644 index 08d46e0..0000000 --- a/lua/setup/my_leap.lua +++ /dev/null @@ -1 +0,0 @@ -require('leap').set_default_keymaps() -- 2.49.1 From b0918760d458dda62cb7635870e6c607ab9948dd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 21:07:04 +0100 Subject: [PATCH 300/894] moved all plugins --- lua/plugins/cmp.lua | 11 +----- lua/plugins/dap.lua | 12 +++---- lua/plugins/diffview.lua | 8 +++++ lua/plugins/gruvbox_flat.lua | 18 ++++++++++ lua/plugins/init.lua | 47 ------------------------ lua/plugins/luasnip.lua | 66 ++++++++++++++++++++++++++++++++++ lua/plugins/neogen.lua | 34 ++++++++++++++++++ lua/plugins/overseer.lua | 19 ++++++++++ lua/setup/luasnip.lua | 67 ----------------------------------- lua/setup/my_diffview.lua | 3 -- lua/setup/my_gruvbox_flat.lua | 12 ------- lua/setup/my_overseer.lua | 18 ---------- lua/setup/neogen.lua | 29 --------------- 13 files changed, 151 insertions(+), 193 deletions(-) create mode 100644 lua/plugins/diffview.lua create mode 100644 lua/plugins/gruvbox_flat.lua create mode 100644 lua/plugins/luasnip.lua create mode 100644 lua/plugins/neogen.lua create mode 100644 lua/plugins/overseer.lua delete mode 100644 lua/setup/luasnip.lua delete mode 100644 lua/setup/my_diffview.lua delete mode 100644 lua/setup/my_gruvbox_flat.lua delete mode 100644 lua/setup/my_overseer.lua delete mode 100644 lua/setup/neogen.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 1994d04..70bd50f 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -4,16 +4,7 @@ return { { 'onsails/lspkind-nvim' }, { 'hrsh7th/cmp-buffer' }, { 'hrsh7th/cmp-nvim-lsp' }, - { - 'L3MON4D3/LuaSnip', - config = function() - require('setup/luasnip') - end, - dependencies = - { - 'rafamadriz/friendly-snippets' - } - }, + { 'L3MON4D3/LuaSnip' }, { 'saadparwaiz1/cmp_luasnip' }, { 'hrsh7th/cmp-nvim-lua' }, { 'octaltree/cmp-look' }, diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index b62079e..dbf6fad 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -118,14 +118,13 @@ return { function loadConfigs() require('dap.ext.vscode').load_launchjs() -- Make sure we use the correct python env even for the configs from launch.json - for nr, config in pairs(dap.configurations.python) do + for _, config in pairs(dap.configurations.python) do config.pythonPath = getPythonEnv() config.cwd = vim.fn.getcwd() end require 'telescope'.extensions.dap.configurations {} end - local initDir = vim.api.nvim_list_runtime_paths()[1] local masonpath = vim.fn.stdpath('data') .. '/mason' -- PYTHON @@ -138,17 +137,16 @@ return { }; } - local dap = require("dap") local dapui = require("dapui") dapui.setup() dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open() + dapui.open({}) end dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close() + dapui.close({}) end dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close() + dapui.close({}) end dap.configurations.python = { @@ -242,7 +240,7 @@ return { -- EXTENSIONS - require('nvim-dap-virtual-text').setup() + require('nvim-dap-virtual-text').setup({}) require('telescope').load_extension('dap') end, diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua new file mode 100644 index 0000000..6fd92bf --- /dev/null +++ b/lua/plugins/diffview.lua @@ -0,0 +1,8 @@ +return { + 'sindrets/diffview.nvim', + dependencies = { + 'nvim-lua/plenary.nvim' + }, + config = true, + cmd = 'DiffviewOpen', +} diff --git a/lua/plugins/gruvbox_flat.lua b/lua/plugins/gruvbox_flat.lua new file mode 100644 index 0000000..f3603d2 --- /dev/null +++ b/lua/plugins/gruvbox_flat.lua @@ -0,0 +1,18 @@ +return { + 'eddyekofo94/gruvbox-flat.nvim', + priority = 1000, + config = function() + local colors = require('gruvbox.colors') + vim.g.gruvbox_flat_style = "dark" + vim.g.gruvbox_colors = { + bg_search = 'purple', + fg_search = 'black', + } + vim.g.gruvbox_theme = { + Pmenu = { bg = 'bg_visual' }, + NormalFloat = { bg = 'bg_visual' } + } + vim.g.gruvbox_dark_float = false + vim.cmd('colorscheme gruvbox-flat') + end +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 882f71e..058678e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,49 +1,2 @@ return { - { - 'mrjones2014/legendary.nvim', - config = function() - require('setup/my_legendary') - require('legendary').keymaps( - { - { - 'i', - function() - require("lazy").home() - end, - description = 'Start lazy home' - } - } - ) - end, - dependencies = { - 'stevearc/dressing.nvim', - 'nvim-telescope/telescope.nvim', - }, - keys = { 'p', 'i' } - }, - { - 'eddyekofo94/gruvbox-flat.nvim', - disable = false, - priority = 1000, - config = function() - require('setup/my_gruvbox_flat') - end - }, - { - 'sindrets/diffview.nvim', - dependencies = 'nvim-lua/plenary.nvim', - config = function() - require('setup/my_diffview') - end, - cmd = 'DiffviewOpen', - }, - { - 'stevearc/overseer.nvim', - config = function() - require('setup/my_overseer') - end, - keys = { - { '' } - }, - } } diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua new file mode 100644 index 0000000..e11aa7f --- /dev/null +++ b/lua/plugins/luasnip.lua @@ -0,0 +1,66 @@ +return { + 'L3MON4D3/LuaSnip', + config = function() + local ls = require('luasnip') + -- some shorthands... + local s = ls.snippet + local sn = ls.snippet_node + local isn = ls.indent_snippet_node + local t = ls.text_node + local i = ls.insert_node + local f = ls.function_node + local c = ls.choice_node + local d = ls.dynamic_node + local r = ls.restore_node + local l = require('luasnip.extras').lambda + local rep = require('luasnip.extras').rep + local p = require('luasnip.extras').partial + local m = require('luasnip.extras').match + local n = require('luasnip.extras').nonempty + local dl = require('luasnip.extras').dynamic_lambda + local fmt = require('luasnip.extras.fmt').fmt + local fmta = require('luasnip.extras.fmt').fmta + local types = require('luasnip.util.types') + local conds = require('luasnip.extras.expand_conditions') + + local function getRegA(capitalize) + local clipboard = vim.fn.getreg('a') + clipboard = clipboard:gsub('^m_', '') + if capitalize then + clipboard = clipboard:gsub('^%l', string.upper) + end + return clipboard + end + + ls.snippets = { + cpp = { + s('TEST_F_getset', + { + t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }), + i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({ ');', ' ' }), + i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({ '());', '' }), + t({ '', '}', '' }) + }), + s('TEST_fn_getset', + { + t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({ '()', '{', ' ' }), + i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({ ');', ' ' }), + i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({ '());', '' }), + t({ '', '}', '', '' }), + + t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }), + p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({ '();' }), + t({ '', '}' }), + }) + }, + } + + require('luasnip.loaders.from_vscode').lazy_load() + require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } }) + end, + dependencies = + { + 'rafamadriz/friendly-snippets' + }, + cmd = 'LuaSnipListAvailable' +} diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua new file mode 100644 index 0000000..4937074 --- /dev/null +++ b/lua/plugins/neogen.lua @@ -0,0 +1,34 @@ +return { + 'danymat/neogen', + dependencies = 'nvim-treesitter/nvim-treesitter', + config = { + enabled = true, + languages = { + cpp = { + template = { + annotation_convention = 'custom', + custom = { + { nil, '/// file', { no_results = true, type = { 'file' } } }, + { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, + { nil, '', { no_results = true, type = { 'file' } } }, + + { nil, '/// $1', { type = { 'func' } } }, + { 'tparam', '/// \\tparam %s $1' }, + { 'parameters', '/// \\param %s $1' }, + { 'return_statement', '/// \\return $1' }, + }, + }, + }, + }, + }, + keys = { + { + 'n', + function() + require('neogen').generate() + end, + desc = 'Add comment', + } + }, + cmd = 'Neogen' +} diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua new file mode 100644 index 0000000..5de82ed --- /dev/null +++ b/lua/plugins/overseer.lua @@ -0,0 +1,19 @@ +return { + 'stevearc/overseer.nvim', + config = function() + require('overseer').setup({ + templates = { "builtin", "user.cmake.cmake" }, + }) + end, + keys = { + { + '', + function() + require('overseer').open() + require('overseer').run_template() + end, + mode = { 'n', 'x' }, + desc = 'Start task (overseer)', + }, + } +} diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua deleted file mode 100644 index 33a5a06..0000000 --- a/lua/setup/luasnip.lua +++ /dev/null @@ -1,67 +0,0 @@ -local ls = require('luasnip') --- some shorthands... -local s = ls.snippet -local sn = ls.snippet_node -local isn = ls.indent_snippet_node -local t = ls.text_node -local i = ls.insert_node -local f = ls.function_node -local c = ls.choice_node -local d = ls.dynamic_node -local r = ls.restore_node -local l = require('luasnip.extras').lambda -local rep = require('luasnip.extras').rep -local p = require('luasnip.extras').partial -local m = require('luasnip.extras').match -local n = require('luasnip.extras').nonempty -local dl = require('luasnip.extras').dynamic_lambda -local fmt = require('luasnip.extras.fmt').fmt -local fmta = require('luasnip.extras.fmt').fmta -local types = require('luasnip.util.types') -local conds = require('luasnip.extras.expand_conditions') - -local function getRegA(capitalize) - local clipboard = vim.fn.getreg('a') - clipboard = clipboard:gsub('^m_', '') - if capitalize then - clipboard = clipboard:gsub('^%l', string.upper) - end - return clipboard -end - - -ls.snippets = { - cpp = { - s('TEST_F_getset', - { - t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), - i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({');', ' '}), - i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({'());', ''}), - t({'','}', ''}) - }), - s('TEST_fn_getset', - { - t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({'()', '{', ' '}), - i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({');', ' '}), - i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({'());', ''}), - t({'','}', '', ''}), - - t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({'_set_get)', '{', ' '}), - p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({'();'}), - t({'','}'}), - }) - }, -} - -require('luasnip.loaders.from_vscode').lazy_load() -require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } }) - - -require('legendary').commands( - { - { - ':LuaSnipListAvailable', - description = 'List snippets', - } - } -) diff --git a/lua/setup/my_diffview.lua b/lua/setup/my_diffview.lua deleted file mode 100644 index eedf472..0000000 --- a/lua/setup/my_diffview.lua +++ /dev/null @@ -1,3 +0,0 @@ -local actions = require("diffview.actions") - -require("diffview").setup({}) diff --git a/lua/setup/my_gruvbox_flat.lua b/lua/setup/my_gruvbox_flat.lua deleted file mode 100644 index 668c550..0000000 --- a/lua/setup/my_gruvbox_flat.lua +++ /dev/null @@ -1,12 +0,0 @@ -local colors = require('gruvbox.colors') -vim.g.gruvbox_flat_style = "dark" -vim.g.gruvbox_colors = { - bg_search = 'purple', - fg_search = 'black', -} -vim.g.gruvbox_theme = { - Pmenu = { bg = 'bg_visual'}, - NormalFloat = { bg = 'bg_visual'} -} -vim.g.gruvbox_dark_float = false -vim.cmd('colorscheme gruvbox-flat') diff --git a/lua/setup/my_overseer.lua b/lua/setup/my_overseer.lua deleted file mode 100644 index 82b9060..0000000 --- a/lua/setup/my_overseer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local overseer = require('overseer') -overseer.setup({ - templates = { "builtin", "user.cmake.cmake" }, -}) - -require('legendary').keymaps( - { - { - '', - function() - overseer.open() - overseer.run_template() - end, - mode = { 'n', 'x' }, - description = 'Start task (overseer)', - }, - } -) diff --git a/lua/setup/neogen.lua b/lua/setup/neogen.lua deleted file mode 100644 index df16773..0000000 --- a/lua/setup/neogen.lua +++ /dev/null @@ -1,29 +0,0 @@ -require('neogen').setup({ - enabled = true, - languages = { - cpp = { - template = { - annotation_convention = 'custom', - custom = { - { nil, '/// file', { no_results = true, type = { 'file' } } }, - { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, - { nil, '', { no_results = true, type = { 'file' } } }, - - { nil, '/// $1', { type = { 'func' } } }, - { 'tparam', '/// \\tparam %s $1' }, - { 'parameters', '/// \\param %s $1' }, - { 'return_statement', '/// \\return $1' }, - }, - }, - }, - }, -}) -require('legendary').keymaps( - { - { - 'n', - ':Neogen', - description = 'Add comment', - } - } -) -- 2.49.1 From 98d3f5cac77be465a0ccccbf133e278d88617045 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 21:40:32 +0100 Subject: [PATCH 301/894] added which-key --- lua/my_keymappings.lua | 1 - lua/plugins/lspconfig.lua | 47 +++++++++++++++++++++++++-------------- lua/plugins/which-key.lua | 4 ++++ 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 lua/plugins/which-key.lua diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index f93b93a..6ddb858 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -1,5 +1,4 @@ local opts = { noremap = true, silent = true } -vim.keymap.set('n', '', 'nil', opts) -- Tabs vim.keymap.set('n', '', ':tabnext', opts) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 51f3dde..ffa4c2f 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -33,24 +33,37 @@ return { vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. - local opts = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, + { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, + { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, + { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) + vim.keymap.set('n', 'd', vim.lsp.buf.definition, + { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, + { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, + { noremap = true, silent = false, desc = 'Hover', buffer = bufnr }) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + { noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr }) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + { noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr }) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, + { noremap = true, silent = false, desc = 'Rename', buffer = bufnr }) local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', '', 'Telescope aerial', opts) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, + { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + { noremap = true, silent = false, desc = 'Type definition', buffer = bufnr }) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, + { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, + { noremap = true, silent = false, desc = 'References', buffer = bufnr }) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 0000000..72c06d8 --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,4 @@ +return { + 'folke/which-key.nvim', + config = true +} -- 2.49.1 From b6e811ab23a4d67c233842fd1f8dbc6e4695fc07 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 21:40:46 +0100 Subject: [PATCH 302/894] small neogen fix --- lua/plugins/neogen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 4937074..432abba 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -25,7 +25,7 @@ return { { 'n', function() - require('neogen').generate() + require('neogen').generate({}) end, desc = 'Add comment', } -- 2.49.1 From 1e7fd727c23e663a73c9bba57ecc80a0c92cc701 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 28 Dec 2022 21:45:23 +0100 Subject: [PATCH 303/894] fixed warnings in lsp config --- lua/plugins/lspconfig.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ffa4c2f..ecfe3b5 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -13,7 +13,7 @@ return { automatic_installation = false, }) - local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + local capabilities = require('cmp_nvim_lsp').default_capabilities() OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do @@ -69,10 +69,12 @@ return { -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) + vim.keymap.set('n', 'f', vim.lsp.buf.format, + { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) end if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) + vim.keymap.set('x', 'f', vim.lsp.buf.format, + { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end -- Set autocommands conditional on server_capabilities -- 2.49.1 From 54e87b448e81c5a6e9dbd5b098044d4f19b52b66 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 29 Dec 2022 00:51:41 +0100 Subject: [PATCH 304/894] more keybinding description --- lua/my_keymappings.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 6ddb858..a37c6ce 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -25,13 +25,16 @@ vim.keymap.set('x', '<', '', '>gv') local function hlWord() - local current_word = vim.call('expand','') + local current_word = vim.call('expand', '') vim.fn.setreg('/', "\\<" .. current_word .. "\\>") vim.opt.hlsearch = true end + -- Highlight word under cursor -vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true }) -vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true }) +vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlight word under cursor' }) +vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, desc = 'Highlight visual' }) -- Close Buffer -vim.keymap.set('n', '', ':bd') +vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) + +vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' }) -- 2.49.1 From 0c5f81d6d43d738e8c86f6a674c63562eaacd39a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 2 Jan 2023 21:46:27 +0100 Subject: [PATCH 305/894] new sign for breakpoint --- lua/plugins/dap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index dbf6fad..9ab1fc6 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -70,7 +70,7 @@ return { }, config = function() local dap = require('dap') - + vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''}) require("cmp_dap").is_dap_buffer() -- 2.49.1 From 2c57a134e3421b402117f77dc2edf0e7bf6b9e81 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 01:48:40 +0100 Subject: [PATCH 306/894] fixed some keybindings overwritten by which key --- lua/plugins/which-key.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 72c06d8..3c4fc71 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -1,4 +1,12 @@ return { 'folke/which-key.nvim', - config = true + config = { + plugins = { + marks = false, + registers = false, + presets = { + operators = false + } + } + } } -- 2.49.1 From 3a70a67737d4c64988a6a46d164ca82da9af589d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 01:48:51 +0100 Subject: [PATCH 307/894] added neodev --- lua/plugins/lspconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ecfe3b5..547e54e 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -6,6 +6,10 @@ return { 'p00f/clangd_extensions.nvim', 'jose-elias-alvarez/null-ls.nvim', 'ray-x/lsp_signature.nvim', + { + 'folke/neodev.nvim', + config = true, + }, }, config = function() require('mason').setup() -- 2.49.1 From 4aa3048e23015d0720e32db6927ea2f131a2727f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 01:50:51 +0100 Subject: [PATCH 308/894] fixed annoying lua ls message --- lua/plugins/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 547e54e..b575fa0 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -206,6 +206,7 @@ return { workspace = { -- Make the server aware of Neovim runtime files library = vim.api.nvim_get_runtime_file('', true), + checkThirdParty = false, }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { -- 2.49.1 From c8e1906f22fb2d5ec7646adbb03e5b46de1d1ddf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 14:30:34 +0100 Subject: [PATCH 309/894] added neotest --- lua/plugins/neotest.lua | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lua/plugins/neotest.lua diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua new file mode 100644 index 0000000..363a9eb --- /dev/null +++ b/lua/plugins/neotest.lua @@ -0,0 +1,42 @@ +return { + 'nvim-neotest/neotest', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + 'antoinemadec/FixCursorHold.nvim', + 'nvim-neotest/neotest-python' + }, + config = function() + require("neotest").setup({ + adapters = { + require("neotest-python")({ + dap = { + justMyCode = false + }, + args = { "--log-level", "DEBUG" }, + runner = 'pytest', + python = '.venv/Scripts/python.exe', + -- is_test_file = function(file_path) + -- return file_path:find("^test_") ~= nil + -- end, + }) + } + }) + end, + keys = { + { + '', + function() + require("neotest").run.run() + end, + desc = 'Run nearest test' + }, + { + '', + function() + require("neotest").run.run({ strategy = "dap" }) + end, + desc = 'Run nearest test' + } + } +} -- 2.49.1 From e3c8a5ddd446aacbb0631af95c28baf0fe5635de Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 14:57:47 +0100 Subject: [PATCH 310/894] removed some debug code from neotest --- lua/plugins/neotest.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index 363a9eb..aecffc2 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -15,10 +15,6 @@ return { }, args = { "--log-level", "DEBUG" }, runner = 'pytest', - python = '.venv/Scripts/python.exe', - -- is_test_file = function(file_path) - -- return file_path:find("^test_") ~= nil - -- end, }) } }) -- 2.49.1 From 78cbde972f55a44a555be0374908197131732957 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 Jan 2023 14:45:38 +0100 Subject: [PATCH 311/894] new keymap to run last dap config --- lua/plugins/dap.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 9ab1fc6..8b9c987 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -16,7 +16,14 @@ return { function() require('dap').continue() end, - desc = 'DAP continue' + desc = 'DAP start or continue' + }, + { + '', + function() + require('dap').run_last() + end, + desc = 'DAP run last' }, { '', -- 2.49.1 From 5a1a8e8f3efba9295de9299fd04a88428a59a1f8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 Jan 2023 22:23:31 +0100 Subject: [PATCH 312/894] added xmlformat --- lua/plugins/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index b575fa0..750eb0c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -237,6 +237,7 @@ return { null_ls.builtins.code_actions.gitsigns, null_ls.builtins.formatting.autopep8, null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.xmlformat, null_ls.builtins.diagnostics.flake8, null_ls.builtins.formatting.isort, null_ls.builtins.formatting.cmake_format, -- 2.49.1 From b35136bae4f9c40ff74fdf6d0e5c8c30747e70bd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 08:38:52 +0100 Subject: [PATCH 313/894] telescope find with file filters --- lua/setup/telescope.lua | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua index 367d1c2..e3b98c3 100644 --- a/lua/setup/telescope.lua +++ b/lua/setup/telescope.lua @@ -36,6 +36,17 @@ require('telescope').setup({ find_files = { theme = 'ivy', previewer = false, + mappings = { + n = { + ['c'] = function(prompt_bufnr) + local selection = require("telescope.actions.state").get_selected_entry() + local dir = vim.fn.fnamemodify(selection.path, ":p:h") + require("telescope.actions").close(prompt_bufnr) + -- Depending on what you want put `cd`, `lcd`, `tcd` + vim.cmd(string.format("silent lcd %s", dir)) + end + } + } }, oldfiles = { theme = 'ivy', @@ -102,6 +113,17 @@ require('legendary').keymaps( ':Telescope live_grep', description = 'Search in project', }, + { + 'k', + function () + vim.ui.input({prompt = 'Glob:', default = vim.api.nvim_buf_get_name(0) }, + function (glob) + require('telescope.builtin').live_grep({glob_pattern = glob}) + end + ) + end, + description = 'Search in project', + }, { '', ':Telescope neoclip', @@ -125,11 +147,19 @@ require('legendary').keymaps( } ) -require('legendary').func( +require('legendary').funcs( { - function() - require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) - end, - description = 'Search in open files', + { + function() + require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) + end, + description = 'Search in open files', + }, + { + function() + require("telescope.builtin").find_files({ no_ignore = false }) + end, + description = 'Find file no_ignore=false', + }, } ) -- 2.49.1 From 06b46caf29484ce9275e66e04d8690b474a5a39e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 09:24:31 +0100 Subject: [PATCH 314/894] added dressing --- lua/plugins/dressing.lua | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lua/plugins/dressing.lua diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua new file mode 100644 index 0000000..43a9c6c --- /dev/null +++ b/lua/plugins/dressing.lua @@ -0,0 +1,3 @@ +return { + 'stevearc/dressing.nvim' +} -- 2.49.1 From 2d3f05b6bec3e5f79f02918f4e7ac2e0cd702324 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 09:24:44 +0100 Subject: [PATCH 315/894] updated plugin versions --- lazy-lock.json | 116 ++++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index dcfc50d..a766d7e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,55 +1,63 @@ -{ - "Comment.nvim": { "branch": "master", "commit": "45dc21a71ad1450606f5e98261badb28db59d74c" }, - "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, - "aerial.nvim": { "branch": "master", "commit": "7e2fef6ec501a3fe8bc6c4051b3a1014dc098a06" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "9bd6073dd1230e667f97760b5a73f81547a19528" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, - "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, - "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, - "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, - "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" }, - "cmp-nvim-lua": { "branch": "main", "commit": "d276254e7198ab7d00f117e88e223b4bd8c02d21" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, - "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "3812e296d3977a24db62f7c18025755b40968d3a" }, - "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, - "friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" }, - "gitsigns.nvim": { "branch": "main", "commit": "2ab3bdf0a40bab53033048c6be75bda86316b55d" }, - "gruvbox-flat.nvim": { "branch": "master", "commit": "172269867994c0da7adcf02e89a068cda85eb805" }, - "indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" }, - "lazy.nvim": { "branch": "main", "commit": "5a5487b015743c69d6a275156a90af35c2905c47" }, - "leap.nvim": { "branch": "main", "commit": "a5c9504290832e6bdbbb6265fd1ff02fc6485d20" }, - "legendary.nvim": { "branch": "master", "commit": "f53ef425b1b6cb9dc907a054755138345fd2fd57" }, - "lsp_signature.nvim": { "branch": "master", "commit": "1979f1118e2b38084e7c148f279eed6e9300a342" }, - "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "fffbcb829288c3ca366f17cdb8d46aefb5c1d6f3" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "31d8ed0dd3daf6cc64e35d710a190b64080bdc86" }, - "mason.nvim": { "branch": "main", "commit": "5f82a4e5618ebb0f3197141e9f14a07b56d5390f" }, - "null-ls.nvim": { "branch": "main", "commit": "b26851b3e7ac1c0c85666f8a74e36aef2acb89c6" }, - "nvim-autopairs": { "branch": "master", "commit": "03580d758231956d33c8dd91e2be195106a79fa4" }, - "nvim-cmp": { "branch": "main", "commit": "e55033fce468c9c578b946948807f2ac48a6ee08" }, - "nvim-dap": { "branch": "master", "commit": "6f2ea9e33b48a51849ec93c6c38148a5372018e4" }, - "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, - "nvim-dap-ui": { "branch": "master", "commit": "54365d2eb4cb9cfab0371306c6a76c913c5a67e3" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" }, - "nvim-lspconfig": { "branch": "master", "commit": "42ca8ce0f2252be795da4789fadfa91f6c3f7464" }, - "nvim-treesitter": { "branch": "master", "commit": "0cb637ca9f4389172933e5aba36387ab8430b6fb" }, - "nvim-ts-rainbow": { "branch": "master", "commit": "064fd6c0a15fae7f876c2c6dd4524ca3fad96750" }, - "nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" }, - "overseer.nvim": { "branch": "master", "commit": "82ed207195b58a73b9f7d013d6eb3c7d78674ac9" }, - "plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" }, - "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, - "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" }, - "toggleterm.nvim": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" }, - "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "yanky.nvim": { "branch": "main", "commit": "2bb05abe20b5d7af917a48785acfacb602248e36" } +{ + "Comment.nvim": { "branch": "master", "commit": "e89df176e8b38e931b7e71a470f923a317976d86" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" }, + "LuaSnip": { "branch": "master", "commit": "508b41fb7b2a7f06522f96eb7742d21f025a8512" }, + "aerial.nvim": { "branch": "master", "commit": "3eafbd28ae573fa665121a6e058a450cf3fe8573" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "a5c3c8390dfb342d630bdc25941a4d8f433510be" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, + "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, + "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, + "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, + "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "diffview.nvim": { "branch": "main", "commit": "e45aaf82e123218da419751d2d6aed2a064ca054" }, + "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, + "friendly-snippets": { "branch": "main", "commit": "484fb38b8f493ceeebf4e6fc499ebe41e10aae25" }, + "gitsigns.nvim": { "branch": "main", "commit": "d4f8c01280413919349f5df7daccd0c172143d7c" }, + "gruvbox-flat.nvim": { "branch": "master", "commit": "172269867994c0da7adcf02e89a068cda85eb805" }, + "indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" }, + "lazy.nvim": { "branch": "main", "commit": "1ca3f101c888b0cf5085bc12446061792e8ee024" }, + "leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" }, + "lsp_signature.nvim": { "branch": "master", "commit": "1979f1118e2b38084e7c148f279eed6e9300a342" }, + "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, + "lualine.nvim": { "branch": "master", "commit": "d8c392dd75778d6258da4e7c55522e94ac389732" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "3751eb5c56c67b51e68a1f4a0da28ae74ab771c1" }, + "mason.nvim": { "branch": "main", "commit": "0975eeac8d6e1e87270cc42285e673a4ee36bc5e" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "3b41f0d17139bb156f1acd907608f63e0e307caf" }, + "neodev.nvim": { "branch": "main", "commit": "258b83f48405c6b530c09dd96950693664dc6bc0" }, + "neogen": { "branch": "main", "commit": "2961b48f7263769953ac18fe4afa4df71b321341" }, + "neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" }, + "neotest-python": { "branch": "master", "commit": "e53920d145d37783c8d8428365a0a230e0a18cb5" }, + "nui.nvim": { "branch": "main", "commit": "257da38029d3859ed111804f9d4e95b0fa993a31" }, + "null-ls.nvim": { "branch": "main", "commit": "915558963709ea17c5aa246ca1c9786bfee6ddb4" }, + "nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" }, + "nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" }, + "nvim-dap": { "branch": "master", "commit": "700a3c7d6fbe5b07bee74e9952b456120d355c47" }, + "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, + "nvim-dap-ui": { "branch": "master", "commit": "f2206de65ea39093e3f13992507fc985c17aa763" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" }, + "nvim-lspconfig": { "branch": "master", "commit": "7b98aadc6e85db4fc3af6c1ec22c4774d965506e" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "996b46fc661f9977ab214ddfc1322668f646d92d" }, + "nvim-treesitter": { "branch": "master", "commit": "3e316204f8ec8450bbaace69d0bf8fe332633fec" }, + "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, + "nvim-web-devicons": { "branch": "master", "commit": "7f55bc36eddec87597167a97de5b690997edaf7d" }, + "overseer.nvim": { "branch": "master", "commit": "5d4aa5786af479a0408b55a06d3aff260c8b2a91" }, + "plenary.nvim": { "branch": "master", "commit": "9d81624fbcedd3dd43b38d7e13a1e7b3f873d8cd" }, + "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, + "sqlite.lua": { "branch": "master", "commit": "53cac3fdb5f5e4e63e243232b6eccf3c764ae18a" }, + "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, + "telescope.nvim": { "branch": "master", "commit": "04af51dbfb17c2afa0b8d82b0e842e0638201ca9" }, + "toggleterm.nvim": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "which-key.nvim": { "branch": "main", "commit": "85f69b07afce4ea77c58ae9a3aeb4e6c918b4d34" } } \ No newline at end of file -- 2.49.1 From 874cb95f01a1ebe43f99c0b20d8037b875c72a9a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 09:51:53 +0100 Subject: [PATCH 316/894] added example pyrightconfig.json --- pyrightconfig.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pyrightconfig.json diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 0000000..ea3d8e9 --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,4 @@ +{ + "venvPath": ".", + "venv": "venvVis" +} -- 2.49.1 From 35552af8312d30a3146e5e052550ec37349e9343 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 09:52:21 +0100 Subject: [PATCH 317/894] added test snippet for cpp --- my_snippets/cpp.json | 14 ++++++++++++++ my_snippets/package.json | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 my_snippets/cpp.json create mode 100644 my_snippets/package.json diff --git a/my_snippets/cpp.json b/my_snippets/cpp.json new file mode 100644 index 0000000..1e1c351 --- /dev/null +++ b/my_snippets/cpp.json @@ -0,0 +1,14 @@ +{ + "TEST_F for g/setter": { + "prefix": "TEST_F_getter", + "body": [ + "TEST_F($1, test_${CLIPBOARD/m_(.*)/${1}/}_${2:setter}_${3:getter})", + "{", + " set${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}($4);", + " ${5:type} result = get${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}();", + " EXPECT_EQ($4, result);$0", + "}" + ], + "description": "Generate TEST_F body for getter and setter functions" + } +} diff --git a/my_snippets/package.json b/my_snippets/package.json new file mode 100644 index 0000000..2dc03d6 --- /dev/null +++ b/my_snippets/package.json @@ -0,0 +1,14 @@ +{ + "name": "my_snippets", + "engines": { + "vscode": "^1.11.0" + }, + "contributes": { + "snippets": [ + { + "language": "cpp", + "path": "./cpp.json" + } + ] + } +} -- 2.49.1 From ed78b61632183ee8b76d4920f9eb24ae3b2af332 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 22:31:35 +0100 Subject: [PATCH 318/894] deleted old config --- lua/setup/aerial.lua | 23 ---- lua/setup/gruvbox.lua | 14 -- lua/setup/my_gruvbox-baby.lua | 4 - lua/setup/my_gruvbox-material.lua | 5 - lua/setup/my_legendary.lua | 54 -------- lua/setup/my_litee.lua | 55 -------- lua/setup/my_lspconfig.lua | 217 ------------------------------ lua/setup/nvim-autopairs.lua | 1 - lua/setup/nvim-tree.lua | 7 - lua/setup/octo.lua | 1 - lua/setup/telescope.lua | 165 ----------------------- 11 files changed, 546 deletions(-) delete mode 100644 lua/setup/aerial.lua delete mode 100644 lua/setup/gruvbox.lua delete mode 100644 lua/setup/my_gruvbox-baby.lua delete mode 100644 lua/setup/my_gruvbox-material.lua delete mode 100644 lua/setup/my_legendary.lua delete mode 100644 lua/setup/my_litee.lua delete mode 100644 lua/setup/my_lspconfig.lua delete mode 100644 lua/setup/nvim-autopairs.lua delete mode 100644 lua/setup/nvim-tree.lua delete mode 100644 lua/setup/octo.lua delete mode 100644 lua/setup/telescope.lua diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua deleted file mode 100644 index ed6e412..0000000 --- a/lua/setup/aerial.lua +++ /dev/null @@ -1,23 +0,0 @@ -require('aerial').setup({ - backends = { 'lsp', 'treesitter', 'markdown' }, - layout = { - default_direction = "prefer_left" - }, - filter_kind = false, - show_guides = true, -}) -require('telescope').load_extension('aerial') -require('legendary').keymaps( - { - { - 's', - ':AerialToggle', - description = 'Symbols outline', - }, - { - '', - ':Telescope aerial', - description = 'Telescope symbols', - } - } -) diff --git a/lua/setup/gruvbox.lua b/lua/setup/gruvbox.lua deleted file mode 100644 index b3cb624..0000000 --- a/lua/setup/gruvbox.lua +++ /dev/null @@ -1,14 +0,0 @@ -require('gruvbox').setup({ - undercurl = true, - underline = true, - bold = false, - italic = false, -- will make italic comments and special strings - inverse = true, -- invert background for search, diffs, statuslines and errors - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - contrast = "hard", -- can be "hard" or "soft" - overrides = {}, -}) -vim.cmd('colorscheme gruvbox') diff --git a/lua/setup/my_gruvbox-baby.lua b/lua/setup/my_gruvbox-baby.lua deleted file mode 100644 index fe8ce6c..0000000 --- a/lua/setup/my_gruvbox-baby.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.g.gruvbox_baby_telescope_theme = 1 -local colors = require("gruvbox-baby.colors").config() -vim.g.gruvbox_baby_highlights = {Visual = {bg = '#384741'}} -vim.cmd[[colorscheme gruvbox-baby]] diff --git a/lua/setup/my_gruvbox-material.lua b/lua/setup/my_gruvbox-material.lua deleted file mode 100644 index c5b0136..0000000 --- a/lua/setup/my_gruvbox-material.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.g.gruvbox_material_background = 'hard' -vim.g.gruvbox_material_foreground = 'original' -vim.g.gruvbox_material_cursor = 'purple' -vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' -vim.cmd('colorscheme gruvbox-material') diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua deleted file mode 100644 index 8f9a429..0000000 --- a/lua/setup/my_legendary.lua +++ /dev/null @@ -1,54 +0,0 @@ -require('legendary').setup({ - default_opts = { - keymaps = { silent = true }, - commands = {}, - autocmds = {}, - }, - keymaps = { - { - 'p', - function() - require("legendary").find() - end, - description = 'legendary keymaps', - mode = { 'n', 'x', 'i' } - }, - { - '', - ':tabnew .', - description = 'Open a new tab', - }, - { - '', - ':vsplit .', - description = 'Open a new vertical split', - }, - { - '', - ':split .', - description = 'Open a new horizontal split', - }, - { - 'a', - '"ayiw', - description = 'Word under cursor into register a', - }, - { - 'x', - 'za', - description = 'Toggle fold', - }, - }, - commands = - { - { - ':set guifont=JetBrainsMonoNL\\ NF:h12', - description = 'Big font size', - }, - { - ':set guifont=JetBrainsMonoNL\\ NF:h9', - description = 'Reset font size', - }, - - } -}) diff --git a/lua/setup/my_litee.lua b/lua/setup/my_litee.lua deleted file mode 100644 index b2a600c..0000000 --- a/lua/setup/my_litee.lua +++ /dev/null @@ -1,55 +0,0 @@ --- configure the litee.nvim library -require('litee.lib').setup({ - tree = { - icon_set = "codicons" - }, - panel = { - orientation = "left", - panel_size = 30 - } -}) --- configure litee-calltree.nvim -require('litee.calltree').setup({ - map_resize_keys = false, - on_open = 'panel', - keymaps = { - expand = "", - collapse = "zc", - collapse_all = "zM", - jump = "", - jump_split = "s", - jump_vsplit = "v", - jump_tab = "t", - hover = "i", - details = "d", - close = "X", - close_panel_pop_out = "", - help = "?", - hide = "H", - switch = "S", - focus = "f" - }, -}) --- configure litee-symboltree.nvim -require('litee.symboltree').setup({ - map_resize_keys = false, - on_open = 'panel', - keymaps = { - expand = '', - collapse = 'zc', - collapse_all = 'zM', - jump = '', - jump_split = 's', - jump_vsplit = 'v', - jump_tab = 't', - hover = 'i', - details = 'd', - close = 'X', - close_panel_pop_out = '', - help = '?', - hide = 'H', - }, -}) - -require('litee.gh').setup({}) - diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua deleted file mode 100644 index dc92e27..0000000 --- a/lua/setup/my_lspconfig.lua +++ /dev/null @@ -1,217 +0,0 @@ -require('mason').setup() -require('mason-lspconfig').setup({ - automatic_installation = true, -}) - -local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -OpenDiagFloat = function() - for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end - end - vim.diagnostic.open_float({ focusable = false, width=80 }) -end - -local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local opts = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) - - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) - - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) - end - - -- Set autocommands conditional on server_capabilities - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_set_hl( - 0, - "LspReferenceText", - { bold = true, - ctermbg = 'red', - bg = "#5a524c"} - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceRead", - { bold = true, - ctermbg = 'red', - bg = 'DarkGreen' } - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceWrite", - { bold = true, - ctermbg = 'red', - bg = 'DarkRed' } - ) - 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 - - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) -end - -require('lspconfig')['pyright'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['groovyls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['cmake'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local clangd_capabilities = capabilities -clangd_capabilities.textDocument.semanticHighlighting = true -clangd_capabilities.offsetEncoding = { "utf-16" } -require("clangd_extensions").setup { - server = { - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - root_dir = require('lspconfig').util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) - }, - extensions = - { - inlay_hints = { - -- Only show inlay hints for the current line - only_current_line = true, - } - } - -} --- require('clangd_extensions').setup({ --- server = { --- on_attach = on_attach, --- capabilities = capabilities, --- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, --- }, --- }) - -require('lspconfig')['jsonls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local lua_rtp = vim.split(package.path, ';') -table.insert(lua_rtp, 'lua/?.lua') -table.insert(lua_rtp, 'lua/?/init.lua') -require('lspconfig').sumneko_lua.setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - } -} - -require('lspconfig')['dockerls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['yamlls'].setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - yaml = { - validate = true - } - } -} - -local null_ls = require('null-ls') -null_ls.setup({ - sources = { - null_ls.builtins.code_actions.gitsigns, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format, - }, - on_attach = on_attach, - capabilities = capabilities, -}) - -vim.diagnostic.config({ virtual_text = false }) diff --git a/lua/setup/nvim-autopairs.lua b/lua/setup/nvim-autopairs.lua deleted file mode 100644 index f96cb3e..0000000 --- a/lua/setup/nvim-autopairs.lua +++ /dev/null @@ -1 +0,0 @@ -require('nvim-autopairs').setup({}) diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua deleted file mode 100644 index fa7bca7..0000000 --- a/lua/setup/nvim-tree.lua +++ /dev/null @@ -1,7 +0,0 @@ --- disable netrw at the very start of your init.lua (strongly advised) -vim.g.loaded = 1 -vim.g.loaded_netrwPlugin = 1 - --- empty setup using defaults -require('nvim-tree').setup() -vim.keymap.set('n', '\\', 'NvimTreeToggle') diff --git a/lua/setup/octo.lua b/lua/setup/octo.lua deleted file mode 100644 index a06b954..0000000 --- a/lua/setup/octo.lua +++ /dev/null @@ -1 +0,0 @@ -require('octo').setup() diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua deleted file mode 100644 index e3b98c3..0000000 --- a/lua/setup/telescope.lua +++ /dev/null @@ -1,165 +0,0 @@ -local actions = require('telescope.actions') - -local mappingTab = { - i = { - [''] = actions.select_tab, - [''] = actions.select_default, - }, -} - -require('telescope').setup({ - defaults = { - mappings = { - i = { - [''] = actions.close, - [''] = actions.select_default + actions.center, - [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist, - }, - }, - }, - pickers = { - -- Your special builtin config goes in here - buffers = { - sort_lastused = true, - theme = 'ivy', - mappings = { - i = { - [''] = actions.delete_buffer, - [''] = actions.select_default, - }, - n = { - [''] = actions.delete_buffer, - }, - }, - }, - find_files = { - theme = 'ivy', - previewer = false, - mappings = { - n = { - ['c'] = function(prompt_bufnr) - local selection = require("telescope.actions.state").get_selected_entry() - local dir = vim.fn.fnamemodify(selection.path, ":p:h") - require("telescope.actions").close(prompt_bufnr) - -- Depending on what you want put `cd`, `lcd`, `tcd` - vim.cmd(string.format("silent lcd %s", dir)) - end - } - } - }, - oldfiles = { - theme = 'ivy', - }, - git_files = { - theme = 'ivy', - previewer = false, - }, - lsp_references = { - show_line = false; - include_declaration = false, - }, - lsp_dynamic_workspace_symbols = {}, - }, -}) - -require('telescope').load_extension('fzf') - -Project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end -end - -require('legendary').keymaps( - { - { - 'p', - ':Telescope projects', - description = 'Select project', - }, - { - 'f', - ':lua require("telescope.builtin").find_files({no_ignore=true})', - description = 'Find file', - }, - { - 'g', - ':lua Project_files()', - description = 'Find git files', - }, - { - 'o', - ':Telescope oldfiles', - description = 'Find old files', - }, - { - 'h', - ':Telescope command_history', - description = 'Open command history', - }, - { - 'b', - ':Telescope buffers', - description = 'Select buffer', - }, - { - 'q', - ':Telescope quickfix', - description = 'Quickfix list with telescope', - }, - { - 'l', - ':Telescope live_grep', - description = 'Search in project', - }, - { - 'k', - function () - vim.ui.input({prompt = 'Glob:', default = vim.api.nvim_buf_get_name(0) }, - function (glob) - require('telescope.builtin').live_grep({glob_pattern = glob}) - end - ) - end, - description = 'Search in project', - }, - { - '', - ':Telescope neoclip', - description = 'Open clipboard history', - }, - { - 'j', - ':Telescope jumplist', - description = 'Open jumplist', - }, - { - '', - ':Telescope current_buffer_fuzzy_find', - description = 'Find in buffer', - }, - { - 'd', - ':Telescope grep_string', - description = 'Find in workspace', - } - } -) - -require('legendary').funcs( - { - { - function() - require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) - end, - description = 'Search in open files', - }, - { - function() - require("telescope.builtin").find_files({ no_ignore = false }) - end, - description = 'Find file no_ignore=false', - }, - } -) -- 2.49.1 From 8de574df32f1cb42c76c1ec99364cde131c64470 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 23:16:02 +0100 Subject: [PATCH 319/894] added cmake tools --- lua/plugins/cmake-tools.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/plugins/cmake-tools.lua diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua new file mode 100644 index 0000000..649251a --- /dev/null +++ b/lua/plugins/cmake-tools.lua @@ -0,0 +1,9 @@ +return { + 'Civitasv/cmake-tools.nvim', + config = { + cmake_command = "cmake", + cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1", '-G', 'Ninja' }, + cmake_show_console = "always", + cmake_build_directory = "build_nvim", + } +} -- 2.49.1 From f2f51655a0505a5b978446c4f4ee47b155b49689 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 23:16:18 +0100 Subject: [PATCH 320/894] fixed cmp config with autopairs --- lua/plugins/cmp.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 70bd50f..21f2978 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -19,9 +19,7 @@ return { { 'p00f/clangd_extensions.nvim' }, { 'windwp/nvim-autopairs', - config = function() - require('setup/nvim-autopairs') - end + config = true, }, }, config = function() -- 2.49.1 From 1983373ba0f9aced7472334aa6cd9c883ad4ad29 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 23:16:32 +0100 Subject: [PATCH 321/894] added leader p as telescope commands --- lua/plugins/telescope.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index b9e78a0..63c6f09 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -23,6 +23,13 @@ return { end, desc = 'Find file', }, + { + 'p', + function() + require("telescope.builtin").commands() + end, + desc = 'Telescope commands', + }, { 'g', function() -- 2.49.1 From ee1033a856fbd2e937479df7f0f363832830cb0a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 9 Jan 2023 23:16:45 +0100 Subject: [PATCH 322/894] updated plugin versions --- lazy-lock.json | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index a766d7e..1888c97 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,9 +1,10 @@ { - "Comment.nvim": { "branch": "master", "commit": "e89df176e8b38e931b7e71a470f923a317976d86" }, + "Comment.nvim": { "branch": "master", "commit": "ab00bcf5aa979c53f2f40dc2655c03e24f4ef50f" }, "FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" }, - "LuaSnip": { "branch": "master", "commit": "508b41fb7b2a7f06522f96eb7742d21f025a8512" }, + "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, "aerial.nvim": { "branch": "master", "commit": "3eafbd28ae573fa665121a6e058a450cf3fe8573" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a5c3c8390dfb342d630bdc25941a4d8f433510be" }, + "cmake-tools.nvim": { "branch": "master", "commit": "ee86951c42986e810312c14c479996b1042e076c" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, @@ -18,46 +19,46 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "e45aaf82e123218da419751d2d6aed2a064ca054" }, + "diffview.nvim": { "branch": "main", "commit": "e3e15d8f1d727056185fc1696be1554837dec897" }, "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, "friendly-snippets": { "branch": "main", "commit": "484fb38b8f493ceeebf4e6fc499ebe41e10aae25" }, "gitsigns.nvim": { "branch": "main", "commit": "d4f8c01280413919349f5df7daccd0c172143d7c" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "172269867994c0da7adcf02e89a068cda85eb805" }, "indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" }, - "lazy.nvim": { "branch": "main", "commit": "1ca3f101c888b0cf5085bc12446061792e8ee024" }, + "lazy.nvim": { "branch": "main", "commit": "102bc2722e73d0dcebd6c90b45a41cb33e0660cb" }, "leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" }, "lsp_signature.nvim": { "branch": "master", "commit": "1979f1118e2b38084e7c148f279eed6e9300a342" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, "lualine.nvim": { "branch": "master", "commit": "d8c392dd75778d6258da4e7c55522e94ac389732" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "3751eb5c56c67b51e68a1f4a0da28ae74ab771c1" }, - "mason.nvim": { "branch": "main", "commit": "0975eeac8d6e1e87270cc42285e673a4ee36bc5e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "33a198bc5ee0215ae8ab3f61781b29103cf4ca5a" }, + "mason.nvim": { "branch": "main", "commit": "73831cbe979fb3b385ed8e61626d16d9306a1f06" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "3b41f0d17139bb156f1acd907608f63e0e307caf" }, "neodev.nvim": { "branch": "main", "commit": "258b83f48405c6b530c09dd96950693664dc6bc0" }, "neogen": { "branch": "main", "commit": "2961b48f7263769953ac18fe4afa4df71b321341" }, "neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" }, "neotest-python": { "branch": "master", "commit": "e53920d145d37783c8d8428365a0a230e0a18cb5" }, "nui.nvim": { "branch": "main", "commit": "257da38029d3859ed111804f9d4e95b0fa993a31" }, - "null-ls.nvim": { "branch": "main", "commit": "915558963709ea17c5aa246ca1c9786bfee6ddb4" }, - "nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" }, + "null-ls.nvim": { "branch": "main", "commit": "6830a1ed04f89e6d556cb6bcc200433173004307" }, + "nvim-autopairs": { "branch": "master", "commit": "03580d758231956d33c8dd91e2be195106a79fa4" }, "nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" }, - "nvim-dap": { "branch": "master", "commit": "700a3c7d6fbe5b07bee74e9952b456120d355c47" }, + "nvim-dap": { "branch": "master", "commit": "1077a86c83f75a6eec36c91f91d6b728e2b02130" }, "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, "nvim-dap-ui": { "branch": "master", "commit": "f2206de65ea39093e3f13992507fc985c17aa763" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" }, - "nvim-lspconfig": { "branch": "master", "commit": "7b98aadc6e85db4fc3af6c1ec22c4774d965506e" }, + "nvim-lspconfig": { "branch": "master", "commit": "e69978a39e4d3262b09ce6a316beff384f443e3b" }, "nvim-neoclip.lua": { "branch": "main", "commit": "996b46fc661f9977ab214ddfc1322668f646d92d" }, - "nvim-treesitter": { "branch": "master", "commit": "3e316204f8ec8450bbaace69d0bf8fe332633fec" }, + "nvim-treesitter": { "branch": "master", "commit": "2d8e6b666297ddf19cbf7cbc2b0f1928bc49224a" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "7f55bc36eddec87597167a97de5b690997edaf7d" }, - "overseer.nvim": { "branch": "master", "commit": "5d4aa5786af479a0408b55a06d3aff260c8b2a91" }, + "nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" }, + "overseer.nvim": { "branch": "master", "commit": "dacf92c19251046f4853d0978f90de7b4ae2ddf6" }, "plenary.nvim": { "branch": "master", "commit": "9d81624fbcedd3dd43b38d7e13a1e7b3f873d8cd" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, "sqlite.lua": { "branch": "master", "commit": "53cac3fdb5f5e4e63e243232b6eccf3c764ae18a" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "04af51dbfb17c2afa0b8d82b0e842e0638201ca9" }, + "telescope.nvim": { "branch": "master", "commit": "cd67e819e453643b818363e6b573484c8e2e41b0" }, "toggleterm.nvim": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "85f69b07afce4ea77c58ae9a3aeb4e6c918b4d34" } + "which-key.nvim": { "branch": "main", "commit": "b7e0b1f16c20bc1ea0515851bc5740d1c1f18444" } } \ No newline at end of file -- 2.49.1 From 2b48e24a2837fc3182effc1d9fc04a1b30f37361 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 10 Jan 2023 20:53:15 +0100 Subject: [PATCH 323/894] added cmd to cmake-toools --- lua/plugins/cmake-tools.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 649251a..6cedfc1 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -5,5 +5,23 @@ return { cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1", '-G', 'Ninja' }, cmake_show_console = "always", cmake_build_directory = "build_nvim", - } + }, + cmd = { + 'CMakeGenerate', + 'CMakeBuild', + 'CMakeRun', + 'CMakeDebug', + 'CMakeSelectBuildType', + 'CMakeSelectBuildTarget', + 'CMakeSelectLaunchTarget', + 'CMakeSelectKit', + 'CMakeSelectConfigurePreset', + 'CMakeSelectBuildPreset', + 'CMakeSelectLaunchTarget', + 'CMakeOpen', + 'CMakeClose', + 'CMakeInstall', + 'CMakeClean', + 'CMakeStop', + }, } -- 2.49.1 From 520858f6ace72b1f35ab17d3508dd3274cbf32d7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 10 Jan 2023 20:53:27 +0100 Subject: [PATCH 324/894] added example pyproject.toml --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6bfb922 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +# pyproject.toml +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-ra -q" +testpaths = [ + "tests", +] -- 2.49.1 From b9c4ea5413a43265f30843d4716fcff348846999 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 12 Jan 2023 14:27:17 +0100 Subject: [PATCH 325/894] some tuning of lsp config --- lua/plugins/lspconfig.lua | 71 +++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 750eb0c..2ac5312 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -16,9 +16,32 @@ return { require('mason-lspconfig').setup({ automatic_installation = false, }) + local lspconfig = require 'lspconfig' local capabilities = require('cmp_nvim_lsp').default_capabilities() + vim.api.nvim_set_hl( + 0, + "LspReferenceText", + { bold = true, + ctermbg = 'red', + bg = "#5a524c" } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceRead", + { bold = true, + ctermbg = 'red', + bg = 'DarkGreen' } + ) + vim.api.nvim_set_hl( + 0, + "LspReferenceWrite", + { bold = true, + ctermbg = 'red', + bg = 'DarkRed' } + ) + OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do if vim.api.nvim_win_get_config(winid).zindex then @@ -73,39 +96,21 @@ return { -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, + vim.keymap.set('n', 'f', function() + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) end if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', vim.lsp.buf.format, + vim.keymap.set('x', 'f', function() + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_set_hl( - 0, - "LspReferenceText", - { bold = true, - ctermbg = 'red', - bg = "#5a524c" } - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceRead", - { bold = true, - ctermbg = 'red', - bg = 'DarkGreen' } - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceWrite", - { bold = true, - ctermbg = 'red', - bg = 'DarkRed' } - ) 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, @@ -129,17 +134,17 @@ return { }, bufnr) end - require('lspconfig')['pyright'].setup { + lspconfig['pyright'].setup { capabilities = capabilities, on_attach = on_attach, } - require('lspconfig')['groovyls'].setup { + lspconfig['groovyls'].setup { capabilities = capabilities, on_attach = on_attach, } - require('lspconfig')['cmake'].setup { + lspconfig['cmake'].setup { capabilities = capabilities, on_attach = on_attach, } @@ -152,7 +157,7 @@ return { capabilities = clangd_capabilities, on_attach = on_attach, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - root_dir = require('lspconfig').util.root_pattern( + root_dir = lspconfig.util.root_pattern( '.clangd', '.clang-tidy', '.clang-format', @@ -180,7 +185,7 @@ return { -- }, -- }) - require('lspconfig')['jsonls'].setup { + lspconfig['jsonls'].setup { capabilities = capabilities, on_attach = on_attach, } @@ -188,7 +193,7 @@ return { local lua_rtp = vim.split(package.path, ';') table.insert(lua_rtp, 'lua/?.lua') table.insert(lua_rtp, 'lua/?/init.lua') - require('lspconfig').sumneko_lua.setup { + lspconfig.sumneko_lua.setup { capabilities = capabilities, on_attach = on_attach, settings = { @@ -216,12 +221,12 @@ return { } } - require('lspconfig')['dockerls'].setup { + lspconfig['dockerls'].setup { capabilities = capabilities, on_attach = on_attach, } - require('lspconfig')['yamlls'].setup { + lspconfig['yamlls'].setup { capabilities = capabilities, on_attach = on_attach, settings = { @@ -235,6 +240,7 @@ return { null_ls.setup({ sources = { null_ls.builtins.code_actions.gitsigns, + -- null_ls.builtins.formatting.black, null_ls.builtins.formatting.autopep8, null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.xmlformat, @@ -242,6 +248,7 @@ return { null_ls.builtins.formatting.isort, null_ls.builtins.formatting.cmake_format, }, + debug = true, on_attach = on_attach, capabilities = capabilities, }) -- 2.49.1 From ec07710b242e91279840269a17f8477282e56e4a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 Jan 2023 18:28:59 +0100 Subject: [PATCH 326/894] added diffview keymapping --- lua/plugins/diffview.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 6fd92bf..82dc2e8 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -5,4 +5,12 @@ return { }, config = true, cmd = 'DiffviewOpen', + keys = { + { + 'b', + 'DiffviewOpen origin/develop...', + desc = 'Diffview vs develop', + }, + + } } -- 2.49.1 From a5ceececb5f35b2848500a0ca12c902f09f333c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 Jan 2023 18:29:33 +0100 Subject: [PATCH 327/894] added document symbol mapping --- lua/plugins/lspconfig.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2ac5312..336335f 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -87,6 +87,8 @@ return { { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) vim.keymap.set('n', 'r', tele_builtins.lsp_references, { noremap = true, silent = false, desc = 'References', buffer = bufnr }) + vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, + { noremap = true, silent = false, desc = 'References', buffer = bufnr }) vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', -- 2.49.1 From e2c55680ee3aa029b3c4d0a7efa02d65135174ac Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 Jan 2023 18:29:49 +0100 Subject: [PATCH 328/894] added pyright in pyproject.toml --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6bfb922..34a4b30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,3 +5,12 @@ addopts = "-ra -q" testpaths = [ "tests", ] +[tool.pyright] +venv = "venv" +venvPath = './' +reportOptionalMemberAccess = 'warning' +reportGeneralTypeIssues = 'warning' +analyzeUnannotatedFunctions = 'false' +executionEnvironments = [ + { root = "./" } +] -- 2.49.1 From beba8b3c51dc451f4e1ec3281841b0edcaf41a77 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 12:42:50 +0100 Subject: [PATCH 329/894] fixed clipboard for wsl --- lua/config/options.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index e2aa99f..5d9ddfc 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -35,7 +35,21 @@ opt.splitbelow= true opt.splitright= true opt.shiftwidth = indent opt.tabstop = indent -if vim.loop.os_uname().sysname == 'Linux' then +if vim.fn.has("wsl") == 1 then + vim.g.clipboard = { + name = "win32yank-wsl", + copy = { + ["+"] = "win32yank.exe -i --crlf", + ["*"] = "win32yank.exe -i --crlf", + }, + paste = { + ["+"] = "win32yank.exe -o --lf", + ["*"] = "win32yank.exe -o --lf", + }, + cache_enabled = 0, + } + opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' else opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf -- 2.49.1 From 7d318b2512e641f55b51d66ec603d843f2c57a5b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 13:00:38 +0100 Subject: [PATCH 330/894] refine the wsl clipboard --- lua/config/options.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 5d9ddfc..b8a7594 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -36,18 +36,18 @@ opt.splitright= true opt.shiftwidth = indent opt.tabstop = indent if vim.fn.has("wsl") == 1 then - vim.g.clipboard = { - name = "win32yank-wsl", - copy = { - ["+"] = "win32yank.exe -i --crlf", - ["*"] = "win32yank.exe -i --crlf", - }, - paste = { - ["+"] = "win32yank.exe -o --lf", - ["*"] = "win32yank.exe -o --lf", - }, - cache_enabled = 0, - } + vim.g.clipboard = { + name = 'WslClipboard', + copy = { + ['+'] = 'win32yank.exe -i --crlf', + ['*'] = 'win32yank.exe -i --crlf', + }, + paste = { + ['+'] = 'win32yank.exe -o --lf', + ['*'] = 'win32yank.exe -o --lf', + }, + cache_enabled = 0, + } opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' -- 2.49.1 From 4f5bd49e70e12e2b6aec6188cdfde5845ffd44a5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 17:36:44 +0100 Subject: [PATCH 331/894] added gruvbox material --- lua/plugins/gruvbox_flat.lua | 3 ++- lua/plugins/gruvbox_material.lua | 18 ++++++++++++++++++ lua/plugins/lualine.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/gruvbox_material.lua diff --git a/lua/plugins/gruvbox_flat.lua b/lua/plugins/gruvbox_flat.lua index f3603d2..8c65c28 100644 --- a/lua/plugins/gruvbox_flat.lua +++ b/lua/plugins/gruvbox_flat.lua @@ -14,5 +14,6 @@ return { } vim.g.gruvbox_dark_float = false vim.cmd('colorscheme gruvbox-flat') - end + end, + enabled = false } diff --git a/lua/plugins/gruvbox_material.lua b/lua/plugins/gruvbox_material.lua new file mode 100644 index 0000000..c8f952b --- /dev/null +++ b/lua/plugins/gruvbox_material.lua @@ -0,0 +1,18 @@ +return { + 'sainnhe/gruvbox-material', + priority = 1000, + config = function() + -- local colors = require('gruvbox.colors') + -- vim.g.gruvbox_flat_style = "dark" + -- vim.g.gruvbox_colors = { + -- bg_search = 'purple', + -- fg_search = 'black', + -- } + -- vim.g.gruvbox_theme = { + -- Pmenu = { bg = 'bg_visual' }, + -- NormalFloat = { bg = 'bg_visual' } + -- } + -- vim.g.gruvbox_dark_float = false + vim.cmd('colorscheme gruvbox-material') + end +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 00731c2..53545b0 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -3,7 +3,7 @@ return { dependencies = { 'kyazdani42/nvim-web-devicons' }, config = { options = { - theme = 'gruvbox-flat', + theme = 'gruvbox-material', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, -- 2.49.1 From 9e8672038e7ba68195548a95de8455ac67094c4b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 17:37:08 +0100 Subject: [PATCH 332/894] disbale unnamedplus because it is slow --- lua/config/options.lua | 1 - lua/my_keymappings.lua | 6 ++++++ lua/plugins/telescope.lua | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index b8a7594..1f93e19 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -15,7 +15,6 @@ opt.ignorecase = true --Case insensitive searching unless /C or capital in searc opt.smartcase = true -- Smart case opt.updatetime = 300 --Decrease update time opt.signcolumn = 'yes' -- Always show sign column -opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 opt.showmode = false -- Do not need to show the mode. We use the statusline instead. diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index a37c6ce..18e1059 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -38,3 +38,9 @@ vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, de vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' }) + + +vim.keymap.set({'n', 'x'}, 'y', '"+y', { desc='Copy from system clipboard'}) +vim.keymap.set({'n', 'x'}, 'Y', '"+yg_', { desc='Copy from system clipboard'}) +vim.keymap.set({'n', 'x'}, 'p', '"+p', { desc='Paste from system clipboard'}) +vim.keymap.set({'n', 'x'}, 'P', '"+P', { desc='Paste from system clipboard'}) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 63c6f09..416fb3f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -24,7 +24,7 @@ return { desc = 'Find file', }, { - 'p', + 'c', function() require("telescope.builtin").commands() end, -- 2.49.1 From 7f00267ec8b24d5b10a33fa974fbe56cd233f0ae Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 17:53:34 +0100 Subject: [PATCH 333/894] use wsl clipboard manager from help --- lua/config/options.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 1f93e19..e3c913a 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -38,12 +38,12 @@ if vim.fn.has("wsl") == 1 then vim.g.clipboard = { name = 'WslClipboard', copy = { - ['+'] = 'win32yank.exe -i --crlf', - ['*'] = 'win32yank.exe -i --crlf', - }, + ['+'] = 'clip.exe', + ['*'] = 'clip.exe', + }, paste = { - ['+'] = 'win32yank.exe -o --lf', - ['*'] = 'win32yank.exe -o --lf', + ['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', + ['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', }, cache_enabled = 0, } -- 2.49.1 From c5e740a70be86672447012bc4616be623efcb60c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 Jan 2023 11:48:34 +0100 Subject: [PATCH 334/894] commands for setting the font --- lua/my_keymappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 18e1059..31b0909 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -44,3 +44,6 @@ vim.keymap.set({'n', 'x'}, 'y', '"+y', { desc='Copy from system clipboar vim.keymap.set({'n', 'x'}, 'Y', '"+yg_', { desc='Copy from system clipboard'}) vim.keymap.set({'n', 'x'}, 'p', '"+p', { desc='Paste from system clipboard'}) vim.keymap.set({'n', 'x'}, 'P', '"+P', { desc='Paste from system clipboard'}) + +vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {}) +vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {}) -- 2.49.1 From 70d6dbda374de5c777551618c6323fdb54a3c9d6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 Jan 2023 20:03:54 +0100 Subject: [PATCH 335/894] try to fix the highlight autocommand --- lua/plugins/lspconfig.lua | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 336335f..9593e19 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -112,15 +112,19 @@ return { -- 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_create_autocmd("CursorHold", { - callback = vim.lsp.buf.document_highlight, + vim.api.nvim_create_augroup("lsp_document_highlight", {}) + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + callback = function() + vim.lsp.buf.document_highlight() + end, buffer = bufnr, group = "lsp_document_highlight", desc = "Document Highlight", }) vim.api.nvim_create_autocmd("CursorMoved", { - callback = vim.lsp.buf.clear_references, + callback = function() + vim.lsp.buf.clear_references() + end, buffer = bufnr, group = "lsp_document_highlight", desc = "Clear All the References", @@ -136,19 +140,26 @@ return { }, bufnr) end + local on_exit = function () + vim.api.nvim_del_augroup_by_name('lsp_document_highlight') + end + lspconfig['pyright'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, } lspconfig['groovyls'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, } lspconfig['cmake'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, } local clangd_capabilities = capabilities @@ -158,6 +169,7 @@ return { server = { capabilities = clangd_capabilities, on_attach = on_attach, + on_exit = on_exit, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, root_dir = lspconfig.util.root_pattern( '.clangd', @@ -182,6 +194,7 @@ return { -- require('clangd_extensions').setup({ -- server = { -- on_attach = on_attach, + -- on_exit = on_exit, -- capabilities = capabilities, -- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, -- }, @@ -190,6 +203,7 @@ return { lspconfig['jsonls'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, } local lua_rtp = vim.split(package.path, ';') @@ -198,6 +212,7 @@ return { lspconfig.sumneko_lua.setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, settings = { Lua = { runtime = { @@ -226,11 +241,13 @@ return { lspconfig['dockerls'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, } lspconfig['yamlls'].setup { capabilities = capabilities, on_attach = on_attach, + on_exit = on_exit, settings = { yaml = { validate = true @@ -252,6 +269,7 @@ return { }, debug = true, on_attach = on_attach, + on_exit = on_exit, capabilities = capabilities, }) -- 2.49.1 From b4e5f2b7b43bccc9162b8b4394a47ce7456472d0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 Jan 2023 20:41:44 +0100 Subject: [PATCH 336/894] hopefully the final fix for document highlight --- lua/plugins/lspconfig.lua | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 9593e19..d9c9d50 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -112,13 +112,13 @@ return { -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_create_augroup("lsp_document_highlight", {}) + local group = vim.api.nvim_create_augroup("lsp_document_highlight", {}) vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { callback = function() vim.lsp.buf.document_highlight() end, buffer = bufnr, - group = "lsp_document_highlight", + group = group, desc = "Document Highlight", }) vim.api.nvim_create_autocmd("CursorMoved", { @@ -126,9 +126,20 @@ return { vim.lsp.buf.clear_references() end, buffer = bufnr, - group = "lsp_document_highlight", + group = group, desc = "Clear All the References", }) + vim.api.nvim_create_autocmd({ 'LspDetach' }, { + group = group, + buffer = bufnr, + callback = function() + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { + group = group, + buffer = bufnr + } + end, + }) end require('lsp_signature').on_attach({ @@ -140,26 +151,19 @@ return { }, bufnr) end - local on_exit = function () - vim.api.nvim_del_augroup_by_name('lsp_document_highlight') - end - lspconfig['pyright'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, } lspconfig['groovyls'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, } lspconfig['cmake'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, } local clangd_capabilities = capabilities @@ -169,7 +173,6 @@ return { server = { capabilities = clangd_capabilities, on_attach = on_attach, - on_exit = on_exit, cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, root_dir = lspconfig.util.root_pattern( '.clangd', @@ -194,7 +197,6 @@ return { -- require('clangd_extensions').setup({ -- server = { -- on_attach = on_attach, - -- on_exit = on_exit, -- capabilities = capabilities, -- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, -- }, @@ -203,7 +205,6 @@ return { lspconfig['jsonls'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, } local lua_rtp = vim.split(package.path, ';') @@ -212,7 +213,6 @@ return { lspconfig.sumneko_lua.setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, settings = { Lua = { runtime = { @@ -241,13 +241,11 @@ return { lspconfig['dockerls'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, } lspconfig['yamlls'].setup { capabilities = capabilities, on_attach = on_attach, - on_exit = on_exit, settings = { yaml = { validate = true @@ -269,7 +267,6 @@ return { }, debug = true, on_attach = on_attach, - on_exit = on_exit, capabilities = capabilities, }) -- 2.49.1 From 413a11e741a46e1483408dfea6fb21f4e0853848 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 Jan 2023 21:26:41 +0100 Subject: [PATCH 337/894] don't clear the document highlight autogroup --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index d9c9d50..2129e0b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -112,7 +112,7 @@ return { -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - local group = vim.api.nvim_create_augroup("lsp_document_highlight", {}) + local group = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = false}) vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { callback = function() vim.lsp.buf.document_highlight() -- 2.49.1 From 4565a3aabd592a1649ccbfba6efb1747db44c282 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 26 Jan 2023 21:39:01 +0100 Subject: [PATCH 338/894] format lua --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2129e0b..ad73bef 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -112,7 +112,7 @@ return { -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - local group = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = false}) + local group = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = false }) vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { callback = function() vim.lsp.buf.document_highlight() -- 2.49.1 From a7a43192436c882d63572a91bdea63c8937b8f18 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 27 Jan 2023 23:31:22 +0100 Subject: [PATCH 339/894] beatiful lsp icons and messages --- lua/plugins/lspconfig.lua | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ad73bef..7cf94cf 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -41,6 +41,23 @@ return { ctermbg = 'red', bg = 'DarkRed' } ) + local diagnostics = { + Error = " ", + Warning = " ", + Information = " ", + Question = " ", + Hint = " ", + } + local signs = { + { name = "DiagnosticSignError", text = diagnostics.Error }, + { name = "DiagnosticSignWarn", text = diagnostics.Warning }, + { name = "DiagnosticSignHint", text = diagnostics.Hint }, + { name = "DiagnosticSignInfo", text = diagnostics.Information }, + } + + for _, sign in ipairs(signs) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name }) + end OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do @@ -270,7 +287,22 @@ return { capabilities = capabilities, }) - vim.diagnostic.config({ virtual_text = false }) + -- vim.diagnostic.config({ virtual_text = false }) + vim.diagnostic.config({ + virtual_text = false, + signs = true, + float = { + border = "single", + format = function(diagnostic) + return string.format( + "%s (%s) [%s]", + diagnostic.message, + diagnostic.source, + diagnostic.code or diagnostic.user_data.lsp.code + ) + end, + }, + }) end, event = 'VeryLazy' } -- 2.49.1 From 6c51bce00dfeecc78a642c614d2c28159f6db1f9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 28 Jan 2023 21:39:46 +0100 Subject: [PATCH 340/894] added lazygit plugin --- lua/plugins/lazygit.lua | 26 ++++++++++++++++++++++++++ lua/plugins/toggleterm.lua | 23 ----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 lua/plugins/lazygit.lua diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua new file mode 100644 index 0000000..646f7e6 --- /dev/null +++ b/lua/plugins/lazygit.lua @@ -0,0 +1,26 @@ +return { + 'kdheepak/lazygit.nvim', + dependencies = { + 'nvim-telescope/telescope.nvim' + }, + cmd = { + 'LazyGit', + 'LazyGitConfig', + 'LazyGitFilter', + 'LazyGitFilterCurrentFile', + 'LazyGit', + }, + config = function () + require("telescope").load_extension("lazygit") + end, + keys = { + { + 'g', + function () + require('lazygit').lazygit() + end + + } + + } +} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index cbd372f..2a84160 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -19,29 +19,6 @@ return { local Terminal = require('toggleterm.terminal').Terminal - local lazygit = Terminal:new({ - cmd = 'lazygit', - -- dir = vim.fn.getcwd(), - hidden = true, - direction = 'float', - on_open = function(term) - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) - -- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', '', {noremap = true, silent = true}) - end, - }) - - function _lazygit_toggle() - lazygit:toggle() - end end, cmd = 'ToggleTerm', - keys = { - { - 'g', - function() - _lazygit_toggle() - end, - desc= 'Open lazygit', - } - } } -- 2.49.1 From cfa7b243f3bb3c110ce8604edc33d4bdb58b07b7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 28 Jan 2023 23:47:27 +0100 Subject: [PATCH 341/894] fix code-lldb debugger --- lua/plugins/dap.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 8b9c987..1983a9b 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -214,11 +214,8 @@ return { return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') end, cwd = '${workspaceFolder}', - stopOnEntry = true, + stopOnEntry = false, }, - } - - dap.configurations.cpp = { { name = 'Launch lldb', type = 'lldb', -- 2.49.1 From 561b99ac1b1486a61a06cf29a953b4624c91ea48 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 00:38:47 +0100 Subject: [PATCH 342/894] configure debug for cmake tools --- lua/plugins/cmake-tools.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 6cedfc1..5857b24 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -5,6 +5,7 @@ return { cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1", '-G', 'Ninja' }, cmake_show_console = "always", cmake_build_directory = "build_nvim", + cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional }, cmd = { 'CMakeGenerate', @@ -24,4 +25,13 @@ return { 'CMakeClean', 'CMakeStop', }, + keys = { + { + '', + function() + require('cmake-tools').debug({}) + end, + desc = 'Run and debug target from cmake' + } + } } -- 2.49.1 From c81d9e0bda5d45dbae4b760f25d2e3b213ed6704 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:15:50 +0100 Subject: [PATCH 343/894] format lazygit --- lua/plugins/lazygit.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index 646f7e6..5ce1e2f 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -10,17 +10,15 @@ return { 'LazyGitFilterCurrentFile', 'LazyGit', }, - config = function () - require("telescope").load_extension("lazygit") + config = function() + require("telescope").load_extension("lazygit") end, keys = { { 'g', - function () + function() require('lazygit').lazygit() end - } - } } -- 2.49.1 From c911f288c6171c2a478a95324a7fc71e4323c2db Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:16:00 +0100 Subject: [PATCH 344/894] udpated plugins --- lazy-lock.json | 73 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1888c97..31bc152 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,10 +1,10 @@ { - "Comment.nvim": { "branch": "master", "commit": "ab00bcf5aa979c53f2f40dc2655c03e24f4ef50f" }, + "Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" }, "FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" }, - "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, - "aerial.nvim": { "branch": "master", "commit": "3eafbd28ae573fa665121a6e058a450cf3fe8573" }, + "LuaSnip": { "branch": "master", "commit": "94f192cf5f0a1931b3035c2d8affdebec460968c" }, + "aerial.nvim": { "branch": "master", "commit": "911373eb6be91700a3597aeb228f553d4a29aec1" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a5c3c8390dfb342d630bdc25941a4d8f433510be" }, - "cmake-tools.nvim": { "branch": "master", "commit": "ee86951c42986e810312c14c479996b1042e076c" }, + "cmake-tools.nvim": { "branch": "master", "commit": "c5e2bfc7deec9c75d41e1fabfd1ad01036793ee4" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, @@ -19,46 +19,47 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "e3e15d8f1d727056185fc1696be1554837dec897" }, + "diffview.nvim": { "branch": "main", "commit": "dc77f487b292c4a89dd437d80331e3aacbe3aaed" }, "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, - "friendly-snippets": { "branch": "main", "commit": "484fb38b8f493ceeebf4e6fc499ebe41e10aae25" }, - "gitsigns.nvim": { "branch": "main", "commit": "d4f8c01280413919349f5df7daccd0c172143d7c" }, - "gruvbox-flat.nvim": { "branch": "master", "commit": "172269867994c0da7adcf02e89a068cda85eb805" }, - "indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" }, - "lazy.nvim": { "branch": "main", "commit": "102bc2722e73d0dcebd6c90b45a41cb33e0660cb" }, - "leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" }, - "lsp_signature.nvim": { "branch": "master", "commit": "1979f1118e2b38084e7c148f279eed6e9300a342" }, + "friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" }, + "gitsigns.nvim": { "branch": "main", "commit": "0d4fe37ba5285171f3729da955955205f3fa945b" }, + "gruvbox-material": { "branch": "master", "commit": "13b7eb4589d9ab0f388ca51047051f7158c930e5" }, + "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, + "lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" }, + "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, + "leap.nvim": { "branch": "main", "commit": "ff4c3663e5a0a0ecbb3fffbc8318825def35d2aa" }, + "lsp_signature.nvim": { "branch": "master", "commit": "b86f249cba85ec2f0f74c62b65898bade00b4413" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "d8c392dd75778d6258da4e7c55522e94ac389732" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "33a198bc5ee0215ae8ab3f61781b29103cf4ca5a" }, - "mason.nvim": { "branch": "main", "commit": "73831cbe979fb3b385ed8e61626d16d9306a1f06" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "3b41f0d17139bb156f1acd907608f63e0e307caf" }, - "neodev.nvim": { "branch": "main", "commit": "258b83f48405c6b530c09dd96950693664dc6bc0" }, - "neogen": { "branch": "main", "commit": "2961b48f7263769953ac18fe4afa4df71b321341" }, - "neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" }, + "lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "422b9745143150e16cd3fe331c74f6737de75e72" }, + "mason.nvim": { "branch": "main", "commit": "2469bfc2538652cb0cf88c129f67d38e46a9cb59" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8238865e1d9c61f1a260c290653f2c419503e0a9" }, + "neodev.nvim": { "branch": "main", "commit": "8fd21037453f4306f500e437c5cbdf6e8b6c2f99" }, + "neogen": { "branch": "main", "commit": "465af9d6c6fb7f360175991dcc23fc10917e3a06" }, + "neotest": { "branch": "master", "commit": "392808a91d6ee28d27cbfb93c9fd9781759b5d00" }, "neotest-python": { "branch": "master", "commit": "e53920d145d37783c8d8428365a0a230e0a18cb5" }, - "nui.nvim": { "branch": "main", "commit": "257da38029d3859ed111804f9d4e95b0fa993a31" }, - "null-ls.nvim": { "branch": "main", "commit": "6830a1ed04f89e6d556cb6bcc200433173004307" }, - "nvim-autopairs": { "branch": "master", "commit": "03580d758231956d33c8dd91e2be195106a79fa4" }, - "nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" }, - "nvim-dap": { "branch": "master", "commit": "1077a86c83f75a6eec36c91f91d6b728e2b02130" }, + "nui.nvim": { "branch": "main", "commit": "b99e6cb13dc51768abc1c4c8585045a0c0459ef1" }, + "null-ls.nvim": { "branch": "main", "commit": "7b2b28e207a1df4ebb13c7dc0bd83f69b5403d71" }, + "nvim-autopairs": { "branch": "master", "commit": "31042a5823b55c4bfb30efcbba2fc1b5b53f90dc" }, + "nvim-cmp": { "branch": "main", "commit": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b" }, + "nvim-dap": { "branch": "master", "commit": "0e376f00e7fac143e29e1017d2ac2cc3df13d185" }, "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, - "nvim-dap-ui": { "branch": "master", "commit": "f2206de65ea39093e3f13992507fc985c17aa763" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" }, - "nvim-lspconfig": { "branch": "master", "commit": "e69978a39e4d3262b09ce6a316beff384f443e3b" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "996b46fc661f9977ab214ddfc1322668f646d92d" }, - "nvim-treesitter": { "branch": "master", "commit": "2d8e6b666297ddf19cbf7cbc2b0f1928bc49224a" }, + "nvim-dap-ui": { "branch": "master", "commit": "e26fba0562cb9c904f7a6510a94961b82701a16f" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" }, + "nvim-lspconfig": { "branch": "master", "commit": "1e988250a0f52a68ddb72905d623405d634e9c5d" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "5b9286a40ea2020352280caeb713515badb03d99" }, + "nvim-treesitter": { "branch": "master", "commit": "cda8b291ef6fc4e04036e2ea6cf0de8aa84c2656" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" }, - "overseer.nvim": { "branch": "master", "commit": "dacf92c19251046f4853d0978f90de7b4ae2ddf6" }, - "plenary.nvim": { "branch": "master", "commit": "9d81624fbcedd3dd43b38d7e13a1e7b3f873d8cd" }, + "nvim-web-devicons": { "branch": "master", "commit": "a421d183ef37dfa13f51a5805bed2381aebf9080" }, + "overseer.nvim": { "branch": "master", "commit": "cebb263509fa6cb52c63544845a721dd826b3c15" }, + "plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, - "sqlite.lua": { "branch": "master", "commit": "53cac3fdb5f5e4e63e243232b6eccf3c764ae18a" }, + "sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "cd67e819e453643b818363e6b573484c8e2e41b0" }, - "toggleterm.nvim": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" }, + "telescope.nvim": { "branch": "master", "commit": "dce1156ca103b8222e4abbfc63f9c6887abf5ec6" }, + "toggleterm.nvim": { "branch": "main", "commit": "a54e6c471ce1cd8ef8357e34598a28a955297131" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "b7e0b1f16c20bc1ea0515851bc5740d1c1f18444" } + "which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" } } \ No newline at end of file -- 2.49.1 From 045a1af8dc4a44dc1497ba05ad969958d8cf7476 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:18:24 +0100 Subject: [PATCH 345/894] removed some commented code --- lua/plugins/project.lua | 1 - lua/plugins/telescope.lua | 1 - 2 files changed, 2 deletions(-) diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua index 5330c8b..1e3abfa 100644 --- a/lua/plugins/project.lua +++ b/lua/plugins/project.lua @@ -8,5 +8,4 @@ return { patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, }) end, - -- event = 'BufReadPre' } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 416fb3f..2d6c64e 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -169,6 +169,5 @@ return { require("telescope").load_extension("ui-select") require('telescope').load_extension('fzf') - -- require('telescope').load_extension('projects') end } -- 2.49.1 From 7bdf105fac7aa844c07a63feea68957ee4462c42 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:28:31 +0100 Subject: [PATCH 346/894] also show hidden files with file search --- lua/plugins/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 2d6c64e..cbee22b 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -19,7 +19,7 @@ return { { 'f', function() - require("telescope.builtin").find_files({ no_ignore = true }) + require("telescope.builtin").find_files({ no_ignore = true, hidden = true }) end, desc = 'Find file', }, -- 2.49.1 From 2b0d14d7a1adbad07f8cf94bc3641cbce564a96a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:41:14 +0100 Subject: [PATCH 347/894] enable single quotes for lua code --- lua/plugins/lspconfig.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 7cf94cf..acdd939 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -251,6 +251,14 @@ return { telemetry = { enable = false, }, + format = { + enable = true, + defaultConfig = { + indent_style = 'space', + indent_size = '2', + quote_style = 'single' + } + } }, } } -- 2.49.1 From c60cf314be75cc985b9f7a9122c084955537c470 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:41:28 +0100 Subject: [PATCH 348/894] removed ununsed 'use' keyword for lua --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index acdd939..71b0725 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -240,7 +240,7 @@ return { }, diagnostics = { -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, + globals = { 'vim' }, }, workspace = { -- Make the server aware of Neovim runtime files -- 2.49.1 From fa0d4ffd8f505b245d2c4088f1d0320fed953ef4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:41:44 +0100 Subject: [PATCH 349/894] telescope: ignore .git but search hidden files --- lua/plugins/telescope.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index cbee22b..27699fb 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -117,6 +117,18 @@ return { if not ok then require "telescope.builtin".find_files(opts) end end + + local telescopeConfig = require("telescope.config") + + -- Clone the default Telescope configuration + local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) } + + -- I want to search in hidden/dot files. + table.insert(vimgrep_arguments, "--hidden") + -- I don't want to search in the `.git` directory. + table.insert(vimgrep_arguments, "--glob") + table.insert(vimgrep_arguments, "!**/.git/*") + require('telescope').setup({ defaults = { mappings = { @@ -126,6 +138,8 @@ return { [''] = actions.smart_send_to_qflist, }, }, + -- `hidden = true` is not supported in text grep commands. + vimgrep_arguments = vimgrep_arguments, }, pickers = { -- Your special builtin config goes in here @@ -145,6 +159,8 @@ return { find_files = { theme = 'ivy', previewer = false, + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. + find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, }, oldfiles = { theme = 'ivy', -- 2.49.1 From b87bbaee7493c32eab238e690986ff8576666c38 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 29 Jan 2023 11:55:25 +0100 Subject: [PATCH 350/894] format all lua files --- lua/config/options.lua | 153 ++++++++++---------- lua/my_autocommands.lua | 9 +- lua/my_keymappings.lua | 10 +- lua/my_plugins.lua | 268 ----------------------------------- lua/plugins/aerial.lua | 4 +- lua/plugins/cmake-tools.lua | 10 +- lua/plugins/cmp.lua | 2 +- lua/plugins/comment.lua | 4 +- lua/plugins/dap.lua | 34 ++--- lua/plugins/gruvbox_flat.lua | 2 +- lua/plugins/lazygit.lua | 2 +- lua/plugins/lspconfig.lua | 53 +++---- lua/plugins/luasnip.lua | 2 +- lua/plugins/neoclip.lua | 6 +- lua/plugins/neotest.lua | 10 +- lua/plugins/overseer.lua | 2 +- lua/plugins/project.lua | 4 +- lua/plugins/telescope.lua | 42 +++--- lua/plugins/treesitter.lua | 15 +- 19 files changed, 179 insertions(+), 453 deletions(-) delete mode 100644 lua/my_plugins.lua diff --git a/lua/config/options.lua b/lua/config/options.lua index e3c913a..98d726d 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,76 +1,77 @@ - -vim.cmd('filetype plugin indent on') -vim.cmd('language en_US.utf-8') - -local opt = vim.opt -local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default -opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. -opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line -opt.list = true -opt.hidden= true -opt.scrolloff= 4 -opt.shiftround= true -opt.relativenumber= false -opt.splitbelow= true -opt.splitright= true -opt.wildmode= 'longest:full,full' -opt.splitbelow= true -opt.splitright= true -opt.shiftwidth = indent -opt.tabstop = indent -if vim.fn.has("wsl") == 1 then - vim.g.clipboard = { - name = 'WslClipboard', - copy = { - ['+'] = 'clip.exe', - ['*'] = 'clip.exe', - }, - paste = { - ['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', - ['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', - }, - cache_enabled = 0, - } - opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf -elseif vim.loop.os_uname().sysname == 'Linux' then - opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' -else - opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf -end -opt.swapfile= false -opt.backup= false -opt.spelllang= 'en,de' -opt.completeopt= 'menu,menuone,noselect' -opt.expandtab= true -opt.smartindent= true -opt.title = true -opt.titlestring = '%{getcwd()} - %t' -opt.laststatus = 3 -- for lualine - --- go to previous/next line with h,l,left arrow and right arrow --- when cursor reaches end/beginning of line --- opt.whichwrap:append('<>[]hl') - --- disable nvim intro -opt.shortmess:append('sI') - --- Treesitter based folding -opt.foldlevel = 20 -opt.foldmethod = 'expr' -opt.foldexpr = 'nvim_treesitter#foldexpr()' +vim.cmd('filetype plugin indent on') +vim.cmd('language en_US.utf-8') + +local opt = vim.opt +local indent = 2 +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default +opt.relativenumber = false --Make relative number default +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.ttimeoutlen = 10 +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.list = true +opt.hidden = true +opt.scrolloff = 4 +opt.shiftround = true +opt.relativenumber = false +opt.splitbelow = true +opt.splitright = true +opt.wildmode = 'longest:full,full' +opt.splitbelow = true +opt.splitright = true +opt.shiftwidth = indent +opt.tabstop = indent +if vim.fn.has('wsl') == 1 then + vim.g.clipboard = { + name = 'WslClipboard', + copy = { + ['+'] = 'clip.exe', + ['*'] = 'clip.exe', + }, + paste = { + ['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', + ['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))', + }, + cache_enabled = 0, + } + opt.guifont = 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf + +elseif vim.loop.os_uname().sysname == 'Linux' then + opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' +else + opt.guifont = 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +end +opt.swapfile = false +opt.backup = false +opt.spelllang = 'en,de' +opt.completeopt = 'menu,menuone,noselect' +opt.expandtab = true +opt.smartindent = true +opt.title = true +opt.titlestring = '%{getcwd()} - %t' +opt.laststatus = 3 -- for lualine + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +-- opt.whichwrap:append('<>[]hl') + +-- disable nvim intro +opt.shortmess:append('sI') + +-- Treesitter based folding +opt.foldlevel = 20 +opt.foldmethod = 'expr' +opt.foldexpr = 'nvim_treesitter#foldexpr()' +opt.foldexpr = 'nvim_treesitter#foldexpr()' diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index b4d0c5b..b2213d6 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -38,14 +38,14 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { 'doskey'}, + pattern = { 'doskey' }, callback = function() vim.bo.filetype = 'dosini' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { '.clangd', '.clang-tidy'}, + pattern = { '.clangd', '.clang-tidy' }, callback = function() vim.bo.filetype = 'yaml' end, @@ -62,7 +62,8 @@ api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) -- ) -- Check if we need to reload the file when it changed -api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) +api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, + { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) -- windows to close with "q" api.nvim_create_autocmd( @@ -82,4 +83,4 @@ api.nvim_create_autocmd( api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) -- Keep window ratio when resize -api.nvim_create_autocmd('VimResized', {command = [[wincmd =]]}) +api.nvim_create_autocmd('VimResized', { command = [[wincmd =]] }) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 31b0909..8dfb83f 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -26,7 +26,7 @@ vim.keymap.set('x', '>', '>gv') local function hlWord() local current_word = vim.call('expand', '') - vim.fn.setreg('/', "\\<" .. current_word .. "\\>") + vim.fn.setreg('/', '\\<' .. current_word .. '\\>') vim.opt.hlsearch = true end @@ -40,10 +40,10 @@ vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' }) -vim.keymap.set({'n', 'x'}, 'y', '"+y', { desc='Copy from system clipboard'}) -vim.keymap.set({'n', 'x'}, 'Y', '"+yg_', { desc='Copy from system clipboard'}) -vim.keymap.set({'n', 'x'}, 'p', '"+p', { desc='Paste from system clipboard'}) -vim.keymap.set({'n', 'x'}, 'P', '"+P', { desc='Paste from system clipboard'}) +vim.keymap.set({ 'n', 'x' }, 'y', '"+y', { desc = 'Copy from system clipboard' }) +vim.keymap.set({ 'n', 'x' }, 'Y', '"+yg_', { desc = 'Copy from system clipboard' }) +vim.keymap.set({ 'n', 'x' }, 'p', '"+p', { desc = 'Paste from system clipboard' }) +vim.keymap.set({ 'n', 'x' }, 'P', '"+P', { desc = 'Paste from system clipboard' }) vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {}) vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {}) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua deleted file mode 100644 index cd16c7b..0000000 --- a/lua/my_plugins.lua +++ /dev/null @@ -1,268 +0,0 @@ -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost my_plugins.lua source | PackerCompile - augroup end -]]) - -local fn = vim.fn -local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' -if fn.empty(fn.glob(install_path)) > 0 then - packer_bootstrap = fn.system({ - 'git', - 'clone', - '--depth', - '1', - 'https://github.com/wbthomason/packer.nvim', - install_path, - }) -end -vim.api.nvim_command('packadd packer.nvim') - -local function get_setup(name) - return string.format('require("setup/%s")', name) -end - -local packerUtil = require('packer.util') -require('packer').init({ - snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'), - display = { - open_fn = require('packer.util').float, - }, -}) - -return require('packer').startup(function() - -- Packer can manage itself as an optional plugin - use({ 'wbthomason/packer.nvim' }) - use({ - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate', - config = get_setup('treesitter'), - }) - use({ - 'nvim-telescope/telescope.nvim', - requires = { - { 'nvim-lua/popup.nvim' }, - { 'nvim-lua/plenary.nvim' }, - { 'kyazdani42/nvim-web-devicons' }, - { 'nvim-telescope/telescope-fzf-native.nvim', - run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja && cmake --build build --config Release && cmake --install build --prefix build' }, - }, - config = get_setup('telescope'), - }) - use({ - 'sainnhe/gruvbox-material', - disable = true, - config = get_setup('my_gruvbox-material') - }) - use({ - 'luisiacc/gruvbox-baby', - disable = true, - config = get_setup('my_gruvbox-baby') - }) - use({ - 'ellisonleao/gruvbox.nvim', - disable = true, - config = get_setup('gruvbox'), - }) - use({ - 'eddyekofo94/gruvbox-flat.nvim', - disable = false, - config = get_setup('my_gruvbox_flat') - }) - use({ - 'lukas-reineke/indent-blankline.nvim', - requires = { - 'nvim-treesitter/nvim-treesitter', - }, - config = get_setup('indent_blankline'), - }) - use({ 'nvim-lua/plenary.nvim' }) - use({ - 'lewis6991/gitsigns.nvim', - config = get_setup('gitsigns'), - }) - use({ - 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons', - config = get_setup('nvim-tree'), - disable = true, - }) - use({ - 'numToStr/Comment.nvim', - config = get_setup('comment'), - }) - use({ - 'hrsh7th/nvim-cmp', - requires = { - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { 'L3MON4D3/LuaSnip' }, - { 'saadparwaiz1/cmp_luasnip' }, - { 'hrsh7th/cmp-nvim-lua' }, - { 'octaltree/cmp-look' }, - { 'hrsh7th/cmp-path' }, - { 'hrsh7th/cmp-calc' }, - { 'f3fora/cmp-spell' }, - { 'hrsh7th/cmp-emoji' }, - { 'hrsh7th/cmp-cmdline' }, - { 'dmitmel/cmp-cmdline-history' }, - { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' }, - { 'p00f/clangd_extensions.nvim' }, - { 'rcarriga/cmp-dap', - opt = true, - module = 'cmp_dap' }, - }, - config = get_setup('my_cmp'), - }) - use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) - use({ 'rafamadriz/friendly-snippets' }) - use({ 'onsails/lspkind-nvim' }) - use({ - 'hoob3rt/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true }, - config = get_setup('lualine'), - }) - use({ - 'ahmedkhalf/project.nvim', - config = get_setup('project'), - }) - use({ 'p00f/nvim-ts-rainbow', - requires = 'nvim-treesitter/nvim-treesitter', - }) - use({ - 'windwp/nvim-autopairs', - config = get_setup('nvim-autopairs'), - }) - use({ 'ray-x/lsp_signature.nvim' }) - use({ - 'neovim/nvim-lspconfig', - requires = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - 'p00f/clangd_extensions.nvim', - }, - config = get_setup('my_lspconfig'), - }) - use({ - 'jose-elias-alvarez/null-ls.nvim', - requires = { 'nvim-lua/plenary.nvim' }, - }) - use({ - 'danymat/neogen', - requires = 'nvim-treesitter/nvim-treesitter', - config = get_setup('neogen'), - opt = true, - module = 'neogen' - }) - use({ 'stevearc/dressing.nvim' }) - use({ - 'nvim-neo-tree/neo-tree.nvim', - requires = { - 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', - { 'MunifTanjim/nui.nvim', module = 'nui' }, - }, - config = get_setup('neo-tree'), - opt = true, - keys = { - { 'n', '\\' } - } - }) - use({ - 'akinsho/toggleterm.nvim', - config = get_setup('toggleterm'), - }) - use({ - 'mrjones2014/legendary.nvim', - config = get_setup('my_legendary') - }) - use({ - 'gbprod/yanky.nvim', - config = get_setup('yanky') - }) - use { - 'ldelossa/litee.nvim', - disable = true, - requires = { - 'ldelossa/litee-calltree.nvim', - 'ldelossa/litee-symboltree.nvim', - 'ldelossa/gh.nvim' - }, - config = get_setup('my_litee') - } - use { - 'stevearc/aerial.nvim', - requires = { - 'nvim-telescope/telescope.nvim' - }, - config = get_setup('aerial'), - opt = true, - module = 'aerial', - cmd = {'Telescope aerial', 'AerialToggle'}, - keys = { - { 'n', 's' }, - { 'n', '' } - } - } - use { - 'ggandor/leap.nvim', - requires = { 'tpope/vim-repeat' }, - config = get_setup('my_leap') - } - use { - 'mfussenegger/nvim-dap', - requires = { - 'mfussenegger/nvim-dap-python', - { - 'theHamsta/nvim-dap-virtual-text', - module = 'nvim-dap-virtual-text' - }, - { - 'nvim-telescope/telescope-dap.nvim', - module = 'telescope._extensions.dap', - requires = 'telescope.nvim', - }, - { - 'rcarriga/nvim-dap-ui', - module = 'dapui' - }, - }, - keys = { - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' }, - { 'n', '' } - }, - -- module = 'dap', - config = function() - require('setup/my_dap') - end, - opt = true, - } - use { - 'sindrets/diffview.nvim', - requires = 'nvim-lua/plenary.nvim', - config = get_setup('my_diffview'), - opt = true, - cmd = 'DiffviewOpen', - module = { 'diffview', 'diffview.actions' } - } - use { - 'stevearc/overseer.nvim', - config = get_setup('my_overseer'), - opt = true, - keys = { - { 'n', '' } - }, - module = 'overseer' - } - if packer_bootstrap then - require('packer').sync() - end -end) diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua index 94f0130..401735b 100644 --- a/lua/plugins/aerial.lua +++ b/lua/plugins/aerial.lua @@ -7,7 +7,7 @@ return { require('aerial').setup({ backends = { 'lsp', 'treesitter', 'markdown' }, layout = { - default_direction = "prefer_left" + default_direction = 'prefer_left' }, filter_kind = false, show_guides = true, @@ -18,7 +18,7 @@ return { keys = { { 's', - function () + function() require('aerial').toggle() end, desc = 'Symbols outline', diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 5857b24..658a20e 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -1,11 +1,11 @@ return { 'Civitasv/cmake-tools.nvim', config = { - cmake_command = "cmake", - cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1", '-G', 'Ninja' }, - cmake_show_console = "always", - cmake_build_directory = "build_nvim", - cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional + cmake_command = 'cmake', + cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, + cmake_show_console = 'always', + cmake_build_directory = 'build_nvim', + cmake_dap_configuration = { name = 'cpp', type = 'codelldb', request = 'launch' }, -- dap configuration, optional }, cmd = { 'CMakeGenerate', diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 21f2978..356d524 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -106,7 +106,7 @@ return { -- { name = 'emoji' }, }, enabled = function() - return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" + return vim.api.nvim_buf_get_option(0, 'buftype') ~= 'prompt' or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index c1eedc9..b90706a 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -9,14 +9,14 @@ return { { '', '(comment_toggle_linewise_current)', - desc= 'Toggle comment' + desc = 'Toggle comment' }, { '', '(comment_toggle_linewise_visual)gv', mode = 'v', - desc= 'Toggle comment' + desc = 'Toggle comment' } } } diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 1983a9b..6e85027 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -77,12 +77,12 @@ return { }, config = function() local dap = require('dap') - vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''}) - require("cmp_dap").is_dap_buffer() + vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' }) + require('cmp_dap').is_dap_buffer() -- make sure we can exit the terminal with esc - vim.api.nvim_create_autocmd({ "TermOpen" }, { + vim.api.nvim_create_autocmd({ 'TermOpen' }, { pattern = { '*dap-terminal*' }, callback = function() local opts = { noremap = true } @@ -99,13 +99,13 @@ return { end local function getPythonEnv() - local venv = os.getenv("VIRTUAL_ENV") + local venv = os.getenv('VIRTUAL_ENV') if venv ~= nil then - return string.format("%s/%s", venv, getVenvSuffix()) + return string.format('%s/%s', venv, getVenvSuffix()) end - local conda = os.getenv("CONDA_PREFIX") + local conda = os.getenv('CONDA_PREFIX') if conda ~= nil then - return string.format("%s/%s", conda, 'python.exe') + return string.format('%s/%s', conda, 'python.exe') end local cwd = vim.fn.getcwd() @@ -144,15 +144,15 @@ return { }; } - local dapui = require("dapui") + local dapui = require('dapui') dapui.setup() - dap.listeners.after.event_initialized["dapui_config"] = function() + dap.listeners.after.event_initialized['dapui_config'] = function() dapui.open({}) end - dap.listeners.before.event_terminated["dapui_config"] = function() + dap.listeners.before.event_terminated['dapui_config'] = function() dapui.close({}) end - dap.listeners.before.event_exited["dapui_config"] = function() + dap.listeners.before.event_exited['dapui_config'] = function() dapui.close({}) end @@ -160,9 +160,9 @@ return { { type = 'python'; request = 'launch'; - name = "Launch file with venv"; + name = 'Launch file with venv'; justMyCode = false; - program = "${file}"; + program = '${file}'; cwd = vim.fn.getcwd(); pythonPath = getPythonEnv }, @@ -182,7 +182,7 @@ return { -- CPP dap.adapters.codelldb = { type = 'server', - port = "${port}", + port = '${port}', executable = { -- CHANGE THIS to your path! command = masonpath .. '/bin/codelldb.cmd', @@ -207,9 +207,9 @@ return { dap.configurations.cpp = { { - name = "Launch codelldb", - type = "codelldb", - request = "launch", + name = 'Launch codelldb', + type = 'codelldb', + request = 'launch', program = function() return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') end, diff --git a/lua/plugins/gruvbox_flat.lua b/lua/plugins/gruvbox_flat.lua index 8c65c28..fbdcfa5 100644 --- a/lua/plugins/gruvbox_flat.lua +++ b/lua/plugins/gruvbox_flat.lua @@ -3,7 +3,7 @@ return { priority = 1000, config = function() local colors = require('gruvbox.colors') - vim.g.gruvbox_flat_style = "dark" + vim.g.gruvbox_flat_style = 'dark' vim.g.gruvbox_colors = { bg_search = 'purple', fg_search = 'black', diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index 5ce1e2f..59a9a4e 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -11,7 +11,7 @@ return { 'LazyGit', }, config = function() - require("telescope").load_extension("lazygit") + require('telescope').load_extension('lazygit') end, keys = { { diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 71b0725..cde18c7 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -22,37 +22,37 @@ return { vim.api.nvim_set_hl( 0, - "LspReferenceText", + 'LspReferenceText', { bold = true, ctermbg = 'red', - bg = "#5a524c" } + bg = '#5a524c' } ) vim.api.nvim_set_hl( 0, - "LspReferenceRead", + 'LspReferenceRead', { bold = true, ctermbg = 'red', bg = 'DarkGreen' } ) vim.api.nvim_set_hl( 0, - "LspReferenceWrite", + 'LspReferenceWrite', { bold = true, ctermbg = 'red', bg = 'DarkRed' } ) local diagnostics = { - Error = " ", - Warning = " ", - Information = " ", - Question = " ", - Hint = " ", + Error = ' ', + Warning = ' ', + Information = ' ', + Question = ' ', + Hint = ' ', } local signs = { - { name = "DiagnosticSignError", text = diagnostics.Error }, - { name = "DiagnosticSignWarn", text = diagnostics.Warning }, - { name = "DiagnosticSignHint", text = diagnostics.Hint }, - { name = "DiagnosticSignInfo", text = diagnostics.Information }, + { name = 'DiagnosticSignError', text = diagnostics.Error }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -129,22 +129,22 @@ return { -- Set autocommands conditional on server_capabilities if client.server_capabilities.documentHighlightProvider then - local group = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = false }) - vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { callback = function() vim.lsp.buf.document_highlight() end, buffer = bufnr, group = group, - desc = "Document Highlight", + desc = 'Document Highlight', }) - vim.api.nvim_create_autocmd("CursorMoved", { + vim.api.nvim_create_autocmd('CursorMoved', { callback = function() vim.lsp.buf.clear_references() end, buffer = bufnr, group = group, - desc = "Clear All the References", + desc = 'Clear All the References', }) vim.api.nvim_create_autocmd({ 'LspDetach' }, { group = group, @@ -185,8 +185,8 @@ return { local clangd_capabilities = capabilities clangd_capabilities.textDocument.semanticHighlighting = true - clangd_capabilities.offsetEncoding = { "utf-16" } - require("clangd_extensions").setup { + clangd_capabilities.offsetEncoding = { 'utf-16' } + require('clangd_extensions').setup { server = { capabilities = clangd_capabilities, on_attach = on_attach, @@ -211,13 +211,6 @@ return { } } - -- require('clangd_extensions').setup({ - -- server = { - -- on_attach = on_attach, - -- capabilities = capabilities, - -- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - -- }, - -- }) lspconfig['jsonls'].setup { capabilities = capabilities, @@ -256,7 +249,7 @@ return { defaultConfig = { indent_style = 'space', indent_size = '2', - quote_style = 'single' + quote_style = 'single', } } }, @@ -300,10 +293,10 @@ return { virtual_text = false, signs = true, float = { - border = "single", + border = 'single', format = function(diagnostic) return string.format( - "%s (%s) [%s]", + '%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index e11aa7f..c8d4a6d 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -56,7 +56,7 @@ return { } require('luasnip.loaders.from_vscode').lazy_load() - require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } }) + require('luasnip.loaders.from_vscode').lazy_load({ paths = { './my-snippets' } }) end, dependencies = { diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua index b38b77e..c72f3e9 100644 --- a/lua/plugins/neoclip.lua +++ b/lua/plugins/neoclip.lua @@ -1,5 +1,5 @@ return { - "AckslD/nvim-neoclip.lua", + 'AckslD/nvim-neoclip.lua', dependencies = { { 'kkharji/sqlite.lua', module = 'sqlite' }, -- { 'nvim-telescope/telescope.nvim' }, @@ -8,8 +8,8 @@ return { keys = { { '[', - function () - require('telescope').extensions.neoclip.default({initial_mode='normal'}) + function() + require('telescope').extensions.neoclip.default({ initial_mode = 'normal' }) end, desc = 'NeoClip' } diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index aecffc2..f4da010 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -7,13 +7,13 @@ return { 'nvim-neotest/neotest-python' }, config = function() - require("neotest").setup({ + require('neotest').setup({ adapters = { - require("neotest-python")({ + require('neotest-python')({ dap = { justMyCode = false }, - args = { "--log-level", "DEBUG" }, + args = { '--log-level', 'DEBUG' }, runner = 'pytest', }) } @@ -23,14 +23,14 @@ return { { '', function() - require("neotest").run.run() + require('neotest').run.run() end, desc = 'Run nearest test' }, { '', function() - require("neotest").run.run({ strategy = "dap" }) + require('neotest').run.run({ strategy = 'dap' }) end, desc = 'Run nearest test' } diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua index 5de82ed..fcefbee 100644 --- a/lua/plugins/overseer.lua +++ b/lua/plugins/overseer.lua @@ -2,7 +2,7 @@ return { 'stevearc/overseer.nvim', config = function() require('overseer').setup({ - templates = { "builtin", "user.cmake.cmake" }, + templates = { 'builtin', 'user.cmake.cmake' }, }) end, keys = { diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua index 1e3abfa..96f614d 100644 --- a/lua/plugins/project.lua +++ b/lua/plugins/project.lua @@ -1,11 +1,11 @@ return { 'ahmedkhalf/project.nvim', config = function() - require("project_nvim").setup( + require('project_nvim').setup( { silent_chdir = true, ignore_lsp = { 'null-ls', 'cmake' }, - patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "build_nvim", "real_path.txt" }, + patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt' }, }) end, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 27699fb..4a4970f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -14,19 +14,19 @@ return { 'nvim-telescope/telescope-ui-select.nvim', 'ahmedkhalf/project.nvim', }, - cmd = { "Telescope" }, + cmd = { 'Telescope' }, keys = { { 'f', function() - require("telescope.builtin").find_files({ no_ignore = true, hidden = true }) + require('telescope.builtin').find_files({ no_ignore = true, hidden = true }) end, desc = 'Find file', }, { 'c', function() - require("telescope.builtin").commands() + require('telescope.builtin').commands() end, desc = 'Telescope commands', }, @@ -40,56 +40,56 @@ return { { 'o', function() - require("telescope.builtin").oldfiles() + require('telescope.builtin').oldfiles() end, desc = 'Find old files', }, { 'h', function() - require("telescope.builtin").command_history() + require('telescope.builtin').command_history() end, desc = 'Open command history', }, { 'b', function() - require("telescope.builtin").buffers() + require('telescope.builtin').buffers() end, desc = 'Select buffer', }, { 'q', function() - require("telescope.builtin").quickfix() + require('telescope.builtin').quickfix() end, desc = 'Quickfix list with telescope', }, { 'l', function() - require("telescope.builtin").live_grep() + require('telescope.builtin').live_grep() end, desc = 'Search in project', }, { 'j', function() - require("telescope.builtin").jumplist() + require('telescope.builtin').jumplist() end, desc = 'Open jumplist', }, { '', function() - require("telescope.builtin").current_buffer_fuzzy_find() + require('telescope.builtin').current_buffer_fuzzy_find() end, desc = 'Find in buffer', }, { 'd', function() - require("telescope.builtin").grep_string() + require('telescope.builtin').grep_string() end, desc = 'Find in workspace', }, @@ -113,21 +113,21 @@ return { Project_files = function() local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end + local ok = pcall(require 'telescope.builtin'.git_files, opts) + if not ok then require 'telescope.builtin'.find_files(opts) end end - local telescopeConfig = require("telescope.config") + local telescopeConfig = require('telescope.config') -- Clone the default Telescope configuration local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) } -- I want to search in hidden/dot files. - table.insert(vimgrep_arguments, "--hidden") + table.insert(vimgrep_arguments, '--hidden') -- I don't want to search in the `.git` directory. - table.insert(vimgrep_arguments, "--glob") - table.insert(vimgrep_arguments, "!**/.git/*") + table.insert(vimgrep_arguments, '--glob') + table.insert(vimgrep_arguments, '!**/.git/*') require('telescope').setup({ defaults = { @@ -160,7 +160,7 @@ return { theme = 'ivy', previewer = false, -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. - find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, + find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' }, }, oldfiles = { theme = 'ivy', @@ -176,14 +176,14 @@ return { lsp_dynamic_workspace_symbols = {}, }, extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { + ['ui-select'] = { + require('telescope.themes').get_dropdown { } } } }) - require("telescope").load_extension("ui-select") + require('telescope').load_extension('ui-select') require('telescope').load_extension('fzf') end } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 3b916e4..277b65a 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -26,25 +26,24 @@ return { keymaps = { -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', }, }, lsp_interop = { enable = true, border = 'none', peek_definition_code = { - ["df"] = "@function.outer", - ["dF"] = "@class.outer", + ['df'] = '@function.outer', + ['dF'] = '@class.outer', }, }, }, }) local parser = require('nvim-treesitter.parsers').filetype_to_parsername parser.groovy = 'java' -- the someft filetype will use the python parser and queries. - require("nvim-treesitter.install").prefer_git = true + require('nvim-treesitter.install').prefer_git = true end } - -- 2.49.1 From b9cf3aadef6bfbe35a61c54ed60c1ad2c726b9d4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 30 Jan 2023 21:27:17 +0100 Subject: [PATCH 351/894] check for pyrightconfig.json in dap --- lua/plugins/dap.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 6e85027..16c7747 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -98,6 +98,25 @@ return { end end + local function getVenvFromJson(jsonfile) + if not vim.fn.filereadable(jsonfile) then + return nil + end + local f = io.open(jsonfile, 'r') + if not f then + return nil + end + local data = f:read('*a') + f:close() + if data then + local jdata = vim.json.decode(data) + if jdata['venvPath'] ~= nil and jdata['venv'] ~= nil then + return jdata['venvPath'] .. '/' .. jdata['venv'] + end + end + return nil + end + local function getPythonEnv() local venv = os.getenv('VIRTUAL_ENV') if venv ~= nil then @@ -109,6 +128,12 @@ return { end local cwd = vim.fn.getcwd() + + local jsonVenv = getVenvFromJson(cwd .. '/pyrightconfig.json') + if jsonVenv ~= nil then + return jsonVenv + end + if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then return cwd .. '/venv/' .. getVenvSuffix() elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then -- 2.49.1 From 1792e5450023876efb5637e7893935146853541c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 30 Jan 2023 21:43:40 +0100 Subject: [PATCH 352/894] added octo --- lazy-lock.json | 1 + lua/plugins/octo.lua | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 lua/plugins/octo.lua diff --git a/lazy-lock.json b/lazy-lock.json index 31bc152..1645c9b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -51,6 +51,7 @@ "nvim-treesitter": { "branch": "master", "commit": "cda8b291ef6fc4e04036e2ea6cf0de8aa84c2656" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-web-devicons": { "branch": "master", "commit": "a421d183ef37dfa13f51a5805bed2381aebf9080" }, + "octo.nvim": { "branch": "master", "commit": "7900dc0cd37e7bb5d4175a37c9c4c3dfb94a1f7b" }, "overseer.nvim": { "branch": "master", "commit": "cebb263509fa6cb52c63544845a721dd826b3c15" }, "plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, diff --git a/lua/plugins/octo.lua b/lua/plugins/octo.lua new file mode 100644 index 0000000..e62d251 --- /dev/null +++ b/lua/plugins/octo.lua @@ -0,0 +1,4 @@ +return { 'pwntester/octo.nvim', + cmd = 'Octo', + config = true, +} -- 2.49.1 From d62c914ea5c1a828f27415f35ec037b11b6986d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 31 Jan 2023 08:38:52 +0100 Subject: [PATCH 353/894] added new cmake lsp --- lua/plugins/lspconfig.lua | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index cde18c7..69696a7 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -178,10 +178,26 @@ return { on_attach = on_attach, } - lspconfig['cmake'].setup { - capabilities = capabilities, - on_attach = on_attach, - } + -- lspconfig['cmake'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + local configs = require('lspconfig.configs') + if not configs.neocmake then + configs.neocmake = { + default_config = { + cmd = { 'neocmakelsp', '--stdio' }, + filetypes = { 'cmake' }, + root_dir = function(fname) + return lspconfig.util.find_git_ancestor(fname) + end, + single_file_support = true, -- suggested + on_attach = on_attach -- on_attach is the on_attach function you defined + } + } + lspconfig.neocmake.setup({}) + end local clangd_capabilities = capabilities clangd_capabilities.textDocument.semanticHighlighting = true -- 2.49.1 From 2b592e82adf2421f2ff6cf23e5c5f366e68b922e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 31 Jan 2023 20:45:10 +0100 Subject: [PATCH 354/894] fixed path for venv --- lua/plugins/dap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 16c7747..b11f322 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -131,7 +131,7 @@ return { local jsonVenv = getVenvFromJson(cwd .. '/pyrightconfig.json') if jsonVenv ~= nil then - return jsonVenv + return jsonVenv .. '/' .. getVenvSuffix() end if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then -- 2.49.1 From 656ff601a31d8671c4a392da04419b7d6a200ce7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Feb 2023 21:02:54 +0100 Subject: [PATCH 355/894] fixed lua lsp deprecated msg --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index cde18c7..e165796 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -220,7 +220,7 @@ return { local lua_rtp = vim.split(package.path, ';') table.insert(lua_rtp, 'lua/?.lua') table.insert(lua_rtp, 'lua/?/init.lua') - lspconfig.sumneko_lua.setup { + lspconfig.lua_ls.setup { capabilities = capabilities, on_attach = on_attach, settings = { -- 2.49.1 From 7a2c6ecd295442f4052aa8d5946c4a14e0316ebf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Feb 2023 21:58:09 +0100 Subject: [PATCH 356/894] fancy lualine config --- lua/plugins/lualine.lua | 69 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 53545b0..a099fff 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -3,27 +3,84 @@ return { dependencies = { 'kyazdani42/nvim-web-devicons' }, config = { options = { - theme = 'gruvbox-material', + theme = 'material', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, }, }, - sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + extensions = { 'aerial' }, + sections = { + lualine_b = { + 'branch', + 'diff', + { + 'diagnostics', + sources = { 'nvim_diagnostic', 'nvim_lsp' } + } + }, + lualine_c = { + 'hostname', + 'getcwd', + { 'filename', path = 1, file_status = true } + }, + lualine_y = { + 'searchcount', + 'progress' + }, + }, + inactive_sections = { + lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } + }, globalstatus = true, winbar = { lualine_a = {}, lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, + lualine_c = { + { + 'filename', + path = 0, + file_status = true, + separator = { left = '', right = '' }, + -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } + color = { bg = '#aa0000', gui = 'bold' } + } + }, + lualine_x = { 'aerial' }, lualine_y = {}, lualine_z = {} }, inactive_winbar = { lualine_a = {}, lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_c = { + { + 'filename', + path = 0, + file_status = true, + separator = { left = '', right = '' }, + -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } + -- color = { fg = '#ff1111'} + } + }, + lualine_x = { 'aerial' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { + { + 'tabs', + mode = 2, + tabs_color = { + -- Same values as the general color option can be used here. + active = 'lualine_a_normal', -- Color for active tab. + inactive = 'lualine_a_inactive', -- Color for inactive tab. + }, + } + }, lualine_x = {}, lualine_y = {}, lualine_z = {} -- 2.49.1 From 2670f4f656ce04770f921c2f01b5d88a05e70b10 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Feb 2023 21:58:15 +0100 Subject: [PATCH 357/894] updated plugins --- lazy-lock.json | 73 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1645c9b..6f9233d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,10 +1,10 @@ { - "Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" }, - "FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" }, - "LuaSnip": { "branch": "master", "commit": "94f192cf5f0a1931b3035c2d8affdebec460968c" }, - "aerial.nvim": { "branch": "master", "commit": "911373eb6be91700a3597aeb228f553d4a29aec1" }, + "Comment.nvim": { "branch": "master", "commit": "418d3117dab2f54c4340ea73e0070dd78fc81753" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, + "LuaSnip": { "branch": "master", "commit": "58fbfc627a93281a77f7d161d4ff702e639677b1" }, + "aerial.nvim": { "branch": "master", "commit": "a467e9a06aa92db81812f4c2c26364877bbafb80" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a5c3c8390dfb342d630bdc25941a4d8f433510be" }, - "cmake-tools.nvim": { "branch": "master", "commit": "c5e2bfc7deec9c75d41e1fabfd1ad01036793ee4" }, + "cmake-tools.nvim": { "branch": "master", "commit": "d059d27b94064e98c66fe9108e728950f41d90e9" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, @@ -12,55 +12,56 @@ "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" }, + "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-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "dc77f487b292c4a89dd437d80331e3aacbe3aaed" }, - "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, - "friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" }, - "gitsigns.nvim": { "branch": "main", "commit": "0d4fe37ba5285171f3729da955955205f3fa945b" }, + "diffview.nvim": { "branch": "main", "commit": "11827d46e939b4748dbdb7e0df4982a63bd59d26" }, + "dressing.nvim": { "branch": "master", "commit": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe" }, + "friendly-snippets": { "branch": "main", "commit": "1645e7cd98ed99e766c84ab3cf13a1612c77dcee" }, + "gitsigns.nvim": { "branch": "main", "commit": "a5caac26768af80b7c57b919f77b3fed3d7424d0" }, "gruvbox-material": { "branch": "master", "commit": "13b7eb4589d9ab0f388ca51047051f7158c930e5" }, "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, - "lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" }, + "lazy.nvim": { "branch": "main", "commit": "c778b7aa04c484e1536ba219e71f2fd0f05302aa" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "ff4c3663e5a0a0ecbb3fffbc8318825def35d2aa" }, - "lsp_signature.nvim": { "branch": "master", "commit": "b86f249cba85ec2f0f74c62b65898bade00b4413" }, + "leap.nvim": { "branch": "main", "commit": "1367a095f336c6c7ccda8c6747b57048fc5e008d" }, + "lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, "lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "422b9745143150e16cd3fe331c74f6737de75e72" }, - "mason.nvim": { "branch": "main", "commit": "2469bfc2538652cb0cf88c129f67d38e46a9cb59" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "8238865e1d9c61f1a260c290653f2c419503e0a9" }, - "neodev.nvim": { "branch": "main", "commit": "8fd21037453f4306f500e437c5cbdf6e8b6c2f99" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e2b82cf4c68b453eeab5833d90c042ed4b49d0e1" }, + "mason.nvim": { "branch": "main", "commit": "a35f3c44381c8ce37faefd427b474ea5ef72d37d" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "245cf1e68840defcc75a16297740f6203f5a045d" }, + "neodev.nvim": { "branch": "main", "commit": "fc9a4ccedcbae14454d66d5050bef077c40ab5e5" }, "neogen": { "branch": "main", "commit": "465af9d6c6fb7f360175991dcc23fc10917e3a06" }, - "neotest": { "branch": "master", "commit": "392808a91d6ee28d27cbfb93c9fd9781759b5d00" }, - "neotest-python": { "branch": "master", "commit": "e53920d145d37783c8d8428365a0a230e0a18cb5" }, - "nui.nvim": { "branch": "main", "commit": "b99e6cb13dc51768abc1c4c8585045a0c0459ef1" }, - "null-ls.nvim": { "branch": "main", "commit": "7b2b28e207a1df4ebb13c7dc0bd83f69b5403d71" }, - "nvim-autopairs": { "branch": "master", "commit": "31042a5823b55c4bfb30efcbba2fc1b5b53f90dc" }, - "nvim-cmp": { "branch": "main", "commit": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b" }, - "nvim-dap": { "branch": "master", "commit": "0e376f00e7fac143e29e1017d2ac2cc3df13d185" }, + "neotest": { "branch": "master", "commit": "8807379e37229ece7ae6ff12080ce505b98289b8" }, + "neotest-python": { "branch": "master", "commit": "a76fb6760fc2f653c2088f79152338cc99380cf1" }, + "nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" }, + "null-ls.nvim": { "branch": "main", "commit": "9d811bb6ed44cf766f4bda8a47fd65fdfbdcaa7d" }, + "nvim-autopairs": { "branch": "master", "commit": "45ae3122a4c7744db41298b41f9f5a3f092123e6" }, + "nvim-cmp": { "branch": "main", "commit": "aae0c3e4e778ca4be6fabc52e388cbd5b844b7a5" }, + "nvim-dap": { "branch": "master", "commit": "401f5f22b2d7f9bdbb9294d0235136091458816a" }, "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, - "nvim-dap-ui": { "branch": "master", "commit": "e26fba0562cb9c904f7a6510a94961b82701a16f" }, + "nvim-dap-ui": { "branch": "master", "commit": "cb623ef426ca81fc437f946f4556f556f369f74d" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" }, - "nvim-lspconfig": { "branch": "master", "commit": "1e988250a0f52a68ddb72905d623405d634e9c5d" }, + "nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" }, "nvim-neoclip.lua": { "branch": "main", "commit": "5b9286a40ea2020352280caeb713515badb03d99" }, - "nvim-treesitter": { "branch": "master", "commit": "cda8b291ef6fc4e04036e2ea6cf0de8aa84c2656" }, + "nvim-treesitter": { "branch": "master", "commit": "ad9ae9e7def54fee446c3e186ed0a0d44cca7b90" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "a421d183ef37dfa13f51a5805bed2381aebf9080" }, - "octo.nvim": { "branch": "master", "commit": "7900dc0cd37e7bb5d4175a37c9c4c3dfb94a1f7b" }, - "overseer.nvim": { "branch": "master", "commit": "cebb263509fa6cb52c63544845a721dd826b3c15" }, - "plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" }, + "nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" }, + "octo.nvim": { "branch": "master", "commit": "f336322f865cfa310ae15435c6bec337687b6b20" }, + "overseer.nvim": { "branch": "master", "commit": "42c0d69f505314d6994a84da4e3fcbaf308c1a86" }, + "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, "sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" }, + "statuscol.nvim": { "branch": "main", "commit": "49a3bdab3e9cf23982724c1e888a6296fca4c8b9" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "dce1156ca103b8222e4abbfc63f9c6887abf5ec6" }, - "toggleterm.nvim": { "branch": "main", "commit": "a54e6c471ce1cd8ef8357e34598a28a955297131" }, + "telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" }, + "toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" } + "which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" } } \ No newline at end of file -- 2.49.1 From 91faa6b62750c9087701c3ee415d47d412f0a290 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Feb 2023 22:18:13 +0100 Subject: [PATCH 358/894] fixed lualine url --- lua/plugins/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index a099fff..7e133d8 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,5 +1,5 @@ return { - 'hoob3rt/lualine.nvim', + 'nvim-lualine/lualine.nvim', dependencies = { 'kyazdani42/nvim-web-devicons' }, config = { options = { -- 2.49.1 From 02aa672af8f2a37c9f535988b57e08dedd0784ca Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 15 Feb 2023 11:05:53 +0100 Subject: [PATCH 359/894] extract python venv utils --- lua/plugins/dap.lua | 69 ++++----------------------------------- lua/utils/python_venv.lua | 59 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 62 deletions(-) create mode 100644 lua/utils/python_venv.lua diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index b11f322..6a3e793 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -90,68 +90,13 @@ return { end }) - local function getVenvSuffix() - if vim.loop.os_uname().sysname == 'Linux' then - return 'bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return 'Scripts/python.exe' - end - end - - local function getVenvFromJson(jsonfile) - if not vim.fn.filereadable(jsonfile) then - return nil - end - local f = io.open(jsonfile, 'r') - if not f then - return nil - end - local data = f:read('*a') - f:close() - if data then - local jdata = vim.json.decode(data) - if jdata['venvPath'] ~= nil and jdata['venv'] ~= nil then - return jdata['venvPath'] .. '/' .. jdata['venv'] - end - end - return nil - end - - local function getPythonEnv() - local venv = os.getenv('VIRTUAL_ENV') - if venv ~= nil then - return string.format('%s/%s', venv, getVenvSuffix()) - end - local conda = os.getenv('CONDA_PREFIX') - if conda ~= nil then - return string.format('%s/%s', conda, 'python.exe') - end - - local cwd = vim.fn.getcwd() - - local jsonVenv = getVenvFromJson(cwd .. '/pyrightconfig.json') - if jsonVenv ~= nil then - return jsonVenv .. '/' .. getVenvSuffix() - end - - if vim.fn.executable(cwd .. '/venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/venv/' .. getVenvSuffix() - elseif vim.fn.executable(cwd .. '/.venv/' .. getVenvSuffix()) == 1 then - return cwd .. '/.venv/' .. getVenvSuffix() - else - if vim.loop.os_uname().sysname == 'Linux' then - return '/usr/bin/python' - elseif vim.loop.os_uname().sysname == 'Windows_NT' then - return os.getenv('SCOOP') .. '/apps/python/current/python.exe' - end - end - end + local pythonVenv = require('utils.python_venv') function loadConfigs() require('dap.ext.vscode').load_launchjs() -- Make sure we use the correct python env even for the configs from launch.json for _, config in pairs(dap.configurations.python) do - config.pythonPath = getPythonEnv() + config.pythonPath = pythonVenv.getPythonEnv() config.cwd = vim.fn.getcwd() end require 'telescope'.extensions.dap.configurations {} @@ -161,12 +106,12 @@ return { -- PYTHON dap.adapters.python = { - type = 'executable'; - command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix(); - args = { '-m', 'debugpy.adapter' }; + type = 'executable', + command = masonpath .. '/packages/debugpy/venv/' .. pythonVenv.getVenvSuffix(), + args = { '-m', 'debugpy.adapter' }, options = { - detached = true; - }; + detached = true, + }, } local dapui = require('dapui') diff --git a/lua/utils/python_venv.lua b/lua/utils/python_venv.lua new file mode 100644 index 0000000..c8cdca3 --- /dev/null +++ b/lua/utils/python_venv.lua @@ -0,0 +1,59 @@ +local M = {} +function M.getVenvSuffix() + if vim.loop.os_uname().sysname == 'Linux' then + return 'bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return 'Scripts/python.exe' + end +end + +function M.getVenvFromJson(jsonfile) + if not vim.fn.filereadable(jsonfile) then + return nil + end + local f = io.open(jsonfile, 'r') + if not f then + return nil + end + local data = f:read('*a') + f:close() + if data then + local jdata = vim.json.decode(data) + if jdata['venvPath'] ~= nil and jdata['venv'] ~= nil then + return jdata['venvPath'] .. '/' .. jdata['venv'] + end + end + return nil +end + +function M.getPythonEnv() + local venv = os.getenv('VIRTUAL_ENV') + if venv ~= nil then + return string.format('%s/%s', venv, M.getVenvSuffix()) + end + local conda = os.getenv('CONDA_PREFIX') + if conda ~= nil then + return string.format('%s/%s', conda, 'python.exe') + end + + local cwd = vim.fn.getcwd() + + local jsonVenv = M.getVenvFromJson(cwd .. '/pyrightconfig.json') + if jsonVenv ~= nil then + return jsonVenv .. '/' .. M.getVenvSuffix() + end + + if vim.fn.executable(cwd .. '/venv/' .. M.getVenvSuffix()) == 1 then + return cwd .. '/venv/' .. M.getVenvSuffix() + elseif vim.fn.executable(cwd .. '/.venv/' .. M.getVenvSuffix()) == 1 then + return cwd .. '/.venv/' .. M.getVenvSuffix() + else + if vim.loop.os_uname().sysname == 'Linux' then + return '/usr/bin/python' + elseif vim.loop.os_uname().sysname == 'Windows_NT' then + return os.getenv('SCOOP') .. '/apps/python/current/python.exe' + end + end +end + +return M -- 2.49.1 From 5b4001d7e87ae3186d467e89b62a3b1599943888 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 15 Feb 2023 11:06:15 +0100 Subject: [PATCH 360/894] format dap.lua --- lua/plugins/dap.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 6a3e793..9180b6f 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -128,13 +128,13 @@ return { dap.configurations.python = { { - type = 'python'; - request = 'launch'; - name = 'Launch file with venv'; - justMyCode = false; - program = '${file}'; - cwd = vim.fn.getcwd(); - pythonPath = getPythonEnv + type = 'python', + request = 'launch', + name = 'Launch file with venv', + justMyCode = false, + program = '${file}', + cwd = vim.fn.getcwd(), + pythonPath = pythonVenv.getPythonEnv }, } @@ -216,6 +216,5 @@ return { require('nvim-dap-virtual-text').setup({}) require('telescope').load_extension('dap') - end, } -- 2.49.1 From 99690477aff4647bb5f31f4006363ff15de5693e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 15 Feb 2023 11:08:19 +0100 Subject: [PATCH 361/894] use pythonvenv in neotest --- lua/plugins/neotest.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index f4da010..6bc202c 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -7,6 +7,7 @@ return { 'nvim-neotest/neotest-python' }, config = function() + local pythonVenv = require('utils.python_venv') require('neotest').setup({ adapters = { require('neotest-python')({ @@ -15,6 +16,7 @@ return { }, args = { '--log-level', 'DEBUG' }, runner = 'pytest', + python = pythonVenv.getPythonEnv }) } }) -- 2.49.1 From bc278c2a6291b7660b15501d793fc1553ba2383f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 20 Feb 2023 21:27:24 +0100 Subject: [PATCH 362/894] added menufacture --- lazy-lock.json | 2 +- lua/plugins/telescope.lua | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 6f9233d..e3432bc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -56,9 +56,9 @@ "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, "sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" }, - "statuscol.nvim": { "branch": "main", "commit": "49a3bdab3e9cf23982724c1e888a6296fca4c8b9" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-menufacture": { "branch": "main", "commit": "44aa65bd42290fca37bb466f257295dbc869a13c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" }, "toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4a4970f..f069028 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -3,6 +3,7 @@ return { dependencies = { 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons', + 'molecule-man/telescope-menufacture', { 'nvim-telescope/telescope-fzf-native.nvim', build = { @@ -19,7 +20,7 @@ return { { 'f', function() - require('telescope.builtin').find_files({ no_ignore = true, hidden = true }) + require('telescope').extensions.menufacture.find_files({ no_ignore = true, hidden = true }) end, desc = 'Find file', }, @@ -68,7 +69,7 @@ return { { 'l', function() - require('telescope.builtin').live_grep() + require('telescope').extensions.menufacture.live_grep() end, desc = 'Search in project', }, @@ -89,7 +90,7 @@ return { { 'd', function() - require('telescope.builtin').grep_string() + require('telescope').extensions.menufacture.grep_string() end, desc = 'Find in workspace', }, @@ -113,8 +114,8 @@ return { Project_files = function() local opts = {} -- define here if you want to define something - local ok = pcall(require 'telescope.builtin'.git_files, opts) - if not ok then require 'telescope.builtin'.find_files(opts) end + local ok = pcall(require('telescope').extensions.menufacture.git_files, opts) + if not ok then require('telescope').extensions.menufacture.find_files(opts) end end @@ -170,7 +171,7 @@ return { previewer = false, }, lsp_references = { - show_line = false; + show_line = false, include_declaration = false, }, lsp_dynamic_workspace_symbols = {}, @@ -179,11 +180,17 @@ return { ['ui-select'] = { require('telescope.themes').get_dropdown { } - } + }, + ['menufacture'] = { + mappings = { + main_menu = { [{ 'n' }] = 'm' }, + }, + }, } }) require('telescope').load_extension('ui-select') require('telescope').load_extension('fzf') + require('telescope').load_extension('menufacture') end } -- 2.49.1 From 33e497133c77f3f9e6eed4d709f6c6182314fb0c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Feb 2023 22:09:38 +0100 Subject: [PATCH 363/894] implement venv picker --- lua/utils/python_venv.lua | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/lua/utils/python_venv.lua b/lua/utils/python_venv.lua index c8cdca3..21b0b85 100644 --- a/lua/utils/python_venv.lua +++ b/lua/utils/python_venv.lua @@ -56,4 +56,67 @@ function M.getPythonEnv() end end +function M.getPythonEnvs() + local venvs = {} + local venv = os.getenv('VIRTUAL_ENV') + if venv ~= nil then + table.insert(venvs, { + name = 'VIRTUAL_ENV', + path = string.format('%s/%s', venv, M.getVenvSuffix()) + }) + end + local conda = os.getenv('CONDA_PREFIX') + if conda ~= nil then + table.insert(venvs, { + name = 'CONDA_PREFIX', + path = string.format('%s/%s', conda, 'python.exe') + }) + end + + local cwd = vim.fn.getcwd() + + local jsonVenv = M.getVenvFromJson(cwd .. '/pyrightconfig.json') + if jsonVenv ~= nil then + table.insert(venvs, { + name = 'pyrightconfig.json', + path = jsonVenv .. '/' .. M.getVenvSuffix() + }) + end + + local venvDirs = { 'venv', '.venv' } + for _, envDir in pairs(venvDirs) do + if vim.fn.executable(cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix()) == 1 then + table.insert(venvs, { + name = envDir, + path = cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix() + }) + end + end + if vim.loop.os_uname().sysname == 'Linux' then + table.insert(venvs, { + name = 'system', + path = '/usr/bin/python' + }) + end + if vim.loop.os_uname().sysname == 'Windows_NT' then + table.insert(venvs, { + name = 'system', + path = os.getenv('SCOOP') .. '/apps/python/current/python.exe' + }) + end + return venvs +end + +M.pick_venv = function() + vim.ui.select(M.getPythonEnvs(), { + prompt = 'Select python venv', + format_item = function(item) return string.format('%s (%s)', item.name, item.path) end, + }, function(choice) + if not choice then + return + end + print(choice.path) + end) +end + return M -- 2.49.1 From eca6376d79596ad115f5fb3152722d5c11e55933 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 3 Mar 2023 10:45:35 +0100 Subject: [PATCH 364/894] added advanced-git-search --- lua/plugins/advanced-git-search.lua | 67 +++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 7 --- 2 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 lua/plugins/advanced-git-search.lua diff --git a/lua/plugins/advanced-git-search.lua b/lua/plugins/advanced-git-search.lua new file mode 100644 index 0000000..20d1fd3 --- /dev/null +++ b/lua/plugins/advanced-git-search.lua @@ -0,0 +1,67 @@ +return { + 'aaronhallaert/advanced-git-search.nvim', + config = function() + require('telescope').load_extension('advanced_git_search') + vim.api.nvim_create_user_command( + 'DiffCommitLine', + 'lua require("telescope").extensions.advanced_git_search.diff_commit_line()', + { range = true } + ) + end, + dependencies = { + 'nvim-telescope/telescope.nvim', + -- to show diff splits and open commits in browser + 'tpope/vim-fugitive', + }, + keys = { + { + 'hb', + function() + require('telescope').extensions.advanced_git_search.diff_branch_file() + end, + desc = 'Diff file against branch' + }, + { + 'hl', + ':DiffCommitLinegv', + desc = 'Diff current line againt previous commits', + mode = { 'x', 'n' }, + noremap = true + }, + { + 'hf', + function() + require('telescope').extensions.advanced_git_search.diff_commit_file() + end, + desc = 'Diff current file against previous commits' + }, + { + 'hl', + function() + require('telescope').extensions.advanced_git_search.search_log_content() + end, + desc = 'Search git log' + }, + { + 'hs', + function() + require('telescope').extensions.advanced_git_search.search_log_content_file() + end, + desc = 'Search git log that changed current file' + }, + { + 'hr', + function() + require('telescope').extensions.advanced_git_search.checkout_reflog() + end, + desc = 'Search all reflog entries' + }, + { + 'hh', + function() + require('telescope').extensions.advanced_git_search.show_custom_functions() + end, + desc = 'Shwo all git telecope functions' + } + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index f069028..a726449 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -45,13 +45,6 @@ return { end, desc = 'Find old files', }, - { - 'h', - function() - require('telescope.builtin').command_history() - end, - desc = 'Open command history', - }, { 'b', function() -- 2.49.1 From dcf6d687b82588aad1bacb39f28ab2bbeeaf6359 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 3 Mar 2023 10:56:51 +0100 Subject: [PATCH 365/894] fixed keymap for git log --- lua/plugins/advanced-git-search.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/advanced-git-search.lua b/lua/plugins/advanced-git-search.lua index 20d1fd3..f0b2523 100644 --- a/lua/plugins/advanced-git-search.lua +++ b/lua/plugins/advanced-git-search.lua @@ -36,7 +36,7 @@ return { desc = 'Diff current file against previous commits' }, { - 'hl', + 'ha', function() require('telescope').extensions.advanced_git_search.search_log_content() end, -- 2.49.1 From 70a06005fe77caa7f2500a947986a8815a2109f2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 15:19:19 +0100 Subject: [PATCH 366/894] use gruvbox again --- lua/plugins/gruvbox.lua | 43 ++++++++++++++++++++++++++++++++ lua/plugins/gruvbox_material.lua | 26 ++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/gruvbox.lua diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua new file mode 100644 index 0000000..5dd4111 --- /dev/null +++ b/lua/plugins/gruvbox.lua @@ -0,0 +1,43 @@ +return { + 'ellisonleao/gruvbox.nvim', + priority = 1000, + config = function() + local links = { + ['@lsp.type.namespace'] = '@namespace', + ['@lsp.type.type'] = '@type', + ['@lsp.type.class'] = '@type', + ['@lsp.type.enum'] = '@type', + ['@lsp.type.interface'] = '@type', + ['@lsp.type.struct'] = '@structure', + ['@lsp.type.parameter'] = '@parameter', + ['@lsp.type.variable'] = '@variable', + ['@lsp.type.property'] = '@property', + ['@lsp.type.enumMember'] = '@constant', + ['@lsp.type.function'] = '@function', + ['@lsp.type.method'] = '@method', + ['@lsp.type.macro'] = '@macro', + ['@lsp.type.decorator'] = '@function', + } + for newgroup, oldgroup in pairs(links) do + vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) + end + vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { bold = true }) + require('gruvbox').setup({ + undercurl = true, + underline = true, + bold = false, + italic = true, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + palette_overrides = {}, + overrides = {}, + dim_inactive = true, + transparent_mode = false, + }) + vim.cmd('colorscheme gruvbox') + end, + enabled = true +} diff --git a/lua/plugins/gruvbox_material.lua b/lua/plugins/gruvbox_material.lua index c8f952b..e8d8c99 100644 --- a/lua/plugins/gruvbox_material.lua +++ b/lua/plugins/gruvbox_material.lua @@ -13,6 +13,30 @@ return { -- NormalFloat = { bg = 'bg_visual' } -- } -- vim.g.gruvbox_dark_float = false + vim.g.gruvbox_material_ui_contrast = 'high' + vim.g.gruvbox_material_dim_inactive_windows = 1 -- Dim inactive windows. Only works in neovim currently. + vim.g.gruvbox_material_disable_terminal_colors = 0 + local links = { + ['@lsp.type.namespace'] = '@namespace', + ['@lsp.type.type'] = '@type', + ['@lsp.type.class'] = '@type', + ['@lsp.type.enum'] = '@type', + ['@lsp.type.interface'] = '@type', + ['@lsp.type.struct'] = '@structure', + ['@lsp.type.parameter'] = '@parameter', + ['@lsp.type.variable'] = '@variable', + ['@lsp.type.property'] = '@property', + ['@lsp.type.enumMember'] = '@constant', + ['@lsp.type.function'] = '@function', + ['@lsp.type.method'] = '@method', + ['@lsp.type.macro'] = '@macro', + ['@lsp.type.decorator'] = '@function', + } + -- for newgroup, oldgroup in pairs(links) do + -- vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) + -- end vim.cmd('colorscheme gruvbox-material') - end + vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { italic = true, fg = 'Purple' }) + end, + enabled = false } -- 2.49.1 From 97c469b1ef371384e479d403378e07af3ee51347 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 15:43:26 +0100 Subject: [PATCH 367/894] set some lsp highlights --- lua/plugins/gruvbox.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index 5dd4111..5b5ab11 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -18,10 +18,13 @@ return { ['@lsp.type.macro'] = '@macro', ['@lsp.type.decorator'] = '@function', } + local colors = require('gruvbox.palette').colors for newgroup, oldgroup in pairs(links) do vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) end + vim.api.nvim_set_hl(0, '@lsp.type.parameter', { fg = colors.faded_purple }) vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { bold = true }) + require('gruvbox').setup({ undercurl = true, underline = true, -- 2.49.1 From 8f6caa96e5988f745c0f2bd0a97305ff05827a16 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 21:29:04 +0100 Subject: [PATCH 368/894] try to fix lauline theme --- lua/plugins/lualine.lua | 193 ++++++++++++++++++++++++---------------- 1 file changed, 115 insertions(+), 78 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 7e133d8..a5dbcbd 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,89 +1,126 @@ return { 'nvim-lualine/lualine.nvim', dependencies = { 'kyazdani42/nvim-web-devicons' }, - config = { - options = { - theme = 'material', - disabled_filetypes = { - statusline = {}, - winbar = { 'dap-repl', 'dapui_console' }, + config = function() + local custom_gruvbox = require 'lualine.themes.gruvbox_dark' + + -- Change the background of lualine_c section for normal mode + custom_gruvbox.normal.a.bg = '#282828' + custom_gruvbox.normal.b.bg = '#282828' + custom_gruvbox.normal.c.bg = '#282828' + -- custom_gruvbox.normal.a.fg = '#282828' + -- custom_gruvbox.normal.b.fg = '#282828' + -- custom_gruvbox.normal.c.fg = '#282828' + + require('lualine').setup { + options = { + -- theme = custom_gruvbox, + theme = 'gruvbox_dark', + disabled_filetypes = { + statusline = {}, + winbar = { 'dap-repl', 'dapui_console' }, + }, }, - }, - extensions = { 'aerial' }, - sections = { - lualine_b = { - 'branch', - 'diff', - { - 'diagnostics', - sources = { 'nvim_diagnostic', 'nvim_lsp' } + globalstatus = true, + extensions = { 'aerial' }, + sections = { + lualine_b = { + 'branch', + 'diff', + { + 'diagnostics', + sources = { 'nvim_diagnostic', 'nvim_lsp' } + } + }, + lualine_c = { + 'hostname', + 'getcwd', + { 'filename', path = 1, file_status = true } + }, + lualine_y = { + 'searchcount', + 'progress' + }, + }, + inactive_sections = { + lualine_c = { + 'getcwd', + { + 'filename', + path = 1, + file_status = true + } } }, - lualine_c = { - 'hostname', - 'getcwd', - { 'filename', path = 1, file_status = true } - }, - lualine_y = { - 'searchcount', - 'progress' - }, - }, - inactive_sections = { - lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } - }, - globalstatus = true, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } - color = { bg = '#aa0000', gui = 'bold' } + winbar = { + lualine_a = { + { + 'filename', + path = 0, + file_status = true, + separator = { left = '', right = '' }, + -- color = { fg = '#ffaa88', gui = 'bold' } + color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' } + } + }, + lualine_b = { + { + 'filesize', + color = { bg = '#282828' } + } + }, + lualine_c = { + { + 'aerial', + color = { fg = '#ebdbb2', bg = '#282828', gui = 'bold' } + } + }, + lualine_x = {}, + lualine_y = {}, + lualine_z = { } }, - lualine_x = { 'aerial' }, - lualine_y = {}, - lualine_z = {} - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } - -- color = { fg = '#ff1111'} - } + inactive_winbar = { + lualine_a = { + { + 'filename', + path = 0, + file_status = true, + separator = { left = '', right = '' }, + color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' } + -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } + -- color = { fg = '#ff1111'} + } + }, + lualine_b = { + { + 'filesize', + color = { bg = '#282828' } + } + }, + lualine_c = { 'aerial' }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} }, - lualine_x = { 'aerial' }, - lualine_y = {}, - lualine_z = {} - }, - tabline = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { - { - 'tabs', - mode = 2, - tabs_color = { - -- Same values as the general color option can be used here. - active = 'lualine_a_normal', -- Color for active tab. - inactive = 'lualine_a_inactive', -- Color for inactive tab. - }, - } + tabline = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { + { + 'tabs', + mode = 2, + tabs_color = { + -- Same values as the general color option can be used here. + active = 'lualine_a_normal', -- Color for active tab. + inactive = 'lualine_a_inactive', -- Color for inactive tab. + }, + } + }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - } + } + end } -- 2.49.1 From 4240bd1bdedfd16c7889fa42004998ddc5b849df Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 21:41:21 +0100 Subject: [PATCH 369/894] change cmp sorting again --- lua/plugins/cmp.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 356d524..c42ce8a 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -118,16 +118,14 @@ return { }, sorting = { comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.recently_used, require('clangd_extensions.cmp_scores'), - cmp.config.compare.locality, - -- cmp.config.compare.recently_used, - -- -- cmp.config.compare.offset, - -- cmp.config.compare.exact, - -- cmp.config.compare.recently_used, - -- cmp.config.compare.kind, - -- cmp.config.compare.sort_text, - -- cmp.config.compare.length, - -- cmp.config.compare.order, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, }, }, -- experimental = { native_menu = true } -- 2.49.1 From 6e3a2f931ce9aa9095d64911412b85398eab673f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 21:41:38 +0100 Subject: [PATCH 370/894] code format cmp.lua --- lua/plugins/cmp.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c42ce8a..d98e0d7 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -38,8 +38,8 @@ return { cmp.setup({ formatting = { format = require('lspkind').cmp_format({ - mode = 'symbol_text', -- show only symbol annotations - maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + mode = 'symbol_text', -- show only symbol annotations + maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) }) }, @@ -82,11 +82,13 @@ return { end, }, sources = { - { name = 'luasnip', priority = 8 }, - { name = 'nvim_lsp', priority = 7 }, + { name = 'luasnip', priority = 8 }, + { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, - { name = 'treesitter', priority = 6 }, - { name = 'buffer', priority = 5, + { name = 'treesitter', priority = 6 }, + { + name = 'buffer', + priority = 5, option = { get_bufnrs = function() local bufs = {} -- 2.49.1 From 3e49aa40a58dffb87f436bdc3b4d4cbe91fbc1dc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 21:55:02 +0100 Subject: [PATCH 371/894] fixed cmp CR behaviour at end of line --- lua/plugins/cmp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index d98e0d7..c606138 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -51,7 +51,13 @@ return { [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), [''] = cmp.mapping({ - i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), + i = function(fallback) + if cmp.visible() and cmp.get_active_entry() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }) + else + fallback() + end + end, c = cmp.mapping.confirm({ select = false }), s = cmp.mapping.confirm({ select = false }), }), -- 2.49.1 From ebefdb64ff01438f3a1664d91c8a24b6cca9083d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 22:51:35 +0100 Subject: [PATCH 372/894] trigger cmdline history with c-x --- lua/plugins/cmp.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c606138..84c8347 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -77,10 +77,18 @@ return { else fallback() end - end, { - 'i', - 's', - }), + end, { 'i', 's', }), + [''] = cmp.mapping(cmp.mapping.complete( + { + config = { + sources = { + { + name = 'cmdline_history' + } + } + } + } + ), { 'c' }), }, snippet = { expand = function(args) @@ -150,7 +158,7 @@ return { cmp.setup.cmdline(':', { sources = { { name = 'cmdline' }, - { name = 'cmdline_history' }, + -- { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, }, -- 2.49.1 From 3324cb1fffa3cc1e53b915c7c89f2dfdb002c62e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 23 Mar 2023 22:25:26 +0100 Subject: [PATCH 373/894] fixed gruvbox config --- lua/plugins/gruvbox.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index 5b5ab11..d04534a 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -29,7 +29,12 @@ return { undercurl = true, underline = true, bold = false, - italic = true, + italic = { + strings = true, + comments = true, + operators = false, + folds = true, + }, strikethrough = true, invert_selection = false, invert_signs = false, -- 2.49.1 From 849cb2a2c7fde250fc9bee4dd110974abfb2b583 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 23 Mar 2023 22:26:17 +0100 Subject: [PATCH 374/894] updated plugins --- lazy-lock.json | 88 ++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index e3432bc..3b295c5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,13 +1,14 @@ { - "Comment.nvim": { "branch": "master", "commit": "418d3117dab2f54c4340ea73e0070dd78fc81753" }, + "Comment.nvim": { "branch": "master", "commit": "8d3aa5c22c2d45e788c7a5fe13ad77368b783c20" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "58fbfc627a93281a77f7d161d4ff702e639677b1" }, - "aerial.nvim": { "branch": "master", "commit": "a467e9a06aa92db81812f4c2c26364877bbafb80" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "a5c3c8390dfb342d630bdc25941a4d8f433510be" }, - "cmake-tools.nvim": { "branch": "master", "commit": "d059d27b94064e98c66fe9108e728950f41d90e9" }, + "LuaSnip": { "branch": "master", "commit": "025886915e7a1442019f467e0ae2847a7cf6bf1a" }, + "advanced-git-search.nvim": { "branch": "main", "commit": "aac65cebf52b327fb042a30a1549c94ce0bae64a" }, + "aerial.nvim": { "branch": "master", "commit": "ab85d57942b3d7e1a2530af1a083b77f4ba33cba" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, + "cmake-tools.nvim": { "branch": "master", "commit": "1c2ad8e4ce63413cb3594d7e10239904f6b0bdcf" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, - "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, + "cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, @@ -19,49 +20,50 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "11827d46e939b4748dbdb7e0df4982a63bd59d26" }, - "dressing.nvim": { "branch": "master", "commit": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe" }, - "friendly-snippets": { "branch": "main", "commit": "1645e7cd98ed99e766c84ab3cf13a1612c77dcee" }, - "gitsigns.nvim": { "branch": "main", "commit": "a5caac26768af80b7c57b919f77b3fed3d7424d0" }, - "gruvbox-material": { "branch": "master", "commit": "13b7eb4589d9ab0f388ca51047051f7158c930e5" }, - "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, - "lazy.nvim": { "branch": "main", "commit": "c778b7aa04c484e1536ba219e71f2fd0f05302aa" }, + "diffview.nvim": { "branch": "main", "commit": "58035354fc79c6ec42fa7b218dab90bd3968615f" }, + "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" }, + "friendly-snippets": { "branch": "main", "commit": "25ddcd96540a2ce41d714bd7fea2e7f75fea8ead" }, + "gitsigns.nvim": { "branch": "main", "commit": "ca473e28382f1524aa3d2b6f04bcf54f2e6a64cb" }, + "gruvbox.nvim": { "branch": "main", "commit": "488acf89979463d3ab77f8a5d35a11a2c809ac19" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "a80422f21750fcbf0e90b26da877d4024d76f116" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "1367a095f336c6c7ccda8c6747b57048fc5e008d" }, - "lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" }, + "leap.nvim": { "branch": "main", "commit": "f74473d23ebf60957e0db3ff8172349a82e5a442" }, + "lsp_signature.nvim": { "branch": "master", "commit": "1882019270be445a8cad4353f1530574f2b2d02d" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "e2b82cf4c68b453eeab5833d90c042ed4b49d0e1" }, - "mason.nvim": { "branch": "main", "commit": "a35f3c44381c8ce37faefd427b474ea5ef72d37d" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "245cf1e68840defcc75a16297740f6203f5a045d" }, - "neodev.nvim": { "branch": "main", "commit": "fc9a4ccedcbae14454d66d5050bef077c40ab5e5" }, - "neogen": { "branch": "main", "commit": "465af9d6c6fb7f360175991dcc23fc10917e3a06" }, - "neotest": { "branch": "master", "commit": "8807379e37229ece7ae6ff12080ce505b98289b8" }, - "neotest-python": { "branch": "master", "commit": "a76fb6760fc2f653c2088f79152338cc99380cf1" }, - "nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" }, - "null-ls.nvim": { "branch": "main", "commit": "9d811bb6ed44cf766f4bda8a47fd65fdfbdcaa7d" }, - "nvim-autopairs": { "branch": "master", "commit": "45ae3122a4c7744db41298b41f9f5a3f092123e6" }, - "nvim-cmp": { "branch": "main", "commit": "aae0c3e4e778ca4be6fabc52e388cbd5b844b7a5" }, - "nvim-dap": { "branch": "master", "commit": "401f5f22b2d7f9bdbb9294d0235136091458816a" }, - "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, - "nvim-dap-ui": { "branch": "master", "commit": "cb623ef426ca81fc437f946f4556f556f369f74d" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" }, - "nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" }, + "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2b811031febe5f743e07305738181ff367e1e452" }, + "mason.nvim": { "branch": "main", "commit": "9f4e06029b1d8cd3bb4438f6b3de6d5c42d2d8d1" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, + "neodev.nvim": { "branch": "main", "commit": "e027abc6d2a9c1efead2f697da8df2c0ed66b8ff" }, + "neogen": { "branch": "main", "commit": "93d997dbddfe084e77ba4541c54a7b8bfd754fb1" }, + "neotest": { "branch": "master", "commit": "bbbfa55d850f1aaa6707ea85fb5230ac866459c6" }, + "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, + "nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" }, + "null-ls.nvim": { "branch": "main", "commit": "0180603b6f3cee40f83c6fc226b9ac5f85e691c4" }, + "nvim-autopairs": { "branch": "master", "commit": "e755f366721bc9e189ddecd39554559045ac0a18" }, + "nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" }, + "nvim-dap": { "branch": "master", "commit": "7e81998e31277c7a33b6c34423640900c5c2c776" }, + "nvim-dap-python": { "branch": "master", "commit": "65ccab83fb3d0b29ead6c765c1c52a1ed49592e8" }, + "nvim-dap-ui": { "branch": "master", "commit": "bdb94e3853d11b5ce98ec182e5a3719d5c0ef6fd" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "8db23ea51203b5f00ad107a0cef7e0b2d7a0476c" }, + "nvim-lspconfig": { "branch": "master", "commit": "c6105c449683b944b5d2138fcf82f18c657249e9" }, "nvim-neoclip.lua": { "branch": "main", "commit": "5b9286a40ea2020352280caeb713515badb03d99" }, - "nvim-treesitter": { "branch": "master", "commit": "ad9ae9e7def54fee446c3e186ed0a0d44cca7b90" }, + "nvim-treesitter": { "branch": "master", "commit": "87cf2abeb6077ac19a1249d0b06f223aa398a0a0" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" }, - "octo.nvim": { "branch": "master", "commit": "f336322f865cfa310ae15435c6bec337687b6b20" }, - "overseer.nvim": { "branch": "master", "commit": "42c0d69f505314d6994a84da4e3fcbaf308c1a86" }, - "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, - "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, - "sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" }, + "nvim-web-devicons": { "branch": "master", "commit": "95b1e300699be8eb6b5be1758a9d4d69fe93cc7f" }, + "octo.nvim": { "branch": "master", "commit": "91a87271552828a499c2ddcc6a3e36f09f38c1d3" }, + "overseer.nvim": { "branch": "master", "commit": "de80ffcbf1bb732473a6837c64c55848e7f17354" }, + "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "project.nvim": { "branch": "main", "commit": "1c2e9c93c7c85126c2197f5e770054f53b1926fb" }, + "sqlite.lua": { "branch": "master", "commit": "376e4735c48e07dade3e6ff5f09a654a04f5d4ba" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, - "telescope-menufacture": { "branch": "main", "commit": "44aa65bd42290fca37bb466f257295dbc869a13c" }, + "telescope-menufacture": { "branch": "main", "commit": "d3520d76b7de6813f072e61c5be8fd75967223bf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" }, - "toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" }, + "telescope.nvim": { "branch": "master", "commit": "942fe5faef47b21241e970551eba407bc10d9547" }, + "toggleterm.nvim": { "branch": "main", "commit": "9a595ba699837c4333c4296634feed320f084df2" }, + "vim-fugitive": { "branch": "master", "commit": "309c68117eca3a95349093012e5886a184c1812d" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" } + "which-key.nvim": { "branch": "main", "commit": "87b1459b3e0be0340da2183fc4ec8a00b2960678" } } \ No newline at end of file -- 2.49.1 From 9e8d143b24fa6c53a4f56e226fd435a39eb20297 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 23 Mar 2023 22:27:22 +0100 Subject: [PATCH 375/894] no italic strings --- lua/plugins/gruvbox.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index d04534a..df3481a 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -30,7 +30,7 @@ return { underline = true, bold = false, italic = { - strings = true, + strings = false, comments = true, operators = false, folds = true, -- 2.49.1 From 04c9200050cecd834b8704f035b86b44c26e73ab Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 24 Mar 2023 16:08:42 +0100 Subject: [PATCH 376/894] added cppdbg for linux dap adapter --- lua/plugins/dap.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 9180b6f..4395583 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -163,6 +163,12 @@ return { } } + dap.adapters.cppdbg = { + id = 'cppdbg', + type = 'executable', + command = masonpath .. '/bin/OpenDebugAD7', + } + dap.adapters.lldb = { type = 'executable', command = function() -- 2.49.1 From 506583b78ae4a63369e630ab2e7ae6259321a890 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 24 Mar 2023 17:31:18 +0100 Subject: [PATCH 377/894] removed depracted lazy call --- lua/plugins/cmake-tools.lua | 2 +- lua/plugins/gitsigns.lua | 2 +- lua/plugins/neogen.lua | 2 +- lua/plugins/neotree.lua | 2 +- lua/plugins/which-key.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 658a20e..e942a2b 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -1,6 +1,6 @@ return { 'Civitasv/cmake-tools.nvim', - config = { + opts = { cmake_command = 'cmake', cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, cmake_show_console = 'always', diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 27f6339..d8faf35 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,6 +1,6 @@ return { 'lewis6991/gitsigns.nvim', - config = { + opts = { current_line_blame = false, current_line_blame_opts = { virt_text = true, diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 432abba..4eca942 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -1,7 +1,7 @@ return { 'danymat/neogen', dependencies = 'nvim-treesitter/nvim-treesitter', - config = { + opts = { enabled = true, languages = { cpp = { diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index d0580c8..5512143 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -10,7 +10,7 @@ return { 'kyazdani42/nvim-web-devicons', 'MunifTanjim/nui.nvim', }, - config = { + opts = { window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for -- possible options. These can also be functions that return these options. position = 'float', -- left, right, float, current diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 3c4fc71..5b41da1 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -1,6 +1,6 @@ return { 'folke/which-key.nvim', - config = { + opts = { plugins = { marks = false, registers = false, -- 2.49.1 From 56357acccfd396729e8c7954b524d1e341178061 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 30 Mar 2023 15:33:57 +0200 Subject: [PATCH 378/894] changed titlestring to cwd --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 98d726d..88c622c 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -60,7 +60,7 @@ opt.completeopt = 'menu,menuone,noselect' opt.expandtab = true opt.smartindent = true opt.title = true -opt.titlestring = '%{getcwd()} - %t' +opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%)' opt.laststatus = 3 -- for lualine -- go to previous/next line with h,l,left arrow and right arrow -- 2.49.1 From 170aa9c79fe68c6f09d30d611e6bd0a9cb5d72ed Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 31 Mar 2023 09:13:26 +0200 Subject: [PATCH 379/894] clangd: query for the cross compiler --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 39a6c78..53f16ec 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -206,7 +206,7 @@ return { server = { capabilities = clangd_capabilities, on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, + cmd = { 'clangd', '--compile-commands-dir=build_nvim', '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*' }, root_dir = lspconfig.util.root_pattern( '.clangd', '.clang-tidy', -- 2.49.1 From 1e15ac6637612f1ef678d51deed658dbe1cde29f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 31 Mar 2023 09:13:44 +0200 Subject: [PATCH 380/894] don't use compile_commands.json for root search --- lua/plugins/lspconfig.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 53f16ec..fdb9995 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -211,7 +211,6 @@ return { '.clangd', '.clang-tidy', '.clang-format', - 'compile_commands.json', 'compile_flags.txt', 'configure.ac', '.git', -- 2.49.1 From 63ff84fae1ea8f463d46a0ce5b58063559c1ac7f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Apr 2023 16:16:09 +0200 Subject: [PATCH 381/894] scaling keymaps for neovide --- lua/my_keymappings.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 8dfb83f..007282b 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -47,3 +47,13 @@ vim.keymap.set({ 'n', 'x' }, 'P', '"+P', { desc = 'Paste from system cli vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {}) vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {}) + +if vim.g.neovide then + vim.g.neovide_scale_factor = 1.0 + local change_scale_factor = function(delta) + vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta + print(string.format('scaling: %f', vim.g.neovide_scale_factor)) + end + vim.keymap.set('n', '', function() change_scale_factor(1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) +end -- 2.49.1 From 01393681800c91ed318b426f0dd71c50a18225fd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Apr 2023 20:41:32 +0200 Subject: [PATCH 382/894] enabel scrollwheel scaling --- lua/my_keymappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 007282b..a343402 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -56,4 +56,6 @@ if vim.g.neovide then end vim.keymap.set('n', '', function() change_scale_factor(1.25) end) vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) end -- 2.49.1 From a0086b4380d609c610571fe4cc7d0e6abd4de5eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Apr 2023 22:57:29 +0200 Subject: [PATCH 383/894] cleaned up cmp.lua --- lua/plugins/cmp.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 84c8347..933b9bf 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -30,11 +30,6 @@ return { return vim.api.nvim_replace_termcodes(str, true, true, true) end - local check_back_space = function() - local col = vim.fn.col('.') - 1 - return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil - end - cmp.setup({ formatting = { format = require('lspkind').cmp_format({ -- 2.49.1 From 4ee5f695665695efb23b6c3dd35a0ed50a32764f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Apr 2023 23:37:08 +0200 Subject: [PATCH 384/894] added navbuddy --- lua/plugins/navbuddy.lua | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lua/plugins/navbuddy.lua diff --git a/lua/plugins/navbuddy.lua b/lua/plugins/navbuddy.lua new file mode 100644 index 0000000..38fdc84 --- /dev/null +++ b/lua/plugins/navbuddy.lua @@ -0,0 +1,59 @@ +return { + 'SmiteshP/nvim-navbuddy', + dependencies = { + 'neovim/nvim-lspconfig', + 'SmiteshP/nvim-navic', + 'MunifTanjim/nui.nvim' + }, + config = function() + local actions = require('nvim-navbuddy.actions') + local navbuddy = require('nvim-navbuddy') + navbuddy.setup { + mappings = { + [''] = actions.close, -- Close and cursor to original location + ['q'] = actions.close, + ['j'] = actions.next_sibling, -- down + ['k'] = actions.previous_sibling, -- up + ['h'] = actions.parent, -- Move to left panel + ['l'] = actions.children, -- Move to right panel + ['v'] = actions.visual_name, -- Visual selection of name + ['V'] = actions.visual_scope, -- Visual selection of scope + ['y'] = actions.yank_name, -- Yank the name to system clipboard "+ + ['Y'] = actions.yank_scope, -- Yank the scope to system clipboard "+ + ['i'] = actions.insert_name, -- Insert at start of name + ['I'] = actions.insert_scope, -- Insert at start of scope + ['a'] = actions.append_name, -- Insert at end of name + ['A'] = actions.append_scope, -- Insert at end of scope + ['r'] = actions.rename, -- Rename currently focused symbol + ['d'] = actions.delete, -- Delete scope + ['f'] = actions.fold_create, -- Create fold of current scope + ['F'] = actions.fold_delete, -- Delete fold of current scope + ['c'] = actions.comment, -- Comment out current scope + [''] = actions.select, -- Goto selected symbol + ['o'] = actions.select, + ['J'] = actions.move_down, -- Move focused node down + ['K'] = actions.move_up, -- Move focused node up + [''] = actions.next_sibling, -- down + [''] = actions.previous_sibling, -- up + [''] = actions.parent, -- Move to left panel + [''] = actions.children, -- Move to right panel + [''] = actions.move_down, -- Move focused node down + [''] = actions.move_up, -- Move focused node up + }, + lsp = { + auto_attach = true, -- If set to true, you don't need to manually use attach function + }, + } + end, + keys = { + { + 'n', + function() + require('nvim-navbuddy').open() + end, + desc = 'Navbuddy' + }, + }, + cmd = 'Navbuddy', + event = 'LspAttach' +} -- 2.49.1 From a94b098588d6dbf2068f2cd2e54c1b36777ab966 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Apr 2023 23:37:19 +0200 Subject: [PATCH 385/894] format lspconfig --- lua/plugins/lspconfig.lua | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index fdb9995..122f871 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -23,23 +23,29 @@ return { vim.api.nvim_set_hl( 0, 'LspReferenceText', - { bold = true, + { + bold = true, ctermbg = 'red', - bg = '#5a524c' } + bg = '#5a524c' + } ) vim.api.nvim_set_hl( 0, 'LspReferenceRead', - { bold = true, + { + bold = true, ctermbg = 'red', - bg = 'DarkGreen' } + bg = 'DarkGreen' + } ) vim.api.nvim_set_hl( 0, 'LspReferenceWrite', - { bold = true, + { + bold = true, ctermbg = 'red', - bg = 'DarkRed' } + bg = 'DarkRed' + } ) local diagnostics = { Error = ' ', @@ -50,9 +56,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -116,14 +122,14 @@ return { -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then vim.keymap.set('n', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) end if client.server_capabilities.documentRangeFormattingProvider then vim.keymap.set('x', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end @@ -193,7 +199,7 @@ return { return lspconfig.util.find_git_ancestor(fname) end, single_file_support = true, -- suggested - on_attach = on_attach -- on_attach is the on_attach function you defined + on_attach = on_attach -- on_attach is the on_attach function you defined } } lspconfig.neocmake.setup({}) @@ -206,7 +212,8 @@ return { server = { capabilities = clangd_capabilities, on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim', '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*' }, + cmd = { 'clangd', '--compile-commands-dir=build_nvim', '--query-driver', + '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*' }, root_dir = lspconfig.util.root_pattern( '.clangd', '.clang-tidy', -- 2.49.1 From e8f5e62439154259e6f342909350fcbc9d702144 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Apr 2023 12:10:39 +0200 Subject: [PATCH 386/894] dont search root with neocmake --- lua/plugins/project.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua index 96f614d..d1bcaf3 100644 --- a/lua/plugins/project.lua +++ b/lua/plugins/project.lua @@ -4,7 +4,7 @@ return { require('project_nvim').setup( { silent_chdir = true, - ignore_lsp = { 'null-ls', 'cmake' }, + ignore_lsp = { 'null-ls', 'cmake', 'neocmake' }, patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt' }, }) end, -- 2.49.1 From 7c8bf66b371e8930c189cb62cc46720c02d97e53 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 7 Apr 2023 13:27:44 +0200 Subject: [PATCH 387/894] use more lazu opt fields --- lua/plugins/comment.lua | 8 +++----- lua/plugins/indent_blankline.lua | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index b90706a..97905b1 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -1,10 +1,8 @@ return { 'numToStr/Comment.nvim', - config = function() - require('Comment').setup({ - mappings = false, - }) - end, + opts = { + mappings = false, + }, keys = { { '', diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua index c7c41d0..8945707 100644 --- a/lua/plugins/indent_blankline.lua +++ b/lua/plugins/indent_blankline.lua @@ -3,18 +3,18 @@ return { dependencies = { 'nvim-treesitter/nvim-treesitter', }, + opts = { + show_end_of_line = true, + use_treesitter = true, + show_current_context = true, + context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, + + }, config = function() local opt = vim.opt -- to set options opt.listchars:append('eol:↴') -- opt.listchars:append("space: ") opt.listchars:append('trail: ') opt.listchars:append('tab:→ ') - - require('indent_blankline').setup({ - show_end_of_line = true, - use_treesitter = true, - show_current_context = true, - context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, - }) end, } -- 2.49.1 From f5f903620fece97e2ccc8cd15814c4514c30f954 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 7 Apr 2023 13:27:52 +0200 Subject: [PATCH 388/894] update plugins --- lazy-lock.json | 68 ++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 3b295c5..cc05fe3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,9 +1,9 @@ { "Comment.nvim": { "branch": "master", "commit": "8d3aa5c22c2d45e788c7a5fe13ad77368b783c20" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "025886915e7a1442019f467e0ae2847a7cf6bf1a" }, - "advanced-git-search.nvim": { "branch": "main", "commit": "aac65cebf52b327fb042a30a1549c94ce0bae64a" }, - "aerial.nvim": { "branch": "master", "commit": "ab85d57942b3d7e1a2530af1a083b77f4ba33cba" }, + "LuaSnip": { "branch": "master", "commit": "bc8ec05022743d3f08bda7a76c6bb5e9a9024581" }, + "advanced-git-search.nvim": { "branch": "main", "commit": "0b5a21b1bb082d119131b2f5244f59d737ec705a" }, + "aerial.nvim": { "branch": "master", "commit": "7371322c60120a56bcc833c407de96be42c18172" }, "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, "cmake-tools.nvim": { "branch": "master", "commit": "1c2ad8e4ce63413cb3594d7e10239904f6b0bdcf" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -18,52 +18,54 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, - "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, + "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "58035354fc79c6ec42fa7b218dab90bd3968615f" }, - "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" }, - "friendly-snippets": { "branch": "main", "commit": "25ddcd96540a2ce41d714bd7fea2e7f75fea8ead" }, - "gitsigns.nvim": { "branch": "main", "commit": "ca473e28382f1524aa3d2b6f04bcf54f2e6a64cb" }, - "gruvbox.nvim": { "branch": "main", "commit": "488acf89979463d3ab77f8a5d35a11a2c809ac19" }, + "diffview.nvim": { "branch": "main", "commit": "6bebefbc4c90e6d2b8c65e65b055d284475d89f8" }, + "dressing.nvim": { "branch": "master", "commit": "c705b3890779ea05bd910e9d06af8a209bfb6ad8" }, + "friendly-snippets": { "branch": "main", "commit": "8d91ba2dc2421a54981115f61b914974f938fa77" }, + "gitsigns.nvim": { "branch": "main", "commit": "372d5cb485f2062ac74abc5b33054abac21d8b58" }, + "gruvbox.nvim": { "branch": "main", "commit": "53bfb95b1ed1d87f6a276abdd322b267be0b5adf" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "a80422f21750fcbf0e90b26da877d4024d76f116" }, + "lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, "leap.nvim": { "branch": "main", "commit": "f74473d23ebf60957e0db3ff8172349a82e5a442" }, "lsp_signature.nvim": { "branch": "master", "commit": "1882019270be445a8cad4353f1530574f2b2d02d" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "2b811031febe5f743e07305738181ff367e1e452" }, - "mason.nvim": { "branch": "main", "commit": "9f4e06029b1d8cd3bb4438f6b3de6d5c42d2d8d1" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, - "neodev.nvim": { "branch": "main", "commit": "e027abc6d2a9c1efead2f697da8df2c0ed66b8ff" }, - "neogen": { "branch": "main", "commit": "93d997dbddfe084e77ba4541c54a7b8bfd754fb1" }, - "neotest": { "branch": "master", "commit": "bbbfa55d850f1aaa6707ea85fb5230ac866459c6" }, + "lualine.nvim": { "branch": "master", "commit": "c28a7427c3fb29322db136f0564ec58807b26747" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a5ca8b03972b347b74b2ad2f7f23f120a514593b" }, + "mason.nvim": { "branch": "main", "commit": "cbe2c13249819cd40e888f5c07e636c7a7bbf7e3" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "2b2f74828eeb02cf29d6b21aa32eedadadc94ca7" }, + "neodev.nvim": { "branch": "main", "commit": "864b35006d3de24c60e44b566de8018f919b13e6" }, + "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, + "neotest": { "branch": "master", "commit": "734efe8a2682b6415712933efd19c484c2f8d942" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" }, - "null-ls.nvim": { "branch": "main", "commit": "0180603b6f3cee40f83c6fc226b9ac5f85e691c4" }, - "nvim-autopairs": { "branch": "master", "commit": "e755f366721bc9e189ddecd39554559045ac0a18" }, + "nui.nvim": { "branch": "main", "commit": "1f43b13d133eb4b4f53a4485379d9afa58808389" }, + "null-ls.nvim": { "branch": "main", "commit": "5855128178fa78293acdfb5b4e41ef046779240b" }, + "nvim-autopairs": { "branch": "master", "commit": "0fd6519d44eac3a6736aafdb3fe9da916c3701d4" }, "nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" }, - "nvim-dap": { "branch": "master", "commit": "7e81998e31277c7a33b6c34423640900c5c2c776" }, - "nvim-dap-python": { "branch": "master", "commit": "65ccab83fb3d0b29ead6c765c1c52a1ed49592e8" }, - "nvim-dap-ui": { "branch": "master", "commit": "bdb94e3853d11b5ce98ec182e5a3719d5c0ef6fd" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "8db23ea51203b5f00ad107a0cef7e0b2d7a0476c" }, - "nvim-lspconfig": { "branch": "master", "commit": "c6105c449683b944b5d2138fcf82f18c657249e9" }, + "nvim-dap": { "branch": "master", "commit": "1dd02e82c77d558e30ba831db4c2e7ed534e874f" }, + "nvim-dap-python": { "branch": "master", "commit": "972b8b8b65823c433ee834ed02a7f06edf590dfc" }, + "nvim-dap-ui": { "branch": "master", "commit": "56a2df0e96bfa64ebd6967e7cad877a1530633d5" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "9dc45a6eb33871f4c5cb2ba08fa307467657471e" }, + "nvim-lspconfig": { "branch": "master", "commit": "1ec6f5cbf6ffc44c84783d70039df5295ca22b4e" }, + "nvim-navbuddy": { "branch": "master", "commit": "13a06c3ab210648c86bc594158eefdaa3c9405d0" }, + "nvim-navic": { "branch": "master", "commit": "27124a773d362628b114cd12016e743dab4ccf3e" }, "nvim-neoclip.lua": { "branch": "main", "commit": "5b9286a40ea2020352280caeb713515badb03d99" }, - "nvim-treesitter": { "branch": "master", "commit": "87cf2abeb6077ac19a1249d0b06f223aa398a0a0" }, + "nvim-treesitter": { "branch": "master", "commit": "226c1475a46a2ef6d840af9caa0117a439465500" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "95b1e300699be8eb6b5be1758a9d4d69fe93cc7f" }, - "octo.nvim": { "branch": "master", "commit": "91a87271552828a499c2ddcc6a3e36f09f38c1d3" }, - "overseer.nvim": { "branch": "master", "commit": "de80ffcbf1bb732473a6837c64c55848e7f17354" }, + "nvim-web-devicons": { "branch": "master", "commit": "0568104bf8d0c3ab16395433fcc5c1638efc25d4" }, + "octo.nvim": { "branch": "master", "commit": "f37efab489a99b4a104e5ee18c73453d5e828b62" }, + "overseer.nvim": { "branch": "master", "commit": "9473677696ab288ef74cb5a115338f39fbf740e5" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, - "project.nvim": { "branch": "main", "commit": "1c2e9c93c7c85126c2197f5e770054f53b1926fb" }, + "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "sqlite.lua": { "branch": "master", "commit": "376e4735c48e07dade3e6ff5f09a654a04f5d4ba" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-menufacture": { "branch": "main", "commit": "d3520d76b7de6813f072e61c5be8fd75967223bf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "telescope.nvim": { "branch": "master", "commit": "942fe5faef47b21241e970551eba407bc10d9547" }, - "toggleterm.nvim": { "branch": "main", "commit": "9a595ba699837c4333c4296634feed320f084df2" }, - "vim-fugitive": { "branch": "master", "commit": "309c68117eca3a95349093012e5886a184c1812d" }, + "toggleterm.nvim": { "branch": "main", "commit": "b86982429325112d2b20c6d0cc7a5c4b182ab705" }, + "vim-fugitive": { "branch": "master", "commit": "ef99f1d90cdb33a52931aed5868785b51fb9411d" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "87b1459b3e0be0340da2183fc4ec8a00b2960678" } + "which-key.nvim": { "branch": "main", "commit": "4b73390eec680b4c061ea175eb32c0ff3412271d" } } \ No newline at end of file -- 2.49.1 From e725e4deeeb85bab698dcb2c31d843ef2ee86cb0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 7 Apr 2023 14:03:39 +0200 Subject: [PATCH 389/894] fixed diagnostics numbers in lualine --- lua/plugins/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index a5dbcbd..927eb08 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -29,7 +29,7 @@ return { 'diff', { 'diagnostics', - sources = { 'nvim_diagnostic', 'nvim_lsp' } + sources = { 'nvim_diagnostic' } } }, lualine_c = { -- 2.49.1 From 8bd2e430528bc619814901456b7da51b44b1f6eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 11 Apr 2023 08:21:19 +0200 Subject: [PATCH 390/894] use conaninfo.txt for root search --- lua/plugins/project.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua index d1bcaf3..3233943 100644 --- a/lua/plugins/project.lua +++ b/lua/plugins/project.lua @@ -5,7 +5,7 @@ return { { silent_chdir = true, ignore_lsp = { 'null-ls', 'cmake', 'neocmake' }, - patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt' }, + patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt', 'conaninfo.txt' }, }) end, } -- 2.49.1 From 03e2166f574d64be410e05efed270023e27e1046 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Apr 2023 15:18:55 +0200 Subject: [PATCH 391/894] put neovim in the title (for keepass) --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 88c622c..4c554ea 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -60,7 +60,7 @@ opt.completeopt = 'menu,menuone,noselect' opt.expandtab = true opt.smartindent = true opt.title = true -opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%)' +opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%) Neovim' opt.laststatus = 3 -- for lualine -- go to previous/next line with h,l,left arrow and right arrow -- 2.49.1 From 8b373ff24f38b540c9d9ec7d4996359f89b68b62 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Apr 2023 15:19:41 +0200 Subject: [PATCH 392/894] some small color updates --- lua/plugins/gruvbox.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index df3481a..9e17a97 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -23,6 +23,9 @@ return { vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) end vim.api.nvim_set_hl(0, '@lsp.type.parameter', { fg = colors.faded_purple }) + vim.api.nvim_set_hl(0, '@lsp.type.namespace', { fg = colors.neutral_aqua }) + vim.api.nvim_set_hl(0, '@lsp.type.function', { fg = '#797df2' }) + vim.api.nvim_set_hl(0, '@lsp.type.method', { fg = '#797df2' }) vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { bold = true }) require('gruvbox').setup({ -- 2.49.1 From a11811019cb6645e303dd26f2588e30ad206c246 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Apr 2023 20:30:10 +0200 Subject: [PATCH 393/894] added lsp_lines --- lazy-lock.json | 1 + lua/plugins/lsp_lines.lua | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 lua/plugins/lsp_lines.lua diff --git a/lazy-lock.json b/lazy-lock.json index cc05fe3..c74b49c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -29,6 +29,7 @@ "lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, "leap.nvim": { "branch": "main", "commit": "f74473d23ebf60957e0db3ff8172349a82e5a442" }, + "lsp_lines.nvim": { "branch": "main", "commit": "d9c8a71b8b6e6bfa2b5cf015f59450472dbf06fe" }, "lsp_signature.nvim": { "branch": "master", "commit": "1882019270be445a8cad4353f1530574f2b2d02d" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, "lualine.nvim": { "branch": "master", "commit": "c28a7427c3fb29322db136f0564ec58807b26747" }, diff --git a/lua/plugins/lsp_lines.lua b/lua/plugins/lsp_lines.lua new file mode 100644 index 0000000..9184acd --- /dev/null +++ b/lua/plugins/lsp_lines.lua @@ -0,0 +1,13 @@ +return { + 'https://git.sr.ht/~whynothugo/lsp_lines.nvim', + config = true, + keys = { + { + 'l', + function() + require('lsp_lines').toggle() + end, + desc = 'Toggle lsp_lines', + } + }, +} -- 2.49.1 From 903112b0bb7edd88e9898c892e3212484641eb7e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Apr 2023 20:31:03 +0200 Subject: [PATCH 394/894] disable diagnostic float window --- lua/plugins/lspconfig.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 122f871..b852b92 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -117,7 +117,6 @@ return { vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -311,21 +310,7 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) - vim.diagnostic.config({ - virtual_text = false, - signs = true, - float = { - border = 'single', - format = function(diagnostic) - return string.format( - '%s (%s) [%s]', - diagnostic.message, - diagnostic.source, - diagnostic.code or diagnostic.user_data.lsp.code - ) - end, - }, - }) + vim.diagnostic.config({ virtual_text = false }) end, event = 'VeryLazy' } -- 2.49.1 From bbdfe3d6e8adf2f469e30ed10df595b9dcdcca0f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 19:07:42 +0200 Subject: [PATCH 395/894] added material colortheme --- lua/plugins/material.lua | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lua/plugins/material.lua diff --git a/lua/plugins/material.lua b/lua/plugins/material.lua new file mode 100644 index 0000000..fe1d337 --- /dev/null +++ b/lua/plugins/material.lua @@ -0,0 +1,73 @@ +return { + 'marko-cerovac/material.nvim', + priority = 1000, + config = function() + local colors = require 'material.colors' + require('material').setup({ + + contrast = { + terminal = false, -- Enable contrast for the built-in terminal + sidebars = false, -- Enable contrast for sidebar-like windows ( for example Nvim-Tree ) + floating_windows = true, -- Enable contrast for floating windows + cursor_line = false, -- Enable darker background for the cursor line + non_current_windows = true, -- Enable darker background for non-current windows + filetypes = {}, -- Specify which filetypes get the contrasted (darker) background + }, + + styles = { -- Give comments style such as bold, italic, underline etc. + comments = { --[[ italic = true ]] }, + strings = { --[[ bold = true ]] }, + keywords = { --[[ underline = true ]] }, + functions = { --[[ bold = true, undercurl = true ]] }, + variables = {}, + operators = {}, + types = {}, + }, + + plugins = { -- Uncomment the plugins that you use to highlight them + -- Available plugins: + "dap", + -- "dashboard", + "gitsigns", + -- "hop", + "indent-blankline", + -- "lspsaga", + -- "mini", + -- "neogit", + -- "neorg", + "nvim-cmp", + "nvim-navic", + -- "nvim-tree", + "nvim-web-devicons", + -- "sneak", + "telescope", + -- "trouble", + "which-key", + }, + + disable = { + colored_cursor = false, -- Disable the colored cursor + borders = false, -- Disable borders between verticaly split windows + background = false, -- Prevent the theme from setting the background (NeoVim then uses your terminal background) + term_colors = false, -- Prevent the theme from setting terminal colors + eob_lines = false -- Hide the end-of-buffer lines + }, + + high_visibility = { + lighter = false, -- Enable higher contrast text for lighter style + darker = true-- Enable higher contrast text for darker style + }, + + lualine_style = 'default', -- Lualine style ( can be 'stealth' or 'default' ) + + async_loading = true, -- Load parts of the theme asyncronously for faster startup (turned on by default) + + custom_colors = nil, -- If you want to everride the default colors, set this to a function + + custom_highlights = {}, -- Overwrite highlights with your own + }) + vim.g.material_style = "darker" + vim.cmd('colorscheme material') + end, + enabled = false +} -- 2.49.1 From 5f17610dbf9ccd089a1a5b149194049e3ccc20ec Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:05:18 +0200 Subject: [PATCH 396/894] load lsp_lines with LspAttach --- lua/plugins/lsp_lines.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lsp_lines.lua b/lua/plugins/lsp_lines.lua index 9184acd..be55b1d 100644 --- a/lua/plugins/lsp_lines.lua +++ b/lua/plugins/lsp_lines.lua @@ -10,4 +10,5 @@ return { desc = 'Toggle lsp_lines', } }, + event = 'LspAttach' } -- 2.49.1 From 6b020335dffbd7586ff0ce044319e282b58487f2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:05:49 +0200 Subject: [PATCH 397/894] enable lsp_lines --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index b852b92..4393fcd 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -310,7 +310,7 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) - vim.diagnostic.config({ virtual_text = false }) + vim.diagnostic.config({ virtual_text = false, virtual_lines = true }) end, event = 'VeryLazy' } -- 2.49.1 From 90494dfad690fec936048bbd7963df100d880e53 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:05:58 +0200 Subject: [PATCH 398/894] added nvim_colorizer --- lua/plugins/nvim-colorizer.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/plugins/nvim-colorizer.lua diff --git a/lua/plugins/nvim-colorizer.lua b/lua/plugins/nvim-colorizer.lua new file mode 100644 index 0000000..ccc0ff8 --- /dev/null +++ b/lua/plugins/nvim-colorizer.lua @@ -0,0 +1,10 @@ +return { + 'NvChad/nvim-colorizer.lua', + config = true, + cmd = { + 'ColorizerAttachToBuffer', + 'ColorizerDetachFromBuffer', + 'ColorizerReloadAllBuffers', + 'ColorizerToggle' + } +} -- 2.49.1 From 476c83e7a84ad5839dc6b6b0e2a757d55edc40e2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:45:57 +0200 Subject: [PATCH 399/894] fixed gruvbox colors --- lua/plugins/gruvbox.lua | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index 9e17a97..0936bd7 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -2,31 +2,7 @@ return { 'ellisonleao/gruvbox.nvim', priority = 1000, config = function() - local links = { - ['@lsp.type.namespace'] = '@namespace', - ['@lsp.type.type'] = '@type', - ['@lsp.type.class'] = '@type', - ['@lsp.type.enum'] = '@type', - ['@lsp.type.interface'] = '@type', - ['@lsp.type.struct'] = '@structure', - ['@lsp.type.parameter'] = '@parameter', - ['@lsp.type.variable'] = '@variable', - ['@lsp.type.property'] = '@property', - ['@lsp.type.enumMember'] = '@constant', - ['@lsp.type.function'] = '@function', - ['@lsp.type.method'] = '@method', - ['@lsp.type.macro'] = '@macro', - ['@lsp.type.decorator'] = '@function', - } local colors = require('gruvbox.palette').colors - for newgroup, oldgroup in pairs(links) do - vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) - end - vim.api.nvim_set_hl(0, '@lsp.type.parameter', { fg = colors.faded_purple }) - vim.api.nvim_set_hl(0, '@lsp.type.namespace', { fg = colors.neutral_aqua }) - vim.api.nvim_set_hl(0, '@lsp.type.function', { fg = '#797df2' }) - vim.api.nvim_set_hl(0, '@lsp.type.method', { fg = '#797df2' }) - vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { bold = true }) require('gruvbox').setup({ undercurl = true, @@ -44,7 +20,12 @@ return { invert_tabline = false, invert_intend_guides = false, palette_overrides = {}, - overrides = {}, + overrides = { + ['@lsp.type.parameter'] = { fg = colors.faded_purple }, + ['@lsp.type.function'] = { fg = '#797df2' }, + ['@lsp.type.method'] = { fg = '#797df2' }, + ['@lsp.mod.readonly'] = { bold = true }, + }, dim_inactive = true, transparent_mode = false, }) -- 2.49.1 From 2ed815894f4b687c64e639e8a3aa15483b76102c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:48:37 +0200 Subject: [PATCH 400/894] lsp_lines only on current line --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4393fcd..27b77a0 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -310,7 +310,7 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) - vim.diagnostic.config({ virtual_text = false, virtual_lines = true }) + vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, event = 'VeryLazy' } -- 2.49.1 From 6879b11ffaa9887fbfb2522f4a88056c17622877 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 27 Apr 2023 22:48:46 +0200 Subject: [PATCH 401/894] updated plugins --- lazy-lock.json | 87 +++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index c74b49c..0121444 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,72 +1,73 @@ { - "Comment.nvim": { "branch": "master", "commit": "8d3aa5c22c2d45e788c7a5fe13ad77368b783c20" }, + "Comment.nvim": { "branch": "master", "commit": "a89339ffbee677ab0521a483b6dac7e2e67c907e" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "bc8ec05022743d3f08bda7a76c6bb5e9a9024581" }, - "advanced-git-search.nvim": { "branch": "main", "commit": "0b5a21b1bb082d119131b2f5244f59d737ec705a" }, - "aerial.nvim": { "branch": "master", "commit": "7371322c60120a56bcc833c407de96be42c18172" }, + "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "advanced-git-search.nvim": { "branch": "main", "commit": "391aa45dfdd530fd300f9bf9551c4400302913f6" }, + "aerial.nvim": { "branch": "master", "commit": "07039ea63b562caf9017a223d14eebfa1fc085c1" }, "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, - "cmake-tools.nvim": { "branch": "master", "commit": "1c2ad8e4ce63413cb3594d7e10239904f6b0bdcf" }, + "cmake-tools.nvim": { "branch": "master", "commit": "6e4e422666618d6e9ce0bc78246a6ac0aab94ab1" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, - "cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" }, + "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "6bebefbc4c90e6d2b8c65e65b055d284475d89f8" }, - "dressing.nvim": { "branch": "master", "commit": "c705b3890779ea05bd910e9d06af8a209bfb6ad8" }, - "friendly-snippets": { "branch": "main", "commit": "8d91ba2dc2421a54981115f61b914974f938fa77" }, - "gitsigns.nvim": { "branch": "main", "commit": "372d5cb485f2062ac74abc5b33054abac21d8b58" }, - "gruvbox.nvim": { "branch": "main", "commit": "53bfb95b1ed1d87f6a276abdd322b267be0b5adf" }, + "diffview.nvim": { "branch": "main", "commit": "f9ddbe798cb92854a383e2377482a49139a52c3d" }, + "dressing.nvim": { "branch": "master", "commit": "f5d7fa1fa5ce6bcebc8f07922f39b1eda4d01e37" }, + "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, + "gitsigns.nvim": { "branch": "main", "commit": "7dfe4be94b4f84a9931098f0f0f618d055e50bd5" }, + "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" }, + "lazy.nvim": { "branch": "main", "commit": "5d3d5fb31dcf2ef6f1bda58972c5adfcbd8ff944" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "f74473d23ebf60957e0db3ff8172349a82e5a442" }, + "leap.nvim": { "branch": "main", "commit": "0eb3611593e135150e2f7880ec67568ccb51c17a" }, "lsp_lines.nvim": { "branch": "main", "commit": "d9c8a71b8b6e6bfa2b5cf015f59450472dbf06fe" }, - "lsp_signature.nvim": { "branch": "master", "commit": "1882019270be445a8cad4353f1530574f2b2d02d" }, + "lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "c28a7427c3fb29322db136f0564ec58807b26747" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a5ca8b03972b347b74b2ad2f7f23f120a514593b" }, - "mason.nvim": { "branch": "main", "commit": "cbe2c13249819cd40e888f5c07e636c7a7bbf7e3" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "2b2f74828eeb02cf29d6b21aa32eedadadc94ca7" }, - "neodev.nvim": { "branch": "main", "commit": "864b35006d3de24c60e44b566de8018f919b13e6" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, + "mason.nvim": { "branch": "main", "commit": "253961cfe9b0a63b2524088be294acd7522366e5" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, + "neodev.nvim": { "branch": "main", "commit": "fe48362be179b5705edcbcb947c1d84b263d5698" }, "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, - "neotest": { "branch": "master", "commit": "734efe8a2682b6415712933efd19c484c2f8d942" }, + "neotest": { "branch": "master", "commit": "972a7dc9dfe860649edaf89e08c514a98d3a2a09" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "1f43b13d133eb4b4f53a4485379d9afa58808389" }, - "null-ls.nvim": { "branch": "main", "commit": "5855128178fa78293acdfb5b4e41ef046779240b" }, - "nvim-autopairs": { "branch": "master", "commit": "0fd6519d44eac3a6736aafdb3fe9da916c3701d4" }, - "nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" }, - "nvim-dap": { "branch": "master", "commit": "1dd02e82c77d558e30ba831db4c2e7ed534e874f" }, + "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, + "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, + "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-python": { "branch": "master", "commit": "972b8b8b65823c433ee834ed02a7f06edf590dfc" }, - "nvim-dap-ui": { "branch": "master", "commit": "56a2df0e96bfa64ebd6967e7cad877a1530633d5" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "9dc45a6eb33871f4c5cb2ba08fa307467657471e" }, - "nvim-lspconfig": { "branch": "master", "commit": "1ec6f5cbf6ffc44c84783d70039df5295ca22b4e" }, - "nvim-navbuddy": { "branch": "master", "commit": "13a06c3ab210648c86bc594158eefdaa3c9405d0" }, - "nvim-navic": { "branch": "master", "commit": "27124a773d362628b114cd12016e743dab4ccf3e" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "5b9286a40ea2020352280caeb713515badb03d99" }, - "nvim-treesitter": { "branch": "master", "commit": "226c1475a46a2ef6d840af9caa0117a439465500" }, + "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, + "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-navbuddy": { "branch": "master", "commit": "5828e8e54b747983913f596d546c356151993511" }, + "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "591f1b62343efe3e369e4831cd91e1875f3a08f4" }, + "nvim-treesitter": { "branch": "master", "commit": "08e8b2c08bfdcd20e4561620ca0ccda0bb2e050a" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "0568104bf8d0c3ab16395433fcc5c1638efc25d4" }, - "octo.nvim": { "branch": "master", "commit": "f37efab489a99b4a104e5ee18c73453d5e828b62" }, - "overseer.nvim": { "branch": "master", "commit": "9473677696ab288ef74cb5a115338f39fbf740e5" }, - "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, + "octo.nvim": { "branch": "master", "commit": "66c0fe4256c4ed1c9f79977ee961d38cedf7d6c6" }, + "overseer.nvim": { "branch": "master", "commit": "889ee63692e7eacbdb9f68aa905137e9b306ba04" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "sqlite.lua": { "branch": "master", "commit": "376e4735c48e07dade3e6ff5f09a654a04f5d4ba" }, + "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, - "telescope-menufacture": { "branch": "main", "commit": "d3520d76b7de6813f072e61c5be8fd75967223bf" }, + "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "942fe5faef47b21241e970551eba407bc10d9547" }, - "toggleterm.nvim": { "branch": "main", "commit": "b86982429325112d2b20c6d0cc7a5c4b182ab705" }, - "vim-fugitive": { "branch": "master", "commit": "ef99f1d90cdb33a52931aed5868785b51fb9411d" }, + "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "vim-fugitive": { "branch": "master", "commit": "e6651a79facf5cc2b7c554fdc19eb8a9fe89602c" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "4b73390eec680b4c061ea175eb32c0ff3412271d" } + "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } } \ No newline at end of file -- 2.49.1 From fcd079556125ee7ea8a4a98b2b0a7b05fd4fb86d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Apr 2023 22:57:45 +0200 Subject: [PATCH 402/894] set lazy-lock to unix --- lazy-lock.json | 146 ++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 0121444..cae2c56 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,73 +1,73 @@ -{ - "Comment.nvim": { "branch": "master", "commit": "a89339ffbee677ab0521a483b6dac7e2e67c907e" }, - "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, - "advanced-git-search.nvim": { "branch": "main", "commit": "391aa45dfdd530fd300f9bf9551c4400302913f6" }, - "aerial.nvim": { "branch": "master", "commit": "07039ea63b562caf9017a223d14eebfa1fc085c1" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, - "cmake-tools.nvim": { "branch": "master", "commit": "6e4e422666618d6e9ce0bc78246a6ac0aab94ab1" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, - "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, - "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, - "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, - "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, - "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "f9ddbe798cb92854a383e2377482a49139a52c3d" }, - "dressing.nvim": { "branch": "master", "commit": "f5d7fa1fa5ce6bcebc8f07922f39b1eda4d01e37" }, - "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, - "gitsigns.nvim": { "branch": "main", "commit": "7dfe4be94b4f84a9931098f0f0f618d055e50bd5" }, - "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, - "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "5d3d5fb31dcf2ef6f1bda58972c5adfcbd8ff944" }, - "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "0eb3611593e135150e2f7880ec67568ccb51c17a" }, - "lsp_lines.nvim": { "branch": "main", "commit": "d9c8a71b8b6e6bfa2b5cf015f59450472dbf06fe" }, - "lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" }, - "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, - "mason.nvim": { "branch": "main", "commit": "253961cfe9b0a63b2524088be294acd7522366e5" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, - "neodev.nvim": { "branch": "main", "commit": "fe48362be179b5705edcbcb947c1d84b263d5698" }, - "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, - "neotest": { "branch": "master", "commit": "972a7dc9dfe860649edaf89e08c514a98d3a2a09" }, - "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, - "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, - "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, - "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-python": { "branch": "master", "commit": "972b8b8b65823c433ee834ed02a7f06edf590dfc" }, - "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, - "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, - "nvim-navbuddy": { "branch": "master", "commit": "5828e8e54b747983913f596d546c356151993511" }, - "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "591f1b62343efe3e369e4831cd91e1875f3a08f4" }, - "nvim-treesitter": { "branch": "master", "commit": "08e8b2c08bfdcd20e4561620ca0ccda0bb2e050a" }, - "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, - "octo.nvim": { "branch": "master", "commit": "66c0fe4256c4ed1c9f79977ee961d38cedf7d6c6" }, - "overseer.nvim": { "branch": "master", "commit": "889ee63692e7eacbdb9f68aa905137e9b306ba04" }, - "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, - "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, - "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, - "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, - "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, - "vim-fugitive": { "branch": "master", "commit": "e6651a79facf5cc2b7c554fdc19eb8a9fe89602c" }, - "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } -} \ No newline at end of file +{ + "Comment.nvim": { "branch": "master", "commit": "a89339ffbee677ab0521a483b6dac7e2e67c907e" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, + "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "advanced-git-search.nvim": { "branch": "main", "commit": "391aa45dfdd530fd300f9bf9551c4400302913f6" }, + "aerial.nvim": { "branch": "master", "commit": "07039ea63b562caf9017a223d14eebfa1fc085c1" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, + "cmake-tools.nvim": { "branch": "master", "commit": "6e4e422666618d6e9ce0bc78246a6ac0aab94ab1" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, + "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, + "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, + "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, + "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "diffview.nvim": { "branch": "main", "commit": "f9ddbe798cb92854a383e2377482a49139a52c3d" }, + "dressing.nvim": { "branch": "master", "commit": "f5d7fa1fa5ce6bcebc8f07922f39b1eda4d01e37" }, + "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, + "gitsigns.nvim": { "branch": "main", "commit": "7dfe4be94b4f84a9931098f0f0f618d055e50bd5" }, + "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "5d3d5fb31dcf2ef6f1bda58972c5adfcbd8ff944" }, + "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, + "leap.nvim": { "branch": "main", "commit": "0eb3611593e135150e2f7880ec67568ccb51c17a" }, + "lsp_lines.nvim": { "branch": "main", "commit": "d9c8a71b8b6e6bfa2b5cf015f59450472dbf06fe" }, + "lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" }, + "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, + "mason.nvim": { "branch": "main", "commit": "253961cfe9b0a63b2524088be294acd7522366e5" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, + "neodev.nvim": { "branch": "main", "commit": "fe48362be179b5705edcbcb947c1d84b263d5698" }, + "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, + "neotest": { "branch": "master", "commit": "972a7dc9dfe860649edaf89e08c514a98d3a2a09" }, + "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, + "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, + "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, + "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, + "nvim-dap-python": { "branch": "master", "commit": "972b8b8b65823c433ee834ed02a7f06edf590dfc" }, + "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, + "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-navbuddy": { "branch": "master", "commit": "5828e8e54b747983913f596d546c356151993511" }, + "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "591f1b62343efe3e369e4831cd91e1875f3a08f4" }, + "nvim-treesitter": { "branch": "master", "commit": "08e8b2c08bfdcd20e4561620ca0ccda0bb2e050a" }, + "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, + "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, + "octo.nvim": { "branch": "master", "commit": "66c0fe4256c4ed1c9f79977ee961d38cedf7d6c6" }, + "overseer.nvim": { "branch": "master", "commit": "889ee63692e7eacbdb9f68aa905137e9b306ba04" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, + "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, + "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, + "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "vim-fugitive": { "branch": "master", "commit": "e6651a79facf5cc2b7c554fdc19eb8a9fe89602c" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } +} -- 2.49.1 From df73cb06c66f8e2b8fe4191645889edc7652c5aa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 May 2023 10:38:24 +0200 Subject: [PATCH 403/894] added surround plugin --- lua/plugins/nvim-surround.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/plugins/nvim-surround.lua diff --git a/lua/plugins/nvim-surround.lua b/lua/plugins/nvim-surround.lua new file mode 100644 index 0000000..4ffa1e9 --- /dev/null +++ b/lua/plugins/nvim-surround.lua @@ -0,0 +1,10 @@ +return { + 'kylechui/nvim-surround', + version = '*', -- Use for stability; omit to use `main` branch for the latest features + event = 'VeryLazy', + config = function() + require('nvim-surround').setup({ + -- Configuration here, or leave empty to use defaults + }) + end +} -- 2.49.1 From 5819910aee3c2f6171a0c9d25a4158af3abd1f1c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 May 2023 10:38:34 +0200 Subject: [PATCH 404/894] updated plugins --- lazy-lock.json | 78 ++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index cae2c56..95bf81d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,11 +1,11 @@ { - "Comment.nvim": { "branch": "master", "commit": "a89339ffbee677ab0521a483b6dac7e2e67c907e" }, + "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, - "advanced-git-search.nvim": { "branch": "main", "commit": "391aa45dfdd530fd300f9bf9551c4400302913f6" }, - "aerial.nvim": { "branch": "master", "commit": "07039ea63b562caf9017a223d14eebfa1fc085c1" }, + "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, + "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, + "aerial.nvim": { "branch": "master", "commit": "d8f2699f7ae0e5eb62424d7b2ad80ce30179ee92" }, "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, - "cmake-tools.nvim": { "branch": "master", "commit": "6e4e422666618d6e9ce0bc78246a6ac0aab94ab1" }, + "cmake-tools.nvim": { "branch": "master", "commit": "b279bfb861666563399de3599c24040b53a42fd2" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, @@ -20,44 +20,45 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "f9ddbe798cb92854a383e2377482a49139a52c3d" }, - "dressing.nvim": { "branch": "master", "commit": "f5d7fa1fa5ce6bcebc8f07922f39b1eda4d01e37" }, - "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, - "gitsigns.nvim": { "branch": "main", "commit": "7dfe4be94b4f84a9931098f0f0f618d055e50bd5" }, + "diffview.nvim": { "branch": "main", "commit": "1d6ea6ced1c3ec0f6464761a138bb35afd79ef63" }, + "dressing.nvim": { "branch": "master", "commit": "66e4990240f92e31b0d5e4df6deb6bb0160ae832" }, + "friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" }, + "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "5d3d5fb31dcf2ef6f1bda58972c5adfcbd8ff944" }, + "lazy.nvim": { "branch": "main", "commit": "652b6febf8d5c99eb8cf4a1cec63da6db62e77d2" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "0eb3611593e135150e2f7880ec67568ccb51c17a" }, - "lsp_lines.nvim": { "branch": "main", "commit": "d9c8a71b8b6e6bfa2b5cf015f59450472dbf06fe" }, - "lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" }, - "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, - "mason.nvim": { "branch": "main", "commit": "253961cfe9b0a63b2524088be294acd7522366e5" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, - "neodev.nvim": { "branch": "main", "commit": "fe48362be179b5705edcbcb947c1d84b263d5698" }, - "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, - "neotest": { "branch": "master", "commit": "972a7dc9dfe860649edaf89e08c514a98d3a2a09" }, + "leap.nvim": { "branch": "main", "commit": "6f2912755c9c4ae790abd829f0cf1b07c037b2a4" }, + "lsp_lines.nvim": { "branch": "main", "commit": "512d8c79637e7aeb889240c2e0ca8ae327940737" }, + "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, + "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, + "mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "541f5c92d2492041afb354e2df6e74809094b051" }, + "neodev.nvim": { "branch": "main", "commit": "7c6999ba7d8fdf36991b0aeed034b0cb299ce1eb" }, + "neogen": { "branch": "main", "commit": "c0fd3dc9e7cc91181ea5a345c4b01c865626c81e" }, + "neotest": { "branch": "master", "commit": "35aa5832e35129c00c48eb7d5862b44745392f69" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, - "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, - "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, - "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" }, + "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, + "nvim-autopairs": { "branch": "master", "commit": "7747bbae60074acf0b9e3a4c13950be7a2dff444" }, + "nvim-cmp": { "branch": "main", "commit": "d153771162bd9795d9f7142df5c674b61066a585" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-python": { "branch": "master", "commit": "972b8b8b65823c433ee834ed02a7f06edf590dfc" }, - "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, + "nvim-dap-python": { "branch": "master", "commit": "51ecb08dbff57fca8add396b93dc765aba262e0a" }, + "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, - "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, - "nvim-navbuddy": { "branch": "master", "commit": "5828e8e54b747983913f596d546c356151993511" }, - "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, + "nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" }, + "nvim-navbuddy": { "branch": "master", "commit": "923cf51fb852c062c63c7ade236a4938f1081d5b" }, + "nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" }, "nvim-neoclip.lua": { "branch": "main", "commit": "591f1b62343efe3e369e4831cd91e1875f3a08f4" }, - "nvim-treesitter": { "branch": "master", "commit": "08e8b2c08bfdcd20e4561620ca0ccda0bb2e050a" }, + "nvim-surround": { "branch": "main", "commit": "e6047128e57c1aff1566fb9f627521d2887fc77a" }, + "nvim-treesitter": { "branch": "master", "commit": "a67a4ab6423d28d075e6054e9d0c5cef80b5acab" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, - "octo.nvim": { "branch": "master", "commit": "66c0fe4256c4ed1c9f79977ee961d38cedf7d6c6" }, - "overseer.nvim": { "branch": "master", "commit": "889ee63692e7eacbdb9f68aa905137e9b306ba04" }, + "nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" }, + "octo.nvim": { "branch": "master", "commit": "1c9a79412a1d92dd3c5a601e2261c158ebb4d4bd" }, + "overseer.nvim": { "branch": "master", "commit": "9e7cc435c1c85d37aa5471d7429501690f4d64d6" }, "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, @@ -65,9 +66,10 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "telescope.nvim": { "branch": "master", "commit": "d77b37f4520e5fc2cf4c74c12e42ed4b589bd367" }, "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, - "vim-fugitive": { "branch": "master", "commit": "e6651a79facf5cc2b7c554fdc19eb8a9fe89602c" }, + "venv-selector.nvim": { "branch": "main", "commit": "479a145f8f4dd854cffd7289f18b8267f82e5cf0" }, + "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } -} + "which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" } +} \ No newline at end of file -- 2.49.1 From 4665a3b753eac59dc6c0d68f18b403152530f578 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 16 May 2023 20:50:26 +0200 Subject: [PATCH 405/894] description for lazygit keys --- lua/plugins/lazygit.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index 59a9a4e..fab51cd 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -18,7 +18,8 @@ return { 'g', function() require('lazygit').lazygit() - end + end, + desc = 'LazyGit' } } } -- 2.49.1 From c72644682d65a8ec9af626acf8bcf5e60a6c9226 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 16 May 2023 22:15:46 +0200 Subject: [PATCH 406/894] switched to new nerd font 3 --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4c554ea..2b019c6 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -51,7 +51,7 @@ if vim.fn.has('wsl') == 1 then elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' else - opt.guifont = 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf + opt.guifont = 'Hack Nerd Font Mono:h10' end opt.swapfile = false opt.backup = false -- 2.49.1 From d1900be2afc3805d2c743069e711618cdc271b08 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 16 May 2023 22:15:58 +0200 Subject: [PATCH 407/894] disbale autocommand for cursorline --- lua/my_autocommands.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index b2213d6..0498603 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -72,13 +72,6 @@ api.nvim_create_autocmd( ) api.nvim_create_autocmd('FileType', { pattern = 'man', command = [[nnoremap q :quit]] }) --- show cursor line only in active window -local cursorGrp = api.nvim_create_augroup('CursorLine', { clear = true }) -api.nvim_create_autocmd({ 'InsertLeave', 'WinEnter' }, { pattern = '*', command = 'set cursorline', group = cursorGrp }) -api.nvim_create_autocmd( - { 'InsertEnter', 'WinLeave' }, - { pattern = '*', command = 'set nocursorline', group = cursorGrp } -) -- don't auto comment new line api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) -- 2.49.1 From 9207bbe62ad6ad70ef24068d0ff1df107562a97c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 20 May 2023 18:24:49 +0200 Subject: [PATCH 408/894] use telescope go to definition\ --- lua/plugins/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 27b77a0..fc6b0c3 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -83,13 +83,14 @@ return { vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') -- Mappings. + local tele_builtins = require('telescope.builtin') vim.keymap.set('n', ',', vim.diagnostic.goto_prev, { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) vim.keymap.set('n', ';', vim.diagnostic.goto_next, { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) vim.keymap.set('n', 'a', vim.lsp.buf.code_action, { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, + vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) @@ -101,7 +102,6 @@ return { { noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr }) vim.keymap.set('n', 'm', vim.lsp.buf.rename, { noremap = true, silent = false, desc = 'Rename', buffer = bufnr }) - local tele_builtins = require('telescope.builtin') vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, -- 2.49.1 From 148a8703851f708e1a942b1799cb0dd260d91855 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 21 May 2023 09:41:01 +0200 Subject: [PATCH 409/894] some borders --- lua/config/options.lua | 3 +++ lua/plugins/lspconfig.lua | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 2b019c6..f85c89d 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -75,3 +75,6 @@ opt.foldlevel = 20 opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' opt.foldexpr = 'nvim_treesitter#foldexpr()' + +-- Window border for floating windows +require('lspconfig.ui.windows').default_options.border = 'rounded' diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index fc6b0c3..28d376f 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -12,7 +12,11 @@ return { }, }, config = function() - require('mason').setup() + require('mason').setup({ + ui = { + border = 'rounded' + } + }) require('mason-lspconfig').setup({ automatic_installation = false, }) -- 2.49.1 From 62ffea7b5747227a0bf9f31d0e5ab50926291e8a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 10:05:36 +0200 Subject: [PATCH 410/894] don't use neo-tree when opening folders --- lua/plugins/neotree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index 5512143..c51e22b 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -53,6 +53,7 @@ return { hide_dotfiles = false, hide_gitignored = false, }, + hijack_netrw_behavior = 'disabled', }, source_selector = { winbar = true, -- 2.49.1 From 3dfbd9b8b62855cf282b9805ec4d9251f61533e9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 15:47:29 +0200 Subject: [PATCH 411/894] optimize buffer sorting --- lua/plugins/telescope.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index a726449..55a2b40 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -138,7 +138,9 @@ return { pickers = { -- Your special builtin config goes in here buffers = { - sort_lastused = true, + sort_lastused = false, + sort_mru = true, + ignore_current_buffer = true, theme = 'ivy', mappings = { i = { -- 2.49.1 From f77d8674be5183bf8516853df07ba700d762f6de Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 15:47:55 +0200 Subject: [PATCH 412/894] always use the same icon repo --- lua/plugins/lualine.lua | 2 +- lua/plugins/neotree.lua | 2 +- lua/plugins/telescope.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 927eb08..227429c 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,6 +1,6 @@ return { 'nvim-lualine/lualine.nvim', - dependencies = { 'kyazdani42/nvim-web-devicons' }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() local custom_gruvbox = require 'lualine.themes.gruvbox_dark' diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index c51e22b..98be306 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -7,7 +7,7 @@ return { dependencies = { 'nvim-lua/plenary.nvim', -- 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended - 'kyazdani42/nvim-web-devicons', + 'nvim-tree/nvim-web-devicons', 'MunifTanjim/nui.nvim', }, opts = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 55a2b40..baca278 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -2,7 +2,7 @@ return { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', + 'nvim-tree/nvim-web-devicons', 'molecule-man/telescope-menufacture', { 'nvim-telescope/telescope-fzf-native.nvim', -- 2.49.1 From 99008719e21b08b986215963214f850edb1de557 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 15:48:10 +0200 Subject: [PATCH 413/894] try nvim-rooter --- lua/plugins/nvim-router.lua | 15 +++++++++++++++ lua/plugins/project.lua | 13 ++++++++++++- lua/plugins/telescope.lua | 7 ------- 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/nvim-router.lua diff --git a/lua/plugins/nvim-router.lua b/lua/plugins/nvim-router.lua new file mode 100644 index 0000000..543d424 --- /dev/null +++ b/lua/plugins/nvim-router.lua @@ -0,0 +1,15 @@ +return { + 'notjedi/nvim-rooter.lua', + opts = { + rooter_patterns = { '.git', + '_darcs', + '.hg', + '.bzr', + '.svn', + 'Makefile', + 'package.json', + 'build_nvim', + 'real_path.txt', + 'conaninfo.txt' }, + } +} diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua index 3233943..5099e09 100644 --- a/lua/plugins/project.lua +++ b/lua/plugins/project.lua @@ -5,7 +5,18 @@ return { { silent_chdir = true, ignore_lsp = { 'null-ls', 'cmake', 'neocmake' }, - patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt', 'conaninfo.txt' }, + patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt', + 'conaninfo.txt' }, }) end, + enabled = false, + keys = { + { + 'p', + function() + require('telescope').extensions.projects.projects() + end, + desc = 'Select project', + }, + } } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index baca278..a0a3533 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -87,13 +87,6 @@ return { end, desc = 'Find in workspace', }, - { - 'p', - function() - require('telescope').extensions.projects.projects() - end, - desc = 'Select project', - }, }, config = function() local actions = require('telescope.actions') -- 2.49.1 From eb87655ced9a517fafaead9f64ff4b0aca30d159 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 15:48:17 +0200 Subject: [PATCH 414/894] added oil --- lua/plugins/oil.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lua/plugins/oil.lua diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua new file mode 100644 index 0000000..a75f101 --- /dev/null +++ b/lua/plugins/oil.lua @@ -0,0 +1,31 @@ +return { + 'stevearc/oil.nvim', + opts = { + keymaps = { + ['g?'] = 'actions.show_help', + [''] = 'actions.select', + [''] = 'actions.select_vsplit', + [''] = 'actions.select_split', + [''] = 'actions.select_tab', + [''] = 'actions.preview', + [''] = 'actions.close', + [''] = 'actions.refresh', + ['-'] = 'actions.parent', + ['_'] = 'actions.open_cwd', + ['`'] = 'actions.cd', + ['~'] = 'actions.tcd', + ['g.'] = 'actions.toggle_hidden', + }, + }, + -- Optional dependencies + dependencies = { 'nvim-tree/nvim-web-devicons' }, + keys = { + { + '-', + function() + require('oil').open() + end, + desc = 'Open oil', + } + } +} -- 2.49.1 From a5b0466f17fb1ddb0abb1a432f3f3b19304a7f92 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 15:48:39 +0200 Subject: [PATCH 415/894] update lock file --- lazy-lock.json | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 95bf81d..26609e6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -26,19 +26,19 @@ "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "652b6febf8d5c99eb8cf4a1cec63da6db62e77d2" }, + "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, "leap.nvim": { "branch": "main", "commit": "6f2912755c9c4ae790abd829f0cf1b07c037b2a4" }, - "lsp_lines.nvim": { "branch": "main", "commit": "512d8c79637e7aeb889240c2e0ca8ae327940737" }, + "lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "541f5c92d2492041afb354e2df6e74809094b051" }, - "neodev.nvim": { "branch": "main", "commit": "7c6999ba7d8fdf36991b0aeed034b0cb299ce1eb" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "e5594d53986b34e584e8afe2ea6ad99d6f6d2105" }, + "neodev.nvim": { "branch": "main", "commit": "5e7e613950df5e2be27534ab5c55fd21af1b2ad3" }, "neogen": { "branch": "main", "commit": "c0fd3dc9e7cc91181ea5a345c4b01c865626c81e" }, - "neotest": { "branch": "master", "commit": "35aa5832e35129c00c48eb7d5862b44745392f69" }, + "neotest": { "branch": "master", "commit": "42cf226457c61abe6fca081e959d69e2325cf08f" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, "nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" }, "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, @@ -47,28 +47,26 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-python": { "branch": "master", "commit": "51ecb08dbff57fca8add396b93dc765aba262e0a" }, - "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, + "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, "nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" }, - "nvim-navbuddy": { "branch": "master", "commit": "923cf51fb852c062c63c7ade236a4938f1081d5b" }, - "nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "591f1b62343efe3e369e4831cd91e1875f3a08f4" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "8094648c54ff3b233ccfe5928f77b6824f77339c" }, + "nvim-rooter.lua": { "branch": "main", "commit": "99832f243426a28c1cc0b83ee4cdf915bf0b2c2b" }, "nvim-surround": { "branch": "main", "commit": "e6047128e57c1aff1566fb9f627521d2887fc77a" }, - "nvim-treesitter": { "branch": "master", "commit": "a67a4ab6423d28d075e6054e9d0c5cef80b5acab" }, + "nvim-treesitter": { "branch": "master", "commit": "f2778bd1a28b74adf5b1aa51aa57da85adfa3d16" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" }, + "nvim-web-devicons": { "branch": "master", "commit": "e283ab937e0197b37ec5d8013e49495193407324" }, "octo.nvim": { "branch": "master", "commit": "1c9a79412a1d92dd3c5a601e2261c158ebb4d4bd" }, + "oil.nvim": { "branch": "master", "commit": "d27bfa1f370e8caddf65890364989b76f9794afb" }, "overseer.nvim": { "branch": "master", "commit": "9e7cc435c1c85d37aa5471d7429501690f4d64d6" }, "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, - "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "d77b37f4520e5fc2cf4c74c12e42ed4b589bd367" }, + "telescope.nvim": { "branch": "master", "commit": "ebf93395e79e5d026e3867d9e5e158b2bbe1499c" }, "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, - "venv-selector.nvim": { "branch": "main", "commit": "479a145f8f4dd854cffd7289f18b8267f82e5cf0" }, "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, "which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" } -- 2.49.1 From 851238e0b9d813fa4fc32768d3e061a8a6d73eb6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 16:32:41 +0200 Subject: [PATCH 416/894] beautify some telescope windows --- lua/plugins/lspconfig.lua | 2 ++ lua/plugins/telescope.lua | 31 +++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 28d376f..b8ecffe 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -116,6 +116,8 @@ return { { noremap = true, silent = false, desc = 'References', buffer = bufnr }) vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, { noremap = true, silent = false, desc = 'References', buffer = bufnr }) + vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, + { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index a0a3533..3ba505f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -130,7 +130,7 @@ return { }, pickers = { -- Your special builtin config goes in here - buffers = { + buffers = { sort_lastused = false, sort_mru = true, ignore_current_buffer = true, @@ -145,24 +145,43 @@ return { }, }, }, - find_files = { + find_files = { theme = 'ivy', previewer = false, -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' }, }, - oldfiles = { + oldfiles = { theme = 'ivy', }, - git_files = { + git_files = { theme = 'ivy', previewer = false, }, - lsp_references = { + lsp_references = { show_line = false, include_declaration = false, }, - lsp_dynamic_workspace_symbols = {}, + lsp_dynamic_workspace_symbols = { + theme = 'ivy', + fname_width = 80, + symbol_width = 55, + symbol_type_width = 8, + ignore_symbols = { 'namespace' } + }, + lsp_document_symbols = { + theme = 'ivy', + fname_width = 80, + symbol_width = 85, + symbol_type_width = 8, + ignore_symbols = { 'namespace' } + }, + lsp_workspace_symbols = { + fname_width = 30, + symbol_width = 85, + symbol_type_width = 8, + ignore_symbols = { 'namespace' } + }, }, extensions = { ['ui-select'] = { -- 2.49.1 From 44376422e049d4fef1df781329ffadadf2fb6808 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 May 2023 16:33:04 +0200 Subject: [PATCH 417/894] use backspace in oil --- lua/plugins/oil.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index a75f101..57de2e0 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -10,7 +10,7 @@ return { [''] = 'actions.preview', [''] = 'actions.close', [''] = 'actions.refresh', - ['-'] = 'actions.parent', + [''] = 'actions.parent', ['_'] = 'actions.open_cwd', ['`'] = 'actions.cd', ['~'] = 'actions.tcd', -- 2.49.1 From 80e3c762f54305818be1446133d738a419e39992 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 24 May 2023 21:13:25 +0200 Subject: [PATCH 418/894] added monokai --- lua/plugins/gruvbox.lua | 2 +- lua/plugins/monokai-pro.lua | 62 +++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/monokai-pro.lua diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index 0936bd7..96bc6ba 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -29,7 +29,7 @@ return { dim_inactive = true, transparent_mode = false, }) - vim.cmd('colorscheme gruvbox') + -- vim.cmd('colorscheme gruvbox') end, enabled = true } diff --git a/lua/plugins/monokai-pro.lua b/lua/plugins/monokai-pro.lua new file mode 100644 index 0000000..623dc90 --- /dev/null +++ b/lua/plugins/monokai-pro.lua @@ -0,0 +1,62 @@ +return { + 'loctvl842/monokai-pro.nvim', + config = function() + require('monokai-pro').setup({ + -- filter = 'spectrum' + override = function(c) + return { + ['@lsp.type.class'] = { link = 'Structure' }, + ['@lsp.type.decorator'] = { link = 'Function' }, + ['@lsp.type.enum'] = { link = 'Structure' }, + ['@lsp.type.enumNumber'] = { link = 'Constant' }, + ['@lsp.type.function'] = { link = 'Function' }, + ['@lsp.type.interface'] = { link = 'Structure' }, + ['@lsp.type.macro'] = { link = 'Macro' }, + -- ['@lsp.type.method'] = { link = 'Function' }, + ['@lsp.type.namespace'] = { link = 'Identifier' }, + ['@lsp.type.parameter'] = { link = '@lsp.typemod.parameter.declaration' }, + ['@lsp.type.property'] = { link = 'Identifier' }, + ['@lsp.type.struct'] = { link = 'Structure' }, + ['@lsp.type.type'] = { link = 'Type' }, + ['@lsp.type.typeParameter'] = { link = 'TypeDef' }, + ['@lsp.type.variable'] = { link = 'Identifier' }, + + -- mod + -- ["@lsp.mod.declaration"] = { fg = c.base.cyan }, + -- ["@lsp.mod.definition"] = { fg = c.base.cyan }, + -- ["@lsp.mod.readonly"] = { fg = c.base.magenta }, + -- ["@lsp.mod.static"] = {}, + ['@lsp.mod.deprecated'] = { strikethrough = true }, + -- ["@lsp.mod.abstract"] = {}, + -- ["@lsp.mod.async"] = {}, + -- ["@lsp.mod.modification"] = {}, + -- ["@lsp.mod.documentation"] = {}, + -- ["@lsp.mod.defaultLibrary"] = {}, + + ['@lsp.typemod.class.defaultLibrary'] = { fg = c.base.white }, + -- ["@lsp.typemod.decorator"] = {}, + -- ["@lsp.typemod.enum"] = {}, + -- ["@lsp.typemod.enumNumber"] = {}, + ['@lsp.typemod.function.declaration'] = { fg = c.base.green }, + ['@lsp.typemod.function.defaultLibrary'] = { fg = c.base.blue }, + -- ["@lsp.typemod.interface"] = {}, + -- ["@lsp.typemod.macro"] = {}, + -- ["@lsp.typemod.method"] = {}, + ["@lsp.typemod.namespace"] = { fg = c.base.red }, + -- ['@lsp.typemod.parameter.declaration'] = { fg = c.base.blue, italic = styles.parameter.italic }, + ["@lsp.typemod.property"] = { fg = '#9699f2' }, + -- ["@lsp.typemod.struct"] = {}, + -- ["@lsp.typemod.type"] = {}, + -- ["@lsp.typemod.typeParameter"] = {}, + ['@lsp.typemod.variable.readonly'] = { fg = c.base.magenta }, + + -- ['@lsp.type.parameter'] = { fg = '#797df2' }, + -- ['@lsp.type.function'] = { fg = '#797df2' }, + -- ['@lsp.type.method'] = { fg = '#797df2' }, + ['@lsp.mod.readonly'] = { bold = true }, + } + end, + }) + vim.cmd('colorscheme monokai-pro') + end +} -- 2.49.1 From bf17d5d108fb8078f7d1340cb089d4c87af6f45e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 24 May 2023 21:41:24 +0200 Subject: [PATCH 419/894] monokai telescope --- lua/plugins/monokai-pro.lua | 1 + lua/plugins/telescope.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/plugins/monokai-pro.lua b/lua/plugins/monokai-pro.lua index 623dc90..b686150 100644 --- a/lua/plugins/monokai-pro.lua +++ b/lua/plugins/monokai-pro.lua @@ -3,6 +3,7 @@ return { config = function() require('monokai-pro').setup({ -- filter = 'spectrum' + background_clear = {}, override = function(c) return { ['@lsp.type.class'] = { link = 'Structure' }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 3ba505f..e5f9051 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -118,6 +118,7 @@ return { require('telescope').setup({ defaults = { + borderchars = { "█", " ", "▀", "█", "█", " ", " ", "▀" }, mappings = { i = { [''] = actions.select_default + actions.center, -- 2.49.1 From b1c2599b9eb485852ed8aa9e7424e83329e79fde Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 25 May 2023 22:55:31 +0200 Subject: [PATCH 420/894] Revert "monokai telescope" This reverts commit bf17d5d108fb8078f7d1340cb089d4c87af6f45e. --- lua/plugins/monokai-pro.lua | 1 - lua/plugins/telescope.lua | 1 - 2 files changed, 2 deletions(-) diff --git a/lua/plugins/monokai-pro.lua b/lua/plugins/monokai-pro.lua index b686150..623dc90 100644 --- a/lua/plugins/monokai-pro.lua +++ b/lua/plugins/monokai-pro.lua @@ -3,7 +3,6 @@ return { config = function() require('monokai-pro').setup({ -- filter = 'spectrum' - background_clear = {}, override = function(c) return { ['@lsp.type.class'] = { link = 'Structure' }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index e5f9051..3ba505f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -118,7 +118,6 @@ return { require('telescope').setup({ defaults = { - borderchars = { "█", " ", "▀", "█", "█", " ", " ", "▀" }, mappings = { i = { [''] = actions.select_default + actions.center, -- 2.49.1 From 82b12e599c094405a0a543bbb78eb2f871a3f4e8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 May 2023 00:00:52 +0200 Subject: [PATCH 421/894] added catpuccin --- lua/plugins/catppuccin.lua | 95 ++++++++++++++++++++++++++++++++++++++ lua/plugins/cmp.lua | 38 ++++++++++----- lua/plugins/lualine.lua | 2 +- 3 files changed, 123 insertions(+), 12 deletions(-) create mode 100644 lua/plugins/catppuccin.lua diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua new file mode 100644 index 0000000..0c6a103 --- /dev/null +++ b/lua/plugins/catppuccin.lua @@ -0,0 +1,95 @@ +return +{ + 'catppuccin/nvim', + name = 'catppuccin', + config = function() + require('catppuccin').setup({ + flavour = 'macchiato', -- latte, frappe, macchiato, mocha + no_italic = true, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + telescope = true, + aerial = true, + indent_blankline = { + enabled = true, + colored_indent_levels = false, + }, + dap = { + enabled = true, + enable_ui = true, -- enable nvim-dap-ui + }, + neotest = true, + neotree = true, + notify = false, + mini = false, + which_key = true, + leap = true, + native_lsp = { + enabled = true, + virtual_text = { + errors = { 'italic' }, + hints = { 'italic' }, + warnings = { 'italic' }, + information = { 'italic' }, + }, + underlines = { + errors = { 'underline' }, + hints = { 'underline' }, + warnings = { 'underline' }, + information = { 'underline' }, + }, + }, + -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) + }, + highlight_overrides = { + all = function(colors) + return { + -- ['@lsp.mod.readonly'] = { style = { 'bold' } }, + CmpBorder = { fg = '#fe4145' }, + } + end, + macchiato = function(macchiato) + return { + ['@lsp.mod.readonly'] = { style = { 'bold' } }, + ['@type.qualifier'] = { fg = macchiato.sky }, + ['@namespace'] = { fg = macchiato.red }, + Macro = { fg = macchiato.rosewater} + } + end, + }, + custom_highlights = function(C) + return { + CmpItemKindSnippet = { fg = C.base, bg = C.mauve }, + CmpItemKindKeyword = { fg = C.base, bg = C.red }, + CmpItemKindText = { fg = C.base, bg = C.teal }, + CmpItemKindMethod = { fg = C.base, bg = C.blue }, + CmpItemKindConstructor = { fg = C.base, bg = C.blue }, + CmpItemKindFunction = { fg = C.base, bg = C.blue }, + CmpItemKindFolder = { fg = C.base, bg = C.blue }, + CmpItemKindModule = { fg = C.base, bg = C.blue }, + CmpItemKindConstant = { fg = C.base, bg = C.peach }, + CmpItemKindField = { fg = C.base, bg = C.green }, + CmpItemKindProperty = { fg = C.base, bg = C.green }, + CmpItemKindEnum = { fg = C.base, bg = C.green }, + CmpItemKindUnit = { fg = C.base, bg = C.green }, + CmpItemKindClass = { fg = C.base, bg = C.yellow }, + CmpItemKindVariable = { fg = C.base, bg = C.flamingo }, + CmpItemKindFile = { fg = C.base, bg = C.blue }, + CmpItemKindInterface = { fg = C.base, bg = C.yellow }, + CmpItemKindColor = { fg = C.base, bg = C.red }, + CmpItemKindReference = { fg = C.base, bg = C.red }, + CmpItemKindEnumMember = { fg = C.base, bg = C.red }, + CmpItemKindStruct = { fg = C.base, bg = C.blue }, + CmpItemKindValue = { fg = C.base, bg = C.peach }, + CmpItemKindEvent = { fg = C.base, bg = C.blue }, + CmpItemKindOperator = { fg = C.base, bg = C.blue }, + CmpItemKindTypeParameter = { fg = C.base, bg = C.blue }, + CmpItemKindCopilot = { fg = C.base, bg = C.teal }, + } + end, + }) + vim.cmd('colorscheme catppuccin') + end +} diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 933b9bf..386f312 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -31,13 +31,6 @@ return { end cmp.setup({ - formatting = { - format = require('lspkind').cmp_format({ - mode = 'symbol_text', -- show only symbol annotations - maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) - ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) - }) - }, mapping = { [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), @@ -94,7 +87,7 @@ return { { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, - { name = 'treesitter', priority = 6 }, + -- { name = 'treesitter', priority = 6 }, { name = 'buffer', priority = 5, @@ -122,10 +115,33 @@ return { or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' end, - completion = { completeopt = 'menu,menuone,noinsert, noselect' }, + -- completion = { + -- completeopt = 'menu,menuone,noinsert, noselect', + -- border = 'rounded', + -- }, window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), + completion = cmp.config.window.bordered({ + col_offset = -3, + side_padding = 0, + winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None', + }), + documentation = cmp.config.window.bordered({ + winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None', + }), + }, + formatting = { + fields = { 'kind', 'abbr', 'menu' }, + format = function(entry, vim_item) + local kind = require('lspkind').cmp_format({ + mode = 'symbol_text', + maxwidth = 50, + })(entry, vim_item) + local strings = vim.split(kind.kind, '%s', { trimempty = true }) + kind.kind = ' ' .. strings[1] .. ' ' + -- kind.menu = ' (' .. strings[2] .. ')' + + return kind + end, }, sorting = { comparators = { diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 227429c..4d6cc64 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -15,7 +15,7 @@ return { require('lualine').setup { options = { -- theme = custom_gruvbox, - theme = 'gruvbox_dark', + theme = 'catppuccin', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, -- 2.49.1 From 29df2f32b2c737bde62feb8d1afc7e2acc5e81d9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 May 2023 00:06:28 +0200 Subject: [PATCH 422/894] dim inactive --- lua/plugins/catppuccin.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index 0c6a103..35cf36c 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -6,6 +6,11 @@ return require('catppuccin').setup({ flavour = 'macchiato', -- latte, frappe, macchiato, mocha no_italic = true, + dim_inactive = { + enabled = true, + shade = 'dark', + percentage = 0.15, + }, integrations = { cmp = true, gitsigns = true, -- 2.49.1 From 07e8a7b526c0ae6d19157f9cafb6caee27b163f0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 May 2023 00:06:39 +0200 Subject: [PATCH 423/894] fixed treesitter highlights --- lua/plugins/treesitter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 277b65a..26c3295 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -5,7 +5,8 @@ return { require('nvim-treesitter.configs').setup({ ensure_installed = 'all', highlight = { - enable = true + enable = true, + additional_vim_regex_highlighting = false }, rainbow = { enable = true, -- 2.49.1 From 6b50294119a629e030c9aed547301f796ad9e849 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 May 2023 00:06:44 +0200 Subject: [PATCH 424/894] format --- lua/plugins/catppuccin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index 35cf36c..a111bf2 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -60,7 +60,7 @@ return ['@lsp.mod.readonly'] = { style = { 'bold' } }, ['@type.qualifier'] = { fg = macchiato.sky }, ['@namespace'] = { fg = macchiato.red }, - Macro = { fg = macchiato.rosewater} + Macro = { fg = macchiato.rosewater } } end, }, -- 2.49.1 From 83f61683bfcb90033bf29542efb579502771e5b7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 May 2023 12:10:49 +0200 Subject: [PATCH 425/894] force treesitter to use clang --- lua/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 26c3295..06e5765 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -2,6 +2,7 @@ return { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', config = function() + require('nvim-treesitter.install').compilers = {'clang'} require('nvim-treesitter.configs').setup({ ensure_installed = 'all', highlight = { -- 2.49.1 From 87f96d8209c368ffd1103c73ada34bf19d7c5f61 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 May 2023 11:30:32 +0200 Subject: [PATCH 426/894] revert back to old diagnostic float window --- lua/plugins/lsp_lines.lua | 14 -------------- lua/plugins/lspconfig.lua | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 lua/plugins/lsp_lines.lua diff --git a/lua/plugins/lsp_lines.lua b/lua/plugins/lsp_lines.lua deleted file mode 100644 index be55b1d..0000000 --- a/lua/plugins/lsp_lines.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - 'https://git.sr.ht/~whynothugo/lsp_lines.nvim', - config = true, - keys = { - { - 'l', - function() - require('lsp_lines').toggle() - end, - desc = 'Toggle lsp_lines', - } - }, - event = 'LspAttach' -} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index b8ecffe..6e7614e 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -123,6 +123,7 @@ return { vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) + vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then -- 2.49.1 From bb792a23c820ccfcb852d60145d291ab30947e5b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 May 2023 23:17:49 +0200 Subject: [PATCH 427/894] update ts rainbow to fork --- lua/plugins/nvim-ts-rainbow.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/nvim-ts-rainbow.lua b/lua/plugins/nvim-ts-rainbow.lua index 2c27644..511a18b 100644 --- a/lua/plugins/nvim-ts-rainbow.lua +++ b/lua/plugins/nvim-ts-rainbow.lua @@ -1,5 +1,5 @@ return { - 'p00f/nvim-ts-rainbow', + 'HiPhish/nvim-ts-rainbow2', dependencies = 'nvim-treesitter/nvim-treesitter', event = 'VeryLazy' } -- 2.49.1 From a10d5bccf4e55de6fbb803c37ce289d92b29dc60 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 May 2023 23:26:06 +0200 Subject: [PATCH 428/894] use astratheme --- lua/plugins/astrodark.lua | 32 ++++++++++++++++++++++++++++++++ lua/plugins/catppuccin.lua | 3 ++- lua/plugins/lualine.lua | 37 +++++-------------------------------- lua/plugins/monokai-pro.lua | 3 ++- 4 files changed, 41 insertions(+), 34 deletions(-) create mode 100644 lua/plugins/astrodark.lua diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua new file mode 100644 index 0000000..33b29d7 --- /dev/null +++ b/lua/plugins/astrodark.lua @@ -0,0 +1,32 @@ +return { + 'AstroNvim/astrotheme', + lazy = false, + priority = 1000, + config = function() + require('astrotheme').setup({ + palette = 'astrodark', -- String of the default palette to use when calling `:colorscheme astrotheme` + + termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. + + terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. + + plugin_default = 'auto', -- Sets how all plugins will be loaded + -- "auto": Uses lazy / packer enabled plugins to load highlights. + -- true: Enables all plugins highlights. + -- false: Disables all plugins. + + plugins = { -- Allows for individual plugin overides using plugin name and value from above. + -- ['lualine'] = true, + }, + + palettes = { + global = { + }, + astrodark = { + }, + }, + }) + vim.cmd('colorscheme astrodark') + end, + enabled = true +} diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index a111bf2..2e74a04 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -96,5 +96,6 @@ return end, }) vim.cmd('colorscheme catppuccin') - end + end, + enabled = false } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 4d6cc64..3fd7f97 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,20 +2,9 @@ return { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() - local custom_gruvbox = require 'lualine.themes.gruvbox_dark' - - -- Change the background of lualine_c section for normal mode - custom_gruvbox.normal.a.bg = '#282828' - custom_gruvbox.normal.b.bg = '#282828' - custom_gruvbox.normal.c.bg = '#282828' - -- custom_gruvbox.normal.a.fg = '#282828' - -- custom_gruvbox.normal.b.fg = '#282828' - -- custom_gruvbox.normal.c.fg = '#282828' - require('lualine').setup { options = { - -- theme = custom_gruvbox, - theme = 'catppuccin', + theme = 'material', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, @@ -59,21 +48,14 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - -- color = { fg = '#ffaa88', gui = 'bold' } - color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' } } }, lualine_b = { { 'filesize', - color = { bg = '#282828' } - } + }, }, lualine_c = { - { - 'aerial', - color = { fg = '#ebdbb2', bg = '#282828', gui = 'bold' } - } }, lualine_x = {}, lualine_y = {}, @@ -87,18 +69,14 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' } - -- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' } - -- color = { fg = '#ff1111'} } }, lualine_b = { { 'filesize', - color = { bg = '#282828' } - } + }, }, - lualine_c = { 'aerial' }, + lualine_c = {}, lualine_x = {}, lualine_y = {}, lualine_z = {} @@ -110,11 +88,6 @@ return { { 'tabs', mode = 2, - tabs_color = { - -- Same values as the general color option can be used here. - active = 'lualine_a_normal', -- Color for active tab. - inactive = 'lualine_a_inactive', -- Color for inactive tab. - }, } }, lualine_x = {}, @@ -122,5 +95,5 @@ return { lualine_z = {} }, } - end + end, } diff --git a/lua/plugins/monokai-pro.lua b/lua/plugins/monokai-pro.lua index 623dc90..eb32cf4 100644 --- a/lua/plugins/monokai-pro.lua +++ b/lua/plugins/monokai-pro.lua @@ -58,5 +58,6 @@ return { end, }) vim.cmd('colorscheme monokai-pro') - end + end, + enabled = false } -- 2.49.1 From 832a09e031e8fc8256f8a6fa6d40802debef2199 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 May 2023 23:26:17 +0200 Subject: [PATCH 429/894] set background to dark --- lua/config/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/config/options.lua b/lua/config/options.lua index f85c89d..6799106 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -62,6 +62,7 @@ opt.smartindent = true opt.title = true opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%) Neovim' opt.laststatus = 3 -- for lualine +opt.background = 'dark' -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line -- 2.49.1 From d34858bbc31b3d73f85ed7097ca1f1962b08c9d8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 31 May 2023 00:11:33 +0200 Subject: [PATCH 430/894] tune colors for cpp in astrodark --- lua/plugins/astrodark.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 33b29d7..f36fb36 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -3,6 +3,7 @@ return { lazy = false, priority = 1000, config = function() + local C = require('astrotheme.palettes.astrodark') require('astrotheme').setup({ palette = 'astrodark', -- String of the default palette to use when calling `:colorscheme astrotheme` @@ -25,6 +26,25 @@ return { astrodark = { }, }, + highlights = { + global = { + modify_hl_groups = function(hl, c) + end, + }, + astrodark = { + modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, + hl.Type = { fg = c.Yellow } + hl.Comment = { italic = true } + end, + ['@lsp.mod.readonly'] = { bold = true }, + ['@lsp.type.namespace.cpp'] = { fg = C.rb }, + ['@lsp.type.variable'] = { fg = C.text }, + ['Comment'] = { italic = true }, + ['Type'] = { fg = C.dark_orange }, + ['Structure'] = { link = 'Type' }, + ['Constant'] = { fg = 'NONE' }, + } + } }) vim.cmd('colorscheme astrodark') end, -- 2.49.1 From 3c7148431f5c7adf4e1b35a2f3ae140d3a03f2ab Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 31 May 2023 11:21:55 +0200 Subject: [PATCH 431/894] more color tuning --- lua/plugins/astrodark.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index f36fb36..22c908c 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -39,10 +39,12 @@ return { ['@lsp.mod.readonly'] = { bold = true }, ['@lsp.type.namespace.cpp'] = { fg = C.rb }, ['@lsp.type.variable'] = { fg = C.text }, + ['@lsp.type.enumMember'] = { fg = C.cyan }, ['Comment'] = { italic = true }, ['Type'] = { fg = C.dark_orange }, ['Structure'] = { link = 'Type' }, ['Constant'] = { fg = 'NONE' }, + ['@parameter'] = { fg = C.purple }, } } }) -- 2.49.1 From 7f6817c852930f6e23eecf1ce92d1ab6a17284c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Jun 2023 00:59:08 +0200 Subject: [PATCH 432/894] try to fix neodev --- lua/config/lazy.lua | 14 +++++++------- lua/plugins/lspconfig.lua | 23 ++++++----------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 0d36981..cee64af 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,14 +1,14 @@ -local lazypath = vim.fn.stdpath('data') .. '/lazy/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', + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release lazypath, }) end -vim.opt.runtimepath:prepend(lazypath) +vim.opt.rtp:prepend(lazypath) require('lazy').setup('plugins', {}) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6e7614e..862bd27 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -8,10 +8,11 @@ return { 'ray-x/lsp_signature.nvim', { 'folke/neodev.nvim', - config = true, }, }, config = function() + require('neodev').setup({ + }) require('mason').setup({ ui = { border = 'rounded' @@ -20,7 +21,7 @@ return { require('mason-lspconfig').setup({ automatic_installation = false, }) - local lspconfig = require 'lspconfig' + local lspconfig = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() @@ -245,29 +246,17 @@ return { on_attach = on_attach, } - local lua_rtp = vim.split(package.path, ';') - table.insert(lua_rtp, 'lua/?.lua') - table.insert(lua_rtp, 'lua/?/init.lua') lspconfig.lua_ls.setup { capabilities = capabilities, on_attach = on_attach, settings = { Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - }, workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), checkThirdParty = false, }, + completion = { + callSnippet = 'Replace' + }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { enable = false, -- 2.49.1 From a3925adf46a03049428960e3fe6000747cb89d1d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Jun 2023 00:59:15 +0200 Subject: [PATCH 433/894] removed old packer files --- snapshots/stable.json | 1 - snapshots/working.json | 1 - 2 files changed, 2 deletions(-) delete mode 100644 snapshots/stable.json delete mode 100644 snapshots/working.json diff --git a/snapshots/stable.json b/snapshots/stable.json deleted file mode 100644 index 401f23c..0000000 --- a/snapshots/stable.json +++ /dev/null @@ -1 +0,0 @@ -{"litee.nvim": {"commit": "de1a3d6"}, "nvim-dap": {"commit": "f4a3be5"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "d268d2e"}, "tabout.nvim": {"commit": "be655cc"}, "nvim-lspconfig": {"commit": "b9c375c"}, "command-center.nvim": {"commit": "baaf831"}, "nvim-cmp": {"commit": "9897465"}, "clangd_extensions.nvim": {"commit": "81b56d4"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "a2b7bf8"}, "lualine.nvim": {"commit": "5113cdb"}, "cmp-cmdline": {"commit": "c36ca4b"}, "nvim-treesitter-textobjects": {"commit": "c8a393e"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "15ecafe"}, "gitsigns.nvim": {"commit": "4883988"}, "dressing.nvim": {"commit": "af17983"}, "indent-blankline.nvim": {"commit": "4a58fe6"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "8613c45"}, "cmp-nvim-lsp-signature-help": {"commit": "007dd27"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "6ea1063"}, "litee-calltree.nvim": {"commit": "71f7eee"}, "lsp_signature.nvim": {"commit": "9c51678"}, "Comment.nvim": {"commit": "4086630"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "521b94d"}, "gruvbox.nvim": {"commit": "79419f9"}, "gh.nvim": {"commit": "cdf177c"}, "aerial.nvim": {"commit": "bd6de88"}, "neovim-cmake": {"commit": "d0ffe31"}, "nvim-autopairs": {"commit": "4a95b39"}, "LuaSnip": {"commit": "295cc9e"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "8f13d50"}, "nvim-web-devicons": {"commit": "8d2c533"}, "nvim-treesitter": {"commit": "cf6d84b"}, "nui.nvim": {"commit": "4af402d"}, "nvim-terminal": {"commit": "e058de4"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "nvim-lsp-installer": {"commit": "12e7c06"}, "cmp-calc": {"commit": "f7efc20"}, "toggleterm.nvim": {"commit": "04174e1"}, "plenary.nvim": {"commit": "46e8bb9"}, "project.nvim": {"commit": "541115e"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "981baf9"}, "cmp-buffer": {"commit": "62fc67a"}} diff --git a/snapshots/working.json b/snapshots/working.json deleted file mode 100644 index a20323d..0000000 --- a/snapshots/working.json +++ /dev/null @@ -1 +0,0 @@ -{"litee.nvim": {"commit": "d346001"}, "nvim-dap": {"commit": "66d33b7"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "afab895"}, "nvim-lspconfig": {"commit": "a78831f"}, "command-center.nvim": {"commit": "31468fd"}, "clangd_extensions.nvim": {"commit": "2390bf7"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "null-ls.nvim": {"commit": "53622ed"}, "mason-lspconfig.nvim": {"commit": "3cbd87f"}, "lualine.nvim": {"commit": "4b5048a"}, "cmp-cmdline": {"commit": "9c0e331"}, "hlargs.nvim": {"commit": "f603d88"}, "aerial.nvim": {"commit": "1abd19b"}, "nvim-autopairs": {"commit": "ca89ab9"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "7339def"}, "leap.nvim": {"commit": "b9bc061"}, "gitsigns.nvim": {"commit": "1e107c9"}, "dressing.nvim": {"commit": "d886a1b"}, "indent-blankline.nvim": {"commit": "c15bbe9"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "a922c3a"}, "cmp-nvim-lsp-signature-help": {"commit": "57c4db7"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "4725867"}, "litee-calltree.nvim": {"commit": "7779988"}, "lsp_signature.nvim": {"commit": "4665921"}, "Comment.nvim": {"commit": "fe9bbdb"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "d55f095"}, "mason.nvim": {"commit": "6171213"}, "gh.nvim": {"commit": "a675ce6"}, "nvim-treesitter-textobjects": {"commit": "b8df8b0"}, "neovim-cmake": {"commit": "338fd2a"}, "cmp-nvim-lsp": {"commit": "affe808"}, "LuaSnip": {"commit": "c599c56"}, "nvim-dap-ui": {"commit": "225115a"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "426d4db"}, "nvim-web-devicons": {"commit": "2d02a56"}, "vim-repeat": {"commit": "24afe92"}, "cmp-dap": {"commit": "e21f0e5"}, "nvim-treesitter": {"commit": "501db14"}, "nui.nvim": {"commit": "9531977"}, "nvim-terminal": {"commit": "e058de4"}, "gruvbox-baby": {"commit": "a7dd15a"}, "cmp-emoji": {"commit": "19075c3"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "project.nvim": {"commit": "090bb11"}, "cmp-calc": {"commit": "f7efc20"}, "nvim-dap-python": {"commit": "86d2636"}, "toggleterm.nvim": {"commit": "dfce846"}, "plenary.nvim": {"commit": "31807ee"}, "nvim-cmp": {"commit": "b588569"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "cmp-path": {"commit": "447c87c"}, "nvim-ts-rainbow": {"commit": "d16220f"}, "cmp-nvim-lua": {"commit": "d276254"}, "cmp-buffer": {"commit": "62fc67a"}} -- 2.49.1 From cd49c9dfe389e1907ecb543a89c3153e73c7e8f7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Jun 2023 00:59:21 +0200 Subject: [PATCH 434/894] updated plugins --- lazy-lock.json | 87 ++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 26609e6..f7f6d6d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,11 +1,12 @@ { "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, + "LuaSnip": { "branch": "master", "commit": "51ebb4b6637290e1b8e0fb0d6f38b605d3c24940" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "d8f2699f7ae0e5eb62424d7b2ad80ce30179ee92" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" }, - "cmake-tools.nvim": { "branch": "master", "commit": "b279bfb861666563399de3599c24040b53a42fd2" }, + "aerial.nvim": { "branch": "master", "commit": "01d63e5599811ddf86c8769180c3fbf6dd2ef224" }, + "astrotheme": { "branch": "main", "commit": "18f791b48189d59cc0018f92c15f086985336fba" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "6d0bf36870d15c0c2284f4b6693a66552a6bf127" }, + "cmake-tools.nvim": { "branch": "master", "commit": "acabfa0f222f32ee7208875e58ed5185ea445905" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, @@ -20,54 +21,56 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "1d6ea6ced1c3ec0f6464761a138bb35afd79ef63" }, - "dressing.nvim": { "branch": "master", "commit": "66e4990240f92e31b0d5e4df6deb6bb0160ae832" }, - "friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" }, - "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, + "diffview.nvim": { "branch": "main", "commit": "bff58a6ea3e081ca50049700f9848b2f84ea57be" }, + "dressing.nvim": { "branch": "master", "commit": "f19cbd56f7f8cad212c58a7285d09c5d9c273896" }, + "friendly-snippets": { "branch": "main", "commit": "7006e69b60a559837ff6cdb7fe610af4f6ca823c" }, + "gitsigns.nvim": { "branch": "main", "commit": "f868d82a36f7f7f5e110eb0a9659993984f59875" }, "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, - "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, - "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, - "leap.nvim": { "branch": "main", "commit": "6f2912755c9c4ae790abd829f0cf1b07c037b2a4" }, - "lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" }, - "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, + "lazy.nvim": { "branch": "main", "commit": "ebdd0499551765e6a7aba220cc8ae4e0cdb6be69" }, + "lazygit.nvim": { "branch": "main", "commit": "883c25d13eafd8b89b3cc116c712b19c9d2a755e" }, + "leap.nvim": { "branch": "main", "commit": "be918a8e6aa00a6cfa7270d4bfcc11b2f80d6902" }, + "lsp_signature.nvim": { "branch": "master", "commit": "c6826d2c3f4bc4a37b41b6a140061ccb0e9cdc4a" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, - "mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "e5594d53986b34e584e8afe2ea6ad99d6f6d2105" }, - "neodev.nvim": { "branch": "main", "commit": "5e7e613950df5e2be27534ab5c55fd21af1b2ad3" }, - "neogen": { "branch": "main", "commit": "c0fd3dc9e7cc91181ea5a345c4b01c865626c81e" }, - "neotest": { "branch": "master", "commit": "42cf226457c61abe6fca081e959d69e2325cf08f" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f0ce33f4794a2364eb08d09d09380e8b04ec5e6a" }, + "mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8c89efb93b8383666a6f989762c2f610f5f2c930" }, + "neodev.nvim": { "branch": "main", "commit": "358f11c585fdccfcb5e8eae720c423fbed6d92de" }, + "neogen": { "branch": "main", "commit": "72238bfb7099ed346e3742e815f13c3fe35f51ab" }, + "neotest": { "branch": "master", "commit": "10e6763d0794c70917faf45e8d869a1306d5182e" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" }, - "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, - "nvim-autopairs": { "branch": "master", "commit": "7747bbae60074acf0b9e3a4c13950be7a2dff444" }, - "nvim-cmp": { "branch": "main", "commit": "d153771162bd9795d9f7142df5c674b61066a585" }, + "nui.nvim": { "branch": "main", "commit": "2b2732528e4a79eb8542568bd51d25f710395bd6" }, + "null-ls.nvim": { "branch": "main", "commit": "c89333e034a8daba654ebfcf9a4ec9f87765f01e" }, + "nvim-autopairs": { "branch": "master", "commit": "59df87a84c80a357ca8d8fe86e451b93ac476ccc" }, + "nvim-cmp": { "branch": "main", "commit": "fc0f694af1a742ada77e5b1c91ff405c746f4a26" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-python": { "branch": "master", "commit": "51ecb08dbff57fca8add396b93dc765aba262e0a" }, - "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" }, - "nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "8094648c54ff3b233ccfe5928f77b6824f77339c" }, + "nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" }, + "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, + "nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, + "nvim-lspconfig": { "branch": "master", "commit": "9166622781a39a829878d1fd24c174529d996838" }, + "nvim-navbuddy": { "branch": "master", "commit": "0db1d62761131ca4d0665423b3f7903532763a77" }, + "nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-rooter.lua": { "branch": "main", "commit": "99832f243426a28c1cc0b83ee4cdf915bf0b2c2b" }, - "nvim-surround": { "branch": "main", "commit": "e6047128e57c1aff1566fb9f627521d2887fc77a" }, - "nvim-treesitter": { "branch": "master", "commit": "f2778bd1a28b74adf5b1aa51aa57da85adfa3d16" }, - "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-web-devicons": { "branch": "master", "commit": "e283ab937e0197b37ec5d8013e49495193407324" }, - "octo.nvim": { "branch": "master", "commit": "1c9a79412a1d92dd3c5a601e2261c158ebb4d4bd" }, - "oil.nvim": { "branch": "master", "commit": "d27bfa1f370e8caddf65890364989b76f9794afb" }, - "overseer.nvim": { "branch": "master", "commit": "9e7cc435c1c85d37aa5471d7429501690f4d64d6" }, - "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" }, + "nvim-treesitter": { "branch": "master", "commit": "62146fe415193879290c523b54cb5072e1f5dbbc" }, + "nvim-ts-rainbow2": { "branch": "master", "commit": "5becf2cec4b8e06b6df745cf515ac35c6c2e6308" }, + "nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" }, + "octo.nvim": { "branch": "master", "commit": "95a7f271eff4397e593c90246891c18058bdffc2" }, + "oil.nvim": { "branch": "master", "commit": "64d2f305d30cec13938aa99f8f13bd84c502e020" }, + "overseer.nvim": { "branch": "master", "commit": "d286e681c4efa7477fccb113e23ef645fcb43cac" }, + "plenary.nvim": { "branch": "master", "commit": "499e0743cf5e8075cd32af68baa3946a1c76adf1" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "ebf93395e79e5d026e3867d9e5e158b2bbe1499c" }, - "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "telescope.nvim": { "branch": "master", "commit": "6d3fbffe426794296a77bb0b37b6ae0f4f14f807" }, + "toggleterm.nvim": { "branch": "main", "commit": "cf146a267a6a7db62b1e2aff40414b20081048a1" }, + "venv-selector.nvim": { "branch": "main", "commit": "6f1865aba002ff8aa0d552491a4f24a3d191c830" }, "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" } + "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" } } \ No newline at end of file -- 2.49.1 From 0f3ae6589209eee509dbfe18ca48068575cb0344 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Jun 2023 00:59:56 +0200 Subject: [PATCH 435/894] fixed fzf build --- lua/plugins/telescope.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 3ba505f..347f99b 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -6,11 +6,8 @@ return { 'molecule-man/telescope-menufacture', { 'nvim-telescope/telescope-fzf-native.nvim', - build = { - 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32" - 'cmake --build build --config Release', - 'cmake --install build --prefix build' - }, + build = + 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build', }, 'nvim-telescope/telescope-ui-select.nvim', 'ahmedkhalf/project.nvim', -- 2.49.1 From 4978435b1f68e793433fff5ba84fea0d62af4513 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Jun 2023 19:59:02 +0200 Subject: [PATCH 436/894] split the lsp config --- lua/plugins/lspconfig.lua | 205 +++++++++++++++++++------------------- 1 file changed, 104 insertions(+), 101 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 862bd27..5d0f785 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,3 +1,107 @@ +on_attach = function(client, bufnr) + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + + -- Mappings. + local tele_builtins = require('telescope.builtin') + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, + { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, + { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, + { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) + vim.keymap.set('x', 'a', vim.lsp.buf.range_code_action, + { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) + vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, + { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, + { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, + { noremap = true, silent = false, desc = 'Hover', buffer = bufnr }) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + { noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr }) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + { noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr }) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, + { noremap = true, silent = false, desc = 'Rename', buffer = bufnr }) + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, + { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + { noremap = true, silent = false, desc = 'Type definition', buffer = bufnr }) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, + { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, + { noremap = true, silent = false, desc = 'References', buffer = bufnr }) + vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, + { noremap = true, silent = false, desc = 'References', buffer = bufnr }) + vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, + { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) + + vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) + + -- Set some keybinds conditional on server capabilities + if client.server_capabilities.documentFormattingProvider then + vim.keymap.set('n', 'f', function() + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, + { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) + end + if client.server_capabilities.documentRangeFormattingProvider then + vim.keymap.set('x', 'f', function() + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, + { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) + end + + -- Set autocommands conditional on server_capabilities + if client.server_capabilities.documentHighlightProvider then + local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { + callback = function() + vim.lsp.buf.document_highlight() + end, + buffer = bufnr, + group = group, + desc = 'Document Highlight', + }) + vim.api.nvim_create_autocmd('CursorMoved', { + callback = function() + vim.lsp.buf.clear_references() + end, + buffer = bufnr, + group = group, + desc = 'Clear All the References', + }) + vim.api.nvim_create_autocmd({ 'LspDetach' }, { + group = group, + buffer = bufnr, + callback = function() + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { + group = group, + buffer = bufnr + } + end, + }) + end + + require('lsp_signature').on_attach({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = 'single', + }, + hi_parameter = 'IncSearch', + }, bufnr) +end + return { 'neovim/nvim-lspconfig', dependencies = { @@ -79,107 +183,6 @@ return { vim.diagnostic.open_float({ focusable = false, width = 80 }) end - local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, - { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, - { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, - { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) - vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, - { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, - { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, - { noremap = true, silent = false, desc = 'Hover', buffer = bufnr }) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - { noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr }) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - { noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr }) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, - { noremap = true, silent = false, desc = 'Rename', buffer = bufnr }) - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, - { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - { noremap = true, silent = false, desc = 'Type definition', buffer = bufnr }) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, - { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, - { noremap = true, silent = false, desc = 'References', buffer = bufnr }) - vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, - { noremap = true, silent = false, desc = 'References', buffer = bufnr }) - vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, - { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, - { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) - - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) - - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, - { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, - { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) - end - - -- Set autocommands conditional on server_capabilities - if client.server_capabilities.documentHighlightProvider then - local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { - callback = function() - vim.lsp.buf.document_highlight() - end, - buffer = bufnr, - group = group, - desc = 'Document Highlight', - }) - vim.api.nvim_create_autocmd('CursorMoved', { - callback = function() - vim.lsp.buf.clear_references() - end, - buffer = bufnr, - group = group, - desc = 'Clear All the References', - }) - vim.api.nvim_create_autocmd({ 'LspDetach' }, { - group = group, - buffer = bufnr, - callback = function() - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { - group = group, - buffer = bufnr - } - end, - }) - end - - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) - end lspconfig['pyright'].setup { capabilities = capabilities, -- 2.49.1 From 086ba55c4a848aeeb09a0d099fe4d85fde1762d5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Jun 2023 21:07:24 +0200 Subject: [PATCH 437/894] added peek plugin --- lua/plugins/peek.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/plugins/peek.lua diff --git a/lua/plugins/peek.lua b/lua/plugins/peek.lua new file mode 100644 index 0000000..ccaab63 --- /dev/null +++ b/lua/plugins/peek.lua @@ -0,0 +1,9 @@ +return { + 'toppair/peek.nvim', + -- build = 'deno task --quiet build:fast', + config = function() + vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {}) + vim.api.nvim_create_user_command('PeekClose', require('peek').close, {}) + end, + cmd = { 'PeekOpen', 'PeekOpen' } +} -- 2.49.1 From cdb768ec2541590f2cbbcf0653483c7ab6e42027 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Jun 2023 21:08:26 +0200 Subject: [PATCH 438/894] visual action keymap --- lua/plugins/lspconfig.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 5d0f785..520d0f5 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -12,9 +12,7 @@ on_attach = function(client, bufnr) { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) vim.keymap.set('n', ';', vim.diagnostic.goto_next, { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, - { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) - vim.keymap.set('x', 'a', vim.lsp.buf.range_code_action, + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) -- 2.49.1 From 1a3a965f4141731632d7be233d872161b0caf4ef Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 2 Jun 2023 21:08:58 +0200 Subject: [PATCH 439/894] added zk and markdown --- after/syntax/markdown.vim | 6 ++++++ ftplugin/markdown.lua | 28 ++++++++++++++++++++++++++++ lua/plugins/treesitter.lua | 2 +- lua/plugins/zk.lua | 11 +++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 after/syntax/markdown.vim create mode 100644 ftplugin/markdown.lua create mode 100644 lua/plugins/zk.lua diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim new file mode 100644 index 0000000..7cf39cf --- /dev/null +++ b/after/syntax/markdown.vim @@ -0,0 +1,6 @@ +" markdownWikiLink is a new region +syn region markdownWikiLink matchgroup=markdownLinkDelimiter start="\[\[" end="\]\]" contains=markdownUrl keepend oneline concealends +" markdownLinkText is copied from runtime files with 'concealends' appended +syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends +" markdownLink is copied from runtime files with 'conceal' appended +syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua new file mode 100644 index 0000000..d827759 --- /dev/null +++ b/ftplugin/markdown.lua @@ -0,0 +1,28 @@ +-- Add the key mappings only for Markdown files in a zk notebook. +if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then + local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end + local opts = { noremap = true, silent = false } + + -- Create a new note after asking for its title. + -- This overrides the global `zn` mapping to create the note in the same directory as the current buffer. + vim.keymap.set('n', 'zn', "ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", + { noremap = true, silent = false, desc = 'Create a new note' }) + -- Create a new note in the same directory as the current buffer, using the current selection for title. + vim.keymap.set('v', 'znt', ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }", + { noremap = true, silent = false, desc = 'Create a new note' }) + -- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title. + map('v', 'znc', + ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", opts) + + -- Open notes linking to the current buffer. + map('n', 'zb', 'ZkBacklinks', opts) + -- Alternative for backlinks using pure LSP and showing the source context. + --map('n', 'zb', 'lua vim.lsp.buf.references()', opts) + -- Open notes linked by the current buffer. + map('n', 'zl', 'ZkLinks', opts) + + -- Preview a linked note. + map('n', 'K', 'lua vim.lsp.buf.hover()', opts) + -- Open the code actions for a visual selection. + map('v', 'za', ":'<,'>lua vim.lsp.buf.range_code_action()", opts) +end diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 06e5765..2169831 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -7,7 +7,7 @@ return { ensure_installed = 'all', highlight = { enable = true, - additional_vim_regex_highlighting = false + additional_vim_regex_highlighting = {'markdown'} }, rainbow = { enable = true, diff --git a/lua/plugins/zk.lua b/lua/plugins/zk.lua new file mode 100644 index 0000000..dc225f1 --- /dev/null +++ b/lua/plugins/zk.lua @@ -0,0 +1,11 @@ +return { + 'mickael-menu/zk-nvim', + config = function() + require('zk').setup({ + picker = 'telescope', + config = { + on_attach = require('plugins.lspconfig').on_attach + } + }) + end +} -- 2.49.1 From 3be2ddf908b2ee6e539c04d101dd8fe18bba6193 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 3 Jun 2023 12:23:24 +0200 Subject: [PATCH 440/894] do a mason update for build --- lua/plugins/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 520d0f5..9062937 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -112,6 +112,7 @@ return { 'folke/neodev.nvim', }, }, + build = ':MasonUpdate', config = function() require('neodev').setup({ }) -- 2.49.1 From d362ccd264911395d55f2913248e88db2a27a966 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 3 Jun 2023 12:40:22 +0200 Subject: [PATCH 441/894] auto install some lsp servers --- lua/plugins/lspconfig.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 9062937..9557bb1 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -123,6 +123,16 @@ return { }) require('mason-lspconfig').setup({ automatic_installation = false, + ensure_installed = { + 'clangd', + 'denols', + 'neocmake', + 'pyright', + 'zk', + 'lua_ls', + 'jsonls', + 'groovyls', + } }) local lspconfig = require('lspconfig') -- 2.49.1 From 242ae277fd85237debde808b6a72186b17780b4f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 Jun 2023 21:29:17 +0200 Subject: [PATCH 442/894] added rust lsp --- lua/plugins/lspconfig.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 9557bb1..cc42663 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -258,6 +258,11 @@ return { on_attach = on_attach, } + lspconfig['rust_analyzer'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + lspconfig.lua_ls.setup { capabilities = capabilities, on_attach = on_attach, -- 2.49.1 From e72c2f9c6b8a9bd4699e1e5258436236fed11ad8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 Jun 2023 21:29:34 +0200 Subject: [PATCH 443/894] don't show ignore files by default in telescope --- lua/plugins/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 347f99b..56314d6 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -17,7 +17,7 @@ return { { 'f', function() - require('telescope').extensions.menufacture.find_files({ no_ignore = true, hidden = true }) + require('telescope').extensions.menufacture.find_files({ no_ignore = false, hidden = true }) end, desc = 'Find file', }, -- 2.49.1 From cc6dd288864ce5082d837d39b53875eb4f2e1d3f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 Jun 2023 21:44:27 +0200 Subject: [PATCH 444/894] lighter float window background --- lua/plugins/astrodark.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 22c908c..4b216dc 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -45,6 +45,7 @@ return { ['Structure'] = { link = 'Type' }, ['Constant'] = { fg = 'NONE' }, ['@parameter'] = { fg = C.purple }, + ['NormalFloat'] = { bg = C.surface0 }, } } }) -- 2.49.1 From 1c359f02fed48b24a11cbe583fb25c2fffcf21a6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 Jun 2023 22:36:47 +0200 Subject: [PATCH 445/894] some telescope color config --- lua/plugins/astrodark.lua | 8 ++++++++ lua/plugins/telescope.lua | 3 +++ 2 files changed, 11 insertions(+) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 4b216dc..e387953 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -46,6 +46,14 @@ return { ['Constant'] = { fg = 'NONE' }, ['@parameter'] = { fg = C.purple }, ['NormalFloat'] = { bg = C.surface0 }, + ['TelescopeBorder'] = { bg = C.surface0 }, + ['TelescopeNormal'] = { bg = C.surface0 }, + ['TelescopePreviewBorder'] = { link = 'TelescopeBorder' }, + ['TelescopeResultsBorder'] = { link = 'TelescopeResultsNormal' }, + ['TelescopePreviewNormal'] = { bg = C.surface0 }, + ['TelescopeTitle'] = { bg = C.surface0 }, + ['TelescopePromptNormal'] = { bg = C.surface0 }, + ['TelescopePromptBorder'] = { link = 'TelescopeBorder'}, } } }) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 56314d6..70ff28e 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -122,6 +122,9 @@ return { [''] = actions.smart_send_to_qflist, }, }, + results_title = false, + preview_title = false, + borderchars = { '', '', '', '', '', '', '', '' }, -- `hidden = true` is not supported in text grep commands. vimgrep_arguments = vimgrep_arguments, }, -- 2.49.1 From 088286f87b9a671bd14ed60c5ac3f2d34f7da08a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 12:02:12 +0200 Subject: [PATCH 446/894] more color tuning --- lua/plugins/astrodark.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index e387953..3fc1290 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -38,7 +38,9 @@ return { end, ['@lsp.mod.readonly'] = { bold = true }, ['@lsp.type.namespace.cpp'] = { fg = C.rb }, - ['@lsp.type.variable'] = { fg = C.text }, + ['@lsp.type.variable'] = { fg = C.mp3 }, + -- ['@lsp.type.variable'] = { link = '@variable' }, + ['@variable'] = { fg = C.green, link = '' }, ['@lsp.type.enumMember'] = { fg = C.cyan }, ['Comment'] = { italic = true }, ['Type'] = { fg = C.dark_orange }, @@ -53,7 +55,7 @@ return { ['TelescopePreviewNormal'] = { bg = C.surface0 }, ['TelescopeTitle'] = { bg = C.surface0 }, ['TelescopePromptNormal'] = { bg = C.surface0 }, - ['TelescopePromptBorder'] = { link = 'TelescopeBorder'}, + ['TelescopePromptBorder'] = { link = 'TelescopeBorder' }, } } }) -- 2.49.1 From f303013a15c3a0501bd43bd3466b4d79f5a7f22f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 12:02:26 +0200 Subject: [PATCH 447/894] adjusted lazy options --- lua/config/lazy.lua | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index cee64af..06ad74e 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,14 +1,25 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/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", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release lazypath, }) end vim.opt.rtp:prepend(lazypath) -require('lazy').setup('plugins', {}) +require('lazy').setup({ + spec = { + import = 'plugins' + }, + checker = { + -- automatically check for plugin updates + enabled = false, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = false, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + }, +}) -- 2.49.1 From 91e8fc21f2c5995a2a5e59f40d69d0bb7c588a69 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 12:02:35 +0200 Subject: [PATCH 448/894] disable zk installation --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index cc42663..d11b83c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -128,7 +128,7 @@ return { 'denols', 'neocmake', 'pyright', - 'zk', + -- 'zk', -- No support for windows 'lua_ls', 'jsonls', 'groovyls', -- 2.49.1 From d7f21fb86fbcf39cf1a4380c9d9cf7a57a643f94 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 12:23:53 +0200 Subject: [PATCH 449/894] disable message when change detected in lazy --- lua/config/lazy.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 06ad74e..7f48356 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -15,11 +15,9 @@ require('lazy').setup({ spec = { import = 'plugins' }, - checker = { - -- automatically check for plugin updates - enabled = false, - concurrency = nil, ---@type number? set to 1 to check for updates very slowly - notify = false, -- get a notification when new updates are found - frequency = 3600, -- check for updates every hour + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = false, -- get a notification when changes are found }, }) -- 2.49.1 From 6d26280753d73feb7609a884d7ff9b15bc6e32f2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 12:36:57 +0200 Subject: [PATCH 450/894] more color adjustments --- lua/plugins/astrodark.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 3fc1290..1f1c0e9 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -38,7 +38,7 @@ return { end, ['@lsp.mod.readonly'] = { bold = true }, ['@lsp.type.namespace.cpp'] = { fg = C.rb }, - ['@lsp.type.variable'] = { fg = C.mp3 }, + ['@lsp.type.variable'] = { fg = C.light_purple }, -- ['@lsp.type.variable'] = { link = '@variable' }, ['@variable'] = { fg = C.green, link = '' }, ['@lsp.type.enumMember'] = { fg = C.cyan }, -- 2.49.1 From 493b712291f9bf25ce4e225b38c71e31fa12ae1f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 13:41:29 +0200 Subject: [PATCH 451/894] more colors --- lua/plugins/astrodark.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 1f1c0e9..80783b3 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -40,13 +40,14 @@ return { ['@lsp.type.namespace.cpp'] = { fg = C.rb }, ['@lsp.type.variable'] = { fg = C.light_purple }, -- ['@lsp.type.variable'] = { link = '@variable' }, - ['@variable'] = { fg = C.green, link = '' }, + ['@variable'] = { fg = C.light_purple, link = '' }, + -- ['Function'] = { fg = C.light_cyan }, ['@lsp.type.enumMember'] = { fg = C.cyan }, ['Comment'] = { italic = true }, ['Type'] = { fg = C.dark_orange }, ['Structure'] = { link = 'Type' }, ['Constant'] = { fg = 'NONE' }, - ['@parameter'] = { fg = C.purple }, + ['@parameter'] = { fg = C.toml }, ['NormalFloat'] = { bg = C.surface0 }, ['TelescopeBorder'] = { bg = C.surface0 }, ['TelescopeNormal'] = { bg = C.surface0 }, -- 2.49.1 From c5f3e71fc3c0cab62ad7baae0644f925ec39bfc6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Jun 2023 13:41:39 +0200 Subject: [PATCH 452/894] disable debug in neotest --- lua/plugins/neotest.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index 6bc202c..d74f687 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -14,7 +14,6 @@ return { dap = { justMyCode = false }, - args = { '--log-level', 'DEBUG' }, runner = 'pytest', python = pythonVenv.getPythonEnv }) -- 2.49.1 From 32be5a0ce6b381160049ed773332667e98d17067 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 15 Jun 2023 07:33:26 +0200 Subject: [PATCH 453/894] also use hack in WSL --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 6799106..bdbaef0 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -46,7 +46,7 @@ if vim.fn.has('wsl') == 1 then }, cache_enabled = 0, } - opt.guifont = 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf + opt.guifont = 'Hack Nerd Font Mono:h10' elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' -- 2.49.1 From cf54f4bd90e7fe6bbd450b82755a50d3826279b8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 17 Jun 2023 21:07:27 +0200 Subject: [PATCH 454/894] dont preselect in cmp --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 386f312..7b980bf 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -31,6 +31,7 @@ return { end cmp.setup({ + preselect = cmp.PreselectMode.None, mapping = { [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), -- 2.49.1 From 9150964742887b327e436b462ded3def0c210d32 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 17 Jun 2023 22:20:08 +0200 Subject: [PATCH 455/894] fixed cmp tab --- lua/plugins/cmp.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 7b980bf..624f86d 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -51,7 +51,9 @@ return { s = cmp.mapping.confirm({ select = false }), }), [''] = cmp.mapping(function(fallback) - if luasnip.expand_or_jumpable() then + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) else fallback() @@ -61,7 +63,9 @@ return { 's', }), [''] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) else fallback() -- 2.49.1 From eefa3b6087224939c12308183872372d9f226191 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 10:18:08 +0200 Subject: [PATCH 456/894] added c-p and c-n for cmp --- lua/plugins/cmp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 624f86d..5fdc0c2 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -35,6 +35,8 @@ return { mapping = { [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), -- 2.49.1 From 89ba4909917f67ce5044b4fba14df54225ac40bc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 10:18:43 +0200 Subject: [PATCH 457/894] keymaps to change windows and tabs with hjkl --- lua/my_keymappings.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index a343402..035e194 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -3,11 +3,17 @@ local opts = { noremap = true, silent = true } -- Tabs vim.keymap.set('n', '', ':tabnext', opts) vim.keymap.set('n', '', ':tabprevious', opts) +vim.keymap.set('n', '', ':tabnext', opts) +vim.keymap.set('n', '', ':tabprevious', opts) -- Split movement vim.keymap.set('n', '', ':wincmd k', opts) vim.keymap.set('n', '', ':wincmd j', opts) vim.keymap.set('n', '', ':wincmd h', opts) vim.keymap.set('n', '', ':wincmd l', opts) +vim.keymap.set('n', '', ':wincmd k', opts) +vim.keymap.set('n', '', ':wincmd j', opts) +vim.keymap.set('n', '', ':wincmd h', opts) +vim.keymap.set('n', '', ':wincmd l', opts) vim.keymap.set('n', '', ':wa | wshada') -- 2.49.1 From fded32158bdf66d95438757951daf3a4c505595b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 10:19:06 +0200 Subject: [PATCH 458/894] move with hjkl in insert mode --- lua/my_keymappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 035e194..80d72a3 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -26,6 +26,10 @@ vim.keymap.set({ 'n', 'x' }, '', 'gk', opts) vim.keymap.set({ 'n', 'x' }, '', 'gj', opts) vim.keymap.set({ 'n', 'x' }, '', 'g', opts) vim.keymap.set({ 'n', 'x' }, '', 'g', opts) +vim.keymap.set({ 'i' }, '', 'gk', opts) +vim.keymap.set({ 'i' }, '', '', opts) +vim.keymap.set({ 'i' }, '', '', opts) +vim.keymap.set({ 'i' }, '', 'gj', opts) vim.keymap.set('x', '<', '', '>gv') -- 2.49.1 From b6b7b5826e726840bda66cc4eabc442b34231e5f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 10:19:18 +0200 Subject: [PATCH 459/894] disable arrow keys --- lua/my_keymappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 80d72a3..8c139d0 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -30,6 +30,10 @@ vim.keymap.set({ 'i' }, '', 'gk', opts) vim.keymap.set({ 'i' }, '', '', opts) vim.keymap.set({ 'i' }, '', '', opts) vim.keymap.set({ 'i' }, '', 'gj', opts) +vim.keymap.set({'n', 'x', 'i'}, '', '') +vim.keymap.set({'n', 'x', 'i'}, '', '') +vim.keymap.set({'n', 'x', 'i'}, '', '') +vim.keymap.set({'n', 'x', 'i'}, '', '') vim.keymap.set('x', '<', '', '>gv') -- 2.49.1 From 9060e1dbb389a273f98a7ebda166e7fed2d50bbc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 11:33:00 +0200 Subject: [PATCH 460/894] fix format for lua lsp --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index d11b83c..48f4372 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -263,7 +263,7 @@ return { on_attach = on_attach, } - lspconfig.lua_ls.setup { + lspconfig['lua_ls'].setup { capabilities = capabilities, on_attach = on_attach, settings = { -- 2.49.1 From 048aef0a7fa647e8110d23b5bdcd5db20f9bd3db Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Jun 2023 15:51:33 +0200 Subject: [PATCH 461/894] added telescope project --- lua/plugins/telescope-project.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lua/plugins/telescope-project.lua diff --git a/lua/plugins/telescope-project.lua b/lua/plugins/telescope-project.lua new file mode 100644 index 0000000..e86623e --- /dev/null +++ b/lua/plugins/telescope-project.lua @@ -0,0 +1,17 @@ +return { + 'nvim-telescope/telescope-project.nvim', + dependencies = { + 'nvim-telescope/telescope.nvim' + }, + config = function() + require 'telescope'.load_extension('project') + end, + keys = { + { + 'p', + function() + require 'telescope'.extensions.project.project {} + end + } + } +} -- 2.49.1 From 1df0872c448b163b0b962ed14310177bc7be9093 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 21 Jun 2023 11:47:43 +0200 Subject: [PATCH 462/894] enable arrow keys again --- lua/my_keymappings.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 8c139d0..4a395fb 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -30,10 +30,10 @@ vim.keymap.set({ 'i' }, '', 'gk', opts) vim.keymap.set({ 'i' }, '', '', opts) vim.keymap.set({ 'i' }, '', '', opts) vim.keymap.set({ 'i' }, '', 'gj', opts) -vim.keymap.set({'n', 'x', 'i'}, '', '') -vim.keymap.set({'n', 'x', 'i'}, '', '') -vim.keymap.set({'n', 'x', 'i'}, '', '') -vim.keymap.set({'n', 'x', 'i'}, '', '') +-- vim.keymap.set({'n', 'x', 'i'}, '', '') +-- vim.keymap.set({'n', 'x', 'i'}, '', '') +-- vim.keymap.set({'n', 'x', 'i'}, '', '') +-- vim.keymap.set({'n', 'x', 'i'}, '', '') vim.keymap.set('x', '<', '', '>gv') -- 2.49.1 From 341c5f402b590c059a3285449e8e5518254a2b26 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 22 Jun 2023 14:19:09 +0200 Subject: [PATCH 463/894] more keys for diffview --- lua/plugins/diffview.lua | 13 +++++++++++-- lua/plugins/neogit.lua | 13 +++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/neogit.lua diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 82dc2e8..6e52fb4 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -7,10 +7,19 @@ return { cmd = 'DiffviewOpen', keys = { { - 'b', + 'bb', + 'DiffviewOpen', + desc = 'Diffview local', + }, + { + 'bd', 'DiffviewOpen origin/develop...', desc = 'Diffview vs develop', }, - + { + 'bm', + 'DiffviewOpen origin/master...', + desc = 'Diffview vs master', + }, } } diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua new file mode 100644 index 0000000..26ec771 --- /dev/null +++ b/lua/plugins/neogit.lua @@ -0,0 +1,13 @@ +return { + 'TimUntersberger/neogit', + dependencies = 'nvim-lua/plenary.nvim', + keys = { + { + 't', + function() + require('neogit').open() + end + } + }, + cmd = { 'Neogit ' } +} -- 2.49.1 From c966acfbe8e3bc5a66e452fac3809b18f64f3c8d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 22 Jun 2023 14:20:11 +0200 Subject: [PATCH 464/894] added neogit --- lua/plugins/neogit.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 26ec771..f5e5a93 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -1,6 +1,17 @@ return { 'TimUntersberger/neogit', - dependencies = 'nvim-lua/plenary.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'sindrets/diffview.nvim' + }, + config = function() + local neogit = require('neogit') + neogit.setup { + integrations = { + diffview = true + }, + } + end, keys = { { 't', -- 2.49.1 From 36a6d599ebc61d677b762f34fa9a1277ec286865 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 Jun 2023 14:27:20 +0200 Subject: [PATCH 465/894] added flash --- lua/plugins/flash.lua | 23 +++++++++++++++++++++++ lua/plugins/leap.lua | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/flash.lua diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua new file mode 100644 index 0000000..4f4c43c --- /dev/null +++ b/lua/plugins/flash.lua @@ -0,0 +1,23 @@ +return { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + keys = { + { + "s", + mode = { "n", "x", "o" }, + function() + -- default options: exact mode, multi window, all directions, with a backdrop + require("flash").jump() + end, + }, + { + "S", + mode = { "n", "o", "x" }, + function() + require("flash").treesitter() + end, + }, + }, +} diff --git a/lua/plugins/leap.lua b/lua/plugins/leap.lua index 830b40d..93c58d2 100644 --- a/lua/plugins/leap.lua +++ b/lua/plugins/leap.lua @@ -4,5 +4,6 @@ return { config = function() require('leap').set_default_keymaps() end, - event = 'VeryLazy' + event = 'VeryLazy', + enabled = false } -- 2.49.1 From 41bcb301c8d5f41d161f828f731ecd08c1e1df92 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 Jun 2023 14:27:32 +0200 Subject: [PATCH 466/894] disable tab for cmp again --- lua/plugins/cmp.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 5fdc0c2..09496b1 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -53,9 +53,7 @@ return { s = cmp.mapping.confirm({ select = false }), }), [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then + if luasnip.expand_or_jumpable() then vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) else fallback() @@ -65,9 +63,7 @@ return { 's', }), [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then + if luasnip.jumpable(-1) then vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) else fallback() -- 2.49.1 From e488888320f3a132e807994a4dda7f161dedaf52 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Jun 2023 11:13:06 +0200 Subject: [PATCH 467/894] signature help in insert and visual mode --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 48f4372..d7faef5 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -30,7 +30,7 @@ on_attach = function(client, bufnr) { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, { noremap = true, silent = false, desc = 'Type definition', buffer = bufnr }) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) vim.keymap.set('n', 'r', tele_builtins.lsp_references, { noremap = true, silent = false, desc = 'References', buffer = bufnr }) -- 2.49.1 From 872e2b4c809d571780b062d42012d8cb9f7b38f3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Jun 2023 11:13:23 +0200 Subject: [PATCH 468/894] added pretty hover --- lua/plugins/lspconfig.lua | 3 ++- lua/plugins/pretty_hover.lua | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/pretty_hover.lua diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index d7faef5..dfe41bf 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -18,7 +18,7 @@ on_attach = function(client, bufnr) { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, + vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, { noremap = true, silent = false, desc = 'Hover', buffer = bufnr }) vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, { noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr }) @@ -111,6 +111,7 @@ return { { 'folke/neodev.nvim', }, + 'Fildo7525/pretty_hover', }, build = ':MasonUpdate', config = function() diff --git a/lua/plugins/pretty_hover.lua b/lua/plugins/pretty_hover.lua new file mode 100644 index 0000000..a4476f9 --- /dev/null +++ b/lua/plugins/pretty_hover.lua @@ -0,0 +1,5 @@ +return { + 'Fildo7525/pretty_hover', + event = 'LspAttach', + opts = {}, +} -- 2.49.1 From a119d0a39a435cc6c0aa17138b209086efaf1009 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Jun 2023 11:13:32 +0200 Subject: [PATCH 469/894] disable flash in search --- lua/plugins/flash.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 4f4c43c..919c7e0 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -2,7 +2,13 @@ return { "folke/flash.nvim", event = "VeryLazy", ---@type Flash.Config - opts = {}, + opts = { + modes = { + search = { + enabled = false + } + } + }, keys = { { "s", -- 2.49.1 From f15e1d7cf4e410692a703270823c19c8c7db8c77 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Jun 2023 11:38:39 +0200 Subject: [PATCH 470/894] set numbers and wrap in telescope preview window --- lua/plugins/telescope.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 70ff28e..131c652 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -199,5 +199,12 @@ return { require('telescope').load_extension('ui-select') require('telescope').load_extension('fzf') require('telescope').load_extension('menufacture') + vim.api.nvim_create_autocmd('User', { + pattern = 'TelescopePreviewerLoaded', + callback = function() + vim.api.nvim_win_set_option(0, "wrap", true) + vim.api.nvim_win_set_option(0, "number", true) + end, + }) end } -- 2.49.1 From 3bcd87638d6cd6ed4bf4128f24d01d6c2c141b51 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 11:48:17 +0200 Subject: [PATCH 471/894] fixed deprecated warning in treesitter --- lua/plugins/treesitter.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 2169831..295c3c3 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -44,8 +44,7 @@ return { }, }, }) - local parser = require('nvim-treesitter.parsers').filetype_to_parsername - parser.groovy = 'java' -- the someft filetype will use the python parser and queries. + vim.treesitter.language.register('groovy', 'java') require('nvim-treesitter.install').prefer_git = true end } -- 2.49.1 From fe7f9a786007e4fa26cd909174352c6727d1cc99 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 14:00:50 +0200 Subject: [PATCH 472/894] use releases for some plugins --- lua/plugins/comment.lua | 1 + lua/plugins/neotree.lua | 1 + lua/plugins/telescope.lua | 1 + lua/plugins/treesitter.lua | 1 + lua/plugins/which-key.lua | 1 + 5 files changed, 5 insertions(+) diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 97905b1..92acae7 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -1,5 +1,6 @@ return { 'numToStr/Comment.nvim', + version = '*', opts = { mappings = false, }, diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index 98be306..cd08546 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -1,6 +1,7 @@ return { 'nvim-neo-tree/neo-tree.nvim', cmd = 'Neotree', + version = '*', keys = { { '\\', 'Neotree reveal', desc = 'NeoTree' }, }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 131c652..736df9e 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,5 +1,6 @@ return { 'nvim-telescope/telescope.nvim', + version = '*', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 295c3c3..f3ff1f6 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,5 +1,6 @@ return { 'nvim-treesitter/nvim-treesitter', + version = '*', build = ':TSUpdate', config = function() require('nvim-treesitter.install').compilers = {'clang'} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 5b41da1..feba445 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -1,5 +1,6 @@ return { 'folke/which-key.nvim', + version = '*', opts = { plugins = { marks = false, -- 2.49.1 From 3ea31df293245a677c250f5e3235ab8f0d10b2aa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 14:00:56 +0200 Subject: [PATCH 473/894] removed leap --- lua/plugins/leap.lua | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 lua/plugins/leap.lua diff --git a/lua/plugins/leap.lua b/lua/plugins/leap.lua deleted file mode 100644 index 93c58d2..0000000 --- a/lua/plugins/leap.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'ggandor/leap.nvim', - dependencies = { 'tpope/vim-repeat' }, - config = function() - require('leap').set_default_keymaps() - end, - event = 'VeryLazy', - enabled = false -} -- 2.49.1 From de16bd101c67b8c0f61ede97b7c3b41c8d2e86da Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 20:41:54 +0200 Subject: [PATCH 474/894] disable gruxbox --- lua/plugins/gruvbox.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index 96bc6ba..b2ae7e6 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -31,5 +31,5 @@ return { }) -- vim.cmd('colorscheme gruvbox') end, - enabled = true + enabled = false } -- 2.49.1 From c09e59d3e51164ac6e04d2e655a5747898cf269d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 20:42:08 +0200 Subject: [PATCH 475/894] remove project.nvim --- lua/plugins/project.lua | 22 ---------------------- lua/plugins/telescope.lua | 1 - 2 files changed, 23 deletions(-) delete mode 100644 lua/plugins/project.lua diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua deleted file mode 100644 index 5099e09..0000000 --- a/lua/plugins/project.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - 'ahmedkhalf/project.nvim', - config = function() - require('project_nvim').setup( - { - silent_chdir = true, - ignore_lsp = { 'null-ls', 'cmake', 'neocmake' }, - patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt', - 'conaninfo.txt' }, - }) - end, - enabled = false, - keys = { - { - 'p', - function() - require('telescope').extensions.projects.projects() - end, - desc = 'Select project', - }, - } -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 736df9e..257b782 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -11,7 +11,6 @@ return { 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build', }, 'nvim-telescope/telescope-ui-select.nvim', - 'ahmedkhalf/project.nvim', }, cmd = { 'Telescope' }, keys = { -- 2.49.1 From ada6d55021b33e3772c2ad2d18e1669b37c9ceb4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 20:42:28 +0200 Subject: [PATCH 476/894] by default use the releases --- lua/config/lazy.lua | 3 +++ lua/plugins/lspconfig.lua | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 7f48356..a554b06 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -12,6 +12,9 @@ end vim.opt.rtp:prepend(lazypath) require('lazy').setup({ + defaults = { + version = '', + }, spec = { import = 'plugins' }, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index dfe41bf..a6fa0dd 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -114,6 +114,8 @@ return { 'Fildo7525/pretty_hover', }, build = ':MasonUpdate', + version = nil, + branch = 'master', config = function() require('neodev').setup({ }) -- 2.49.1 From 9a5f079e8591c8f0e8c86237e2097aa80f96c2b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 30 Jun 2023 20:42:36 +0200 Subject: [PATCH 477/894] update lock file --- lazy-lock.json | 94 ++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f7f6d6d..e2dafb7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,76 +1,78 @@ { - "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, + "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "51ebb4b6637290e1b8e0fb0d6f38b605d3c24940" }, + "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "01d63e5599811ddf86c8769180c3fbf6dd2ef224" }, - "astrotheme": { "branch": "main", "commit": "18f791b48189d59cc0018f92c15f086985336fba" }, + "aerial.nvim": { "branch": "master", "commit": "603c805d2d46deb3f9d492d829cc320ef0184d37" }, + "astrotheme": { "branch": "main", "commit": "7a52efdd9a5bd302445d284a424467f92e4b1d44" }, "clangd_extensions.nvim": { "branch": "main", "commit": "6d0bf36870d15c0c2284f4b6693a66552a6bf127" }, - "cmake-tools.nvim": { "branch": "master", "commit": "acabfa0f222f32ee7208875e58ed5185ea445905" }, + "cmake-tools.nvim": { "branch": "master", "commit": "35500245db20727b730398e18c7be140e36b29dd" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, - "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, + "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "bff58a6ea3e081ca50049700f9848b2f84ea57be" }, - "dressing.nvim": { "branch": "master", "commit": "f19cbd56f7f8cad212c58a7285d09c5d9c273896" }, - "friendly-snippets": { "branch": "main", "commit": "7006e69b60a559837ff6cdb7fe610af4f6ca823c" }, - "gitsigns.nvim": { "branch": "main", "commit": "f868d82a36f7f7f5e110eb0a9659993984f59875" }, - "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, - "lazy.nvim": { "branch": "main", "commit": "ebdd0499551765e6a7aba220cc8ae4e0cdb6be69" }, - "lazygit.nvim": { "branch": "main", "commit": "883c25d13eafd8b89b3cc116c712b19c9d2a755e" }, - "leap.nvim": { "branch": "main", "commit": "be918a8e6aa00a6cfa7270d4bfcc11b2f80d6902" }, - "lsp_signature.nvim": { "branch": "master", "commit": "c6826d2c3f4bc4a37b41b6a140061ccb0e9cdc4a" }, + "diffview.nvim": { "branch": "main", "commit": "766a4f210e67e522659302dc6bd8a8d3b8c08c54" }, + "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" }, + "flash.nvim": { "branch": "main", "commit": "bdfda726eb9e5e87d5860cdd2f33d678cc343cdb" }, + "friendly-snippets": { "branch": "main", "commit": "1723ae01d83f3b3ac1530f1ae22b7b9d5da7749b" }, + "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, + "indent-blankline.nvim": { "branch": "master", "commit": "ceaf730b13e332cd76600d9795722413c236c684" }, + "lazy.nvim": { "branch": "main", "commit": "de0a911ad97e273edb6e3890ddb1aac59e2d0fb4" }, + "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, + "lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "f0ce33f4794a2364eb08d09d09380e8b04ec5e6a" }, - "mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "8c89efb93b8383666a6f989762c2f610f5f2c930" }, - "neodev.nvim": { "branch": "main", "commit": "358f11c585fdccfcb5e8eae720c423fbed6d92de" }, - "neogen": { "branch": "main", "commit": "72238bfb7099ed346e3742e815f13c3fe35f51ab" }, - "neotest": { "branch": "master", "commit": "10e6763d0794c70917faf45e8d869a1306d5182e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "17a493410c72268a5ec6eb59dc2d6c11bbf424c8" }, + "mason.nvim": { "branch": "main", "commit": "8adaf0bc58ddadd70dad563f949042fb1cb0211c" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "f765e75e7d2444629b5ace3cd7609c12251de254" }, + "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, + "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, + "neogit": { "branch": "master", "commit": "68a3e90e9d1ed9e362317817851d0f34b19e426b" }, + "neotest": { "branch": "master", "commit": "e46eae5739c470aa011ee43108ea8a730736174e" }, "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, - "nui.nvim": { "branch": "main", "commit": "2b2732528e4a79eb8542568bd51d25f710395bd6" }, - "null-ls.nvim": { "branch": "main", "commit": "c89333e034a8daba654ebfcf9a4ec9f87765f01e" }, - "nvim-autopairs": { "branch": "master", "commit": "59df87a84c80a357ca8d8fe86e451b93ac476ccc" }, - "nvim-cmp": { "branch": "main", "commit": "fc0f694af1a742ada77e5b1c91ff405c746f4a26" }, + "nui.nvim": { "branch": "main", "commit": "7a524120a7a70761b5a65b602fd235a65cb005aa" }, + "null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" }, + "nvim-autopairs": { "branch": "master", "commit": "e8f7dd7a72de3e7b6626c050a802000e69d53ff0" }, + "nvim-cmp": { "branch": "main", "commit": "983453e32cb35533a119725883c04436d16c0120" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" }, + "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-lspconfig": { "branch": "master", "commit": "9166622781a39a829878d1fd24c174529d996838" }, - "nvim-navbuddy": { "branch": "master", "commit": "0db1d62761131ca4d0665423b3f7903532763a77" }, - "nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" }, + "nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" }, + "nvim-navbuddy": { "branch": "master", "commit": "f0a2f66cb1e0b5f7bd803c5724e4b4456b5578a6" }, + "nvim-navic": { "branch": "master", "commit": "32cff45f1c84bec5e2a7bf15c0f3c6739b64c85d" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, - "nvim-rooter.lua": { "branch": "main", "commit": "99832f243426a28c1cc0b83ee4cdf915bf0b2c2b" }, + "nvim-rooter.lua": { "branch": "main", "commit": "6835974903d7679de13b97a8aaf97f6980071e67" }, "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" }, - "nvim-treesitter": { "branch": "master", "commit": "62146fe415193879290c523b54cb5072e1f5dbbc" }, - "nvim-ts-rainbow2": { "branch": "master", "commit": "5becf2cec4b8e06b6df745cf515ac35c6c2e6308" }, - "nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" }, - "octo.nvim": { "branch": "master", "commit": "95a7f271eff4397e593c90246891c18058bdffc2" }, - "oil.nvim": { "branch": "master", "commit": "64d2f305d30cec13938aa99f8f13bd84c502e020" }, - "overseer.nvim": { "branch": "master", "commit": "d286e681c4efa7477fccb113e23ef645fcb43cac" }, - "plenary.nvim": { "branch": "master", "commit": "499e0743cf5e8075cd32af68baa3946a1c76adf1" }, - "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, + "nvim-treesitter": { "branch": "master", "commit": "cc360a9beb1b30d172438f640e2c3450358c4086" }, + "nvim-ts-rainbow2": { "branch": "master", "commit": "c00d61ab7517530c49457ba49186776e6611a3e1" }, + "nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" }, + "octo.nvim": { "branch": "master", "commit": "22328c578bc013fa4b0cef3d00af35efe0c0f256" }, + "oil.nvim": { "branch": "master", "commit": "0138a2e0f9baacd98d5531ebb5078fafc5114fae" }, + "overseer.nvim": { "branch": "master", "commit": "5564d0d1b7c956be5c51f4945ebbde7408a48043" }, + "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, + "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "pretty_hover": { "branch": "master", "commit": "e8eb6e89162707ea454895eefa4927d66ed84618" }, + "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, + "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "6d3fbffe426794296a77bb0b37b6ae0f4f14f807" }, - "toggleterm.nvim": { "branch": "main", "commit": "cf146a267a6a7db62b1e2aff40414b20081048a1" }, - "venv-selector.nvim": { "branch": "main", "commit": "6f1865aba002ff8aa0d552491a4f24a3d191c830" }, - "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, - "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, - "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" } + "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, + "toggleterm.nvim": { "branch": "main", "commit": "95204ece0f2a54c89c4395295432f9aeedca7b5f" }, + "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, + "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }, + "zk-nvim": { "branch": "main", "commit": "5ddb53688035d115f941f0c8255f6e6618e608ac" } } \ No newline at end of file -- 2.49.1 From 62e90c927901a61287371cebc7c0ef371d3e60d6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 3 Jul 2023 08:51:31 +0200 Subject: [PATCH 478/894] updated cmp to newest version instead of release --- lazy-lock.json | 2 +- lua/plugins/cmp.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index e2dafb7..9b56f28 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -43,7 +43,7 @@ "nui.nvim": { "branch": "main", "commit": "7a524120a7a70761b5a65b602fd235a65cb005aa" }, "null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" }, "nvim-autopairs": { "branch": "master", "commit": "e8f7dd7a72de3e7b6626c050a802000e69d53ff0" }, - "nvim-cmp": { "branch": "main", "commit": "983453e32cb35533a119725883c04436d16c0120" }, + "nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 09496b1..a3f2dbb 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,5 +1,6 @@ return { 'hrsh7th/nvim-cmp', + branch = 'main', dependencies = { { 'onsails/lspkind-nvim' }, { 'hrsh7th/cmp-buffer' }, -- 2.49.1 From 9aea25954f64a67eab24fb87b7f2867cbe4f67a8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 4 Jul 2023 10:35:03 +0200 Subject: [PATCH 479/894] reworked lspconfig --- lua/plugins/lspconfig.lua | 78 ++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a6fa0dd..1664af2 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,4 +1,43 @@ -on_attach = function(client, bufnr) +local lspKeys = function(bufnr) + local tele_builtins = require('telescope.builtin') + local options = { noremap = true, silent = false, buffer = bufnr } + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, + vim.tbl_extend('error', options, { desc = 'Diag prev' })) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, + vim.tbl_extend('error', options, { desc = 'Diag next' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, + vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, + vim.tbl_extend('error', options, { desc = 'Definition' })) + vim.keymap.set('n', 'e', + vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) + vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, + vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, + vim.tbl_extend('error', options, { desc = 'Rename' })) + vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, + vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', 'r', tele_builtins.lsp_references, + vim.tbl_extend('error', options, { desc = 'References' })) + vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, + vim.tbl_extend('error', options, { desc = 'References' })) + vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + vim.tbl_extend('error', options, { desc = 'Diagnostics' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) +end + +local on_attach = function(client, bufnr) local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -6,42 +45,7 @@ on_attach = function(client, bufnr) buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - -- Mappings. - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, - { noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr }) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, - { noremap = true, silent = false, desc = 'Diag next', buffer = bufnr }) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - { noremap = true, silent = false, desc = 'Code action', buffer = bufnr }) - vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, - { noremap = true, silent = false, desc = 'Definition', buffer = bufnr }) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, - { noremap = true, silent = false, desc = 'Declaration', buffer = bufnr }) - vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, - { noremap = true, silent = false, desc = 'Hover', buffer = bufnr }) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - { noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr }) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - { noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr }) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, - { noremap = true, silent = false, desc = 'Rename', buffer = bufnr }) - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, - { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - { noremap = true, silent = false, desc = 'Type definition', buffer = bufnr }) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - { noremap = true, silent = false, desc = 'Signature help', buffer = bufnr }) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, - { noremap = true, silent = false, desc = 'References', buffer = bufnr }) - vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, - { noremap = true, silent = false, desc = 'References', buffer = bufnr }) - vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, - { noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr }) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, - { noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr }) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - { noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr }) + lspKeys(bufnr) vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- 2.49.1 From 48621f8887b985e12bae0ea608aad55855556ea3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 4 Jul 2023 10:35:17 +0200 Subject: [PATCH 480/894] no lazy loading of cmp --- lua/plugins/cmp.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index a3f2dbb..6fc936a 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -194,5 +194,4 @@ return { local cmp_autopairs = require('nvim-autopairs.completion.cmp') cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) end, - event = { 'InsertEnter', 'CmdLineEnter' }, } -- 2.49.1 From 8003a2df42c249a0939d57c6045d991338c9930d Mon Sep 17 00:00:00 2001 From: Hartmann Date: Tue, 4 Jul 2023 10:52:43 +0200 Subject: [PATCH 481/894] workaround for telescope old files bug --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 93e408b..66e8837 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,7 @@ vim.g.mapleader = ',' +if vim.loop.os_uname().sysname == 'Windows_NT' then + vim.env.HOME = '' +end if not vim.g.vscode then require('config.lazy') require('my_keymappings') -- 2.49.1 From d5b129b373e508dbde7957e58c20574254564ae3 Mon Sep 17 00:00:00 2001 From: Hartmann Date: Tue, 4 Jul 2023 10:56:33 +0200 Subject: [PATCH 482/894] only set home during telescope config --- init.lua | 3 --- lua/plugins/telescope.lua | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 66e8837..93e408b 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,4 @@ vim.g.mapleader = ',' -if vim.loop.os_uname().sysname == 'Windows_NT' then - vim.env.HOME = '' -end if not vim.g.vscode then require('config.lazy') require('my_keymappings') diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 257b782..bf13c92 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -86,6 +86,10 @@ return { }, }, config = function() + if vim.loop.os_uname().sysname == 'Windows_NT' then + vim.env.HOME = '' + end + local home = vim.env.HOME local actions = require('telescope.actions') local mappingTab = { @@ -206,5 +210,8 @@ return { vim.api.nvim_win_set_option(0, "number", true) end, }) + if vim.loop.os_uname().sysname == 'Windows_NT' then + vim.env.HOME = home + end end } -- 2.49.1 From ed4ad9305e09e47379a57422622e38b432639244 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Jul 2023 21:24:35 +0200 Subject: [PATCH 483/894] added firevim --- lua/my_autocommands.lua | 9 +++++++++ lua/plugins/firenvim.lua | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lua/plugins/firenvim.lua diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 0498603..a28d2b7 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -77,3 +77,12 @@ api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) -- Keep window ratio when resize api.nvim_create_autocmd('VimResized', { command = [[wincmd =]] }) + +vim.api.nvim_create_autocmd({'UIEnter'}, { + callback = function(event) + local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client + if client ~= nil and client.name == "Firenvim" then + vim.o.laststatus = 0 + end + end +}) diff --git a/lua/plugins/firenvim.lua b/lua/plugins/firenvim.lua new file mode 100644 index 0000000..7b34632 --- /dev/null +++ b/lua/plugins/firenvim.lua @@ -0,0 +1,11 @@ +return { + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + cond = not not vim.g.started_by_firenvim, + build = function() + require('lazy').load({ plugins = 'firenvim', wait = true }) + vim.fn['firenvim#install'](0) + end +} -- 2.49.1 From 47279796fc48e37f41d37760384f250c6a2f1155 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jul 2023 00:14:22 +0200 Subject: [PATCH 484/894] added locality in cmp compare --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 6fc936a..adde897 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -153,6 +153,7 @@ return { cmp.config.compare.exact, cmp.config.compare.recently_used, require('clangd_extensions.cmp_scores'), + cmp.config.compare.locality, cmp.config.compare.kind, cmp.config.compare.sort_text, cmp.config.compare.length, -- 2.49.1 From 1eaaeeeaad3f2ebd9a05a9233f15f350d0a9133c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 7 Jul 2023 08:39:43 +0200 Subject: [PATCH 485/894] show current buffer --- lua/plugins/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index bf13c92..d75b99a 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -137,7 +137,7 @@ return { buffers = { sort_lastused = false, sort_mru = true, - ignore_current_buffer = true, + ignore_current_buffer = false, theme = 'ivy', mappings = { i = { -- 2.49.1 From 5964e8428a6c8edacccc3dee2beee7df0f65b2a9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 9 Jul 2023 20:49:59 +0200 Subject: [PATCH 486/894] addad diagflow --- lazy-lock.json | 1 + lua/plugins/diagflow.lua | 6 ++++++ lua/plugins/lspconfig.lua | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/diagflow.lua diff --git a/lazy-lock.json b/lazy-lock.json index 9b56f28..4e17f7b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -21,6 +21,7 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "diagflow.nvim": { "branch": "main", "commit": "ec67b8fc5d0b91388fe29869b56ecc232572207b" }, "diffview.nvim": { "branch": "main", "commit": "766a4f210e67e522659302dc6bd8a8d3b8c08c54" }, "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" }, "flash.nvim": { "branch": "main", "commit": "bdfda726eb9e5e87d5860cdd2f33d678cc343cdb" }, diff --git a/lua/plugins/diagflow.lua b/lua/plugins/diagflow.lua new file mode 100644 index 0000000..514f416 --- /dev/null +++ b/lua/plugins/diagflow.lua @@ -0,0 +1,6 @@ +return { + 'dgagn/diagflow.nvim', + opts = { + scope = 'line' + } +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 1664af2..e4cd513 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -330,7 +330,6 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) - vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, event = 'VeryLazy' } -- 2.49.1 From 4a11883ee4f5f731e79304672078614d6fc38692 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 9 Jul 2023 20:50:16 +0200 Subject: [PATCH 487/894] commented code --- lua/plugins/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index e4cd513..3388265 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -330,6 +330,7 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) + -- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, event = 'VeryLazy' } -- 2.49.1 From f0b4587db46a50ec29877c2317e19ed820d6929b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 11:04:33 +0200 Subject: [PATCH 488/894] disable some conflicting keybindings in diffview --- lua/plugins/diffview.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 6e52fb4..7b7ec41 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -3,7 +3,19 @@ return { dependencies = { 'nvim-lua/plenary.nvim' }, - config = true, + opts = { + keymaps = { + view = { + ['b'] = false + }, + file_panel = { + ['b'] = false + }, + file_history_panel = { + ['b'] = false + }, + } + }, cmd = 'DiffviewOpen', keys = { { -- 2.49.1 From 22d518adcde7d022eb68111bd2b70a7cfc548145 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 08:28:36 +0200 Subject: [PATCH 489/894] don't install groovyls --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3388265..8896929 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -138,7 +138,7 @@ return { -- 'zk', -- No support for windows 'lua_ls', 'jsonls', - 'groovyls', + -- 'groovyls', -- Doesn't work in WSL } }) local lspconfig = require('lspconfig') -- 2.49.1 From 8a8ea01a2feb1939150d408330b699b9aa8aa234 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 11:57:19 +0200 Subject: [PATCH 490/894] don't override leader key with flash --- lua/plugins/flash.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 919c7e0..5861d90 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -6,6 +6,9 @@ return { modes = { search = { enabled = false + }, + char = { + keys = { 'f', 'F', 't', 'T', ';' }, } } }, -- 2.49.1 From 6b1d57e28a88f152a6e1164f1bb1871b96d01e05 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 11:57:25 +0200 Subject: [PATCH 491/894] format flash file --- lua/plugins/flash.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 5861d90..33711b7 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -1,6 +1,6 @@ return { - "folke/flash.nvim", - event = "VeryLazy", + 'folke/flash.nvim', + event = 'VeryLazy', ---@type Flash.Config opts = { modes = { @@ -14,18 +14,18 @@ return { }, keys = { { - "s", - mode = { "n", "x", "o" }, + 's', + mode = { 'n', 'x', 'o' }, function() -- default options: exact mode, multi window, all directions, with a backdrop - require("flash").jump() + require('flash').jump() end, }, { - "S", - mode = { "n", "o", "x" }, + 'S', + mode = { 'n', 'o', 'x' }, function() - require("flash").treesitter() + require('flash').treesitter() end, }, }, -- 2.49.1 From 0691b19e472d1debe2ca6914f4d7615ff54b0acd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 12:02:55 +0200 Subject: [PATCH 492/894] don't show diagnostic popup --- lua/plugins/lspconfig.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8896929..902a1a4 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -47,7 +47,7 @@ local on_attach = function(client, bufnr) lspKeys(bufnr) - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) + -- vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -330,6 +330,7 @@ return { }) -- vim.diagnostic.config({ virtual_text = false }) + vim.diagnostic.config({ virtual_text = false, virtual_lines = false }) -- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, event = 'VeryLazy' -- 2.49.1 From ae5247f81c80e9ef14f96c73e2b3ad49ffed7704 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Jul 2023 22:29:09 +0200 Subject: [PATCH 493/894] updated lock --- lazy-lock.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 4e17f7b..0195185 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,7 +6,7 @@ "aerial.nvim": { "branch": "master", "commit": "603c805d2d46deb3f9d492d829cc320ef0184d37" }, "astrotheme": { "branch": "main", "commit": "7a52efdd9a5bd302445d284a424467f92e4b1d44" }, "clangd_extensions.nvim": { "branch": "main", "commit": "6d0bf36870d15c0c2284f4b6693a66552a6bf127" }, - "cmake-tools.nvim": { "branch": "master", "commit": "35500245db20727b730398e18c7be140e36b29dd" }, + "cmake-tools.nvim": { "branch": "master", "commit": "5697db80fb9a49f638d8bde3317f06e6e4faccfd" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -21,38 +21,38 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diagflow.nvim": { "branch": "main", "commit": "ec67b8fc5d0b91388fe29869b56ecc232572207b" }, - "diffview.nvim": { "branch": "main", "commit": "766a4f210e67e522659302dc6bd8a8d3b8c08c54" }, + "diagflow.nvim": { "branch": "main", "commit": "37e44cc83bec7d62c4e6bf20302391528f1fe6d7" }, + "diffview.nvim": { "branch": "main", "commit": "b0cc22f5708f6b2b4f873b44fbc5eb93020f4e0c" }, "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" }, - "flash.nvim": { "branch": "main", "commit": "bdfda726eb9e5e87d5860cdd2f33d678cc343cdb" }, - "friendly-snippets": { "branch": "main", "commit": "1723ae01d83f3b3ac1530f1ae22b7b9d5da7749b" }, + "flash.nvim": { "branch": "main", "commit": "a8da6ff212c1885ecde26af477207742959c67d7" }, + "friendly-snippets": { "branch": "main", "commit": "6e0afe3be0ba43ef03d495a529de8fb22721c0d0" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, - "indent-blankline.nvim": { "branch": "master", "commit": "ceaf730b13e332cd76600d9795722413c236c684" }, - "lazy.nvim": { "branch": "main", "commit": "de0a911ad97e273edb6e3890ddb1aac59e2d0fb4" }, + "indent-blankline.nvim": { "branch": "master", "commit": "73640233cca0da8e01aced8c1f9e63fd892128b7" }, + "lazy.nvim": { "branch": "main", "commit": "da8b00581a52f5f87ad2aba9f52171fda7491f18" }, "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, "lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "17a493410c72268a5ec6eb59dc2d6c11bbf424c8" }, - "mason.nvim": { "branch": "main", "commit": "8adaf0bc58ddadd70dad563f949042fb1cb0211c" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "f765e75e7d2444629b5ace3cd7609c12251de254" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "796008869e67ef27a5aa5ac44c08ce2a60b89f55" }, + "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "7f6fa04dbd8e8c79d1af33bc90e856b65d8641da" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "68a3e90e9d1ed9e362317817851d0f34b19e426b" }, + "neogit": { "branch": "master", "commit": "1b6edb56e8c754494be1564912d33e50ddd8a023" }, "neotest": { "branch": "master", "commit": "e46eae5739c470aa011ee43108ea8a730736174e" }, - "neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" }, + "neotest-python": { "branch": "master", "commit": "054f22129405e747adfc2cbeddfcc59537df50ba" }, "nui.nvim": { "branch": "main", "commit": "7a524120a7a70761b5a65b602fd235a65cb005aa" }, - "null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" }, + "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, "nvim-autopairs": { "branch": "master", "commit": "e8f7dd7a72de3e7b6626c050a802000e69d53ff0" }, - "nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" }, + "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" }, - "nvim-navbuddy": { "branch": "master", "commit": "f0a2f66cb1e0b5f7bd803c5724e4b4456b5578a6" }, - "nvim-navic": { "branch": "master", "commit": "32cff45f1c84bec5e2a7bf15c0f3c6739b64c85d" }, + "nvim-lspconfig": { "branch": "master", "commit": "deade69789089c3da15237697156334fb3e943f0" }, + "nvim-navbuddy": { "branch": "master", "commit": "244a4cded6f2b568403684131d148048efe4e8af" }, + "nvim-navic": { "branch": "master", "commit": "6e8850a524307814decc1b195a2c8a51482a9886" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-rooter.lua": { "branch": "main", "commit": "6835974903d7679de13b97a8aaf97f6980071e67" }, "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" }, @@ -64,7 +64,7 @@ "overseer.nvim": { "branch": "master", "commit": "5564d0d1b7c956be5c51f4945ebbde7408a48043" }, "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, - "pretty_hover": { "branch": "master", "commit": "e8eb6e89162707ea454895eefa4927d66ed84618" }, + "pretty_hover": { "branch": "master", "commit": "55b2deedc4cc27ef5c87cc447c787b9ad10422b7" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, @@ -75,5 +75,5 @@ "toggleterm.nvim": { "branch": "main", "commit": "95204ece0f2a54c89c4395295432f9aeedca7b5f" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }, - "zk-nvim": { "branch": "main", "commit": "5ddb53688035d115f941f0c8255f6e6618e608ac" } + "zk-nvim": { "branch": "main", "commit": "797618aa07f58ceba6f79fb6e777e8e45c51e1ce" } } \ No newline at end of file -- 2.49.1 From 0792b8274bab073e91f9c03fd4024e3b8e072ac4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jul 2023 21:44:01 +0200 Subject: [PATCH 494/894] added some clangd options --- lua/plugins/lspconfig.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 902a1a4..1052f26 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -238,8 +238,13 @@ return { server = { capabilities = clangd_capabilities, on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim', '--query-driver', - '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*' }, + cmd = { 'clangd', + '--compile-commands-dir=build_nvim', + '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--clang-tidy', + '--background-index', + '--use-dirty-headers', + '--completion-style=detailed' }, root_dir = lspconfig.util.root_pattern( '.clangd', '.clang-tidy', -- 2.49.1 From 3b16b57c21d07feb6ad0307961a0b4ac51cdc3f7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jul 2023 22:07:13 +0200 Subject: [PATCH 495/894] removed lsp signature --- lua/plugins/lspconfig.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 1052f26..85a1b0b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -95,13 +95,6 @@ local on_attach = function(client, bufnr) }) end - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) end return { @@ -111,7 +104,6 @@ return { 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', 'jose-elias-alvarez/null-ls.nvim', - 'ray-x/lsp_signature.nvim', { 'folke/neodev.nvim', }, -- 2.49.1 From 2244cd70666e9505eb964f39ccd6170ec26d5153 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jul 2023 23:00:31 +0200 Subject: [PATCH 496/894] less prio for buffer --- lua/plugins/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index adde897..309ddff 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -94,7 +94,7 @@ return { -- { name = 'treesitter', priority = 6 }, { name = 'buffer', - priority = 5, + priority = 3, option = { get_bufnrs = function() local bufs = {} -- 2.49.1 From beecfef93e8247c9c6e247c6e5a2c3aaf85961f6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jul 2023 23:01:38 +0200 Subject: [PATCH 497/894] remove lsp signature --- lazy-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 0195185..b32fc48 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -30,7 +30,6 @@ "indent-blankline.nvim": { "branch": "master", "commit": "73640233cca0da8e01aced8c1f9e63fd892128b7" }, "lazy.nvim": { "branch": "main", "commit": "da8b00581a52f5f87ad2aba9f52171fda7491f18" }, "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, - "lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "796008869e67ef27a5aa5ac44c08ce2a60b89f55" }, -- 2.49.1 From cfc6aaa4477f3a4b2b41f76a6937a469d0256a66 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 24 Jul 2023 16:54:36 +0200 Subject: [PATCH 498/894] added github theme --- lua/plugins/github-theme.lua | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lua/plugins/github-theme.lua diff --git a/lua/plugins/github-theme.lua b/lua/plugins/github-theme.lua new file mode 100644 index 0000000..f3202dc --- /dev/null +++ b/lua/plugins/github-theme.lua @@ -0,0 +1,43 @@ +return +{ + 'projekt0n/github-nvim-theme', + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + require('github-theme').setup({ + options = { + dim_inactive = true, + modules = { + 'cmp', + -- 'coc', + -- 'coc_explorer', + 'dapui', + -- 'diffchar', + -- 'dashboard', + 'diagnostic', + -- 'fidget', + -- 'fzf', + 'gitgutter', + 'gitsigns', + 'indent_blankline', + 'lsp_semantic_tokens', + -- 'lsp_trouble', + -- 'mini', + 'native_lsp', + 'neogit', + 'neotree', + -- 'notify', + -- 'nvimtree', + 'telescope', + 'treesitter', + 'treesitter_context', + 'whichkey', + } + }, + }) + + -- vim.cmd('colorscheme github_dark') + vim.cmd('colorscheme github_dark_dimmed') + end, + enabled = false, +} -- 2.49.1 From 62411eb1cc70d29acbd6de7899d27a0ea4ade269 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 25 Jul 2023 10:51:45 +0200 Subject: [PATCH 499/894] fixed indent blankline --- lua/plugins/indent_blankline.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua index 8945707..445cc34 100644 --- a/lua/plugins/indent_blankline.lua +++ b/lua/plugins/indent_blankline.lua @@ -3,18 +3,20 @@ return { dependencies = { 'nvim-treesitter/nvim-treesitter', }, - opts = { - show_end_of_line = true, - use_treesitter = true, - show_current_context = true, - context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, - - }, config = function() local opt = vim.opt -- to set options opt.listchars:append('eol:↴') -- opt.listchars:append("space: ") + -- opt.listchars:append 'space:⋅' opt.listchars:append('trail: ') opt.listchars:append('tab:→ ') + require('indent_blankline').setup { + show_end_of_line = true, + use_treesitter = true, + show_current_context = true, + show_current_context_start = false, + space_char_blankline = ' ', + -- context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, + } end, } -- 2.49.1 From f631f2ad866115a9c4ac3e4e88eb6c5deff71953 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 25 Jul 2023 10:51:57 +0200 Subject: [PATCH 500/894] replaced ts rainbow --- lua/plugins/{nvim-ts-rainbow.lua => rainbow-delimiters.lua} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename lua/plugins/{nvim-ts-rainbow.lua => rainbow-delimiters.lua} (57%) diff --git a/lua/plugins/nvim-ts-rainbow.lua b/lua/plugins/rainbow-delimiters.lua similarity index 57% rename from lua/plugins/nvim-ts-rainbow.lua rename to lua/plugins/rainbow-delimiters.lua index 511a18b..07abdfa 100644 --- a/lua/plugins/nvim-ts-rainbow.lua +++ b/lua/plugins/rainbow-delimiters.lua @@ -1,5 +1,5 @@ return { - 'HiPhish/nvim-ts-rainbow2', + 'https://gitlab.com/HiPhish/rainbow-delimiters.nvim', dependencies = 'nvim-treesitter/nvim-treesitter', event = 'VeryLazy' } -- 2.49.1 From 3e818ddef9b5ed9fd74458cb0ba54631394da91e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Aug 2023 09:03:24 +0200 Subject: [PATCH 501/894] changed virtual lines --- lua/plugins/diagflow.lua | 8 ++++++-- lua/plugins/lsp-virtual-improved.lua | 14 ++++++++++++++ lua/plugins/lspconfig.lua | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 lua/plugins/lsp-virtual-improved.lua diff --git a/lua/plugins/diagflow.lua b/lua/plugins/diagflow.lua index 514f416..775b7d0 100644 --- a/lua/plugins/diagflow.lua +++ b/lua/plugins/diagflow.lua @@ -1,6 +1,10 @@ return { 'dgagn/diagflow.nvim', opts = { - scope = 'line' - } + scope = 'line', + placement = 'inline', + text_align = 'left', + inline_padding_left = 5, + }, + enabled = false } diff --git a/lua/plugins/lsp-virtual-improved.lua b/lua/plugins/lsp-virtual-improved.lua new file mode 100644 index 0000000..f527cf2 --- /dev/null +++ b/lua/plugins/lsp-virtual-improved.lua @@ -0,0 +1,14 @@ +return { + 'luozhiya/lsp-virtual-improved.nvim', + event = { 'LspAttach' }, + config = function() + require('lsp-virtual-improved').setup() + local diagnostics = { + virtual_text = false, -- Disable builtin virtual text diagnostic. + virtual_improved = { + current_line = 'only', + }, + } + vim.diagnostic.config(diagnostics) + end, +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 85a1b0b..5f34b52 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -326,8 +326,8 @@ return { capabilities = capabilities, }) - -- vim.diagnostic.config({ virtual_text = false }) - vim.diagnostic.config({ virtual_text = false, virtual_lines = false }) + vim.diagnostic.config({ virtual_text = true}) + -- vim.diagnostic.config({ virtual_text = false, virtual_lines = false }) -- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, event = 'VeryLazy' -- 2.49.1 From 356a87f4b49048a4f89dc476303cc180d35ed674 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Aug 2023 09:03:33 +0200 Subject: [PATCH 502/894] changed wsl font --- lua/config/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index bdbaef0..cbfef25 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -46,7 +46,8 @@ if vim.fn.has('wsl') == 1 then }, cache_enabled = 0, } - opt.guifont = 'Hack Nerd Font Mono:h10' + -- opt.guifont = 'Hack Nerd Font Mono:h10' + opt.guifont = 'RobotoMono Nerd Font:h10' elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' -- 2.49.1 From 284000e988de57f472d4a9aa5d88493e627f64e6 Mon Sep 17 00:00:00 2001 From: Hartmann Date: Tue, 29 Aug 2023 13:34:26 +0200 Subject: [PATCH 503/894] added devdocs plugin --- lua/plugins/nvim-devdocs.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/plugins/nvim-devdocs.lua diff --git a/lua/plugins/nvim-devdocs.lua b/lua/plugins/nvim-devdocs.lua new file mode 100644 index 0000000..61e978c --- /dev/null +++ b/lua/plugins/nvim-devdocs.lua @@ -0,0 +1,10 @@ +return { + 'luckasRanarison/nvim-devdocs', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + branch = 'master', + opts = {} +} -- 2.49.1 From dd7fe850d891dceb3eb2862278e09d90b18cebca Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 29 Aug 2023 13:35:48 +0200 Subject: [PATCH 504/894] added some fonts --- lua/config/options.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index bdbaef0..4e92e97 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -51,7 +51,15 @@ if vim.fn.has('wsl') == 1 then elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' else - opt.guifont = 'Hack Nerd Font Mono:h10' + -- opt.guifont = 'Hack Nerd Font:h10' + -- opt.guifont = 'JetBrainsMono Nerd Font:h10' + -- opt.guifont = 'FiraCode Nerd Font:h10' + opt.guifont = 'RobotoMono Nerd Font:h10' + -- opt.guifont = 'Cousine Nerd Font Mono:h10' + -- opt.guifont = 'DroidSansM Nerd Font Propo:h10' + -- opt.guifont = 'AnonymicePro Nerd Font:h11' + -- opt.guifont = 'SauceCodePro Nerd Font:h10' + -- opt.guifont = 'Monoid Nerd Font Propo:h10' end opt.swapfile = false opt.backup = false -- 2.49.1 From ea5a1aee4450cb422c411135107b37908fc08713 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 2 Sep 2023 11:33:54 +0200 Subject: [PATCH 505/894] updated plugins --- lazy-lock.json | 79 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index b32fc48..ef9f9d3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,14 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, + "LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "603c805d2d46deb3f9d492d829cc320ef0184d37" }, - "astrotheme": { "branch": "main", "commit": "7a52efdd9a5bd302445d284a424467f92e4b1d44" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "6d0bf36870d15c0c2284f4b6693a66552a6bf127" }, - "cmake-tools.nvim": { "branch": "master", "commit": "5697db80fb9a49f638d8bde3317f06e6e4faccfd" }, + "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, + "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "323b00de2ee18cad1ac45eb95e680386c4ff4366" }, + "cmake-tools.nvim": { "branch": "master", "commit": "d1600ed7a9a13bdbcb7be9d3745d0a59b589c65d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, + "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, @@ -21,58 +21,59 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diagflow.nvim": { "branch": "main", "commit": "37e44cc83bec7d62c4e6bf20302391528f1fe6d7" }, - "diffview.nvim": { "branch": "main", "commit": "b0cc22f5708f6b2b4f873b44fbc5eb93020f4e0c" }, - "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" }, - "flash.nvim": { "branch": "main", "commit": "a8da6ff212c1885ecde26af477207742959c67d7" }, - "friendly-snippets": { "branch": "main", "commit": "6e0afe3be0ba43ef03d495a529de8fb22721c0d0" }, + "diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" }, + "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, + "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, + "friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, - "indent-blankline.nvim": { "branch": "master", "commit": "73640233cca0da8e01aced8c1f9e63fd892128b7" }, - "lazy.nvim": { "branch": "main", "commit": "da8b00581a52f5f87ad2aba9f52171fda7491f18" }, - "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, + "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, + "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, + "lazygit.nvim": { "branch": "main", "commit": "22e51e03268fabe068a77e2bd316ac25ff2084f9" }, + "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, - "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "796008869e67ef27a5aa5ac44c08ce2a60b89f55" }, - "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "7f6fa04dbd8e8c79d1af33bc90e856b65d8641da" }, + "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, + "mason.nvim": { "branch": "main", "commit": "4a8deb615a477029a549cea5cef69d90e4d1f850" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "9b5b4c874b13e372500f07c37187ba06c0c1ac0a" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "neogit": { "branch": "master", "commit": "1b6edb56e8c754494be1564912d33e50ddd8a023" }, - "neotest": { "branch": "master", "commit": "e46eae5739c470aa011ee43108ea8a730736174e" }, - "neotest-python": { "branch": "master", "commit": "054f22129405e747adfc2cbeddfcc59537df50ba" }, - "nui.nvim": { "branch": "main", "commit": "7a524120a7a70761b5a65b602fd235a65cb005aa" }, - "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, - "nvim-autopairs": { "branch": "master", "commit": "e8f7dd7a72de3e7b6626c050a802000e69d53ff0" }, - "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, + "neotest": { "branch": "master", "commit": "bec7be0f13ee19c85561943fc5f7b8daa4f4d465" }, + "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, + "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, + "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, + "nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, + "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, - "nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, + "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-lspconfig": { "branch": "master", "commit": "deade69789089c3da15237697156334fb3e943f0" }, - "nvim-navbuddy": { "branch": "master", "commit": "244a4cded6f2b568403684131d148048efe4e8af" }, - "nvim-navic": { "branch": "master", "commit": "6e8850a524307814decc1b195a2c8a51482a9886" }, + "nvim-devdocs": { "branch": "master", "commit": "ed98d03cd1ad01ae01e4934ee9710ad5aa82cea2" }, + "nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, + "nvim-navbuddy": { "branch": "master", "commit": "b56a704323d07aac296a20bbf8274cf24e73ab32" }, + "nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, - "nvim-rooter.lua": { "branch": "main", "commit": "6835974903d7679de13b97a8aaf97f6980071e67" }, - "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" }, - "nvim-treesitter": { "branch": "master", "commit": "cc360a9beb1b30d172438f640e2c3450358c4086" }, - "nvim-ts-rainbow2": { "branch": "master", "commit": "c00d61ab7517530c49457ba49186776e6611a3e1" }, - "nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" }, - "octo.nvim": { "branch": "master", "commit": "22328c578bc013fa4b0cef3d00af35efe0c0f256" }, - "oil.nvim": { "branch": "master", "commit": "0138a2e0f9baacd98d5531ebb5078fafc5114fae" }, + "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, + "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, + "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, + "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, + "octo.nvim": { "branch": "master", "commit": "d1e52f9b3c755fcebb93d635821663a2c0f53281" }, + "oil.nvim": { "branch": "master", "commit": "c12a12c34da2a04465308f410095bcbe47996f0b" }, "overseer.nvim": { "branch": "master", "commit": "5564d0d1b7c956be5c51f4945ebbde7408a48043" }, "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, - "pretty_hover": { "branch": "master", "commit": "55b2deedc4cc27ef5c87cc447c787b9ad10422b7" }, + "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "9cbd3dc409af1f5531778ccd1ea6bce668241f39" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, - "telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" }, + "telescope-menufacture": { "branch": "main", "commit": "a12ba19b6e750707c5a63488d02c6b7f2b9d745b" }, "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, - "toggleterm.nvim": { "branch": "main", "commit": "95204ece0f2a54c89c4395295432f9aeedca7b5f" }, + "toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, - "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }, + "which-key.nvim": { "branch": "main", "commit": "bf09a25bdc9a83bcc69d2cf078e680368676513b" }, "zk-nvim": { "branch": "main", "commit": "797618aa07f58ceba6f79fb6e777e8e45c51e1ce" } } \ No newline at end of file -- 2.49.1 From e354f9057745ce260b84fa70dbfe3a6fbe7ddd9a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 10:29:00 +0200 Subject: [PATCH 506/894] update plugins --- lazy-lock.json | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index ef9f9d3..de7dcf7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,8 +5,8 @@ "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "323b00de2ee18cad1ac45eb95e680386c4ff4366" }, - "cmake-tools.nvim": { "branch": "master", "commit": "d1600ed7a9a13bdbcb7be9d3745d0a59b589c65d" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" }, + "cmake-tools.nvim": { "branch": "master", "commit": "714fcd7ce88d320507d3a4a1da5d23bf457bcf7b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -21,57 +21,58 @@ "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" }, + "diffview.nvim": { "branch": "main", "commit": "a111d19ccceac6530448d329c63f998f77b5626e" }, "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, - "friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" }, + "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, - "lazygit.nvim": { "branch": "main", "commit": "22e51e03268fabe068a77e2bd316ac25ff2084f9" }, + "lazygit.nvim": { "branch": "main", "commit": "75c920883f44243f2bbb172be423e484a58f7c45" }, "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, - "mason.nvim": { "branch": "main", "commit": "4a8deb615a477029a549cea5cef69d90e4d1f850" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "9b5b4c874b13e372500f07c37187ba06c0c1ac0a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, + "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "2d89ca96e08eb6e9c8e50e1bb4738bc5125c9f12" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "1b6edb56e8c754494be1564912d33e50ddd8a023" }, - "neotest": { "branch": "master", "commit": "bec7be0f13ee19c85561943fc5f7b8daa4f4d465" }, + "neogit": { "branch": "master", "commit": "f0bd7c736cc242258f0fdce0029f3b6331fe952b" }, + "neorg": { "branch": "main", "commit": "67c729f5493bda44a9a1165393cd21f90a3f2a9d" }, + "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, + "nvim-autopairs": { "branch": "master", "commit": "7b3eb9b5813a22188c4dbb248475fcbaf9f4d195" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, - "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, + "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-devdocs": { "branch": "master", "commit": "ed98d03cd1ad01ae01e4934ee9710ad5aa82cea2" }, - "nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, - "nvim-navbuddy": { "branch": "master", "commit": "b56a704323d07aac296a20bbf8274cf24e73ab32" }, - "nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" }, + "nvim-devdocs": { "branch": "master", "commit": "0416494850471e22f8639b7b812e6dea3d46a051" }, + "nvim-lspconfig": { "branch": "master", "commit": "f3195835c0447ee2c80152b893ab51ca162b04a9" }, + "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, + "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, - "octo.nvim": { "branch": "master", "commit": "d1e52f9b3c755fcebb93d635821663a2c0f53281" }, - "oil.nvim": { "branch": "master", "commit": "c12a12c34da2a04465308f410095bcbe47996f0b" }, - "overseer.nvim": { "branch": "master", "commit": "5564d0d1b7c956be5c51f4945ebbde7408a48043" }, + "nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, + "octo.nvim": { "branch": "master", "commit": "ffa4c4f9d6579039d772ae32c13083e0974fa31c" }, + "oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" }, + "overseer.nvim": { "branch": "master", "commit": "fc35ba7bd86004654ee314eb44d58498f27a326a" }, "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "9cbd3dc409af1f5531778ccd1ea6bce668241f39" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, - "telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, + "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-menufacture": { "branch": "main", "commit": "a12ba19b6e750707c5a63488d02c6b7f2b9d745b" }, "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, + "telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" }, "toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, "which-key.nvim": { "branch": "main", "commit": "bf09a25bdc9a83bcc69d2cf078e680368676513b" }, -- 2.49.1 From 8894b967f81485ec6ec279daaf47ed32769fbb0c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 10:29:10 +0200 Subject: [PATCH 507/894] fixed treesitter --- lua/plugins/treesitter.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f3ff1f6..fe7f132 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -3,9 +3,13 @@ return { version = '*', build = ':TSUpdate', config = function() - require('nvim-treesitter.install').compilers = {'clang'} + require('nvim-treesitter.install').compilers = {'gcc'} require('nvim-treesitter.configs').setup({ ensure_installed = 'all', + modules = {}, + sync_install = true, + auto_install = false, + ignore_install = {}, highlight = { enable = true, additional_vim_regex_highlighting = {'markdown'} -- 2.49.1 From b33b0eecea0ce3620bd3a664b8cd49a54bfff827 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 10:29:15 +0200 Subject: [PATCH 508/894] added neorg --- lua/plugins/neorg.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lua/plugins/neorg.lua diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..9f1b8d3 --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,20 @@ +return { + 'nvim-neorg/neorg', + build = ':Neorg sync-parsers', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + require('neorg').setup { + load = { + ['core.defaults'] = {}, -- Loads default behaviour + ['core.concealer'] = {}, -- Adds pretty icons to your documents + ['core.dirman'] = { -- Manages Neorg workspaces + config = { + workspaces = { + notes = '~/notes', + }, + }, + }, + }, + } + end, +} -- 2.49.1 From 0338d00fb59a383c68b64a977d76f0d3939cce54 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 11:07:08 +0200 Subject: [PATCH 509/894] some neorg updates --- init.lua | 1 + lazy-lock.json | 3 ++- lua/plugins/neorg.lua | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 93e408b..3d931a8 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,5 @@ vim.g.mapleader = ',' +vim.g.maplocalleader = ',' if not vim.g.vscode then require('config.lazy') require('my_keymappings') diff --git a/lazy-lock.json b/lazy-lock.json index de7dcf7..1c8de42 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -38,7 +38,8 @@ "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "neogit": { "branch": "master", "commit": "f0bd7c736cc242258f0fdce0029f3b6331fe952b" }, - "neorg": { "branch": "main", "commit": "67c729f5493bda44a9a1165393cd21f90a3f2a9d" }, + "neorg": { "branch": "main", "commit": "2745ee1371c1029171bb98f2d9fb258e688d2c20" }, + "neorg-telescope": { "branch": "main", "commit": "1310d4aaefd8149c9839bbe1d5610e94389e2f0e" }, "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 9f1b8d3..48f2ca9 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -1,19 +1,27 @@ return { 'nvim-neorg/neorg', build = ':Neorg sync-parsers', - dependencies = { 'nvim-lua/plenary.nvim' }, + branch = 'main', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-neorg/neorg-telescope' + }, config = function() require('neorg').setup { load = { - ['core.defaults'] = {}, -- Loads default behaviour - ['core.concealer'] = {}, -- Adds pretty icons to your documents - ['core.dirman'] = { -- Manages Neorg workspaces + ['core.defaults'] = {}, -- Loads default behaviour + ['core.concealer'] = {}, -- Adds pretty icons to your documents + ['core.dirman'] = { -- Manages Neorg workspaces config = { workspaces = { notes = '~/notes', }, }, }, + ['core.itero'] = {}, + ['core.promo'] = {}, + ['core.export.markdown'] = {}, + ['core.integrations.telescope'] = {}, }, } end, -- 2.49.1 From 544c4814a8b0ac3130cc1439ceafb35682a13ca7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 11:12:16 +0200 Subject: [PATCH 510/894] fixed clangd lsp --- lua/plugins/lspconfig.lua | 49 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 5f34b52..5e286c3 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -94,7 +94,6 @@ local on_attach = function(client, bufnr) end, }) end - end return { @@ -226,27 +225,28 @@ return { local clangd_capabilities = capabilities clangd_capabilities.textDocument.semanticHighlighting = true clangd_capabilities.offsetEncoding = { 'utf-16' } - require('clangd_extensions').setup { - server = { - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { 'clangd', - '--compile-commands-dir=build_nvim', - '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', - '--clang-tidy', - '--background-index', - '--use-dirty-headers', - '--completion-style=detailed' }, - root_dir = lspconfig.util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) - }, + lspconfig['clangd'].setup { + capabilities = clangd_capabilities, + on_attach = on_attach, + cmd = { 'clangd', + '--compile-commands-dir=build_nvim', + '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--clang-tidy', + '--background-index', + '--use-dirty-headers', + '--completion-style=detailed' }, + root_dir = lspconfig.util.root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim' + ) + } + + require('clangd_extensions').setup({ extensions = { inlay_hints = { @@ -254,8 +254,7 @@ return { only_current_line = true, } } - - } + }) lspconfig['jsonls'].setup { capabilities = capabilities, @@ -326,7 +325,7 @@ return { capabilities = capabilities, }) - vim.diagnostic.config({ virtual_text = true}) + vim.diagnostic.config({ virtual_text = true }) -- vim.diagnostic.config({ virtual_text = false, virtual_lines = false }) -- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) end, -- 2.49.1 From 66d9f8d837564c3d4ce3a6ab491c8b1cf205d34c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Sep 2023 14:15:29 +0200 Subject: [PATCH 511/894] added kanagawa theme --- lazy-lock.json | 1 + lua/config/options.lua | 2 +- lua/plugins/kanagawa.lua | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/kanagawa.lua diff --git a/lazy-lock.json b/lazy-lock.json index 1c8de42..7997128 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -27,6 +27,7 @@ "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, + "kanagawa.nvim": { "branch": "master", "commit": "a4e99f089110c6d00bc33f5497709200e914e763" }, "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "lazygit.nvim": { "branch": "main", "commit": "75c920883f44243f2bbb172be423e484a58f7c45" }, "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, diff --git a/lua/config/options.lua b/lua/config/options.lua index 8da5eec..046c85a 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -55,7 +55,7 @@ else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' -- opt.guifont = 'FiraCode Nerd Font:h10' - opt.guifont = 'RobotoMono Nerd Font:h10' + opt.guifont = 'RobotoMono Nerd Font:h11' -- opt.guifont = 'Cousine Nerd Font Mono:h10' -- opt.guifont = 'DroidSansM Nerd Font Propo:h10' -- opt.guifont = 'AnonymicePro Nerd Font:h11' diff --git a/lua/plugins/kanagawa.lua b/lua/plugins/kanagawa.lua new file mode 100644 index 0000000..2627fe1 --- /dev/null +++ b/lua/plugins/kanagawa.lua @@ -0,0 +1,36 @@ +return { + 'rebelot/kanagawa.nvim', + config = function() + require('kanagawa').setup({ + compile = false, -- enable compiling the colorscheme + undercurl = true, -- enable undercurls + commentStyle = { italic = true }, + functionStyle = {}, + keywordStyle = { italic = true }, + statementStyle = { bold = true }, + typeStyle = {}, + transparent = false, -- do not set background color + dimInactive = true, -- dim inactive window `:h hl-NormalNC` + terminalColors = true, -- define vim.g.terminal_color_{0,17} + colors = { + -- add/modify theme and palette colors + palette = {}, + theme = { wave = {}, lotus = {}, dragon = {}, all = {} }, + }, + overrides = function(colors) -- add/modify highlights + return { + ['@lsp.mod.readonly'] = { bold = true }, + } + end, + theme = 'wave', -- Load "wave" theme when 'background' option is not set + background = { + -- map the value of 'background' option to a theme + dark = 'wave', -- try "dragon" ! + light = 'lotus' + }, + }) + + vim.cmd('colorscheme kanagawa') + end, + enabled = true +} -- 2.49.1 From 4e0c89a4c86c590ba22d37f2ae4ce74dc8771298 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 21 Sep 2023 12:47:55 +0200 Subject: [PATCH 512/894] fixed two warnings in dap config --- lua/plugins/dap.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 4395583..5164899 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -187,7 +187,7 @@ return { type = 'codelldb', request = 'launch', program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file') + return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file'}) end, cwd = '${workspaceFolder}', stopOnEntry = false, @@ -197,7 +197,7 @@ return { type = 'lldb', request = 'launch', program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file') + return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file'}) end, cwd = '${workspaceFolder}', stopOnEntry = false, -- 2.49.1 From 5fff121742de053cba11a8d789a5c51643e04739 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 21 Sep 2023 12:48:04 +0200 Subject: [PATCH 513/894] use mason way to get exe in dap config --- lua/plugins/dap.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 5164899..173bdd2 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -154,8 +154,7 @@ return { type = 'server', port = '${port}', executable = { - -- CHANGE THIS to your path! - command = masonpath .. '/bin/codelldb.cmd', + command = require'mason-core.path'.bin_prefix'codelldb'; args = { '--port', '${port}' }, -- On windows you may have to uncomment this: -- 2.49.1 From 5dd9bd87ec685d830e7e02bedc3e2d34c2e1e6b4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 28 Sep 2023 13:44:34 +0200 Subject: [PATCH 514/894] updated plugins --- lazy-lock.json | 30 ++++++++++++------------ lua/plugins/indent_blankline.lua | 39 ++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 7997128..aab05f2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -18,56 +18,58 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "diffview.nvim": { "branch": "main", "commit": "a111d19ccceac6530448d329c63f998f77b5626e" }, "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, + "everforest-nvim": { "branch": "main", "commit": "64f290dd2d00ae54132589b55bf9454370eb7cd8" }, "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, - "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, + "gruvbox.nvim": { "branch": "main", "commit": "08a551cc8140e6ca41b5de6cabf75d02a246c330" }, + "indent-blankline.nvim": { "branch": "master", "commit": "4872a53987167e70b9285a9ebcc1d286b9e13b06" }, "kanagawa.nvim": { "branch": "master", "commit": "a4e99f089110c6d00bc33f5497709200e914e763" }, - "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, - "lazygit.nvim": { "branch": "main", "commit": "75c920883f44243f2bbb172be423e484a58f7c45" }, + "lazy.nvim": { "branch": "main", "commit": "7ca3bdb566c3ba4492f2d22b37c2c9e26f09470f" }, + "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "2d89ca96e08eb6e9c8e50e1bb4738bc5125c9f12" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "f0bd7c736cc242258f0fdce0029f3b6331fe952b" }, - "neorg": { "branch": "main", "commit": "2745ee1371c1029171bb98f2d9fb258e688d2c20" }, + "neogit": { "branch": "master", "commit": "49c51e9325e578f566672cc427b2d86fd6753f67" }, + "neorg": { "branch": "main", "commit": "745715c873395840a5127413d1ef30a42735605e" }, "neorg-telescope": { "branch": "main", "commit": "1310d4aaefd8149c9839bbe1d5610e94389e2f0e" }, "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "7b3eb9b5813a22188c4dbb248475fcbaf9f4d195" }, + "nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-devdocs": { "branch": "master", "commit": "0416494850471e22f8639b7b812e6dea3d46a051" }, - "nvim-lspconfig": { "branch": "master", "commit": "f3195835c0447ee2c80152b893ab51ca162b04a9" }, + "nvim-devdocs": { "branch": "master", "commit": "8e0cb37b2bd35f6025074b3d4c6f62d77b21836c" }, + "nvim-lspconfig": { "branch": "master", "commit": "c7077400d004c1a424d210af76ce198250db72fd" }, "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, - "octo.nvim": { "branch": "master", "commit": "ffa4c4f9d6579039d772ae32c13083e0974fa31c" }, + "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, + "octo.nvim": { "branch": "master", "commit": "04334f0602b351e4995f352b6fed3d6f91f64610" }, "oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" }, "overseer.nvim": { "branch": "master", "commit": "fc35ba7bd86004654ee314eb44d58498f27a326a" }, "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "9cbd3dc409af1f5531778ccd1ea6bce668241f39" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "6b9fc617ad52f25372d1855e049cae3af348bc09" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, @@ -75,7 +77,7 @@ "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" }, - "toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, + "toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, "which-key.nvim": { "branch": "main", "commit": "bf09a25bdc9a83bcc69d2cf078e680368676513b" }, "zk-nvim": { "branch": "main", "commit": "797618aa07f58ceba6f79fb6e777e8e45c51e1ce" } diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua index 445cc34..c662f37 100644 --- a/lua/plugins/indent_blankline.lua +++ b/lua/plugins/indent_blankline.lua @@ -3,6 +3,7 @@ return { dependencies = { 'nvim-treesitter/nvim-treesitter', }, + main = 'ibl', config = function() local opt = vim.opt -- to set options opt.listchars:append('eol:↴') @@ -10,13 +11,37 @@ return { -- opt.listchars:append 'space:⋅' opt.listchars:append('trail: ') opt.listchars:append('tab:→ ') - require('indent_blankline').setup { - show_end_of_line = true, - use_treesitter = true, - show_current_context = true, - show_current_context_start = false, - space_char_blankline = ' ', - -- context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' }, + local highlight = { + 'RainbowRed', + 'RainbowYellow', + 'RainbowBlue', + 'RainbowOrange', + 'RainbowGreen', + 'RainbowViolet', + 'RainbowCyan', } + + local hooks = require 'ibl.hooks' + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, 'RainbowRed', { fg = '#E06C75' }) + vim.api.nvim_set_hl(0, 'RainbowYellow', { fg = '#E5C07B' }) + vim.api.nvim_set_hl(0, 'RainbowBlue', { fg = '#61AFEF' }) + vim.api.nvim_set_hl(0, 'RainbowOrange', { fg = '#D19A66' }) + vim.api.nvim_set_hl(0, 'RainbowGreen', { fg = '#98C379' }) + vim.api.nvim_set_hl(0, 'RainbowViolet', { fg = '#C678DD' }) + vim.api.nvim_set_hl(0, 'RainbowCyan', { fg = '#56B6C2' }) + end) + + vim.g.rainbow_delimiters = { highlight = highlight } + require('ibl').setup { + scope = { + highlight = highlight, + show_start = false + } + } + + hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) end, } -- 2.49.1 From 02e55b113b2562bee69572fadcda97635d9e74cc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 28 Sep 2023 13:56:22 +0200 Subject: [PATCH 515/894] static is italic in kanagawa --- lua/plugins/kanagawa.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/kanagawa.lua b/lua/plugins/kanagawa.lua index 2627fe1..e23221b 100644 --- a/lua/plugins/kanagawa.lua +++ b/lua/plugins/kanagawa.lua @@ -20,6 +20,7 @@ return { overrides = function(colors) -- add/modify highlights return { ['@lsp.mod.readonly'] = { bold = true }, + ['@lsp.mod.static'] = { italic = true }, } end, theme = 'wave', -- Load "wave" theme when 'background' option is not set -- 2.49.1 From 713a7072b108255640ca76405fffcb32ad50c4d1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 28 Sep 2023 14:27:00 +0200 Subject: [PATCH 516/894] some neorg fixes --- lua/my_autocommands.lua | 14 ++++++++------ lua/plugins/cmp.lua | 1 + lua/plugins/neorg.lua | 4 ++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index a28d2b7..98a0d9e 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -78,11 +78,13 @@ api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) -- Keep window ratio when resize api.nvim_create_autocmd('VimResized', { command = [[wincmd =]] }) -vim.api.nvim_create_autocmd({'UIEnter'}, { - callback = function(event) - local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client - if client ~= nil and client.name == "Firenvim" then - vim.o.laststatus = 0 - end +vim.api.nvim_create_autocmd({ 'UIEnter' }, { + callback = function(event) + local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client + if client ~= nil and client.name == 'Firenvim' then + vim.o.laststatus = 0 end + end }) + +vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter' }, { pattern = { '*.norg' }, command = 'set conceallevel=3' }) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 309ddff..105f1fd 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -88,6 +88,7 @@ return { end, }, sources = { + { name = 'neorg', priority = 8 }, { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 48f2ca9..cda5837 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -11,6 +11,10 @@ return { load = { ['core.defaults'] = {}, -- Loads default behaviour ['core.concealer'] = {}, -- Adds pretty icons to your documents + ['core.completion'] = { + config = { + engine = 'nvim-cmp'} + }, -- Adds pretty icons to your documents ['core.dirman'] = { -- Manages Neorg workspaces config = { workspaces = { -- 2.49.1 From 81f8b66de4f038200976df0081d2d750e41f99e9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 4 Oct 2023 20:24:01 +0200 Subject: [PATCH 517/894] fixed wrapping with telescope --- lua/plugins/telescope.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index d75b99a..16d021c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -213,5 +213,14 @@ return { if vim.loop.os_uname().sysname == 'Windows_NT' then vim.env.HOME = home end + vim.api.nvim_create_autocmd('BufEnter', { + callback = function() + if vim.opt.foldmethod:get() == 'expr' then + vim.schedule(function() + vim.opt.foldmethod = 'expr' + end) + end + end, + }) end } -- 2.49.1 From 404ce56cb5514527fd334f9bc65dfd50037d8d56 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 4 Oct 2023 20:24:08 +0200 Subject: [PATCH 518/894] format telescope config --- lua/plugins/telescope.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 16d021c..5a94cb6 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -206,8 +206,8 @@ return { vim.api.nvim_create_autocmd('User', { pattern = 'TelescopePreviewerLoaded', callback = function() - vim.api.nvim_win_set_option(0, "wrap", true) - vim.api.nvim_win_set_option(0, "number", true) + vim.api.nvim_win_set_option(0, 'wrap', true) + vim.api.nvim_win_set_option(0, 'number', true) end, }) if vim.loop.os_uname().sysname == 'Windows_NT' then -- 2.49.1 From 4fb7e309b23a41988380e207937fc2d8ee32447a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 12:52:38 +0200 Subject: [PATCH 519/894] lazy load neorg --- lua/plugins/neorg.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index cda5837..e96d8cc 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -6,10 +6,13 @@ return { 'nvim-lua/plenary.nvim', 'nvim-neorg/neorg-telescope' }, + ft = 'norg', + cmd = 'Neorg', config = function() require('neorg').setup { load = { ['core.defaults'] = {}, -- Loads default behaviour + ['core.export'] = {}, -- Loads default behaviour ['core.concealer'] = {}, -- Adds pretty icons to your documents ['core.completion'] = { config = { -- 2.49.1 From 2ebe9240fab47738287c3b6fd45be4ce0d4af2e3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:07:00 +0200 Subject: [PATCH 520/894] lazy load cmp --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 105f1fd..a01520e 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,6 +1,7 @@ return { 'hrsh7th/nvim-cmp', branch = 'main', + event = 'InsertEnter', dependencies = { { 'onsails/lspkind-nvim' }, { 'hrsh7th/cmp-buffer' }, -- 2.49.1 From e3d31b397843204007df3dc434d2ba34ff464acc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:07:14 +0200 Subject: [PATCH 521/894] lazy load devdocs --- lua/plugins/nvim-devdocs.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/plugins/nvim-devdocs.lua b/lua/plugins/nvim-devdocs.lua index 61e978c..96d6d1e 100644 --- a/lua/plugins/nvim-devdocs.lua +++ b/lua/plugins/nvim-devdocs.lua @@ -6,5 +6,16 @@ return { 'nvim-treesitter/nvim-treesitter', }, branch = 'master', - opts = {} + opts = {}, + cmd = { + 'DevdocsFetch', + 'DevdocsInstall', + 'DevdocsUninstall', + 'DevdocsOpen', + 'DevdocsOpenFloat', + 'DevdocsOpenCurrent', + 'DevdocsOpenCurrentFloat', + 'DevdocsUpdate', + 'DevdocsUpdateAll', + } } -- 2.49.1 From a251c7461902c1f763546736b3242cfa60dd684c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:07:22 +0200 Subject: [PATCH 522/894] format treesitter config --- lua/plugins/treesitter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index fe7f132..b66a4e0 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -3,7 +3,7 @@ return { version = '*', build = ':TSUpdate', config = function() - require('nvim-treesitter.install').compilers = {'gcc'} + require('nvim-treesitter.install').compilers = { 'gcc' } require('nvim-treesitter.configs').setup({ ensure_installed = 'all', modules = {}, @@ -12,7 +12,7 @@ return { ignore_install = {}, highlight = { enable = true, - additional_vim_regex_highlighting = {'markdown'} + additional_vim_regex_highlighting = { 'markdown' } }, rainbow = { enable = true, -- 2.49.1 From 33e27206de14abe5674df133b637919fe9f33b3a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:08:32 +0200 Subject: [PATCH 523/894] use lazy true for colorschemes --- lua/config/options.lua | 2 ++ lua/plugins/astrodark.lua | 2 +- lua/plugins/everforest.lua | 15 +++++++++++++++ lua/plugins/gruvbox-baby.lua | 9 +++++++++ lua/plugins/gruvbox.lua | 10 ++++++---- lua/plugins/kanagawa.lua | 1 + 6 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 lua/plugins/everforest.lua create mode 100644 lua/plugins/gruvbox-baby.lua diff --git a/lua/config/options.lua b/lua/config/options.lua index 046c85a..4d60f42 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -88,3 +88,5 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Window border for floating windows require('lspconfig.ui.windows').default_options.border = 'rounded' + +vim.cmd('colorscheme gruvbox') diff --git a/lua/plugins/astrodark.lua b/lua/plugins/astrodark.lua index 80783b3..0c0e405 100644 --- a/lua/plugins/astrodark.lua +++ b/lua/plugins/astrodark.lua @@ -1,6 +1,6 @@ return { 'AstroNvim/astrotheme', - lazy = false, + lazy = true, priority = 1000, config = function() local C = require('astrotheme.palettes.astrodark') diff --git a/lua/plugins/everforest.lua b/lua/plugins/everforest.lua new file mode 100644 index 0000000..897712b --- /dev/null +++ b/lua/plugins/everforest.lua @@ -0,0 +1,15 @@ +return { + 'neanias/everforest-nvim', + version = false, + lazy = true, + priority = 1000, -- make sure to load this before all the other start plugins + -- Optional; default configuration will be used if setup isn't called. + config = function() + require('everforest').setup({ + background = 'hard', + -- Your config here + }) + require('everforest').load() + end, + enabled = true +} diff --git a/lua/plugins/gruvbox-baby.lua b/lua/plugins/gruvbox-baby.lua new file mode 100644 index 0000000..512579d --- /dev/null +++ b/lua/plugins/gruvbox-baby.lua @@ -0,0 +1,9 @@ +return { + 'luisiacc/gruvbox-baby', + lazy = true, + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + vim.cmd('colorscheme gruvbox-baby') + end, + enabled = true +} diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua index b2ae7e6..d80c622 100644 --- a/lua/plugins/gruvbox.lua +++ b/lua/plugins/gruvbox.lua @@ -1,8 +1,10 @@ return { 'ellisonleao/gruvbox.nvim', priority = 1000, + lazy = true, + branch = 'main', config = function() - local colors = require('gruvbox.palette').colors + -- local colors = require('gruvbox.palette').colors require('gruvbox').setup({ undercurl = true, @@ -21,7 +23,7 @@ return { invert_intend_guides = false, palette_overrides = {}, overrides = { - ['@lsp.type.parameter'] = { fg = colors.faded_purple }, + -- ['@lsp.type.parameter'] = { fg = colors.faded_purple }, ['@lsp.type.function'] = { fg = '#797df2' }, ['@lsp.type.method'] = { fg = '#797df2' }, ['@lsp.mod.readonly'] = { bold = true }, @@ -29,7 +31,7 @@ return { dim_inactive = true, transparent_mode = false, }) - -- vim.cmd('colorscheme gruvbox') + vim.cmd('colorscheme gruvbox') end, - enabled = false + enabled = true } diff --git a/lua/plugins/kanagawa.lua b/lua/plugins/kanagawa.lua index e23221b..2922d11 100644 --- a/lua/plugins/kanagawa.lua +++ b/lua/plugins/kanagawa.lua @@ -1,5 +1,6 @@ return { 'rebelot/kanagawa.nvim', + lazy = true, config = function() require('kanagawa').setup({ compile = false, -- enable compiling the colorscheme -- 2.49.1 From 90173c2e25621de8d4636fb6f90aaad1b6f32b3c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:10:49 +0200 Subject: [PATCH 524/894] format options file --- lua/config/options.lua | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4d60f42..49dae5f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,24 +3,24 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.scrolloff = 4 @@ -48,7 +48,6 @@ if vim.fn.has('wsl') == 1 then } -- opt.guifont = 'Hack Nerd Font Mono:h10' opt.guifont = 'RobotoMono Nerd Font:h10' - elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' else @@ -69,7 +68,7 @@ opt.completeopt = 'menu,menuone,noselect' opt.expandtab = true opt.smartindent = true opt.title = true -opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%) Neovim' +opt.titlestring = '%(%{fnamemodify(getcwd(),\":t\")}%) Neovim' opt.laststatus = 3 -- for lualine opt.background = 'dark' -- 2.49.1 From 89086b70d0d63c0bc88da9f9a9df974a02dc5360 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:31:22 +0200 Subject: [PATCH 525/894] more colorscheme tuning --- lazy-lock.json | 3 +++ lua/config/options.lua | 2 +- lua/plugins/catppuccin.lua | 5 ++++- lua/plugins/monokai-pro.lua | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index aab05f2..1d2af2b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,6 +5,7 @@ "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, + "catppuccin": { "branch": "main", "commit": "18267654c665310c665d3b7c6bc43d5f5ea5e410" }, "clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" }, "cmake-tools.nvim": { "branch": "master", "commit": "714fcd7ce88d320507d3a4a1da5d23bf457bcf7b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -27,6 +28,7 @@ "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, + "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "08a551cc8140e6ca41b5de6cabf75d02a246c330" }, "indent-blankline.nvim": { "branch": "master", "commit": "4872a53987167e70b9285a9ebcc1d286b9e13b06" }, "kanagawa.nvim": { "branch": "master", "commit": "a4e99f089110c6d00bc33f5497709200e914e763" }, @@ -37,6 +39,7 @@ "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, + "monokai-pro.nvim": { "branch": "master", "commit": "488a0152331c59a33d7f8bdef6eb88dae299c808" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, diff --git a/lua/config/options.lua b/lua/config/options.lua index 49dae5f..f0b4bc5 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -88,4 +88,4 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Window border for floating windows require('lspconfig.ui.windows').default_options.border = 'rounded' -vim.cmd('colorscheme gruvbox') +vim.cmd('colorscheme catppuccin') diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index 2e74a04..57159aa 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -2,6 +2,7 @@ return { 'catppuccin/nvim', name = 'catppuccin', + lazy = true, config = function() require('catppuccin').setup({ flavour = 'macchiato', -- latte, frappe, macchiato, mocha @@ -60,6 +61,8 @@ return ['@lsp.mod.readonly'] = { style = { 'bold' } }, ['@type.qualifier'] = { fg = macchiato.sky }, ['@namespace'] = { fg = macchiato.red }, + ['@function.builtin'] = { link = 'Function' }, + ['@property'] = { fg = macchiato.pink }, Macro = { fg = macchiato.rosewater } } end, @@ -97,5 +100,5 @@ return }) vim.cmd('colorscheme catppuccin') end, - enabled = false + enabled = true } diff --git a/lua/plugins/monokai-pro.lua b/lua/plugins/monokai-pro.lua index eb32cf4..1894913 100644 --- a/lua/plugins/monokai-pro.lua +++ b/lua/plugins/monokai-pro.lua @@ -1,5 +1,6 @@ return { 'loctvl842/monokai-pro.nvim', + lazy = true, config = function() require('monokai-pro').setup({ -- filter = 'spectrum' @@ -59,5 +60,5 @@ return { }) vim.cmd('colorscheme monokai-pro') end, - enabled = false + enabled = true } -- 2.49.1 From b790381843727d5130de6570ae01c31ac5b273f6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:46:08 +0200 Subject: [PATCH 526/894] change flavor to moccha --- lua/plugins/catppuccin.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index 57159aa..3ba7131 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -5,7 +5,7 @@ return lazy = true, config = function() require('catppuccin').setup({ - flavour = 'macchiato', -- latte, frappe, macchiato, mocha + flavour = 'mocha', -- latte, frappe, macchiato, mocha no_italic = true, dim_inactive = { enabled = true, @@ -56,14 +56,14 @@ return CmpBorder = { fg = '#fe4145' }, } end, - macchiato = function(macchiato) + mocha = function(colors) return { ['@lsp.mod.readonly'] = { style = { 'bold' } }, - ['@type.qualifier'] = { fg = macchiato.sky }, - ['@namespace'] = { fg = macchiato.red }, + ['@type.qualifier'] = { fg = colors.sky }, + ['@namespace'] = { fg = colors.red }, ['@function.builtin'] = { link = 'Function' }, - ['@property'] = { fg = macchiato.pink }, - Macro = { fg = macchiato.rosewater } + ['@property'] = { fg = colors.pink }, + Macro = { fg = colors.rosewater } } end, }, -- 2.49.1 From 3f24c9a0f8de9b72f87b37fb18898cedd1ea91f9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:46:16 +0200 Subject: [PATCH 527/894] fixed lualine theme --- lua/plugins/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 3fd7f97..e0630d4 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -4,7 +4,7 @@ return { config = function() require('lualine').setup { options = { - theme = 'material', + theme = 'catppuccin', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, -- 2.49.1 From 41d9095aaed40a22dd5f87b217b8fc27e3bc5234 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:46:23 +0200 Subject: [PATCH 528/894] sorting in buffer telescope window --- lua/plugins/telescope.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 5a94cb6..2bf0c21 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -133,9 +133,8 @@ return { vimgrep_arguments = vimgrep_arguments, }, pickers = { - -- Your special builtin config goes in here buffers = { - sort_lastused = false, + sort_lastused = true, sort_mru = true, ignore_current_buffer = false, theme = 'ivy', -- 2.49.1 From eae5c634d96383a2b87473542b46abb4a06bda32 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:46:36 +0200 Subject: [PATCH 529/894] change font size to 10 --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index f0b4bc5..770fb4a 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -54,7 +54,7 @@ else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' -- opt.guifont = 'FiraCode Nerd Font:h10' - opt.guifont = 'RobotoMono Nerd Font:h11' + opt.guifont = 'RobotoMono Nerd Font:h10' -- opt.guifont = 'Cousine Nerd Font Mono:h10' -- opt.guifont = 'DroidSansM Nerd Font Propo:h10' -- opt.guifont = 'AnonymicePro Nerd Font:h11' -- 2.49.1 From 3c2781930f946f0fef88ea7276a203e80571c9cd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 15 Oct 2023 13:47:05 +0200 Subject: [PATCH 530/894] added git hash for catppuccin --- lazy-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1d2af2b..ba75397 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,7 +5,6 @@ "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, - "catppuccin": { "branch": "main", "commit": "18267654c665310c665d3b7c6bc43d5f5ea5e410" }, "clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" }, "cmake-tools.nvim": { "branch": "master", "commit": "714fcd7ce88d320507d3a4a1da5d23bf457bcf7b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, -- 2.49.1 From 4cdf7874914b9c78bf96dda3681aff210b8755f4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 10 Nov 2023 22:14:00 +0100 Subject: [PATCH 531/894] set conceallevel for markdown --- lua/my_autocommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 98a0d9e..43a7b6b 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -87,4 +87,4 @@ vim.api.nvim_create_autocmd({ 'UIEnter' }, { end }) -vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter' }, { pattern = { '*.norg' }, command = 'set conceallevel=3' }) +vim.api.nvim_create_autocmd({ 'FileType' }, { pattern = { 'norg', 'markdown' }, command = 'set conceallevel=3' }) -- 2.49.1 From 34b7cd61673c0901bfb653773670052ee2c0dad5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 30 Nov 2023 20:13:29 +0100 Subject: [PATCH 532/894] added bamboo color scheme --- lazy-lock.json | 1 + lua/config/options.lua | 2 +- lua/plugins/bamboo.lua | 15 +++++++++++++++ lua/plugins/lualine.lua | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/bamboo.lua diff --git a/lazy-lock.json b/lazy-lock.json index ba75397..0afd5cc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,6 +5,7 @@ "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, + "bamboo.nvim": { "branch": "master", "commit": "318e032ad1d9605a2af673d75c65797dbf95bc14" }, "clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" }, "cmake-tools.nvim": { "branch": "master", "commit": "714fcd7ce88d320507d3a4a1da5d23bf457bcf7b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, diff --git a/lua/config/options.lua b/lua/config/options.lua index 770fb4a..fac914f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -88,4 +88,4 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Window border for floating windows require('lspconfig.ui.windows').default_options.border = 'rounded' -vim.cmd('colorscheme catppuccin') +vim.cmd('colorscheme bamboo') diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua new file mode 100644 index 0000000..c0c6f13 --- /dev/null +++ b/lua/plugins/bamboo.lua @@ -0,0 +1,15 @@ +return { + 'ribru17/bamboo.nvim', + lazy = true, + priority = 1000, + config = function() + require('bamboo').setup { + dim_inactive = false, -- Dim inactive windows/buffers + highlights = { + ['@lsp.mod.readonly'] = { fmt = 'bold' }, + }, + } + require('bamboo').load() + end, + enabled = true +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index e0630d4..c9e3bce 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -4,7 +4,7 @@ return { config = function() require('lualine').setup { options = { - theme = 'catppuccin', + theme = 'bamboo', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, -- 2.49.1 From 943f29a165ab2c86ecdc5e36dac4754a43f60335 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 30 Nov 2023 20:13:36 +0100 Subject: [PATCH 533/894] neorg tweaks --- lua/plugins/neorg.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index e96d8cc..d4c0b9e 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -4,7 +4,10 @@ return { branch = 'main', dependencies = { 'nvim-lua/plenary.nvim', - 'nvim-neorg/neorg-telescope' + { + 'nvim-neorg/neorg-telescope', + branch = 'main' + } }, ft = 'norg', cmd = 'Neorg', @@ -12,13 +15,13 @@ return { require('neorg').setup { load = { ['core.defaults'] = {}, -- Loads default behaviour - ['core.export'] = {}, -- Loads default behaviour + ['core.export'] = {}, -- Loads default behaviour ['core.concealer'] = {}, -- Adds pretty icons to your documents ['core.completion'] = { config = { - engine = 'nvim-cmp'} - }, -- Adds pretty icons to your documents - ['core.dirman'] = { -- Manages Neorg workspaces + engine = 'nvim-cmp' } + }, -- Adds pretty icons to your documents + ['core.dirman'] = { -- Manages Neorg workspaces config = { workspaces = { notes = '~/notes', -- 2.49.1 From 9af61291c3f719c7853f95bac9f661b8e09115c1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Dec 2023 20:57:55 +0100 Subject: [PATCH 534/894] fixed zk --- ftplugin/markdown.lua | 5 +++-- lua/plugins/lspconfig.lua | 5 +++++ lua/plugins/zk.lua | 21 ++++++++++++++++++--- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua index d827759..c13ca46 100644 --- a/ftplugin/markdown.lua +++ b/ftplugin/markdown.lua @@ -1,8 +1,9 @@ -- Add the key mappings only for Markdown files in a zk notebook. -if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then +-- if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end local opts = { noremap = true, silent = false } + map("n", "", "lua vim.lsp.buf.definition()", opts) -- Create a new note after asking for its title. -- This overrides the global `zn` mapping to create the note in the same directory as the current buffer. vim.keymap.set('n', 'zn', "ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", @@ -25,4 +26,4 @@ if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then map('n', 'K', 'lua vim.lsp.buf.hover()', opts) -- Open the code actions for a visual selection. map('v', 'za', ":'<,'>lua vim.lsp.buf.range_code_action()", opts) -end +-- end diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 5e286c3..59d741f 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -298,6 +298,11 @@ return { on_attach = on_attach, } + lspconfig['zk'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + lspconfig['yamlls'].setup { capabilities = capabilities, on_attach = on_attach, diff --git a/lua/plugins/zk.lua b/lua/plugins/zk.lua index dc225f1..747ee84 100644 --- a/lua/plugins/zk.lua +++ b/lua/plugins/zk.lua @@ -3,9 +3,24 @@ return { config = function() require('zk').setup({ picker = 'telescope', - config = { - on_attach = require('plugins.lspconfig').on_attach - } + -- config = { + -- on_attach = require('plugins.lspconfig').on_attach + -- } + lsp = { + -- `config` is passed to `vim.lsp.start_client(config)` + config = { + cmd = { 'zk', 'lsp' }, + name = 'zk', + -- on_attach = ... + -- etc, see `:h vim.lsp.start_client()` + }, + + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + filetypes = { 'markdown' }, + }, + }, }) end } -- 2.49.1 From cbe9c23df08d168b0327989c03a06c0fb9e069ae Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Dec 2023 21:56:31 +0100 Subject: [PATCH 535/894] plugin update --- lazy-lock.json | 99 +++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 0afd5cc..5cf2521 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,13 +1,14 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" }, + "LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, - "astrotheme": { "branch": "main", "commit": "e78a109d195a89930d7c168157e5c32c2b0a1c8d" }, - "bamboo.nvim": { "branch": "master", "commit": "318e032ad1d9605a2af673d75c65797dbf95bc14" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" }, - "cmake-tools.nvim": { "branch": "master", "commit": "714fcd7ce88d320507d3a4a1da5d23bf457bcf7b" }, + "aerial.nvim": { "branch": "master", "commit": "63ec2bfc3d9b8ce1fd943fff14781504d8ee250e" }, + "astrotheme": { "branch": "main", "commit": "275006599730f67e809ef9542e8d2293ee42e38e" }, + "bamboo.nvim": { "branch": "master", "commit": "3b39487358c8e23ecec9cda255059c8526dea760" }, + "catppuccin": { "branch": "main", "commit": "18267654c665310c665d3b7c6bc43d5f5ea5e410" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, + "cmake-tools.nvim": { "branch": "master", "commit": "edbf419e00b21e83d45f4a17edffb2035d7a0ce6" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -20,68 +21,68 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, - "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "a111d19ccceac6530448d329c63f998f77b5626e" }, - "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, - "everforest-nvim": { "branch": "main", "commit": "64f290dd2d00ae54132589b55bf9454370eb7cd8" }, - "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, - "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, - "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, + "cmp-treesitter": { "branch": "master", "commit": "b8bc760dfcc624edd5454f0982b63786a822eed9" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, + "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, + "everforest-nvim": { "branch": "main", "commit": "6e06de0a08afc09c7e63acc4ace8c748fe48d8b9" }, + "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "08a551cc8140e6ca41b5de6cabf75d02a246c330" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4872a53987167e70b9285a9ebcc1d286b9e13b06" }, - "kanagawa.nvim": { "branch": "master", "commit": "a4e99f089110c6d00bc33f5497709200e914e763" }, - "lazy.nvim": { "branch": "main", "commit": "7ca3bdb566c3ba4492f2d22b37c2c9e26f09470f" }, + "gruvbox.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" }, + "indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" }, + "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, - "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, - "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, - "monokai-pro.nvim": { "branch": "master", "commit": "488a0152331c59a33d7f8bdef6eb88dae299c808" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4eb8e15e3c0757303d4c6dea64d2981fc679e990" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "monokai-pro.nvim": { "branch": "master", "commit": "70c384c43b9e19b59df3d6489b544ad4df155100" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "49c51e9325e578f566672cc427b2d86fd6753f67" }, - "neorg": { "branch": "main", "commit": "745715c873395840a5127413d1ef30a42735605e" }, - "neorg-telescope": { "branch": "main", "commit": "1310d4aaefd8149c9839bbe1d5610e94389e2f0e" }, - "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, - "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, + "neogit": { "branch": "master", "commit": "29561839c7167010611a6e9315dba7aa9f358024" }, + "neorg": { "branch": "main", "commit": "bf3daa2229c60f92f48ac6d7db3049b65fd01371" }, + "neorg-telescope": { "branch": "main", "commit": "6a7a677c40fa3c348924a4e2a06a513e0b34c056" }, + "neotest": { "branch": "master", "commit": "009328955066ae6c170d24bb0de5f168d8760ff8" }, + "neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" }, "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" }, - "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, + "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, + "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" }, - "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, + "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, + "nvim-dap-python": { "branch": "master", "commit": "e0be843877e7ae756ef1ee7a441ca0b9e1677da9" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-devdocs": { "branch": "master", "commit": "8e0cb37b2bd35f6025074b3d4c6f62d77b21836c" }, - "nvim-lspconfig": { "branch": "master", "commit": "c7077400d004c1a424d210af76ce198250db72fd" }, + "nvim-devdocs": { "branch": "master", "commit": "738c5d2afa191c05b8016b7eb502e21ce89657ad" }, + "nvim-lspconfig": { "branch": "master", "commit": "694aaec65733e2d54d393abf80e526f86726c988" }, "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, - "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, - "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, + "nvim-surround": { "branch": "main", "commit": "18016d6af52edc9f1c794dcf6665a26a2962d2ee" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, - "octo.nvim": { "branch": "master", "commit": "04334f0602b351e4995f352b6fed3d6f91f64610" }, - "oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" }, - "overseer.nvim": { "branch": "master", "commit": "fc35ba7bd86004654ee314eb44d58498f27a326a" }, - "peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" }, - "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, + "octo.nvim": { "branch": "master", "commit": "1ce62d9a29b5eca2c63fb955359f5212e4d1bc7b" }, + "oil.nvim": { "branch": "master", "commit": "58340545c6a01e5e9f7966df448714a156db137a" }, + "overseer.nvim": { "branch": "master", "commit": "62e812574e93380ea0704de9455ee68e5a098e93" }, + "peek.nvim": { "branch": "master", "commit": "4163a48f190d2b2d94840be3eb38b4af83961ebe" }, + "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "6b9fc617ad52f25372d1855e049cae3af348bc09" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "47404636a34580db1636dc0cf35027bdf77abba5" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope-menufacture": { "branch": "main", "commit": "a12ba19b6e750707c5a63488d02c6b7f2b9d745b" }, - "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" }, + "telescope-menufacture": { "branch": "main", "commit": "6d02935d732fc208fd59fca9922964d796fcb659" }, + "telescope-project.nvim": { "branch": "master", "commit": "5460c6c60d48618c5c746e5b1cad4c3e8262fdae" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "c261d903a78c2cda47a5e44488621f10f9dd7fcf" }, + "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, - "which-key.nvim": { "branch": "main", "commit": "bf09a25bdc9a83bcc69d2cf078e680368676513b" }, - "zk-nvim": { "branch": "main", "commit": "797618aa07f58ceba6f79fb6e777e8e45c51e1ce" } + "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, + "zk-nvim": { "branch": "main", "commit": "142625638d2fad464939c6ee1775571aba6379c6" } } \ No newline at end of file -- 2.49.1 From 4a21b07bf6950609dd18e0f5649b44bef681344e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Dec 2023 21:56:42 +0100 Subject: [PATCH 536/894] bamboo changes --- lua/config/options.lua | 2 +- lua/plugins/bamboo.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index fac914f..c50e19c 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -88,4 +88,4 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Window border for floating windows require('lspconfig.ui.windows').default_options.border = 'rounded' -vim.cmd('colorscheme bamboo') +require('bamboo').load() diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index c0c6f13..e0d7886 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -4,7 +4,8 @@ return { priority = 1000, config = function() require('bamboo').setup { - dim_inactive = false, -- Dim inactive windows/buffers + dim_inactive = true, -- Dim inactive windows/buffers + cmp_itemkind_reverse = true, highlights = { ['@lsp.mod.readonly'] = { fmt = 'bold' }, }, -- 2.49.1 From 3ae7846485b09ae1803ee02823903bef3ed46a2c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Jan 2024 13:56:30 +0100 Subject: [PATCH 537/894] set gitsigns to main branch --- lua/plugins/gitsigns.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index d8faf35..104dbe0 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,5 +1,6 @@ return { 'lewis6991/gitsigns.nvim', + branch = 'main', opts = { current_line_blame = false, current_line_blame_opts = { -- 2.49.1 From f26ec9e154fb959ba4d718c8495a138f26a361f3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Jan 2024 13:59:41 +0100 Subject: [PATCH 538/894] plugin updates --- lazy-lock.json | 102 ++++++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5cf2521..5e81e41 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,88 +1,88 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, + "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "63ec2bfc3d9b8ce1fd943fff14781504d8ee250e" }, - "astrotheme": { "branch": "main", "commit": "275006599730f67e809ef9542e8d2293ee42e38e" }, - "bamboo.nvim": { "branch": "master", "commit": "3b39487358c8e23ecec9cda255059c8526dea760" }, - "catppuccin": { "branch": "main", "commit": "18267654c665310c665d3b7c6bc43d5f5ea5e410" }, + "aerial.nvim": { "branch": "master", "commit": "e9661d4f739508377f42528fd08a85c4c8feba6e" }, + "astrotheme": { "branch": "main", "commit": "8dbe318a8361fe6e91161bdf17ba695ed06abee9" }, + "bamboo.nvim": { "branch": "master", "commit": "a8be506afe2ce533d870a6e23858c43968ea2660" }, + "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, - "cmake-tools.nvim": { "branch": "master", "commit": "edbf419e00b21e83d45f4a17edffb2035d7a0ce6" }, + "cmake-tools.nvim": { "branch": "master", "commit": "cd5db8b22de45b52cdac4c3fb6b333f1c02530bf" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, - "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, - "cmp-treesitter": { "branch": "master", "commit": "b8bc760dfcc624edd5454f0982b63786a822eed9" }, + "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, - "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "everforest-nvim": { "branch": "main", "commit": "6e06de0a08afc09c7e63acc4ace8c748fe48d8b9" }, + "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, + "everforest-nvim": { "branch": "main", "commit": "a2de6a58e8fa389fa239c51f416b72fd01a02175" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" }, + "friendly-snippets": { "branch": "main", "commit": "aced40b66b7bae9bc2c37fd7b11841d54727a7b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" }, - "indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" }, + "gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" }, + "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, - "lsp-virtual-improved.nvim": { "branch": "master", "commit": "79c53ce05fdeb6590701db55da5832ab4a2c3387" }, - "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4eb8e15e3c0757303d4c6dea64d2981fc679e990" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "monokai-pro.nvim": { "branch": "master", "commit": "70c384c43b9e19b59df3d6489b544ad4df155100" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, + "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, + "lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" }, + "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, + "mason.nvim": { "branch": "main", "commit": "baf99d94c3380640d19af9c70c0541bd6e7cd0cb" }, + "monokai-pro.nvim": { "branch": "master", "commit": "f3200bf058202089315c09a5060f386fe8ce94e9" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "2f2d08894bbc679d4d181604c16bb7079f646384" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "29561839c7167010611a6e9315dba7aa9f358024" }, - "neorg": { "branch": "main", "commit": "bf3daa2229c60f92f48ac6d7db3049b65fd01371" }, + "neogit": { "branch": "master", "commit": "ce0c369ccdba3f644a3b28f4c053421f435352c9" }, + "neorg": { "branch": "main", "commit": "e6d89d333aff65a771a98955fac9fc178345c01c" }, "neorg-telescope": { "branch": "main", "commit": "6a7a677c40fa3c348924a4e2a06a513e0b34c056" }, - "neotest": { "branch": "master", "commit": "009328955066ae6c170d24bb0de5f168d8760ff8" }, - "neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" }, + "neotest": { "branch": "master", "commit": "73043d666780e35185a77589e01bec96a52db910" }, + "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, - "nvim-dap-python": { "branch": "master", "commit": "e0be843877e7ae756ef1ee7a441ca0b9e1677da9" }, - "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-devdocs": { "branch": "master", "commit": "738c5d2afa191c05b8016b7eb502e21ce89657ad" }, - "nvim-lspconfig": { "branch": "master", "commit": "694aaec65733e2d54d393abf80e526f86726c988" }, + "nvim-dap-python": { "branch": "master", "commit": "091e4ae00a12085f9ed4200a3cd04af7179b8a23" }, + "nvim-dap-ui": { "branch": "master", "commit": "0b4816e5ad5f3219e8e3ec9cce07f61b770c1974" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, + "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, + "nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" }, "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" }, "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, - "nvim-surround": { "branch": "main", "commit": "18016d6af52edc9f1c794dcf6665a26a2962d2ee" }, - "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, - "octo.nvim": { "branch": "master", "commit": "1ce62d9a29b5eca2c63fb955359f5212e4d1bc7b" }, - "oil.nvim": { "branch": "master", "commit": "58340545c6a01e5e9f7966df448714a156db137a" }, - "overseer.nvim": { "branch": "master", "commit": "62e812574e93380ea0704de9455ee68e5a098e93" }, + "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, + "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, + "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" }, + "octo.nvim": { "branch": "master", "commit": "f77d214e5a67f1c1eb601a9c99418a5f7924af22" }, + "oil.nvim": { "branch": "master", "commit": "dd432e76d01eda08b8658415588d011009478469" }, + "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, "peek.nvim": { "branch": "master", "commit": "4163a48f190d2b2d94840be3eb38b4af83961ebe" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "47404636a34580db1636dc0cf35027bdf77abba5" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "a249476e451673f7811852d93109dff19311ee39" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, - "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, + "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope-menufacture": { "branch": "main", "commit": "6d02935d732fc208fd59fca9922964d796fcb659" }, - "telescope-project.nvim": { "branch": "master", "commit": "5460c6c60d48618c5c746e5b1cad4c3e8262fdae" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "c261d903a78c2cda47a5e44488621f10f9dd7fcf" }, + "telescope-menufacture": { "branch": "main", "commit": "2f342d275feab92cd6e7eb80c418d3c4370d4174" }, + "telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, + "toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, - "zk-nvim": { "branch": "main", "commit": "142625638d2fad464939c6ee1775571aba6379c6" } + "zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" } } \ No newline at end of file -- 2.49.1 From ce4a7ef05e91b4a26f1a260e6e0628645c0d43cc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Feb 2024 09:06:14 +0100 Subject: [PATCH 539/894] fixed some colors in bamboo for lsp --- lua/plugins/bamboo.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index e0d7886..b64d1ae 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -7,7 +7,9 @@ return { dim_inactive = true, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, highlights = { - ['@lsp.mod.readonly'] = { fmt = 'bold' }, + ['@lsp.type.parameter'] = { fg = 'red' }, + ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, + ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, }, } require('bamboo').load() -- 2.49.1 From 8a801d4b738eb2b99ec5e68484026eff4a0421a5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Feb 2024 13:38:33 +0100 Subject: [PATCH 540/894] fixed red color in bamboo custom colors --- lua/plugins/bamboo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index b64d1ae..9821604 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -3,11 +3,12 @@ return { lazy = true, priority = 1000, config = function() + local colors = require('bamboo.palette') require('bamboo').setup { dim_inactive = true, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, highlights = { - ['@lsp.type.parameter'] = { fg = 'red' }, + ['@lsp.type.parameter'] = { fg = colors.vulgaris.red }, ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, }, -- 2.49.1 From 1e8eaf3840c564f9371407e75da0810a1f8070cf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Feb 2024 23:37:57 +0100 Subject: [PATCH 541/894] add rustaceanvim --- lua/plugins/lspconfig.lua | 4 ---- lua/plugins/rustaceanvim.lua | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 lua/plugins/rustaceanvim.lua diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 59d741f..bad9c00 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -261,10 +261,6 @@ return { on_attach = on_attach, } - lspconfig['rust_analyzer'].setup { - capabilities = capabilities, - on_attach = on_attach, - } lspconfig['lua_ls'].setup { capabilities = capabilities, diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua new file mode 100644 index 0000000..752954d --- /dev/null +++ b/lua/plugins/rustaceanvim.lua @@ -0,0 +1,4 @@ +return { + 'mrcjkb/rustaceanvim', + ft = { 'rust' }, +} -- 2.49.1 From 38d34d0e8632e448b9229d43b9bb20b9acf67cc0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Feb 2024 23:38:08 +0100 Subject: [PATCH 542/894] fixed more in bamboo --- lua/plugins/bamboo.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 9821604..b1c1ec6 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -11,6 +11,8 @@ return { ['@lsp.type.parameter'] = { fg = colors.vulgaris.red }, ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, + ['@lsp.typemod.method.defaultLibrary.cpp'] = { fg = 'NONE' }, + ['@function.builtin'] = { fg = 'NONE' }, }, } require('bamboo').load() -- 2.49.1 From d37abaf353c13c6bb1189286347de2963bd04a4b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 7 Feb 2024 23:38:21 +0100 Subject: [PATCH 543/894] added rust plugin to lock file --- lazy-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lazy-lock.json b/lazy-lock.json index 5e81e41..3d1f831 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -74,6 +74,7 @@ "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "a249476e451673f7811852d93109dff19311ee39" }, + "rustaceanvim": { "branch": "master", "commit": "98b905d37d2751a4391ad096cf741930406d0ce0" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, -- 2.49.1 From 75b5dc19638ad79ca5115553598e09580b53594d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 13 Feb 2024 23:46:42 +0100 Subject: [PATCH 544/894] Keymap for exiting terminal --- lua/my_keymappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 4a395fb..40c9f80 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -73,3 +73,5 @@ if vim.g.neovide then vim.keymap.set('n', '', function() change_scale_factor(1.25) end) vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) end + +vim.keymap.set('t', '', '', { noremap = true}) -- 2.49.1 From 563f74965d4698d559698a2f03f46c86711db866 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 13 Feb 2024 23:48:14 +0100 Subject: [PATCH 545/894] Changed font to Hack Nerd font --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index c50e19c..0c9f45f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -49,7 +49,7 @@ if vim.fn.has('wsl') == 1 then -- opt.guifont = 'Hack Nerd Font Mono:h10' opt.guifont = 'RobotoMono Nerd Font:h10' elseif vim.loop.os_uname().sysname == 'Linux' then - opt.guifont = 'JetBrainsMono Nerd Font Mono:h7' + opt.guifont = 'Hack Nerd Font:h11' else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' -- 2.49.1 From cbeffa9b6d876509bae62e6757f6d61d1aacaa15 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 13 Feb 2024 23:55:34 +0100 Subject: [PATCH 546/894] config function for rustaceanvim --- lua/plugins/rustaceanvim.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index 752954d..14b1eb2 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -1,4 +1,15 @@ return { 'mrcjkb/rustaceanvim', ft = { 'rust' }, + config = function() + vim.g.rustaceanvim = { + server = { + on_attach = function(client, bufnr) + local options = { noremap = true, silent = false, buffer = bufnr } + vim.keymap.set('n', 'y', function() vim.cmd.RustLsp { 'hover', 'actions' } end, + vim.tbl_extend('error', options, { desc = 'Hover' })) + end + } + } + end } -- 2.49.1 From e829e4b1be5efa8b3b289bba62040a9cf984e267 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Feb 2024 13:07:19 +0100 Subject: [PATCH 547/894] set colors for highlight in bamboo --- lua/plugins/bamboo.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index b1c1ec6..6110517 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -13,6 +13,9 @@ return { ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.method.defaultLibrary.cpp'] = { fg = 'NONE' }, ['@function.builtin'] = { fg = 'NONE' }, + ['LspReferenceRead'] = { bg = colors.vulgaris.green , fg = colors.vulgaris.black}, + ['LspReferenceWrite'] = { bg = colors.vulgaris.dark_red, fg = colors.vulgaris.fg }, + ['LspReferenceText'] = { bg = colors.vulgaris.dark_cyan, fg = colors.vulgaris.fg }, }, } require('bamboo').load() -- 2.49.1 From f76909ecf4eaf7c9498a9009f5e7919e644569b2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 14 Feb 2024 13:07:49 +0100 Subject: [PATCH 548/894] Call on_attach from lsp_config in rust --- lua/plugins/rustaceanvim.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index 14b1eb2..60c7fd9 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -8,6 +8,7 @@ return { local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', 'y', function() vim.cmd.RustLsp { 'hover', 'actions' } end, vim.tbl_extend('error', options, { desc = 'Hover' })) + require('plugins.lspconfig').on_attach(client, bufnr) end } } -- 2.49.1 From db11ddc6c5c0a87a4d3057a764003590526c2e22 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 17 Feb 2024 13:15:35 +0100 Subject: [PATCH 549/894] refactor lspconfig --- lua/plugins/lspconfig.lua | 4 ++++ lua/plugins/rustaceanvim.lua | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index bad9c00..fb3e828 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -261,6 +261,10 @@ return { on_attach = on_attach, } + -- lspconfig['rust_analyzer'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } lspconfig['lua_ls'].setup { capabilities = capabilities, diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index 60c7fd9..66e517c 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -2,13 +2,44 @@ return { 'mrcjkb/rustaceanvim', ft = { 'rust' }, config = function() + -- local capabilities = require('cmp_nvim_lsp').default_capabilities() vim.g.rustaceanvim = { server = { + -- capabilities = capabilities, on_attach = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', 'y', function() vim.cmd.RustLsp { 'hover', 'actions' } end, vim.tbl_extend('error', options, { desc = 'Hover' })) - require('plugins.lspconfig').on_attach(client, bufnr) + -- require('plugins.lspconfig').lspKeys(client, bufnr) + + local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { + callback = function() + vim.lsp.buf.document_highlight() + end, + buffer = bufnr, + group = group, + desc = 'Document Highlight', + }) + vim.api.nvim_create_autocmd('CursorMoved', { + callback = function() + vim.lsp.buf.clear_references() + end, + buffer = bufnr, + group = group, + desc = 'Clear All the References', + }) + vim.api.nvim_create_autocmd({ 'LspDetach' }, { + group = group, + buffer = bufnr, + callback = function() + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { + group = group, + buffer = bufnr + } + end, + }) end } } -- 2.49.1 From f25db8737db424af9b21a49d67a854895b217357 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 17 Feb 2024 13:42:12 +0100 Subject: [PATCH 550/894] more refactoring of lspconfig --- lua/plugins/lspconfig.lua | 86 ++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index fb3e828..a786ab5 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,4 +1,4 @@ -local lspKeys = function(bufnr) +local lspKeys = function(client, bufnr) local tele_builtins = require('telescope.builtin') local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, @@ -35,19 +35,6 @@ local lspKeys = function(bufnr) vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -end - -local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - lspKeys(bufnr) - - -- vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -62,37 +49,52 @@ local on_attach = function(client, bufnr) end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end +end +local document_highlight = function(bufnr) -- Set autocommands conditional on server_capabilities + local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { + callback = function() + vim.lsp.buf.document_highlight() + end, + buffer = bufnr, + group = group, + desc = 'Document Highlight', + }) + vim.api.nvim_create_autocmd('CursorMoved', { + callback = function() + vim.lsp.buf.clear_references() + end, + buffer = bufnr, + group = group, + desc = 'Clear All the References', + }) + vim.api.nvim_create_autocmd({ 'LspDetach' }, { + group = group, + buffer = bufnr, + callback = function() + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { + group = group, + buffer = bufnr + } + end, + }) +end + +local on_attach = function(client, bufnr) + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + + lspKeys(client, bufnr) + if client.server_capabilities.documentHighlightProvider then - local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { - callback = function() - vim.lsp.buf.document_highlight() - end, - buffer = bufnr, - group = group, - desc = 'Document Highlight', - }) - vim.api.nvim_create_autocmd('CursorMoved', { - callback = function() - vim.lsp.buf.clear_references() - end, - buffer = bufnr, - group = group, - desc = 'Clear All the References', - }) - vim.api.nvim_create_autocmd({ 'LspDetach' }, { - group = group, - buffer = bufnr, - callback = function() - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { - group = group, - buffer = bufnr - } - end, - }) + document_highlight(bufnr) end end -- 2.49.1 From 768807cbfe73cbd9432957c37bc335e3f19fd414 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 18 Feb 2024 14:07:41 +0100 Subject: [PATCH 551/894] jump to last know cursor position --- lua/my_autocommands.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 43a7b6b..bc057ac 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -61,6 +61,24 @@ api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) -- { command = [[if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\"" | endif]] } -- ) +-- When editing a file, always jump to the last known cursor position. +-- Don't do it when the position is invalid, when inside an event handler +-- (happens when dropping a file on gvim) and for a commit message (it's +-- likely a different one than last time). +local userGrp = api.nvim_create_augroup('UserGroup', { clear = true }) +vim.api.nvim_create_autocmd('BufReadPost', { + group = userGrp, + callback = function(args) + local valid_line = vim.fn.line([['"]]) >= 1 and vim.fn.line([['"]]) < vim.fn.line('$') + local not_commit = vim.b[args.buf].filetype ~= 'commit' + + if valid_line and not_commit then + vim.cmd([[normal! g`"]]) + end + end, +}) + + -- Check if we need to reload the file when it changed api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) -- 2.49.1 From 4582fd0c9ac2671ce690646821dc66f8792caa94 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 18 Feb 2024 14:08:29 +0100 Subject: [PATCH 552/894] fixed diagnostic float window --- lua/plugins/lsp-virtual-improved.lua | 1 + lua/plugins/lspconfig.lua | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lsp-virtual-improved.lua b/lua/plugins/lsp-virtual-improved.lua index f527cf2..1af76e4 100644 --- a/lua/plugins/lsp-virtual-improved.lua +++ b/lua/plugins/lsp-virtual-improved.lua @@ -11,4 +11,5 @@ return { } vim.diagnostic.config(diagnostics) end, + enabled = false } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a786ab5..3ec4966 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -332,9 +332,29 @@ return { capabilities = capabilities, }) - vim.diagnostic.config({ virtual_text = true }) - -- vim.diagnostic.config({ virtual_text = false, virtual_lines = false }) - -- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } }) + vim.diagnostic.config({ + virtual_text = false, + signs = true, + float = { + border = 'single', + format = function(diagnostic) + return string.format( + '%s (%s) [%s]', + diagnostic.message, + diagnostic.source, + diagnostic.code or diagnostic.user_data.lsp.code + ) + end, + }, + }) + local diag_group = vim.api.nvim_create_augroup('lsp_diagnostic_float', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold' }, { + callback = function() + vim.diagnostic.open_float({scope = 'line'}, { focus = false }) + end, + group = diag_group, + desc = 'Document Highlight', + }) end, event = 'VeryLazy' } -- 2.49.1 From ee05d192bcf100e1fb430fff6f6d2b4f60a4723d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 18 Feb 2024 14:14:38 +0100 Subject: [PATCH 553/894] cleanup --- lazy-lock.json | 1 - lua/plugins/diagflow.lua | 10 ---------- lua/plugins/lsp-virtual-improved.lua | 15 --------------- lua/plugins/rustaceanvim.lua | 3 --- 4 files changed, 29 deletions(-) delete mode 100644 lua/plugins/diagflow.lua delete mode 100644 lua/plugins/lsp-virtual-improved.lua diff --git a/lazy-lock.json b/lazy-lock.json index 3d1f831..9b1482c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -35,7 +35,6 @@ "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, - "lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, diff --git a/lua/plugins/diagflow.lua b/lua/plugins/diagflow.lua deleted file mode 100644 index 775b7d0..0000000 --- a/lua/plugins/diagflow.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - 'dgagn/diagflow.nvim', - opts = { - scope = 'line', - placement = 'inline', - text_align = 'left', - inline_padding_left = 5, - }, - enabled = false -} diff --git a/lua/plugins/lsp-virtual-improved.lua b/lua/plugins/lsp-virtual-improved.lua deleted file mode 100644 index 1af76e4..0000000 --- a/lua/plugins/lsp-virtual-improved.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - 'luozhiya/lsp-virtual-improved.nvim', - event = { 'LspAttach' }, - config = function() - require('lsp-virtual-improved').setup() - local diagnostics = { - virtual_text = false, -- Disable builtin virtual text diagnostic. - virtual_improved = { - current_line = 'only', - }, - } - vim.diagnostic.config(diagnostics) - end, - enabled = false -} diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index 66e517c..d3e079c 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -2,15 +2,12 @@ return { 'mrcjkb/rustaceanvim', ft = { 'rust' }, config = function() - -- local capabilities = require('cmp_nvim_lsp').default_capabilities() vim.g.rustaceanvim = { server = { - -- capabilities = capabilities, on_attach = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', 'y', function() vim.cmd.RustLsp { 'hover', 'actions' } end, vim.tbl_extend('error', options, { desc = 'Hover' })) - -- require('plugins.lspconfig').lspKeys(client, bufnr) local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { -- 2.49.1 From 6bbf6325e0cc2e0d481532e720306489394132b5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 19 Feb 2024 12:43:29 +0100 Subject: [PATCH 554/894] replace friendly-snippets with luasnip_snippets --- lazy-lock.json | 2 +- lua/plugins/luasnip-snippets.lua | 9 +++++++++ lua/plugins/luasnip.lua | 13 +++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 lua/plugins/luasnip-snippets.lua diff --git a/lazy-lock.json b/lazy-lock.json index 9b1482c..5aea9df 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -27,7 +27,6 @@ "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, "everforest-nvim": { "branch": "main", "commit": "a2de6a58e8fa389fa239c51f416b72fd01a02175" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "aced40b66b7bae9bc2c37fd7b11841d54727a7b0" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" }, @@ -37,6 +36,7 @@ "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "luasnip-snippets": { "branch": "main", "commit": "c948a463195515bef9468bfffe37552d3594c27c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, "mason.nvim": { "branch": "main", "commit": "baf99d94c3380640d19af9c70c0541bd6e7cd0cb" }, "monokai-pro.nvim": { "branch": "master", "commit": "f3200bf058202089315c09a5060f386fe8ce94e9" }, diff --git a/lua/plugins/luasnip-snippets.lua b/lua/plugins/luasnip-snippets.lua new file mode 100644 index 0000000..1d2e3d2 --- /dev/null +++ b/lua/plugins/luasnip-snippets.lua @@ -0,0 +1,9 @@ +return { + 'mireq/luasnip-snippets', + dependencies = { 'L3MON4D3/LuaSnip' }, + init = function() + -- Mandatory setup function + require('luasnip_snippets.common.snip_utils').setup() + end + +} diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index c8d4a6d..486b623 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -2,6 +2,15 @@ return { 'L3MON4D3/LuaSnip', config = function() local ls = require('luasnip') + ls.setup({ + -- Required to automatically include base snippets, like "c" snippets for "cpp" + load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func, + ft_func = require('luasnip_snippets.common.snip_utils').ft_func, + -- To enable auto expansin + enable_autosnippets = true, + -- Uncomment to enable visual snippets triggered using + store_selection_keys = '', + }) -- some shorthands... local s = ls.snippet local sn = ls.snippet_node @@ -58,9 +67,5 @@ return { require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_vscode').lazy_load({ paths = { './my-snippets' } }) end, - dependencies = - { - 'rafamadriz/friendly-snippets' - }, cmd = 'LuaSnipListAvailable' } -- 2.49.1 From 6d1bfd3e83da5177eb8d6df9e9a7bd2e18b4b4d5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 Feb 2024 14:01:20 +0100 Subject: [PATCH 555/894] added heirline-components and heirline but disabled for the moment --- lazy-lock.json | 2 ++ lua/plugins/heirline.lua | 54 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 lua/plugins/heirline.lua diff --git a/lazy-lock.json b/lazy-lock.json index 5aea9df..c64d5b0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -30,6 +30,8 @@ "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" }, + "heirline-components.nvim": { "branch": "main", "commit": "da7d4f8f6ff5accaf2c26e488134e1e0b8f771a1" }, + "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" }, "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua new file mode 100644 index 0000000..3d2f2d5 --- /dev/null +++ b/lua/plugins/heirline.lua @@ -0,0 +1,54 @@ +return { + 'rebelot/heirline.nvim', + dependencies = { 'Zeioth/heirline-components.nvim' }, + opts = function() + local compon = require 'heirline-components.all' + return { + tabline = { -- UI upper bar + compon.component.tabline_conditional_padding(), + compon.component.tabline_buffers(), + compon.component.fill { hl = { bg = 'tabline_bg' } }, + compon.component.tabline_tabpages() + }, + winbar = { -- UI breadcrumbs bar + init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end, + fallthrough = false, + compon.component.breadcrumbs_when_inactive(), + compon.component.breadcrumbs { hl = compon.hl.get_attributes('winbar', true) }, + }, + statuscolumn = { -- UI left column + init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end, + compon.component.foldcolumn(), + compon.component.fill(), + compon.component.numbercolumn(), + compon.component.signcolumn(), + } or nil, + statusline = { -- UI statusbar + hl = { fg = 'fg', bg = 'bg' }, + compon.component.mode { mode_text = { pad_text = 'left' } }, + compon.component.git_branch(), + compon.component.file_info { filetype = false, filename = {}, file_modified = {}, file_read_only = {} }, + compon.component.git_diff(), + compon.component.diagnostics(), + compon.component.fill(), + compon.component.cmd_info { search_count = {} }, + compon.component.fill(), + -- compon.component.lsp(), + compon.component.compiler_state(), + compon.component.virtual_env(), + compon.component.file_encoding(), + compon.component.nav(), + }, + } + end, + config = function(_, opts) + local heirline = require 'heirline' + lib = require 'heirline-components.all' + + -- Setup + lib.init.subscribe_to_events() + heirline.load_colors(lib.hl.get_colors()) + heirline.setup(opts) + end, + enabled = false +} -- 2.49.1 From a1f501a27d6357c6c67d221a0aeeac1d6d11bf9e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 25 Feb 2024 14:33:40 +0100 Subject: [PATCH 556/894] Some neogit configuration --- lua/plugins/neogit.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index f5e5a93..f0cdfed 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -8,8 +8,10 @@ return { local neogit = require('neogit') neogit.setup { integrations = { - diffview = true + diffview = true, + telescope = true }, + graph_style = "unicode", } end, keys = { -- 2.49.1 From 819fc00188522f4b5aba4bb83e7d8b3d08b571d9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 25 Feb 2024 14:34:29 +0100 Subject: [PATCH 557/894] Disable shortcut for close buffer with --- lua/my_keymappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 40c9f80..86b0a57 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -49,7 +49,7 @@ vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlig vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, desc = 'Highlight visual' }) -- Close Buffer -vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) +-- vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' }) -- 2.49.1 From 90cd7ee9289c9dba71176600af9b65444339645f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Feb 2024 22:43:51 +0100 Subject: [PATCH 558/894] added arrow plugin --- lazy-lock.json | 1 + lua/plugins/arrow.lua | 7 +++++++ lua/plugins/lualine.lua | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 lua/plugins/arrow.lua diff --git a/lazy-lock.json b/lazy-lock.json index c64d5b0..74e58b0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,6 +4,7 @@ "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, "aerial.nvim": { "branch": "master", "commit": "e9661d4f739508377f42528fd08a85c4c8feba6e" }, + "arrow.nvim": { "branch": "master", "commit": "9d98760d9a195174a24b6ccc20217bc98f3596e0" }, "astrotheme": { "branch": "main", "commit": "8dbe318a8361fe6e91161bdf17ba695ed06abee9" }, "bamboo.nvim": { "branch": "master", "commit": "a8be506afe2ce533d870a6e23858c43968ea2660" }, "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, diff --git a/lua/plugins/arrow.lua b/lua/plugins/arrow.lua new file mode 100644 index 0000000..89246ca --- /dev/null +++ b/lua/plugins/arrow.lua @@ -0,0 +1,7 @@ +return { + 'otavioschwanck/arrow.nvim', + opts = { + show_icons = true, + leader_key = ';' -- Recommended to be a single key + } +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index c9e3bce..bae0b0d 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,6 +2,7 @@ return { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() + local statusline = require('arrow.statusline') require('lualine').setup { options = { theme = 'bamboo', @@ -48,6 +49,9 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, + }, + { + statusline.text_for_statusline_with_icons } }, lualine_b = { -- 2.49.1 From 31858bea16e75e742c300b319169849fb0ad287d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Feb 2024 23:38:20 +0100 Subject: [PATCH 559/894] some lualine adoptions --- lua/plugins/lualine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index bae0b0d..9cf03b3 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -10,9 +10,10 @@ return { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, }, + section_separators = { left = '', right = '' }, }, globalstatus = true, - extensions = { 'aerial' }, + extensions = { 'aerial', 'oil', 'toggleterm' }, sections = { lualine_b = { 'branch', -- 2.49.1 From 2f1c347a24bbdc0fb6300bc3a884b0fb454e1b65 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Feb 2024 23:38:46 +0100 Subject: [PATCH 560/894] flash shortcut descriptions --- lua/plugins/flash.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 33711b7..c9138ca 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -20,6 +20,7 @@ return { -- default options: exact mode, multi window, all directions, with a backdrop require('flash').jump() end, + desc = 'Flash jump' }, { 'S', @@ -27,6 +28,7 @@ return { function() require('flash').treesitter() end, + desc = 'Flash treesitter' }, }, } -- 2.49.1 From 19512716ec1689f5cb07edbe997a816f23206f5d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 3 Mar 2024 20:24:18 +0100 Subject: [PATCH 561/894] Replaced nvim-colorizer with nvim-highlight-colors --- lazy-lock.json | 2 +- lua/plugins/nvim-colorizer.lua | 10 ---------- lua/plugins/nvim-highlight-colors.lua | 9 +++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 lua/plugins/nvim-colorizer.lua create mode 100644 lua/plugins/nvim-highlight-colors.lua diff --git a/lazy-lock.json b/lazy-lock.json index 74e58b0..9a2dca7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -55,12 +55,12 @@ "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, "nvim-dap-python": { "branch": "master", "commit": "091e4ae00a12085f9ed4200a3cd04af7179b8a23" }, "nvim-dap-ui": { "branch": "master", "commit": "0b4816e5ad5f3219e8e3ec9cce07f61b770c1974" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, + "nvim-highlight-colors": { "branch": "main", "commit": "3b57a76ab79bd437c2cb03a7fe0c5405ac8fbfc2" }, "nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" }, "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, diff --git a/lua/plugins/nvim-colorizer.lua b/lua/plugins/nvim-colorizer.lua deleted file mode 100644 index ccc0ff8..0000000 --- a/lua/plugins/nvim-colorizer.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - 'NvChad/nvim-colorizer.lua', - config = true, - cmd = { - 'ColorizerAttachToBuffer', - 'ColorizerDetachFromBuffer', - 'ColorizerReloadAllBuffers', - 'ColorizerToggle' - } -} diff --git a/lua/plugins/nvim-highlight-colors.lua b/lua/plugins/nvim-highlight-colors.lua new file mode 100644 index 0000000..01f957f --- /dev/null +++ b/lua/plugins/nvim-highlight-colors.lua @@ -0,0 +1,9 @@ +return { + 'brenoprata10/nvim-highlight-colors', + config = true, + opts = { + render = 'background', -- or 'foreground' or 'virtual', + enable_named_colors = true, + }, + cmd = { 'HighlightColors' } +} -- 2.49.1 From dffa118b80a6549abd16fabbd17bcdd83ba76069 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 18 Mar 2024 21:23:43 +0100 Subject: [PATCH 562/894] Install treesitter async --- lua/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index b66a4e0..2c9ae6d 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -7,7 +7,7 @@ return { require('nvim-treesitter.configs').setup({ ensure_installed = 'all', modules = {}, - sync_install = true, + sync_install = false, auto_install = false, ignore_install = {}, highlight = { -- 2.49.1 From a6c307578758ebdc4e44e46c6b4378c20653d040 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 18 Mar 2024 21:26:51 +0100 Subject: [PATCH 563/894] Disable additional_vim_regex_highlighting --- lua/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 2c9ae6d..fc4a920 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -50,6 +50,6 @@ return { }, }) vim.treesitter.language.register('groovy', 'java') - require('nvim-treesitter.install').prefer_git = true + require('nvim-treesitter.install').prefer_git = false end } -- 2.49.1 From 2e0c412f67dd75cd4ce244e5ab7825b9ee812f03 Mon Sep 17 00:00:00 2001 From: Hartmann Date: Wed, 20 Mar 2024 11:26:52 +0100 Subject: [PATCH 564/894] Make diag float not focusable --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3ec4966..3634060 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -350,7 +350,7 @@ return { local diag_group = vim.api.nvim_create_augroup('lsp_diagnostic_float', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold' }, { callback = function() - vim.diagnostic.open_float({scope = 'line'}, { focus = false }) + vim.diagnostic.open_float({scope = 'line', focusable = false}, { focus = false }) end, group = diag_group, desc = 'Document Highlight', -- 2.49.1 From f541e3d1933bafdc0ff989c84e39d9304241b0c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Mar 2024 11:28:20 +0100 Subject: [PATCH 565/894] only install treesitter if needed --- lua/plugins/treesitter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index fc4a920..b295bf9 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -5,10 +5,10 @@ return { config = function() require('nvim-treesitter.install').compilers = { 'gcc' } require('nvim-treesitter.configs').setup({ - ensure_installed = 'all', + ensure_installed = '', modules = {}, - sync_install = false, - auto_install = false, + sync_install = true, + auto_install = true, ignore_install = {}, highlight = { enable = true, -- 2.49.1 From e5fa429a75bfb8c137e0f5f12727ec2cd12bb9a9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Mar 2024 11:28:33 +0100 Subject: [PATCH 566/894] use clang for treesitter --- lua/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index b295bf9..adcbe35 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -3,7 +3,7 @@ return { version = '*', build = ':TSUpdate', config = function() - require('nvim-treesitter.install').compilers = { 'gcc' } + require('nvim-treesitter.install').compilers = { 'clang' } require('nvim-treesitter.configs').setup({ ensure_installed = '', modules = {}, -- 2.49.1 From 25ba85d77874d045d1e573f447f22035ca8978bd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 22 Mar 2024 10:18:26 +0000 Subject: [PATCH 567/894] Change diagnostic to lualine --- lazy-lock.json | 1 + lua/plugins/lspconfig.lua | 14 ++++---------- lua/plugins/lualine.lua | 14 +++++++++++++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 9a2dca7..d4683a9 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -38,6 +38,7 @@ "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "luasnip-snippets": { "branch": "main", "commit": "c948a463195515bef9468bfffe37552d3594c27c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3634060..6be064a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -31,7 +31,9 @@ local lspKeys = function(client, bufnr) vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 'V', function() tele_builtins.diagnostics({ bufnr = 0 }) end, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) @@ -126,7 +128,7 @@ return { ensure_installed = { 'clangd', 'denols', - 'neocmake', + -- 'neocmake', 'pyright', -- 'zk', -- No support for windows 'lua_ls', @@ -347,14 +349,6 @@ return { end, }, }) - local diag_group = vim.api.nvim_create_augroup('lsp_diagnostic_float', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold' }, { - callback = function() - vim.diagnostic.open_float({scope = 'line', focusable = false}, { focus = false }) - end, - group = diag_group, - desc = 'Document Highlight', - }) end, event = 'VeryLazy' } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 9cf03b3..1c3fd56 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,6 +1,9 @@ return { 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, + dependencies = { + 'nvim-tree/nvim-web-devicons', + 'Isrothy/lualine-diagnostic-message' + }, config = function() local statusline = require('arrow.statusline') require('lualine').setup { @@ -59,6 +62,15 @@ return { { 'filesize', }, + { + 'diagnostic-message', + icons = { + error = ' ', + warn = ' ', + info = ' ', + hint = ' ', + } + } }, lualine_c = { }, -- 2.49.1 From aaac8b374c74dbcddb501dea2102d00ade6713e7 Mon Sep 17 00:00:00 2001 From: Hartmann Date: Fri, 22 Mar 2024 13:17:51 +0100 Subject: [PATCH 568/894] Use basedpyright instead of pyright --- lua/plugins/lspconfig.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6be064a..241b2d0 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -129,7 +129,7 @@ return { 'clangd', 'denols', -- 'neocmake', - 'pyright', + -- 'pyright', -- 'zk', -- No support for windows 'lua_ls', 'jsonls', @@ -195,7 +195,12 @@ return { end - lspconfig['pyright'].setup { + -- lspconfig['pyright'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + lspconfig['basedpyright'].setup { capabilities = capabilities, on_attach = on_attach, } -- 2.49.1 From 9441307921eb180433418bedddc106f3a940bc71 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 22 Mar 2024 12:20:16 +0000 Subject: [PATCH 569/894] Update lsp and mason --- lazy-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index d4683a9..07dc1f0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -41,8 +41,8 @@ "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "luasnip-snippets": { "branch": "main", "commit": "c948a463195515bef9468bfffe37552d3594c27c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, - "mason.nvim": { "branch": "main", "commit": "baf99d94c3380640d19af9c70c0541bd6e7cd0cb" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "monokai-pro.nvim": { "branch": "master", "commit": "f3200bf058202089315c09a5060f386fe8ce94e9" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "2f2d08894bbc679d4d181604c16bb7079f646384" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, @@ -62,7 +62,7 @@ "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, "nvim-highlight-colors": { "branch": "main", "commit": "3b57a76ab79bd437c2cb03a7fe0c5405ac8fbfc2" }, - "nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" }, + "nvim-lspconfig": { "branch": "master", "commit": "24662f92c18edd397ef12d635b11dbdedef2d094" }, "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" }, -- 2.49.1 From eaada06d1a46e0cbd25f19e99cc920d57f21fefa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 27 Mar 2024 21:32:03 +0100 Subject: [PATCH 570/894] Update plugins and fix neorg --- lazy-lock.json | 92 ++++++++++++++++++++-------------------- lua/plugins/luarocks.lua | 5 +++ lua/plugins/neorg.lua | 2 +- 3 files changed, 52 insertions(+), 47 deletions(-) create mode 100644 lua/plugins/luarocks.lua diff --git a/lazy-lock.json b/lazy-lock.json index 07dc1f0..8f73d56 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,19 +3,19 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "e9661d4f739508377f42528fd08a85c4c8feba6e" }, - "arrow.nvim": { "branch": "master", "commit": "9d98760d9a195174a24b6ccc20217bc98f3596e0" }, - "astrotheme": { "branch": "main", "commit": "8dbe318a8361fe6e91161bdf17ba695ed06abee9" }, - "bamboo.nvim": { "branch": "master", "commit": "a8be506afe2ce533d870a6e23858c43968ea2660" }, + "aerial.nvim": { "branch": "master", "commit": "3748e87a316a68754341cdffcef44fee61dee51c" }, + "arrow.nvim": { "branch": "master", "commit": "038b30c5d1b37d278cb31735a0cfdb471e2466d7" }, + "astrotheme": { "branch": "main", "commit": "84cbd9c1456a94cbe805d15a174a2d04f95110a9" }, + "bamboo.nvim": { "branch": "master", "commit": "5c826c8ad27010ac2fcaf7deb4c36b16d00ef5a1" }, "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, - "cmake-tools.nvim": { "branch": "master", "commit": "cd5db8b22de45b52cdac4c3fb6b333f1c02530bf" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "2992ba8c13c2de41f91a7c7488bf1c48bcec31fe" }, + "cmake-tools.nvim": { "branch": "master", "commit": "a4cd0b3a2c8a166a54b36bc00579954426748959" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, + "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, "cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, @@ -26,66 +26,66 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, - "everforest-nvim": { "branch": "main", "commit": "a2de6a58e8fa389fa239c51f416b72fd01a02175" }, + "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" }, - "heirline-components.nvim": { "branch": "main", "commit": "da7d4f8f6ff5accaf2c26e488134e1e0b8f771a1" }, - "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" }, - "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, - "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, - "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, + "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, + "kanagawa.nvim": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" }, + "lazy.nvim": { "branch": "main", "commit": "65887ea871d44822bff47504202b3643f29d614e" }, + "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, - "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, - "luasnip-snippets": { "branch": "main", "commit": "c948a463195515bef9468bfffe37552d3594c27c" }, + "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, + "luarocks.nvim": { "branch": "main", "commit": "d73f4bbbeea9eeb9b66a0c6431db402654f43cb8" }, + "luasnip-snippets": { "branch": "main", "commit": "76bc77740a5e003412605e7e29eef7f97e47a5b8" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "monokai-pro.nvim": { "branch": "master", "commit": "f3200bf058202089315c09a5060f386fe8ce94e9" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "2f2d08894bbc679d4d181604c16bb7079f646384" }, + "monokai-pro.nvim": { "branch": "master", "commit": "1b9b086df95ad9a6b946c56f65fa2d048297c00b" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, - "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "neogit": { "branch": "master", "commit": "ce0c369ccdba3f644a3b28f4c053421f435352c9" }, - "neorg": { "branch": "main", "commit": "e6d89d333aff65a771a98955fac9fc178345c01c" }, - "neorg-telescope": { "branch": "main", "commit": "6a7a677c40fa3c348924a4e2a06a513e0b34c056" }, - "neotest": { "branch": "master", "commit": "73043d666780e35185a77589e01bec96a52db910" }, + "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, + "neogit": { "branch": "master", "commit": "20ab5a688c2de6fa371865528c737ae901989aa5" }, + "neorg": { "branch": "main", "commit": "71e2f05ee19c94705fadbc1f84e11990baf8ff1c" }, + "neorg-telescope": { "branch": "main", "commit": "418f8fd4bd7360d954613a2322b4eb2888ac3ad9" }, + "neotest": { "branch": "master", "commit": "e07fe8241112274aae9947b98d255763738a1d52" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, + "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" }, + "nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" }, "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, - "nvim-dap-python": { "branch": "master", "commit": "091e4ae00a12085f9ed4200a3cd04af7179b8a23" }, - "nvim-dap-ui": { "branch": "master", "commit": "0b4816e5ad5f3219e8e3ec9cce07f61b770c1974" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, + "nvim-dap-python": { "branch": "master", "commit": "66560f0ebddf96604f7037e1efad3ba6942761e6" }, + "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" }, "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, - "nvim-highlight-colors": { "branch": "main", "commit": "3b57a76ab79bd437c2cb03a7fe0c5405ac8fbfc2" }, - "nvim-lspconfig": { "branch": "master", "commit": "24662f92c18edd397ef12d635b11dbdedef2d094" }, - "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" }, + "nvim-highlight-colors": { "branch": "main", "commit": "56e40d86a3202aedb0dbcded7aa6248c299eb0f0" }, + "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, + "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" }, - "nvim-rooter.lua": { "branch": "main", "commit": "df09c31d09ff051b3823e5e8cf45b8063f8d08a5" }, - "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, + "nvim-rooter.lua": { "branch": "main", "commit": "fe2343901c1777316823e3c6a34718eea8dedf37" }, + "nvim-surround": { "branch": "main", "commit": "d47001f8ddf9646c24f16d2732d4d0255acd2121" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" }, - "octo.nvim": { "branch": "master", "commit": "f77d214e5a67f1c1eb601a9c99418a5f7924af22" }, - "oil.nvim": { "branch": "master", "commit": "dd432e76d01eda08b8658415588d011009478469" }, + "octo.nvim": { "branch": "master", "commit": "27d6fd6ad2f2f59330724d6ea5c751f0c3ec96e6" }, + "oil.nvim": { "branch": "master", "commit": "32e18df30f937e02135398c270b72a4d24b40120" }, "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, - "peek.nvim": { "branch": "master", "commit": "4163a48f190d2b2d94840be3eb38b4af83961ebe" }, + "paren-hint.nvim": { "branch": "main", "commit": "98be4743381b312cf001bbda688857bc10916024" }, + "peek.nvim": { "branch": "master", "commit": "62e9e46fb5b6be510c60f67c1fd9913764efaac0" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "392f6f71c6526955fcf510d48930bce7864b6915" }, + "pretty_hover": { "branch": "master", "commit": "27e8926d1d51ba8d26561d7383f8cf80d504fbd7" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "a249476e451673f7811852d93109dff19311ee39" }, - "rustaceanvim": { "branch": "master", "commit": "98b905d37d2751a4391ad096cf741930406d0ce0" }, + "rustaceanvim": { "branch": "master", "commit": "c2cdbeca8674e1b1b66ba870ff502bdad55a6d8a" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope-menufacture": { "branch": "main", "commit": "2f342d275feab92cd6e7eb80c418d3c4370d4174" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope-menufacture": { "branch": "main", "commit": "79376f887f589a4240267383e8abc0a31861325a" }, "telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, + "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, + "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, "zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" } diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua new file mode 100644 index 0000000..fced1df --- /dev/null +++ b/lua/plugins/luarocks.lua @@ -0,0 +1,5 @@ +return { + 'vhyrro/luarocks.nvim', + priority = 1000, -- We'd like this plugin to load first out of the rest + config = true, -- This automatically runs `require("luarocks-nvim").setup()` +} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index d4c0b9e..e3c9233 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -1,9 +1,9 @@ return { 'nvim-neorg/neorg', - build = ':Neorg sync-parsers', branch = 'main', dependencies = { 'nvim-lua/plenary.nvim', + 'luarocks.nvim', { 'nvim-neorg/neorg-telescope', branch = 'main' -- 2.49.1 From d248b8866fb273e24b48c9d93687cc3463cc0936 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Apr 2024 20:16:46 +0200 Subject: [PATCH 571/894] added nvim-lint with clang-tidy --- lazy-lock.json | 1 + lua/plugins/nvim-lint.lua | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lua/plugins/nvim-lint.lua diff --git a/lazy-lock.json b/lazy-lock.json index 8f73d56..0ae895c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -61,6 +61,7 @@ "nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" }, "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, "nvim-highlight-colors": { "branch": "main", "commit": "56e40d86a3202aedb0dbcded7aa6248c299eb0f0" }, + "nvim-lint": { "branch": "master", "commit": "4055dc856d5ac8f6b85748006fd8fa6457e086e8" }, "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, diff --git a/lua/plugins/nvim-lint.lua b/lua/plugins/nvim-lint.lua new file mode 100644 index 0000000..9ecf62e --- /dev/null +++ b/lua/plugins/nvim-lint.lua @@ -0,0 +1,19 @@ +return { + 'mfussenegger/nvim-lint', + config = function() + require('lint').linters_by_ft = { + cpp = { 'clangtidy', } + } + vim.api.nvim_create_autocmd({ 'BufWritePost' }, { + callback = function() + -- try_lint without arguments runs the linters defined in `linters_by_ft` + -- for the current filetype + require('lint').try_lint() + + -- You can call `try_lint` with a linter name or a list of names to always + -- run specific linters, independent of the `linters_by_ft` configuration + -- require('lint').try_lint('cspell') + end, + }) + end +} -- 2.49.1 From e0d85e7cbdc24abd2ff3a24b5827a9068f795fc3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Apr 2024 20:33:23 +0200 Subject: [PATCH 572/894] New font for linux --- lua/config/options.lua | 2 +- lua/plugins/bamboo.lua | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 0c9f45f..fb7aef7 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -49,7 +49,7 @@ if vim.fn.has('wsl') == 1 then -- opt.guifont = 'Hack Nerd Font Mono:h10' opt.guifont = 'RobotoMono Nerd Font:h10' elseif vim.loop.os_uname().sysname == 'Linux' then - opt.guifont = 'Hack Nerd Font:h11' + opt.guifont = 'Iosevka NFM:h11' else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 6110517..beda326 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -7,15 +7,26 @@ return { require('bamboo').setup { dim_inactive = true, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, + code_style = { + comments = { italic = true }, + conditionals = { italic = false }, + keywords = {}, + functions = {}, + namespaces = { italic = false }, + parameters = { italic = false }, + strings = {}, + variables = {}, + }, highlights = { ['@lsp.type.parameter'] = { fg = colors.vulgaris.red }, ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.method.defaultLibrary.cpp'] = { fg = 'NONE' }, ['@function.builtin'] = { fg = 'NONE' }, - ['LspReferenceRead'] = { bg = colors.vulgaris.green , fg = colors.vulgaris.black}, + ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.black }, ['LspReferenceWrite'] = { bg = colors.vulgaris.dark_red, fg = colors.vulgaris.fg }, ['LspReferenceText'] = { bg = colors.vulgaris.dark_cyan, fg = colors.vulgaris.fg }, + ['Delimiter'] = { fg = colors.vulgaris.fg }, }, } require('bamboo').load() -- 2.49.1 From 2b8d4bfff7b5a4eedeac6c2b9df7dd64a40bd3f8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Apr 2024 21:28:45 +0200 Subject: [PATCH 573/894] enable build for peek again --- lua/plugins/peek.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/peek.lua b/lua/plugins/peek.lua index ccaab63..8c5b375 100644 --- a/lua/plugins/peek.lua +++ b/lua/plugins/peek.lua @@ -1,7 +1,10 @@ return { 'toppair/peek.nvim', - -- build = 'deno task --quiet build:fast', + build = 'deno task --quiet build:fast', config = function() + require('peek').setup({ + app = 'webview', + }) vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {}) vim.api.nvim_create_user_command('PeekClose', require('peek').close, {}) end, -- 2.49.1 From 657a638309dfe9d30b37f9148be5633896d35ff3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Apr 2024 21:50:09 +0200 Subject: [PATCH 574/894] added marksman lsp --- lua/plugins/lspconfig.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 241b2d0..4a727e3 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -312,6 +312,11 @@ return { on_attach = on_attach, } + lspconfig['marksman'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + lspconfig['yamlls'].setup { capabilities = capabilities, on_attach = on_attach, -- 2.49.1 From 1b764b9f0e3040cbbf2edda5f33d920f85d9e405 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Apr 2024 22:01:24 +0200 Subject: [PATCH 575/894] Use new font in windows --- lua/config/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index fb7aef7..6881000 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -54,7 +54,8 @@ else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' -- opt.guifont = 'FiraCode Nerd Font:h10' - opt.guifont = 'RobotoMono Nerd Font:h10' + -- opt.guifont = 'RobotoMono Nerd Font:h10' + opt.guifont = 'IosevkaTerm Nerd Font Mono:h11' -- opt.guifont = 'Cousine Nerd Font Mono:h10' -- opt.guifont = 'DroidSansM Nerd Font Propo:h10' -- opt.guifont = 'AnonymicePro Nerd Font:h11' -- 2.49.1 From efd30083a87db9499b0fb111227eeae511f832de Mon Sep 17 00:00:00 2001 From: Hartmann Date: Thu, 11 Apr 2024 10:14:24 +0200 Subject: [PATCH 576/894] added clang-tidy task to overseer --- .../template/user/clang/clang-tidy.lua | 22 +++++++++++++++++++ lua/plugins/overseer.lua | 18 +++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 lua/overseer/template/user/clang/clang-tidy.lua diff --git a/lua/overseer/template/user/clang/clang-tidy.lua b/lua/overseer/template/user/clang/clang-tidy.lua new file mode 100644 index 0000000..998bc04 --- /dev/null +++ b/lua/overseer/template/user/clang/clang-tidy.lua @@ -0,0 +1,22 @@ +return { + name = 'clang-tidy', + builder = function() + -- Full path to current file (see :help expand()) + local dir = vim.loop.cwd() + local file = vim.fn.expand('%:p') + return { + cmd = { 'clang-tidy' }, + -- cmd = { 'c:/Users/uid40528/scoop/apps/llvm/current/bin/clang-tidy.exe' }, + args = { file, '-p', 'build_nvim', '--quiet', '--config-file', dir .. '/.clang-tidy' }, + cwd = dir, + components = { + { 'on_result_diagnostics_quickfix', open = true }, + { 'on_output_parse', problem_matcher = '$gcc' }, + { 'on_result_diagnostics' }, + 'default' }, + } + end, + condition = { + filetype = { 'cpp' }, + }, +} diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua index fcefbee..af9a5b5 100644 --- a/lua/plugins/overseer.lua +++ b/lua/plugins/overseer.lua @@ -2,18 +2,32 @@ return { 'stevearc/overseer.nvim', config = function() require('overseer').setup({ - templates = { 'builtin', 'user.cmake.cmake' }, + templates = { 'builtin', 'user.cmake.cmake', 'user.clang.clang-tidy' }, }) end, keys = { { '', function() - require('overseer').open() require('overseer').run_template() end, mode = { 'n', 'x' }, desc = 'Start task (overseer)', }, + }, + cmd = { + 'OverseerOpen', + 'OverseerClose', + 'OverseerToggle', + 'OverseerSaveBundle', + 'OverseerLoadBundle', + 'OverseerDeleteBundle', + 'OverseerRunCmd', + 'OverseerRun', + 'OverseerInfo', + 'OverseerBuild', + 'OverseerQuickAction', + 'OverseerTaskAction', + 'OverseerClearCache' } } -- 2.49.1 From 0a37abcc6ba7c79a2c7fdd91064eabd9ec921fd0 Mon Sep 17 00:00:00 2001 From: Hartmann Date: Thu, 11 Apr 2024 10:34:00 +0200 Subject: [PATCH 577/894] enhance output of clang-tidy --- lua/overseer/template/user/clang/clang-tidy.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/overseer/template/user/clang/clang-tidy.lua b/lua/overseer/template/user/clang/clang-tidy.lua index 998bc04..b475fc0 100644 --- a/lua/overseer/template/user/clang/clang-tidy.lua +++ b/lua/overseer/template/user/clang/clang-tidy.lua @@ -10,9 +10,10 @@ return { args = { file, '-p', 'build_nvim', '--quiet', '--config-file', dir .. '/.clang-tidy' }, cwd = dir, components = { - { 'on_result_diagnostics_quickfix', open = true }, + { 'on_result_diagnostics_quickfix', open = false}, { 'on_output_parse', problem_matcher = '$gcc' }, - { 'on_result_diagnostics' }, + { 'on_result_diagnostics', remove_on_restart = true }, + { 'restart_on_save'}, 'default' }, } end, -- 2.49.1 From e4604d3a08ef69761a12bc709daef5f89a9c663c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 Apr 2024 23:37:02 +0200 Subject: [PATCH 578/894] removed some unused plugins --- lua/plugins/advanced-git-search.lua | 67 ----------------------------- lua/plugins/neoclip.lua | 18 -------- lua/plugins/zk.lua | 26 ----------- 3 files changed, 111 deletions(-) delete mode 100644 lua/plugins/advanced-git-search.lua delete mode 100644 lua/plugins/neoclip.lua delete mode 100644 lua/plugins/zk.lua diff --git a/lua/plugins/advanced-git-search.lua b/lua/plugins/advanced-git-search.lua deleted file mode 100644 index f0b2523..0000000 --- a/lua/plugins/advanced-git-search.lua +++ /dev/null @@ -1,67 +0,0 @@ -return { - 'aaronhallaert/advanced-git-search.nvim', - config = function() - require('telescope').load_extension('advanced_git_search') - vim.api.nvim_create_user_command( - 'DiffCommitLine', - 'lua require("telescope").extensions.advanced_git_search.diff_commit_line()', - { range = true } - ) - end, - dependencies = { - 'nvim-telescope/telescope.nvim', - -- to show diff splits and open commits in browser - 'tpope/vim-fugitive', - }, - keys = { - { - 'hb', - function() - require('telescope').extensions.advanced_git_search.diff_branch_file() - end, - desc = 'Diff file against branch' - }, - { - 'hl', - ':DiffCommitLinegv', - desc = 'Diff current line againt previous commits', - mode = { 'x', 'n' }, - noremap = true - }, - { - 'hf', - function() - require('telescope').extensions.advanced_git_search.diff_commit_file() - end, - desc = 'Diff current file against previous commits' - }, - { - 'ha', - function() - require('telescope').extensions.advanced_git_search.search_log_content() - end, - desc = 'Search git log' - }, - { - 'hs', - function() - require('telescope').extensions.advanced_git_search.search_log_content_file() - end, - desc = 'Search git log that changed current file' - }, - { - 'hr', - function() - require('telescope').extensions.advanced_git_search.checkout_reflog() - end, - desc = 'Search all reflog entries' - }, - { - 'hh', - function() - require('telescope').extensions.advanced_git_search.show_custom_functions() - end, - desc = 'Shwo all git telecope functions' - } - } -} diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua deleted file mode 100644 index c72f3e9..0000000 --- a/lua/plugins/neoclip.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - 'AckslD/nvim-neoclip.lua', - dependencies = { - { 'kkharji/sqlite.lua', module = 'sqlite' }, - -- { 'nvim-telescope/telescope.nvim' }, - }, - config = true, - keys = { - { - '[', - function() - require('telescope').extensions.neoclip.default({ initial_mode = 'normal' }) - end, - desc = 'NeoClip' - } - }, - event = 'VeryLazy' -} diff --git a/lua/plugins/zk.lua b/lua/plugins/zk.lua deleted file mode 100644 index 747ee84..0000000 --- a/lua/plugins/zk.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - 'mickael-menu/zk-nvim', - config = function() - require('zk').setup({ - picker = 'telescope', - -- config = { - -- on_attach = require('plugins.lspconfig').on_attach - -- } - lsp = { - -- `config` is passed to `vim.lsp.start_client(config)` - config = { - cmd = { 'zk', 'lsp' }, - name = 'zk', - -- on_attach = ... - -- etc, see `:h vim.lsp.start_client()` - }, - - -- automatically attach buffers in a zk notebook that match the given filetypes - auto_attach = { - enabled = true, - filetypes = { 'markdown' }, - }, - }, - }) - end -} -- 2.49.1 From 1bd3db5a20a963f66eedb807f06815b35d54c013 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 Apr 2024 23:50:53 +0200 Subject: [PATCH 579/894] Replaced telescope with lua-fzf --- lua/plugins/fzf-lua.lua | 97 +++++++++++++++++++++++++++++++++++++++ lua/plugins/lspconfig.lua | 17 +++---- lua/plugins/telescope.lua | 1 + 3 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/fzf-lua.lua diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua new file mode 100644 index 0000000..b314ebd --- /dev/null +++ b/lua/plugins/fzf-lua.lua @@ -0,0 +1,97 @@ +return { + 'ibhagwan/fzf-lua', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('fzf-lua').setup({}) + end, + cmd = 'FzfLua', + keys = { + { + 'f', + function() + require('fzf-lua').files() + end, + desc = 'Find files', + }, + { + 'c', + function() + require('fzf-lua').commands() + end, + desc = 'Find commands', + }, + { + 'g', + function() + require('fzf-lua').git_files() + end, + desc = 'Find git files', + }, + { + 'o', + function() + require('fzf-lua').oldfiles() + end, + desc = 'Find old files', + }, + { + 'b', + function() + require('fzf-lua').buffers() + end, + desc = 'Select buffer', + }, + { + 'q', + function() + require('fzf-lua').quickfix() + end, + desc = 'Quickfix list', + }, + { + 'l', + function() + require('fzf-lua').live_grep_native() + end, + desc = 'Search in project', + }, + { + 'd', + function() + require('fzf-lua').grep_cword() + end, + mode = { 'n' }, + desc = 'Find word under cursor', + }, + { + 'd', + function() + require('fzf-lua').grep_visual() + end, + mode = { 'x', 'v' }, + desc = 'Find word under cursor', + }, + { + 'j', + function() + require('fzf-lua').jumps() + end, + desc = 'Open jumplist', + }, + { + '', + function() + require('fzf-lua').grep_curbuf() + end, + desc = 'Find in buffer', + }, + { + '', + function() + require('fzf-lua').complete_path() + end, + mode = { "n", "v", "i" }, + desc = 'Fuzzy complete path', + }, + } +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4a727e3..f73f037 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,5 +1,6 @@ local lspKeys = function(client, bufnr) - local tele_builtins = require('telescope.builtin') + -- local tele_builtins = require('telescope.builtin') + local fzf = require('fzf-lua') local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) @@ -7,7 +8,7 @@ local lspKeys = function(client, bufnr) vim.tbl_extend('error', options, { desc = 'Diag next' })) vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) - vim.keymap.set('n', 'd', tele_builtins.lsp_definitions, + vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) @@ -19,21 +20,21 @@ local lspKeys = function(client, bufnr) vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, + vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) - vim.keymap.set('n', '', tele_builtins.lsp_document_symbols, - vim.tbl_extend('error', options, { desc = 'References' })) - vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, + vim.keymap.set('n', '', fzf.lsp_document_symbols, + vim.tbl_extend('error', options, { desc = 'Document symbols' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', 'V', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 2bf0c21..add92b4 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -13,6 +13,7 @@ return { 'nvim-telescope/telescope-ui-select.nvim', }, cmd = { 'Telescope' }, + enabled = false, keys = { { 'f', -- 2.49.1 From 9d9689df9541329a7f93664cfa2a842710c6825f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 23 Apr 2024 23:51:31 +0200 Subject: [PATCH 580/894] updated lock file for fzf --- lazy-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lazy-lock.json b/lazy-lock.json index 0ae895c..82a1bb6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -28,6 +28,7 @@ "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, + "fzf-lua": { "branch": "main", "commit": "6860237cbcc6e95d26ffdb22e4fe7a65b2b3e60d" }, "gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, -- 2.49.1 From 9c14a43efb9bbe39d0c4560ba88f4e2b661f5eb0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 24 Apr 2024 14:29:31 +0200 Subject: [PATCH 581/894] replaced telescope projects with workspaces --- lua/plugins/telescope-project.lua | 17 ------------ lua/plugins/workspaces.lua | 45 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 17 deletions(-) delete mode 100644 lua/plugins/telescope-project.lua create mode 100644 lua/plugins/workspaces.lua diff --git a/lua/plugins/telescope-project.lua b/lua/plugins/telescope-project.lua deleted file mode 100644 index e86623e..0000000 --- a/lua/plugins/telescope-project.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - 'nvim-telescope/telescope-project.nvim', - dependencies = { - 'nvim-telescope/telescope.nvim' - }, - config = function() - require 'telescope'.load_extension('project') - end, - keys = { - { - 'p', - function() - require 'telescope'.extensions.project.project {} - end - } - } -} diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua new file mode 100644 index 0000000..adce631 --- /dev/null +++ b/lua/plugins/workspaces.lua @@ -0,0 +1,45 @@ +return { + 'natecraddock/workspaces.nvim', + config = function() + require('workspaces').setup() + end, + branch = 'master', + keys = { + { + 'p', + function() + local workspaces = require('workspaces') + local fzf_lua = require('fzf-lua') + fzf_lua.fzf_exec(function(cb) + local results = workspaces.get() + for _, e in ipairs(results) do + cb(e['name']) + end + cb() + end, + { + actions = { + ['default'] = { + function(selected) + workspaces.open(selected[1]) + fzf_lua.git_files() + end, + }, + ['ctrl-d'] = { + function(selected) + workspaces.remove(selected[1]) + end, + fzf_lua.actions.resume + }, + ['ctrl-a'] = { + function() + workspaces.add() + end, + fzf_lua.actions.resume + } + } + }) + end + } + } +} -- 2.49.1 From a4818de18e06ba1f99515fa36be7c1e9244224e0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 25 Apr 2024 09:05:43 +0200 Subject: [PATCH 582/894] Make cmp load also in cmdline --- lua/plugins/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index a01520e..57cb476 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,7 +1,7 @@ return { 'hrsh7th/nvim-cmp', branch = 'main', - event = 'InsertEnter', + event = {'InsertEnter', 'CmdlineEnter'}, dependencies = { { 'onsails/lspkind-nvim' }, { 'hrsh7th/cmp-buffer' }, -- 2.49.1 From eedf6b26bf9bdff9c1de56d8c95642a42eb4d3cd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 25 Apr 2024 09:08:08 +0200 Subject: [PATCH 583/894] Make oil not lazy load --- lua/plugins/oil.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 57de2e0..a711a98 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -17,7 +17,7 @@ return { ['g.'] = 'actions.toggle_hidden', }, }, - -- Optional dependencies + lazy = false, dependencies = { 'nvim-tree/nvim-web-devicons' }, keys = { { -- 2.49.1 From 5c5b29a5dfbc888a638599c4eebd7991f5b15742 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 25 Apr 2024 09:08:52 +0200 Subject: [PATCH 584/894] Fixed aerial using telescope --- lua/plugins/aerial.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua index 401735b..b265195 100644 --- a/lua/plugins/aerial.lua +++ b/lua/plugins/aerial.lua @@ -1,8 +1,5 @@ return { 'stevearc/aerial.nvim', - dependencies = { - 'nvim-telescope/telescope.nvim' - }, config = function() require('aerial').setup({ backends = { 'lsp', 'treesitter', 'markdown' }, @@ -12,7 +9,6 @@ return { filter_kind = false, show_guides = true, }) - require('telescope').load_extension('aerial') end, cmd = 'AerialToggle', keys = { -- 2.49.1 From cc87de752b528208b17e1037d644f6814206e4d0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 10:56:22 +0200 Subject: [PATCH 585/894] Changed fzf profile --- lua/plugins/fzf-lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index b314ebd..7adce72 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -2,7 +2,7 @@ return { 'ibhagwan/fzf-lua', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() - require('fzf-lua').setup({}) + require('fzf-lua').setup({ 'borderless_full' }) end, cmd = 'FzfLua', keys = { -- 2.49.1 From 42de9ba4d89bdc06abf68d706652f11cc7f30fac Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 10:56:41 +0200 Subject: [PATCH 586/894] Added oldfiles in cwd keybinding --- lua/plugins/fzf-lua.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 7adce72..39abb65 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -34,6 +34,13 @@ return { end, desc = 'Find old files', }, + { + 'i', + function() + require('fzf-lua').oldfiles({ cwd_only = true }) + end, + desc = 'Find old files in cwd', + }, { 'b', function() -- 2.49.1 From 79ddb6faca952f5c920837af3fd6f8ed56ace934 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 10:57:00 +0200 Subject: [PATCH 587/894] Format --- lua/plugins/fzf-lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 39abb65..80c230a 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -97,7 +97,7 @@ return { function() require('fzf-lua').complete_path() end, - mode = { "n", "v", "i" }, + mode = { 'n', 'v', 'i' }, desc = 'Fuzzy complete path', }, } -- 2.49.1 From 4dc7351d8b198a9f5217d2e1445e7ccc84a46bb4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 11:11:42 +0200 Subject: [PATCH 588/894] Removed some telescope dependencies --- lua/plugins/dap.lua | 7 +- lua/plugins/lazygit.lua | 6 - lua/plugins/lspconfig.lua | 1 - lua/plugins/neogit.lua | 3 +- lua/plugins/neorg.lua | 38 ------ lua/plugins/nvim-devdocs.lua | 21 ---- lua/plugins/telescope.lua | 226 ----------------------------------- 7 files changed, 3 insertions(+), 299 deletions(-) delete mode 100644 lua/plugins/neorg.lua delete mode 100644 lua/plugins/nvim-devdocs.lua delete mode 100644 lua/plugins/telescope.lua diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 173bdd2..6ad154a 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -3,10 +3,6 @@ return { dependencies = { 'mfussenegger/nvim-dap-python', 'theHamsta/nvim-dap-virtual-text', - { - 'nvim-telescope/telescope-dap.nvim', - dependencies = 'telescope.nvim', - }, 'rcarriga/nvim-dap-ui', 'rcarriga/cmp-dap', }, @@ -99,7 +95,7 @@ return { config.pythonPath = pythonVenv.getPythonEnv() config.cwd = vim.fn.getcwd() end - require 'telescope'.extensions.dap.configurations {} + require ('fzf-lua').dap_configurations() end local masonpath = vim.fn.stdpath('data') .. '/mason' @@ -220,6 +216,5 @@ return { -- EXTENSIONS require('nvim-dap-virtual-text').setup({}) - require('telescope').load_extension('dap') end, } diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index fab51cd..8faded0 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -1,8 +1,5 @@ return { 'kdheepak/lazygit.nvim', - dependencies = { - 'nvim-telescope/telescope.nvim' - }, cmd = { 'LazyGit', 'LazyGitConfig', @@ -10,9 +7,6 @@ return { 'LazyGitFilterCurrentFile', 'LazyGit', }, - config = function() - require('telescope').load_extension('lazygit') - end, keys = { { 'g', diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index f73f037..5e44e30 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,5 +1,4 @@ local lspKeys = function(client, bufnr) - -- local tele_builtins = require('telescope.builtin') local fzf = require('fzf-lua') local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index f0cdfed..b255600 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -9,7 +9,8 @@ return { neogit.setup { integrations = { diffview = true, - telescope = true + telescope = false, + fzf_lua = true }, graph_style = "unicode", } diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua deleted file mode 100644 index e3c9233..0000000 --- a/lua/plugins/neorg.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - 'nvim-neorg/neorg', - branch = 'main', - dependencies = { - 'nvim-lua/plenary.nvim', - 'luarocks.nvim', - { - 'nvim-neorg/neorg-telescope', - branch = 'main' - } - }, - ft = 'norg', - cmd = 'Neorg', - config = function() - require('neorg').setup { - load = { - ['core.defaults'] = {}, -- Loads default behaviour - ['core.export'] = {}, -- Loads default behaviour - ['core.concealer'] = {}, -- Adds pretty icons to your documents - ['core.completion'] = { - config = { - engine = 'nvim-cmp' } - }, -- Adds pretty icons to your documents - ['core.dirman'] = { -- Manages Neorg workspaces - config = { - workspaces = { - notes = '~/notes', - }, - }, - }, - ['core.itero'] = {}, - ['core.promo'] = {}, - ['core.export.markdown'] = {}, - ['core.integrations.telescope'] = {}, - }, - } - end, -} diff --git a/lua/plugins/nvim-devdocs.lua b/lua/plugins/nvim-devdocs.lua deleted file mode 100644 index 96d6d1e..0000000 --- a/lua/plugins/nvim-devdocs.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - 'luckasRanarison/nvim-devdocs', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-telescope/telescope.nvim', - 'nvim-treesitter/nvim-treesitter', - }, - branch = 'master', - opts = {}, - cmd = { - 'DevdocsFetch', - 'DevdocsInstall', - 'DevdocsUninstall', - 'DevdocsOpen', - 'DevdocsOpenFloat', - 'DevdocsOpenCurrent', - 'DevdocsOpenCurrentFloat', - 'DevdocsUpdate', - 'DevdocsUpdateAll', - } -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua deleted file mode 100644 index add92b4..0000000 --- a/lua/plugins/telescope.lua +++ /dev/null @@ -1,226 +0,0 @@ -return { - 'nvim-telescope/telescope.nvim', - version = '*', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', - 'molecule-man/telescope-menufacture', - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = - 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build', - }, - 'nvim-telescope/telescope-ui-select.nvim', - }, - cmd = { 'Telescope' }, - enabled = false, - keys = { - { - 'f', - function() - require('telescope').extensions.menufacture.find_files({ no_ignore = false, hidden = true }) - end, - desc = 'Find file', - }, - { - 'c', - function() - require('telescope.builtin').commands() - end, - desc = 'Telescope commands', - }, - { - 'g', - function() - Project_files() - end, - desc = 'Find git files', - }, - { - 'o', - function() - require('telescope.builtin').oldfiles() - end, - desc = 'Find old files', - }, - { - 'b', - function() - require('telescope.builtin').buffers() - end, - desc = 'Select buffer', - }, - { - 'q', - function() - require('telescope.builtin').quickfix() - end, - desc = 'Quickfix list with telescope', - }, - { - 'l', - function() - require('telescope').extensions.menufacture.live_grep() - end, - desc = 'Search in project', - }, - { - 'j', - function() - require('telescope.builtin').jumplist() - end, - desc = 'Open jumplist', - }, - { - '', - function() - require('telescope.builtin').current_buffer_fuzzy_find() - end, - desc = 'Find in buffer', - }, - { - 'd', - function() - require('telescope').extensions.menufacture.grep_string() - end, - desc = 'Find in workspace', - }, - }, - config = function() - if vim.loop.os_uname().sysname == 'Windows_NT' then - vim.env.HOME = '' - end - local home = vim.env.HOME - local actions = require('telescope.actions') - - local mappingTab = { - i = { - [''] = actions.select_tab, - [''] = actions.select_default, - }, - } - - Project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require('telescope').extensions.menufacture.git_files, opts) - if not ok then require('telescope').extensions.menufacture.find_files(opts) end - end - - - local telescopeConfig = require('telescope.config') - - -- Clone the default Telescope configuration - local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) } - - -- I want to search in hidden/dot files. - table.insert(vimgrep_arguments, '--hidden') - -- I don't want to search in the `.git` directory. - table.insert(vimgrep_arguments, '--glob') - table.insert(vimgrep_arguments, '!**/.git/*') - - require('telescope').setup({ - defaults = { - mappings = { - i = { - [''] = actions.select_default + actions.center, - [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist, - }, - }, - results_title = false, - preview_title = false, - borderchars = { '', '', '', '', '', '', '', '' }, - -- `hidden = true` is not supported in text grep commands. - vimgrep_arguments = vimgrep_arguments, - }, - pickers = { - buffers = { - sort_lastused = true, - sort_mru = true, - ignore_current_buffer = false, - theme = 'ivy', - mappings = { - i = { - [''] = actions.delete_buffer, - [''] = actions.select_default, - }, - n = { - [''] = actions.delete_buffer, - }, - }, - }, - find_files = { - theme = 'ivy', - previewer = false, - -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. - find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' }, - }, - oldfiles = { - theme = 'ivy', - }, - git_files = { - theme = 'ivy', - previewer = false, - }, - lsp_references = { - show_line = false, - include_declaration = false, - }, - lsp_dynamic_workspace_symbols = { - theme = 'ivy', - fname_width = 80, - symbol_width = 55, - symbol_type_width = 8, - ignore_symbols = { 'namespace' } - }, - lsp_document_symbols = { - theme = 'ivy', - fname_width = 80, - symbol_width = 85, - symbol_type_width = 8, - ignore_symbols = { 'namespace' } - }, - lsp_workspace_symbols = { - fname_width = 30, - symbol_width = 85, - symbol_type_width = 8, - ignore_symbols = { 'namespace' } - }, - }, - extensions = { - ['ui-select'] = { - require('telescope.themes').get_dropdown { - } - }, - ['menufacture'] = { - mappings = { - main_menu = { [{ 'n' }] = 'm' }, - }, - }, - } - }) - - require('telescope').load_extension('ui-select') - require('telescope').load_extension('fzf') - require('telescope').load_extension('menufacture') - vim.api.nvim_create_autocmd('User', { - pattern = 'TelescopePreviewerLoaded', - callback = function() - vim.api.nvim_win_set_option(0, 'wrap', true) - vim.api.nvim_win_set_option(0, 'number', true) - end, - }) - if vim.loop.os_uname().sysname == 'Windows_NT' then - vim.env.HOME = home - end - vim.api.nvim_create_autocmd('BufEnter', { - callback = function() - if vim.opt.foldmethod:get() == 'expr' then - vim.schedule(function() - vim.opt.foldmethod = 'expr' - end) - end - end, - }) - end -} -- 2.49.1 From 57eb3586d96c48a32d33a1af4c470eeda3660f9b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 09:15:57 +0000 Subject: [PATCH 589/894] fixed dap config --- lua/plugins/dap.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 6ad154a..d07dbbf 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -3,7 +3,12 @@ return { dependencies = { 'mfussenegger/nvim-dap-python', 'theHamsta/nvim-dap-virtual-text', - 'rcarriga/nvim-dap-ui', + { + 'rcarriga/nvim-dap-ui', + dependencies = { + 'nvim-neotest/nvim-nio' + } + }, 'rcarriga/cmp-dap', }, keys = { @@ -95,7 +100,7 @@ return { config.pythonPath = pythonVenv.getPythonEnv() config.cwd = vim.fn.getcwd() end - require ('fzf-lua').dap_configurations() + require('fzf-lua').dap_configurations() end local masonpath = vim.fn.stdpath('data') .. '/mason' @@ -103,7 +108,7 @@ return { -- PYTHON dap.adapters.python = { type = 'executable', - command = masonpath .. '/packages/debugpy/venv/' .. pythonVenv.getVenvSuffix(), + command = 'python', args = { '-m', 'debugpy.adapter' }, options = { detached = true, @@ -150,7 +155,7 @@ return { type = 'server', port = '${port}', executable = { - command = require'mason-core.path'.bin_prefix'codelldb'; + command = require 'mason-core.path'.bin_prefix 'codelldb', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: @@ -182,7 +187,7 @@ return { type = 'codelldb', request = 'launch', program = function() - return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file'}) + return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) end, cwd = '${workspaceFolder}', stopOnEntry = false, @@ -192,7 +197,7 @@ return { type = 'lldb', request = 'launch', program = function() - return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file'}) + return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) end, cwd = '${workspaceFolder}', stopOnEntry = false, -- 2.49.1 From 4131ef418b7f7553a6d94d09f544f233a2225e1a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 11:30:27 +0200 Subject: [PATCH 590/894] Fixed LspReferenceText highlight for bamboo --- lua/plugins/bamboo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index beda326..6dbcb25 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -25,7 +25,7 @@ return { ['@function.builtin'] = { fg = 'NONE' }, ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.black }, ['LspReferenceWrite'] = { bg = colors.vulgaris.dark_red, fg = colors.vulgaris.fg }, - ['LspReferenceText'] = { bg = colors.vulgaris.dark_cyan, fg = colors.vulgaris.fg }, + ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1 }, ['Delimiter'] = { fg = colors.vulgaris.fg }, }, } -- 2.49.1 From ce098ba0b0a0db726389d4dc56ed9f6d0b0a7005 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 09:35:47 +0000 Subject: [PATCH 591/894] fixed reference write highlight --- lua/plugins/bamboo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 6dbcb25..6dab736 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -24,7 +24,7 @@ return { ['@lsp.typemod.method.defaultLibrary.cpp'] = { fg = 'NONE' }, ['@function.builtin'] = { fg = 'NONE' }, ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.black }, - ['LspReferenceWrite'] = { bg = colors.vulgaris.dark_red, fg = colors.vulgaris.fg }, + ['LspReferenceWrite'] = { bg = colors.vulgaris.red , fg = colors.vulgaris.bg1 }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1 }, ['Delimiter'] = { fg = colors.vulgaris.fg }, }, -- 2.49.1 From 01d5a598bbc8f1ce80e52344a2dd021a4a2cead9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 20:56:31 +0200 Subject: [PATCH 592/894] fixed esc in lazygit --- lua/my_keymappings.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 86b0a57..8033187 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -74,4 +74,3 @@ if vim.g.neovide then vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) end -vim.keymap.set('t', '', '', { noremap = true}) -- 2.49.1 From c298be4bfdc984b1e03ca94626badabf6c71f412 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 21:04:52 +0200 Subject: [PATCH 593/894] delete arrow plugin --- lua/plugins/arrow.lua | 7 ------- lua/plugins/lualine.lua | 4 ---- 2 files changed, 11 deletions(-) delete mode 100644 lua/plugins/arrow.lua diff --git a/lua/plugins/arrow.lua b/lua/plugins/arrow.lua deleted file mode 100644 index 89246ca..0000000 --- a/lua/plugins/arrow.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'otavioschwanck/arrow.nvim', - opts = { - show_icons = true, - leader_key = ';' -- Recommended to be a single key - } -} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 1c3fd56..c84a51c 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -5,7 +5,6 @@ return { 'Isrothy/lualine-diagnostic-message' }, config = function() - local statusline = require('arrow.statusline') require('lualine').setup { options = { theme = 'bamboo', @@ -54,9 +53,6 @@ return { file_status = true, separator = { left = '', right = '' }, }, - { - statusline.text_for_statusline_with_icons - } }, lualine_b = { { -- 2.49.1 From b17849a136a6ebb1d1e4341516b418c2cc208e8f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 26 Apr 2024 21:05:54 +0200 Subject: [PATCH 594/894] updated plugins --- lazy-lock.json | 82 +++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 48 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 82a1bb6..5cde671 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,15 +1,13 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, - "advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" }, - "aerial.nvim": { "branch": "master", "commit": "3748e87a316a68754341cdffcef44fee61dee51c" }, - "arrow.nvim": { "branch": "master", "commit": "038b30c5d1b37d278cb31735a0cfdb471e2466d7" }, - "astrotheme": { "branch": "main", "commit": "84cbd9c1456a94cbe805d15a174a2d04f95110a9" }, - "bamboo.nvim": { "branch": "master", "commit": "5c826c8ad27010ac2fcaf7deb4c36b16d00ef5a1" }, - "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "aerial.nvim": { "branch": "master", "commit": "399e276328be8242ccde01d90f6f6c619f7bb24f" }, + "astrotheme": { "branch": "main", "commit": "8b316aa3ecd8c4206430379c0b1da0b4e7969ab9" }, + "bamboo.nvim": { "branch": "master", "commit": "f624433d750dbf69ce93ee057fbc1c595aa13e31" }, + "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "clangd_extensions.nvim": { "branch": "main", "commit": "2992ba8c13c2de41f91a7c7488bf1c48bcec31fe" }, - "cmake-tools.nvim": { "branch": "master", "commit": "a4cd0b3a2c8a166a54b36bc00579954426748959" }, + "cmake-tools.nvim": { "branch": "master", "commit": "fa23e7009ff92c4c5e784188ccddf021d9044a84" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, @@ -28,67 +26,55 @@ "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "fzf-lua": { "branch": "main", "commit": "6860237cbcc6e95d26ffdb22e4fe7a65b2b3e60d" }, - "gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" }, + "fzf-lua": { "branch": "main", "commit": "2a1bb74da8e409d8c534a8f43d7fb0f8acc85207" }, + "gitsigns.nvim": { "branch": "main", "commit": "035da036e68e509ed158414416c827d022d914bd" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "kanagawa.nvim": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" }, - "lazy.nvim": { "branch": "main", "commit": "65887ea871d44822bff47504202b3643f29d614e" }, + "kanagawa.nvim": { "branch": "master", "commit": "23ae977e5a46dbf976d051ad2b57f5ed789871d8" }, + "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, - "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, - "luarocks.nvim": { "branch": "main", "commit": "d73f4bbbeea9eeb9b66a0c6431db402654f43cb8" }, - "luasnip-snippets": { "branch": "main", "commit": "76bc77740a5e003412605e7e29eef7f97e47a5b8" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "luarocks.nvim": { "branch": "main", "commit": "d3dda396d66e484590f253d1ac6d8980e3130807" }, + "luasnip-snippets": { "branch": "main", "commit": "731fc02d4b2e30ef0fddd345f9cad5f261479b7c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a14770dc8c7cb29643870ac79788eec6f7ce1f8" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "monokai-pro.nvim": { "branch": "master", "commit": "1b9b086df95ad9a6b946c56f65fa2d048297c00b" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" }, + "monokai-pro.nvim": { "branch": "master", "commit": "8940b2f87343db96ee2c62404a4e4ff9257ed514" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, - "neogit": { "branch": "master", "commit": "20ab5a688c2de6fa371865528c737ae901989aa5" }, - "neorg": { "branch": "main", "commit": "71e2f05ee19c94705fadbc1f84e11990baf8ff1c" }, - "neorg-telescope": { "branch": "main", "commit": "418f8fd4bd7360d954613a2322b4eb2888ac3ad9" }, - "neotest": { "branch": "master", "commit": "e07fe8241112274aae9947b98d255763738a1d52" }, + "neogit": { "branch": "master", "commit": "0cae7abc30cb91d661f28257c331fcb5b5198e31" }, + "neotest": { "branch": "master", "commit": "f03a78cef74db5638e4312e18b767294a90de8da" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" }, - "nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" }, + "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, + "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, - "nvim-dap-python": { "branch": "master", "commit": "66560f0ebddf96604f7037e1efad3ba6942761e6" }, + "nvim-dap-python": { "branch": "master", "commit": "3dffa58541d1f52c121fe58ced046268c838d802" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" }, - "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, - "nvim-highlight-colors": { "branch": "main", "commit": "56e40d86a3202aedb0dbcded7aa6248c299eb0f0" }, - "nvim-lint": { "branch": "master", "commit": "4055dc856d5ac8f6b85748006fd8fa6457e086e8" }, - "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" }, + "nvim-highlight-colors": { "branch": "main", "commit": "432dc7a817a4973041f02b418169667c491f60fd" }, + "nvim-lint": { "branch": "master", "commit": "f098232d70cebe90e27404928c9bc19ca7a5a7b5" }, + "nvim-lspconfig": { "branch": "master", "commit": "7133e85c3df14a387da8942c094c7edddcdef309" }, "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, - "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" }, + "nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, "nvim-rooter.lua": { "branch": "main", "commit": "fe2343901c1777316823e3c6a34718eea8dedf37" }, - "nvim-surround": { "branch": "main", "commit": "d47001f8ddf9646c24f16d2732d4d0255acd2121" }, + "nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" }, - "octo.nvim": { "branch": "master", "commit": "27d6fd6ad2f2f59330724d6ea5c751f0c3ec96e6" }, - "oil.nvim": { "branch": "master", "commit": "32e18df30f937e02135398c270b72a4d24b40120" }, + "octo.nvim": { "branch": "master", "commit": "5646539320cd62af6ff28f48ec92aeb724c68e18" }, + "oil.nvim": { "branch": "master", "commit": "78aeb665e2dcbc8ab948b3397581dcc0b7b086f3" }, "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, - "paren-hint.nvim": { "branch": "main", "commit": "98be4743381b312cf001bbda688857bc10916024" }, - "peek.nvim": { "branch": "master", "commit": "62e9e46fb5b6be510c60f67c1fd9913764efaac0" }, + "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "27e8926d1d51ba8d26561d7383f8cf80d504fbd7" }, + "pretty_hover": { "branch": "master", "commit": "4c6e6f2d968e34cd9d2074b1d37b5b58c5362348" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "a249476e451673f7811852d93109dff19311ee39" }, - "rustaceanvim": { "branch": "master", "commit": "c2cdbeca8674e1b1b66ba870ff502bdad55a6d8a" }, - "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, - "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope-menufacture": { "branch": "main", "commit": "79376f887f589a4240267383e8abc0a31861325a" }, - "telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, - "vim-fugitive": { "branch": "master", "commit": "96c1009fcf8ce60161cc938d149dd5a66d570756" }, + "rustaceanvim": { "branch": "master", "commit": "cd35b0f7fb0c9fe6879b084096230a74fefa4da8" }, + "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, - "zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" } + "workspaces.nvim": { "branch": "master", "commit": "c6f19b08123eaee37d27561299f2b4f1385fa9f0" } } \ No newline at end of file -- 2.49.1 From 97eba08fc8f5ed7b4639c0c9d98efdc136ef064f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Apr 2024 23:15:32 +0200 Subject: [PATCH 595/894] Set typeCheckingMode to standard for basedpyright --- lua/plugins/lspconfig.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 5e44e30..cc1e11c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -203,6 +203,11 @@ return { lspconfig['basedpyright'].setup { capabilities = capabilities, on_attach = on_attach, + settings = { + basedpyright = { + typeCheckingMode = 'standard', + }, + }, } lspconfig['groovyls'].setup { -- 2.49.1 From bbd5ddce17d869161b4606a238c3e743d4992a6a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Apr 2024 23:15:55 +0200 Subject: [PATCH 596/894] Added markdown_oxide --- lua/plugins/lspconfig.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index cc1e11c..4ab7af2 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -317,6 +317,11 @@ return { on_attach = on_attach, } + lspconfig['markdown_oxide'].setup { + capabilities = capabilities, + on_attach = on_attach, + } + lspconfig['marksman'].setup { capabilities = capabilities, on_attach = on_attach, -- 2.49.1 From d139425947bdb65c2388b427e2e3e2a5067677dc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Apr 2024 23:53:33 +0200 Subject: [PATCH 597/894] Fixed LspReferenceText fg colors --- lua/plugins/bamboo.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 6dab736..5318d61 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -23,9 +23,9 @@ return { ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.method.defaultLibrary.cpp'] = { fg = 'NONE' }, ['@function.builtin'] = { fg = 'NONE' }, - ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.black }, - ['LspReferenceWrite'] = { bg = colors.vulgaris.red , fg = colors.vulgaris.bg1 }, - ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1 }, + ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, + ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, + ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['Delimiter'] = { fg = colors.vulgaris.fg }, }, } -- 2.49.1 From 1d1f123a1b0a5d46c48587f91acb9688dad74b2f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 4 May 2024 13:55:54 +0200 Subject: [PATCH 598/894] updated fzf --- lazy-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5cde671..0245662 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -26,7 +26,7 @@ "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "fzf-lua": { "branch": "main", "commit": "2a1bb74da8e409d8c534a8f43d7fb0f8acc85207" }, + "fzf-lua": { "branch": "main", "commit": "2702816ef910ea956b3154ce1e3cbd02b2a6c127" }, "gitsigns.nvim": { "branch": "main", "commit": "035da036e68e509ed158414416c827d022d914bd" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, -- 2.49.1 From b8b8b020981af3781ad9f685b443ebd16162162c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 4 May 2024 13:56:06 +0200 Subject: [PATCH 599/894] removed highlights from lsp --- lua/plugins/lspconfig.lua | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4ab7af2..3122278 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -140,33 +140,6 @@ return { local capabilities = require('cmp_nvim_lsp').default_capabilities() - vim.api.nvim_set_hl( - 0, - 'LspReferenceText', - { - bold = true, - ctermbg = 'red', - bg = '#5a524c' - } - ) - vim.api.nvim_set_hl( - 0, - 'LspReferenceRead', - { - bold = true, - ctermbg = 'red', - bg = 'DarkGreen' - } - ) - vim.api.nvim_set_hl( - 0, - 'LspReferenceWrite', - { - bold = true, - ctermbg = 'red', - bg = 'DarkRed' - } - ) local diagnostics = { Error = ' ', Warning = ' ', -- 2.49.1 From 8e2604d30af07e53890850ad038d187ebe5720bc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 7 May 2024 09:13:29 +0200 Subject: [PATCH 600/894] added lsp comment highlight to bamboo --- lua/plugins/bamboo.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 5318d61..2b485db 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -18,6 +18,7 @@ return { variables = {}, }, highlights = { + ['@lsp.type.comment'] = { link = '@comment', default = true }, ['@lsp.type.parameter'] = { fg = colors.vulgaris.red }, ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, -- 2.49.1 From 951b772f578e9b15701acf3b7ca354dc8ca69661 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 9 May 2024 21:47:45 +0200 Subject: [PATCH 601/894] split in fzflua is ctrl-x --- lua/plugins/fzf-lua.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 80c230a..8c3dcf9 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -2,7 +2,18 @@ return { 'ibhagwan/fzf-lua', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() - require('fzf-lua').setup({ 'borderless_full' }) + local actions = require 'fzf-lua.actions' + require('fzf-lua').setup({ + 'borderless_full', + actions = { + files = { + ['ctrl-x'] = actions.file_split, + }, + buffers = { + ['ctrl-x'] = actions.buf_split, + } + } + }) end, cmd = 'FzfLua', keys = { -- 2.49.1 From 3442de38f57409560f9e6d43a39fdd4bd50d7a8d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 May 2024 20:28:15 +0200 Subject: [PATCH 602/894] some bamboo tuning --- lua/plugins/bamboo.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/plugins/bamboo.lua b/lua/plugins/bamboo.lua index 2b485db..be312f0 100644 --- a/lua/plugins/bamboo.lua +++ b/lua/plugins/bamboo.lua @@ -7,8 +7,11 @@ return { require('bamboo').setup { dim_inactive = true, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, + lualine = { + transparent = true, -- lualine center bar transparency + }, code_style = { - comments = { italic = true }, + comments = { italic = false }, conditionals = { italic = false }, keywords = {}, functions = {}, @@ -19,6 +22,7 @@ return { }, highlights = { ['@lsp.type.comment'] = { link = '@comment', default = true }, + ['@comment'] = { fg = colors.vulgaris.light_grey, default = true }, ['@lsp.type.parameter'] = { fg = colors.vulgaris.red }, ['@lsp.mod.readonly'] = { fmt = 'bold', fg = 'NONE' }, ['@lsp.typemod.parameter.readonly'] = { fmt = 'bold', fg = 'NONE' }, -- 2.49.1 From 6eff3343b5545c1c4d6a9a10987eafc8e6580044 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 May 2024 20:34:50 +0200 Subject: [PATCH 603/894] fixed fzf bindings --- lua/plugins/fzf-lua.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 8c3dcf9..427e99d 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -7,10 +7,20 @@ return { 'borderless_full', actions = { files = { + ['default'] = actions.file_edit_or_qf, + ['ctrl-s'] = actions.file_split, + ['ctrl-v'] = actions.file_vsplit, + ['ctrl-t'] = actions.file_tabedit, + ['alt-q'] = actions.file_sel_to_qf, + ['alt-l'] = actions.file_sel_to_ll, ['ctrl-x'] = actions.file_split, }, buffers = { - ['ctrl-x'] = actions.buf_split, + ['default'] = actions.buf_edit, + ['ctrl-s'] = actions.buf_split, + ['ctrl-v'] = actions.buf_vsplit, + ['ctrl-t'] = actions.buf_tabedit, + ['ctrl-x'] = actions.buf_split } } }) -- 2.49.1 From 3e8eb942371565c60d15150810bca1575591653e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 May 2024 20:52:17 +0200 Subject: [PATCH 604/894] fixed rainbow url --- lua/plugins/rainbow-delimiters.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/rainbow-delimiters.lua b/lua/plugins/rainbow-delimiters.lua index 07abdfa..285a558 100644 --- a/lua/plugins/rainbow-delimiters.lua +++ b/lua/plugins/rainbow-delimiters.lua @@ -1,5 +1,5 @@ return { - 'https://gitlab.com/HiPhish/rainbow-delimiters.nvim', + 'HiPhish/rainbow-delimiters.nvim', dependencies = 'nvim-treesitter/nvim-treesitter', event = 'VeryLazy' } -- 2.49.1 From c4581bfc847b8c77c3b8ab644c947e1b67c29b25 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 May 2024 20:52:22 +0200 Subject: [PATCH 605/894] updated plugins --- lazy-lock.json | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 0245662..d184009 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,11 +3,11 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "aerial.nvim": { "branch": "master", "commit": "399e276328be8242ccde01d90f6f6c619f7bb24f" }, - "astrotheme": { "branch": "main", "commit": "8b316aa3ecd8c4206430379c0b1da0b4e7969ab9" }, + "astrotheme": { "branch": "main", "commit": "7e47b7900229365bc0dca2a2eee2acc62dfc9dc3" }, "bamboo.nvim": { "branch": "master", "commit": "f624433d750dbf69ce93ee057fbc1c595aa13e31" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "2992ba8c13c2de41f91a7c7488bf1c48bcec31fe" }, - "cmake-tools.nvim": { "branch": "master", "commit": "fa23e7009ff92c4c5e784188ccddf021d9044a84" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "430a8f56605cb1d0ed9876301d6e9bf675195e16" }, + "cmake-tools.nvim": { "branch": "master", "commit": "b221c5973ca520b0f079e16cd9919a8d944f7890" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, @@ -19,61 +19,61 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, - "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" }, + "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, + "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, - "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "fzf-lua": { "branch": "main", "commit": "2702816ef910ea956b3154ce1e3cbd02b2a6c127" }, - "gitsigns.nvim": { "branch": "main", "commit": "035da036e68e509ed158414416c827d022d914bd" }, + "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, + "fzf-lua": { "branch": "main", "commit": "b64d2802d1349ae9c3d54062492856c2e071326a" }, + "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, + "gruvbox.nvim": { "branch": "main", "commit": "c442515506caa166118e157980f62a9ac24fa8c3" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "kanagawa.nvim": { "branch": "master", "commit": "23ae977e5a46dbf976d051ad2b57f5ed789871d8" }, - "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, - "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, + "kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" }, + "lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" }, + "lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "luarocks.nvim": { "branch": "main", "commit": "d3dda396d66e484590f253d1ac6d8980e3130807" }, "luasnip-snippets": { "branch": "main", "commit": "731fc02d4b2e30ef0fddd345f9cad5f261479b7c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a14770dc8c7cb29643870ac79788eec6f7ce1f8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "monokai-pro.nvim": { "branch": "master", "commit": "8940b2f87343db96ee2c62404a4e4ff9257ed514" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, - "neogit": { "branch": "master", "commit": "0cae7abc30cb91d661f28257c331fcb5b5198e31" }, - "neotest": { "branch": "master", "commit": "f03a78cef74db5638e4312e18b767294a90de8da" }, + "neogit": { "branch": "master", "commit": "bc0c609e3568a171e0549b449aa1b2b4b5b20e8c" }, + "neotest": { "branch": "master", "commit": "5caac5cc235d495a2382bc2980630ef36ac87032" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, - "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, + "nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" }, + "nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" }, "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, "nvim-dap-python": { "branch": "master", "commit": "3dffa58541d1f52c121fe58ced046268c838d802" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" }, "nvim-highlight-colors": { "branch": "main", "commit": "432dc7a817a4973041f02b418169667c491f60fd" }, - "nvim-lint": { "branch": "master", "commit": "f098232d70cebe90e27404928c9bc19ca7a5a7b5" }, - "nvim-lspconfig": { "branch": "master", "commit": "7133e85c3df14a387da8942c094c7edddcdef309" }, + "nvim-lint": { "branch": "master", "commit": "f3bcc28ffccb768212247294acccc106e029fc3c" }, + "nvim-lspconfig": { "branch": "master", "commit": "94513a5b246cf32a8f87ca714af50911df63351c" }, "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, - "nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" }, - "nvim-rooter.lua": { "branch": "main", "commit": "fe2343901c1777316823e3c6a34718eea8dedf37" }, - "nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" }, + "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, + "nvim-rooter.lua": { "branch": "main", "commit": "de7ffc3d704041cb4a65304229288a1329a2d298" }, + "nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, - "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" }, + "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "octo.nvim": { "branch": "master", "commit": "5646539320cd62af6ff28f48ec92aeb724c68e18" }, "oil.nvim": { "branch": "master", "commit": "78aeb665e2dcbc8ab948b3397581dcc0b7b086f3" }, "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "4c6e6f2d968e34cd9d2074b1d37b5b58c5362348" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "a249476e451673f7811852d93109dff19311ee39" }, - "rustaceanvim": { "branch": "master", "commit": "cd35b0f7fb0c9fe6879b084096230a74fefa4da8" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, + "rustaceanvim": { "branch": "master", "commit": "1c3d3a75bebcb16df2a093b147ba498185e4ab17" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, "workspaces.nvim": { "branch": "master", "commit": "c6f19b08123eaee37d27561299f2b4f1385fa9f0" } -- 2.49.1 From 220fe9ce0f00a4202ef4a29eb1fee9eb970bcab6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 May 2024 23:31:12 +0200 Subject: [PATCH 606/894] deleted some unused plugins --- lua/plugins/heirline.lua | 54 --------------------------------- lua/plugins/luarocks.lua | 5 ---- lua/plugins/navbuddy.lua | 59 ------------------------------------ lua/plugins/neotree.lua | 64 ---------------------------------------- lua/plugins/octo.lua | 4 --- 5 files changed, 186 deletions(-) delete mode 100644 lua/plugins/heirline.lua delete mode 100644 lua/plugins/luarocks.lua delete mode 100644 lua/plugins/navbuddy.lua delete mode 100644 lua/plugins/neotree.lua delete mode 100644 lua/plugins/octo.lua diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua deleted file mode 100644 index 3d2f2d5..0000000 --- a/lua/plugins/heirline.lua +++ /dev/null @@ -1,54 +0,0 @@ -return { - 'rebelot/heirline.nvim', - dependencies = { 'Zeioth/heirline-components.nvim' }, - opts = function() - local compon = require 'heirline-components.all' - return { - tabline = { -- UI upper bar - compon.component.tabline_conditional_padding(), - compon.component.tabline_buffers(), - compon.component.fill { hl = { bg = 'tabline_bg' } }, - compon.component.tabline_tabpages() - }, - winbar = { -- UI breadcrumbs bar - init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end, - fallthrough = false, - compon.component.breadcrumbs_when_inactive(), - compon.component.breadcrumbs { hl = compon.hl.get_attributes('winbar', true) }, - }, - statuscolumn = { -- UI left column - init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end, - compon.component.foldcolumn(), - compon.component.fill(), - compon.component.numbercolumn(), - compon.component.signcolumn(), - } or nil, - statusline = { -- UI statusbar - hl = { fg = 'fg', bg = 'bg' }, - compon.component.mode { mode_text = { pad_text = 'left' } }, - compon.component.git_branch(), - compon.component.file_info { filetype = false, filename = {}, file_modified = {}, file_read_only = {} }, - compon.component.git_diff(), - compon.component.diagnostics(), - compon.component.fill(), - compon.component.cmd_info { search_count = {} }, - compon.component.fill(), - -- compon.component.lsp(), - compon.component.compiler_state(), - compon.component.virtual_env(), - compon.component.file_encoding(), - compon.component.nav(), - }, - } - end, - config = function(_, opts) - local heirline = require 'heirline' - lib = require 'heirline-components.all' - - -- Setup - lib.init.subscribe_to_events() - heirline.load_colors(lib.hl.get_colors()) - heirline.setup(opts) - end, - enabled = false -} diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua deleted file mode 100644 index fced1df..0000000 --- a/lua/plugins/luarocks.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'vhyrro/luarocks.nvim', - priority = 1000, -- We'd like this plugin to load first out of the rest - config = true, -- This automatically runs `require("luarocks-nvim").setup()` -} diff --git a/lua/plugins/navbuddy.lua b/lua/plugins/navbuddy.lua deleted file mode 100644 index 38fdc84..0000000 --- a/lua/plugins/navbuddy.lua +++ /dev/null @@ -1,59 +0,0 @@ -return { - 'SmiteshP/nvim-navbuddy', - dependencies = { - 'neovim/nvim-lspconfig', - 'SmiteshP/nvim-navic', - 'MunifTanjim/nui.nvim' - }, - config = function() - local actions = require('nvim-navbuddy.actions') - local navbuddy = require('nvim-navbuddy') - navbuddy.setup { - mappings = { - [''] = actions.close, -- Close and cursor to original location - ['q'] = actions.close, - ['j'] = actions.next_sibling, -- down - ['k'] = actions.previous_sibling, -- up - ['h'] = actions.parent, -- Move to left panel - ['l'] = actions.children, -- Move to right panel - ['v'] = actions.visual_name, -- Visual selection of name - ['V'] = actions.visual_scope, -- Visual selection of scope - ['y'] = actions.yank_name, -- Yank the name to system clipboard "+ - ['Y'] = actions.yank_scope, -- Yank the scope to system clipboard "+ - ['i'] = actions.insert_name, -- Insert at start of name - ['I'] = actions.insert_scope, -- Insert at start of scope - ['a'] = actions.append_name, -- Insert at end of name - ['A'] = actions.append_scope, -- Insert at end of scope - ['r'] = actions.rename, -- Rename currently focused symbol - ['d'] = actions.delete, -- Delete scope - ['f'] = actions.fold_create, -- Create fold of current scope - ['F'] = actions.fold_delete, -- Delete fold of current scope - ['c'] = actions.comment, -- Comment out current scope - [''] = actions.select, -- Goto selected symbol - ['o'] = actions.select, - ['J'] = actions.move_down, -- Move focused node down - ['K'] = actions.move_up, -- Move focused node up - [''] = actions.next_sibling, -- down - [''] = actions.previous_sibling, -- up - [''] = actions.parent, -- Move to left panel - [''] = actions.children, -- Move to right panel - [''] = actions.move_down, -- Move focused node down - [''] = actions.move_up, -- Move focused node up - }, - lsp = { - auto_attach = true, -- If set to true, you don't need to manually use attach function - }, - } - end, - keys = { - { - 'n', - function() - require('nvim-navbuddy').open() - end, - desc = 'Navbuddy' - }, - }, - cmd = 'Navbuddy', - event = 'LspAttach' -} diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua deleted file mode 100644 index cd08546..0000000 --- a/lua/plugins/neotree.lua +++ /dev/null @@ -1,64 +0,0 @@ -return { - 'nvim-neo-tree/neo-tree.nvim', - cmd = 'Neotree', - version = '*', - keys = { - { '\\', 'Neotree reveal', desc = 'NeoTree' }, - }, - dependencies = { - 'nvim-lua/plenary.nvim', - -- 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended - 'nvim-tree/nvim-web-devicons', - 'MunifTanjim/nui.nvim', - }, - opts = { - window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for - -- possible options. These can also be functions that return these options. - position = 'float', -- left, right, float, current - width = 40, -- applies to left and right positions - popup = { -- settings that apply to float position only - size = { - height = '80%', - width = '50%', - }, - position = '50%', -- 50% means center it - -- you can also specify border here, if you want a different setting from - -- the global popup_border_style. - }, - enable_git_status = false, - -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. - -- You can also create your own commands by providing a function instead of a string. - mappings = { - [''] = 'toggle_node', - ['<2-LeftMouse>'] = 'open', - [''] = 'open', - ['s'] = 'open_split', - ['v'] = 'open_vsplit', - ['C'] = 'close_node', - ['z'] = 'close_all_nodes', - ['R'] = 'refresh', - ['a'] = 'add', - ['A'] = 'add_directory', - ['d'] = 'delete', - ['r'] = 'rename', - ['y'] = 'copy_to_clipboard', - ['x'] = 'cut_to_clipboard', - ['p'] = 'paste_from_clipboard', - ['c'] = 'copy', -- takes text input for destination - ['m'] = 'move', -- takes text input for destination - ['q'] = 'close_window', - }, - }, - filesystem = { - filtered_items = { - hide_dotfiles = false, - hide_gitignored = false, - }, - hijack_netrw_behavior = 'disabled', - }, - source_selector = { - winbar = true, - statusline = false - } - } -} diff --git a/lua/plugins/octo.lua b/lua/plugins/octo.lua deleted file mode 100644 index e62d251..0000000 --- a/lua/plugins/octo.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { 'pwntester/octo.nvim', - cmd = 'Octo', - config = true, -} -- 2.49.1 From 1137f6c0ab64a0c6efda56b470a66600f80484eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 May 2024 23:31:18 +0200 Subject: [PATCH 607/894] fixed spelling --- lua/plugins/{nvim-router.lua => nvim-rooter.lua} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lua/plugins/{nvim-router.lua => nvim-rooter.lua} (100%) diff --git a/lua/plugins/nvim-router.lua b/lua/plugins/nvim-rooter.lua similarity index 100% rename from lua/plugins/nvim-router.lua rename to lua/plugins/nvim-rooter.lua -- 2.49.1 From 3b17c39a613727ec4bc4f4059eb7f53dcd4165b8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 May 2024 23:36:37 +0200 Subject: [PATCH 608/894] also removed from lock file --- lazy-lock.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index d184009..f4d4fe7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -37,18 +37,15 @@ "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "luarocks.nvim": { "branch": "main", "commit": "d3dda396d66e484590f253d1ac6d8980e3130807" }, "luasnip-snippets": { "branch": "main", "commit": "731fc02d4b2e30ef0fddd345f9cad5f261479b7c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "monokai-pro.nvim": { "branch": "master", "commit": "8940b2f87343db96ee2c62404a4e4ff9257ed514" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, "neogit": { "branch": "master", "commit": "bc0c609e3568a171e0549b449aa1b2b4b5b20e8c" }, "neotest": { "branch": "master", "commit": "5caac5cc235d495a2382bc2980630ef36ac87032" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" }, "nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" }, @@ -59,14 +56,11 @@ "nvim-highlight-colors": { "branch": "main", "commit": "432dc7a817a4973041f02b418169667c491f60fd" }, "nvim-lint": { "branch": "master", "commit": "f3bcc28ffccb768212247294acccc106e029fc3c" }, "nvim-lspconfig": { "branch": "master", "commit": "94513a5b246cf32a8f87ca714af50911df63351c" }, - "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" }, - "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, "nvim-rooter.lua": { "branch": "main", "commit": "de7ffc3d704041cb4a65304229288a1329a2d298" }, "nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "octo.nvim": { "branch": "master", "commit": "5646539320cd62af6ff28f48ec92aeb724c68e18" }, "oil.nvim": { "branch": "master", "commit": "78aeb665e2dcbc8ab948b3397581dcc0b7b086f3" }, "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, -- 2.49.1 From e6879ea1359b09642bb8c20cbd52b48ef806383b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 May 2024 23:56:59 +0200 Subject: [PATCH 609/894] moved themes to themes dir --- lua/config/lazy.lua | 3 ++- lua/{plugins => themes}/astrodark.lua | 0 lua/{plugins => themes}/bamboo.lua | 0 lua/{plugins => themes}/catppuccin.lua | 0 lua/{plugins => themes}/everforest.lua | 0 lua/{plugins => themes}/github-theme.lua | 0 lua/{plugins => themes}/gruvbox-baby.lua | 0 lua/{plugins => themes}/gruvbox.lua | 0 lua/{plugins => themes}/gruvbox_flat.lua | 0 lua/{plugins => themes}/gruvbox_material.lua | 0 lua/{plugins => themes}/kanagawa.lua | 0 lua/{plugins => themes}/material.lua | 0 lua/{plugins => themes}/monokai-pro.lua | 0 13 files changed, 2 insertions(+), 1 deletion(-) rename lua/{plugins => themes}/astrodark.lua (100%) rename lua/{plugins => themes}/bamboo.lua (100%) rename lua/{plugins => themes}/catppuccin.lua (100%) rename lua/{plugins => themes}/everforest.lua (100%) rename lua/{plugins => themes}/github-theme.lua (100%) rename lua/{plugins => themes}/gruvbox-baby.lua (100%) rename lua/{plugins => themes}/gruvbox.lua (100%) rename lua/{plugins => themes}/gruvbox_flat.lua (100%) rename lua/{plugins => themes}/gruvbox_material.lua (100%) rename lua/{plugins => themes}/kanagawa.lua (100%) rename lua/{plugins => themes}/material.lua (100%) rename lua/{plugins => themes}/monokai-pro.lua (100%) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index a554b06..ffca987 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -16,7 +16,8 @@ require('lazy').setup({ version = '', }, spec = { - import = 'plugins' + { import = 'plugins' }, + { import = 'themes' } }, change_detection = { -- automatically check for config file changes and reload the ui diff --git a/lua/plugins/astrodark.lua b/lua/themes/astrodark.lua similarity index 100% rename from lua/plugins/astrodark.lua rename to lua/themes/astrodark.lua diff --git a/lua/plugins/bamboo.lua b/lua/themes/bamboo.lua similarity index 100% rename from lua/plugins/bamboo.lua rename to lua/themes/bamboo.lua diff --git a/lua/plugins/catppuccin.lua b/lua/themes/catppuccin.lua similarity index 100% rename from lua/plugins/catppuccin.lua rename to lua/themes/catppuccin.lua diff --git a/lua/plugins/everforest.lua b/lua/themes/everforest.lua similarity index 100% rename from lua/plugins/everforest.lua rename to lua/themes/everforest.lua diff --git a/lua/plugins/github-theme.lua b/lua/themes/github-theme.lua similarity index 100% rename from lua/plugins/github-theme.lua rename to lua/themes/github-theme.lua diff --git a/lua/plugins/gruvbox-baby.lua b/lua/themes/gruvbox-baby.lua similarity index 100% rename from lua/plugins/gruvbox-baby.lua rename to lua/themes/gruvbox-baby.lua diff --git a/lua/plugins/gruvbox.lua b/lua/themes/gruvbox.lua similarity index 100% rename from lua/plugins/gruvbox.lua rename to lua/themes/gruvbox.lua diff --git a/lua/plugins/gruvbox_flat.lua b/lua/themes/gruvbox_flat.lua similarity index 100% rename from lua/plugins/gruvbox_flat.lua rename to lua/themes/gruvbox_flat.lua diff --git a/lua/plugins/gruvbox_material.lua b/lua/themes/gruvbox_material.lua similarity index 100% rename from lua/plugins/gruvbox_material.lua rename to lua/themes/gruvbox_material.lua diff --git a/lua/plugins/kanagawa.lua b/lua/themes/kanagawa.lua similarity index 100% rename from lua/plugins/kanagawa.lua rename to lua/themes/kanagawa.lua diff --git a/lua/plugins/material.lua b/lua/themes/material.lua similarity index 100% rename from lua/plugins/material.lua rename to lua/themes/material.lua diff --git a/lua/plugins/monokai-pro.lua b/lua/themes/monokai-pro.lua similarity index 100% rename from lua/plugins/monokai-pro.lua rename to lua/themes/monokai-pro.lua -- 2.49.1 From 0d5b0ca292d6f9b62c0e8bc0488e0ab208eea764 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 May 2024 23:57:07 +0200 Subject: [PATCH 610/894] deleted firenvim --- lua/plugins/firenvim.lua | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 lua/plugins/firenvim.lua diff --git a/lua/plugins/firenvim.lua b/lua/plugins/firenvim.lua deleted file mode 100644 index 7b34632..0000000 --- a/lua/plugins/firenvim.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'glacambre/firenvim', - - -- Lazy load firenvim - -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 - cond = not not vim.g.started_by_firenvim, - build = function() - require('lazy').load({ plugins = 'firenvim', wait = true }) - vim.fn['firenvim#install'](0) - end -} -- 2.49.1 From 89eef9e104df45067c2868c4631891e62056a9e2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 16 May 2024 09:41:18 +0200 Subject: [PATCH 611/894] Fixed conceallevel --- after/syntax/markdown.lua | 1 + after/syntax/norg.lua | 1 + lua/my_autocommands.lua | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 after/syntax/markdown.lua create mode 100644 after/syntax/norg.lua diff --git a/after/syntax/markdown.lua b/after/syntax/markdown.lua new file mode 100644 index 0000000..df6a488 --- /dev/null +++ b/after/syntax/markdown.lua @@ -0,0 +1 @@ +vim.opt_local.conceallevel = 3 diff --git a/after/syntax/norg.lua b/after/syntax/norg.lua new file mode 100644 index 0000000..73dac27 --- /dev/null +++ b/after/syntax/norg.lua @@ -0,0 +1 @@ +vim.opt_local.conceallevel = 2 diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index bc057ac..696756a 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -104,5 +104,3 @@ vim.api.nvim_create_autocmd({ 'UIEnter' }, { end end }) - -vim.api.nvim_create_autocmd({ 'FileType' }, { pattern = { 'norg', 'markdown' }, command = 'set conceallevel=3' }) -- 2.49.1 From 3d3f4e72e236d0b0c267ab72e49a11664d3f8c1b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 16 May 2024 09:41:46 +0200 Subject: [PATCH 612/894] Removed firenvim options --- lua/my_autocommands.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 696756a..00ed704 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -95,12 +95,3 @@ api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] }) -- Keep window ratio when resize api.nvim_create_autocmd('VimResized', { command = [[wincmd =]] }) - -vim.api.nvim_create_autocmd({ 'UIEnter' }, { - callback = function(event) - local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client - if client ~= nil and client.name == 'Firenvim' then - vim.o.laststatus = 0 - end - end -}) -- 2.49.1 From 87858ea0de782baf9a3c958e67e35c7abc7b8a8f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 16 May 2024 09:42:51 +0200 Subject: [PATCH 613/894] Set conceallevel to 3 for norg --- after/syntax/norg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/after/syntax/norg.lua b/after/syntax/norg.lua index 73dac27..df6a488 100644 --- a/after/syntax/norg.lua +++ b/after/syntax/norg.lua @@ -1 +1 @@ -vim.opt_local.conceallevel = 2 +vim.opt_local.conceallevel = 3 -- 2.49.1 From 68562ea1beb691b03d848c3b7a348538f386efa5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 18 May 2024 20:19:57 +0200 Subject: [PATCH 614/894] some markdown enhancements --- after/syntax/markdown.lua | 2 +- lua/plugins/cmp.lua | 15 +++++++++++---- lua/plugins/lspconfig.lua | 15 ++++++++++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/after/syntax/markdown.lua b/after/syntax/markdown.lua index df6a488..73dac27 100644 --- a/after/syntax/markdown.lua +++ b/after/syntax/markdown.lua @@ -1 +1 @@ -vim.opt_local.conceallevel = 3 +vim.opt_local.conceallevel = 2 diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 57cb476..31dc365 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,7 +1,7 @@ return { 'hrsh7th/nvim-cmp', branch = 'main', - event = {'InsertEnter', 'CmdlineEnter'}, + event = { 'InsertEnter', 'CmdlineEnter' }, dependencies = { { 'onsails/lspkind-nvim' }, { 'hrsh7th/cmp-buffer' }, @@ -89,9 +89,16 @@ return { end, }, sources = { - { name = 'neorg', priority = 8 }, - { name = 'luasnip', priority = 8 }, - { name = 'nvim_lsp', priority = 7 }, + { name = 'neorg', priority = 8 }, + { name = 'luasnip', priority = 8 }, + { + name = 'nvim_lsp', + option = { + markdown_oxide = { + keyword_pattern = [[\(\k\| \|\/\|#\)\+]] + } + } + }, { name = 'nvim_lsp_signature_help', priority = 7 }, -- { name = 'treesitter', priority = 6 }, { diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3122278..70072f9 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -138,7 +138,12 @@ return { }) local lspconfig = require('lspconfig') - local capabilities = require('cmp_nvim_lsp').default_capabilities() + local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + capabilities.workspace = { + didChangeWatchedFiles = { + dynamicRegistration = true, + }, + } local diagnostics = { Error = ' ', @@ -295,10 +300,10 @@ return { on_attach = on_attach, } - lspconfig['marksman'].setup { - capabilities = capabilities, - on_attach = on_attach, - } + -- lspconfig['marksman'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } lspconfig['yamlls'].setup { capabilities = capabilities, -- 2.49.1 From 638293d7a8e9122cf6f6a5d7560f30acb0a194b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 20 May 2024 21:48:49 +0200 Subject: [PATCH 615/894] space + i for toggle inlay hints --- lua/plugins/lspconfig.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 70072f9..4ffc71a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -51,6 +51,17 @@ local lspKeys = function(client, bufnr) end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end + if client.supports_method('inlayHintProvider') then + vim.keymap.set('n', 'i', function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) + end, + { + noremap = true, + silent = false, + desc = 'Toggle inlay hints', + buffer = bufnr + }) + end end local document_highlight = function(bufnr) -- 2.49.1 From 42c45af70520e159be9d020bef83a6d5302347cd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 21 May 2024 10:00:27 +0000 Subject: [PATCH 616/894] set clipboard for ssh sessions --- lua/config/options.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/config/options.lua b/lua/config/options.lua index 6881000..4cf8b72 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -50,6 +50,27 @@ if vim.fn.has('wsl') == 1 then opt.guifont = 'RobotoMono Nerd Font:h10' elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont = 'Iosevka NFM:h11' + if vim.env.SSH_TTY or vim.env.SSH_CLIENT or vim.env.SSH_CONNECTION then + function no_paste(reg) + return function(lines) + -- Do nothing! We can't paste with OSC52 + end + end + + vim.g.clipboard = { + name = 'OSC 52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy('+'), + ['*'] = require('vim.ui.clipboard.osc52').copy('*'), + }, + paste = { + -- ['+'] = require('vim.ui.clipboard.osc52').paste('+'), + -- ['*'] = require('vim.ui.clipboard.osc52').paste('*'), + ['+'] = no_paste('+'), -- Pasting disabled + ['*'] = no_paste('*'), -- Pasting disabled + }, + } + end else -- opt.guifont = 'Hack Nerd Font:h10' -- opt.guifont = 'JetBrainsMono Nerd Font:h10' -- 2.49.1 From b8e9373c798c6bc32ac4f7a70833b5187ea3483b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 22 May 2024 08:29:39 +0200 Subject: [PATCH 617/894] switch to friendly snippets again --- lua/plugins/luasnip-snippets.lua | 4 ++-- lua/plugins/luasnip.lua | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/luasnip-snippets.lua b/lua/plugins/luasnip-snippets.lua index 1d2e3d2..5c99142 100644 --- a/lua/plugins/luasnip-snippets.lua +++ b/lua/plugins/luasnip-snippets.lua @@ -4,6 +4,6 @@ return { init = function() -- Mandatory setup function require('luasnip_snippets.common.snip_utils').setup() - end - + end, + enabled = false } diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index 486b623..982d266 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -1,11 +1,12 @@ return { 'L3MON4D3/LuaSnip', + dependencies = { 'rafamadriz/friendly-snippets' }, config = function() local ls = require('luasnip') ls.setup({ -- Required to automatically include base snippets, like "c" snippets for "cpp" - load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func, - ft_func = require('luasnip_snippets.common.snip_utils').ft_func, + -- load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func, + -- ft_func = require('luasnip_snippets.common.snip_utils').ft_func, -- To enable auto expansin enable_autosnippets = true, -- Uncomment to enable visual snippets triggered using -- 2.49.1 From 3fe8d4f86daf5ee3caefa191812bf20ce44b94b7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 22 May 2024 09:02:29 +0200 Subject: [PATCH 618/894] use toggleterm for lazygit --- lua/plugins/lazygit.lua | 19 ------------------- lua/plugins/toggleterm.lua | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 19 deletions(-) delete mode 100644 lua/plugins/lazygit.lua diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua deleted file mode 100644 index 8faded0..0000000 --- a/lua/plugins/lazygit.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - 'kdheepak/lazygit.nvim', - cmd = { - 'LazyGit', - 'LazyGitConfig', - 'LazyGitFilter', - 'LazyGitFilterCurrentFile', - 'LazyGit', - }, - keys = { - { - 'g', - function() - require('lazygit').lazygit() - end, - desc = 'LazyGit' - } - } -} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 2a84160..ab28232 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -18,7 +18,40 @@ return { }) local Terminal = require('toggleterm.terminal').Terminal + local lazygit = Terminal:new({ + cmd = 'lazygit', + dir = 'git_dir', + direction = 'float', + float_opts = { + border = 'double', + }, + -- function to run on opening the terminal + on_open = function(term) + vim.cmd('startinsert!') + vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) + end, + -- function to run on closing the terminal + on_close = function(term) + vim.cmd('startinsert!') + end, + }) + function _lazygit_toggle() + lazygit:toggle() + end + + vim.keymap.set('n', 'g', function() + end, + { noremap = true, silent = true }) end, + keys = { + { + 'g', + function() + _lazygit_toggle() + end, + desc = 'LazyGit' + } + }, cmd = 'ToggleTerm', } -- 2.49.1 From 01b44d37be87eed9a55e90a64df93fef0194355d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 22 May 2024 09:03:02 +0200 Subject: [PATCH 619/894] added a clang-tidy file --- .clang-tidy | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .clang-tidy diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..9d00300 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,114 @@ +Checks: 'readability-*, + bsl-*, + cppcoreguidelines-*, + cppcoreguidelines-prefer-member-initializer, + clang-analyzer-core.*, + clang-analyzer-core.StackAddressEscape, + bugprone-assert-side-effect, + bugprone-branch-clone, + bugprone-copy-constructor-init, + bugprone-exception-escape, + bugprone-forward-declaration-namespace, + bugprone-incorrect-roundings, + bugprone-infinite-loop, + bugprone-integer-division, + bugprone-macro-parentheses, + bugprone-multiple-statement-macro, + bugprone-parent-virtual-call, + bugprone-redundant-branch-condition, + bugprone-reserved-identifier, + bugprone-sizeof-container, + bugprone-sizeof-expression, + bugprone-string-constructor, + bugprone-string-integer-assignment, + bugprone-suspicious-enum-usage, + bugprone-suspicious-include, + bugprone-suspicious-missing-comma, + bugprone-suspicious-semicolon, + bugprone-swapped-arguments, + bugprone-terminating-continue, + bugprone-too-small-loop-variable, + bugprone-use-after-move, + misc-redundant-expression, + misc-unused-parameters, + misc-const-correctness, + misc-confusable-identifiers, + misc-definitions-in-headers, + misc-header-include-cycle, + misc-include-cleaner, + misc-misplaced-const, + misc-static-assert, + modernize-use-default-member-init, + modernize-loop-convert, + modernize-min-max-use-initializer-list, + modernize-pass-by-value, + modernize-return-braced-init-list, + modernize-use-default-member-init, + modernize-use-designated-initializers, + modernize-use-equals-default, + modernize-use-equals-delete, + modernize-use-nullptr, + modernize-use-override, + modernize-use-starts-ends-with, + modernize-use-using, + readability-identifier-naming, + readability-duplicate-include, + readability-braces-around-statements, + readability-implicit-bool-conversion, + readability-inconsistent-declaration-parameter-name, + readability-make-member-function-const, + readability-misleading-indentation, + readability-redundant-declaration, + readability-redundant-preprocessor, + readability-redundant-member-init, + readability-simplify-boolean-expr, + readability-static-accessed-through-instance, + readability-uppercase-literal-suffix, + readability-identifier-naming, + readability-duplicate-include, + readability-braces-around-statements, + readability-implicit-bool-conversion, + readability-inconsistent-declaration-parameter-name, + readability-make-member-function-const, + readability-const-return-type, + readability-non-const-parameter, + hicpp-signed-bitwise, + -readability-avoid-const-params-in-decls, + -readability-function-cognitive-complexity, + -readability-magic-numbers, + -readability-identifier-length, + -cppcoreguidelines-explicit-virtual-functions, + -cppcoreguidelines-init-variables, + -cppcoreguidelines-non-private-member-variables-in-classes, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-owning-memory, + -cppcoreguidelines-pro-bounds-constant-array-index, + -cppcoreguidelines-special-member-functions, + -cppcoreguidelines-avoid-c-arrays, + -cppcoreguidelines-pro-type-reinterpret-cast, + -cppcoreguidelines-avoid-non-const-global-variables, + -cppcoreguidelines-pro-bounds-pointer-arithmetic' +CheckOptions: + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.PrivateMemberPrefix + value: m_ + - key: readability-identifier-naming.StructCase + value: CamelCase + - key: readability-identifier-naming.FunctionCase + value: camelBack + - key: readability-identifier-naming.VariableCase + value: camelBack + - key: readability-identifier-naming.GlobalConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.EnumConstant + value: UPPER_CASE + - key: bugprone-argument-comment.StrictMode + value: 1 + - key: bugprone-exception-escape.FunctionsThatShouldNotThrow + value: WinMain,SDL_main + - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: 1 + -- 2.49.1 From f9365da44176a1abf5198d19b30a01d80026d0bc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 22 May 2024 09:27:45 +0200 Subject: [PATCH 620/894] removed additional keymap in toggleterm --- lua/plugins/toggleterm.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index ab28232..2fcca54 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -39,10 +39,6 @@ return { function _lazygit_toggle() lazygit:toggle() end - - vim.keymap.set('n', 'g', function() - end, - { noremap = true, silent = true }) end, keys = { { -- 2.49.1 From f5ae4bd731da611a8a5aa4e5606dcea7a2f47485 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 21:53:42 +0200 Subject: [PATCH 621/894] added lazydev --- lua/plugins/lazydev.lua | 27 +++++++++++++++++++++++++++ lua/plugins/lspconfig.lua | 5 ----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 lua/plugins/lazydev.lua diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua new file mode 100644 index 0000000..f3a7612 --- /dev/null +++ b/lua/plugins/lazydev.lua @@ -0,0 +1,27 @@ +return { + { + 'folke/lazydev.nvim', + ft = 'lua', -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { + 'Bilal2453/luvit-meta', + lazy = true + }, -- optional `vim.uv` typings + { -- optional completion source for require statements and module annotations + 'hrsh7th/nvim-cmp', + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { + name = 'lazydev', + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }) + end, + }, +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4ffc71a..2eaa620 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -118,17 +118,12 @@ return { 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', 'jose-elias-alvarez/null-ls.nvim', - { - 'folke/neodev.nvim', - }, 'Fildo7525/pretty_hover', }, build = ':MasonUpdate', version = nil, branch = 'master', config = function() - require('neodev').setup({ - }) require('mason').setup({ ui = { border = 'rounded' -- 2.49.1 From 0977f892869e42dc54f28995fc051515b880ca8b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 22:21:34 +0200 Subject: [PATCH 622/894] replaced peek with markdown preview --- lua/plugins/markdown-preview.lua | 19 +++++++++++++++++++ lua/plugins/peek.lua | 12 ------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 lua/plugins/markdown-preview.lua delete mode 100644 lua/plugins/peek.lua diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua new file mode 100644 index 0000000..5fa64e0 --- /dev/null +++ b/lua/plugins/markdown-preview.lua @@ -0,0 +1,19 @@ +return { + 'iamcco/markdown-preview.nvim', + cmd = { + 'MarkdownPreviewToggle', + 'MarkdownPreview', + 'MarkdownPreviewStop' + }, + branch = 'master', + ft = { 'markdown' }, + build = function() + vim.fn['mkdp#util#install']() + end, + init = function () + vim.g.mkdp_auto_close = 0 + vim.g.mkdp_auto_start = 1 + vim.g.mkdp_combine_preview = 1 + vim.g.mkdp_combine_preview_auto_refresh = 1 + end +} diff --git a/lua/plugins/peek.lua b/lua/plugins/peek.lua deleted file mode 100644 index 8c5b375..0000000 --- a/lua/plugins/peek.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'toppair/peek.nvim', - build = 'deno task --quiet build:fast', - config = function() - require('peek').setup({ - app = 'webview', - }) - vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {}) - vim.api.nvim_create_user_command('PeekClose', require('peek').close, {}) - end, - cmd = { 'PeekOpen', 'PeekOpen' } -} -- 2.49.1 From ca3279c7623c12e60d974615133b42c27d0e56d6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 22:50:36 +0200 Subject: [PATCH 623/894] fixed lazygit terminal --- lua/plugins/toggleterm.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 2fcca54..83d91d8 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -20,7 +20,7 @@ return { local Terminal = require('toggleterm.terminal').Terminal local lazygit = Terminal:new({ cmd = 'lazygit', - dir = 'git_dir', + dir = vim.fn.getcwd(), direction = 'float', float_opts = { border = 'double', -- 2.49.1 From 82ccaa9c5318114a975ebd7890fd3e15c1a5ae11 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 22:50:55 +0200 Subject: [PATCH 624/894] cleaned up markdown --- after/syntax/markdown.lua | 1 - after/syntax/markdown.vim | 6 ------ ftplugin/markdown.lua | 31 +++---------------------------- lua/plugins/lspconfig.lua | 5 ----- 4 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 after/syntax/markdown.lua delete mode 100644 after/syntax/markdown.vim diff --git a/after/syntax/markdown.lua b/after/syntax/markdown.lua deleted file mode 100644 index 73dac27..0000000 --- a/after/syntax/markdown.lua +++ /dev/null @@ -1 +0,0 @@ -vim.opt_local.conceallevel = 2 diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim deleted file mode 100644 index 7cf39cf..0000000 --- a/after/syntax/markdown.vim +++ /dev/null @@ -1,6 +0,0 @@ -" markdownWikiLink is a new region -syn region markdownWikiLink matchgroup=markdownLinkDelimiter start="\[\[" end="\]\]" contains=markdownUrl keepend oneline concealends -" markdownLinkText is copied from runtime files with 'concealends' appended -syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends -" markdownLink is copied from runtime files with 'conceal' appended -syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua index c13ca46..4a91dd7 100644 --- a/ftplugin/markdown.lua +++ b/ftplugin/markdown.lua @@ -1,29 +1,4 @@ --- Add the key mappings only for Markdown files in a zk notebook. --- if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then - local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end - local opts = { noremap = true, silent = false } +local opts = { noremap = true, silent = false } +vim.keymap.set('n', '', vim.lsp.buf.definition, opts) - map("n", "", "lua vim.lsp.buf.definition()", opts) - -- Create a new note after asking for its title. - -- This overrides the global `zn` mapping to create the note in the same directory as the current buffer. - vim.keymap.set('n', 'zn', "ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", - { noremap = true, silent = false, desc = 'Create a new note' }) - -- Create a new note in the same directory as the current buffer, using the current selection for title. - vim.keymap.set('v', 'znt', ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }", - { noremap = true, silent = false, desc = 'Create a new note' }) - -- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title. - map('v', 'znc', - ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", opts) - - -- Open notes linking to the current buffer. - map('n', 'zb', 'ZkBacklinks', opts) - -- Alternative for backlinks using pure LSP and showing the source context. - --map('n', 'zb', 'lua vim.lsp.buf.references()', opts) - -- Open notes linked by the current buffer. - map('n', 'zl', 'ZkLinks', opts) - - -- Preview a linked note. - map('n', 'K', 'lua vim.lsp.buf.hover()', opts) - -- Open the code actions for a visual selection. - map('v', 'za', ":'<,'>lua vim.lsp.buf.range_code_action()", opts) --- end +vim.opt_local.conceallevel = 0 diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2eaa620..fec4db6 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -296,11 +296,6 @@ return { on_attach = on_attach, } - lspconfig['zk'].setup { - capabilities = capabilities, - on_attach = on_attach, - } - lspconfig['markdown_oxide'].setup { capabilities = capabilities, on_attach = on_attach, -- 2.49.1 From d57eca961d5a1a627041ef11c97bd99cc094459e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 23:34:22 +0200 Subject: [PATCH 625/894] added efm --- lua/plugins/lspconfig.lua | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index fec4db6..faafe59 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -119,6 +119,7 @@ return { 'p00f/clangd_extensions.nvim', 'jose-elias-alvarez/null-ls.nvim', 'Fildo7525/pretty_hover', + 'creativenull/efmls-configs-nvim', }, build = ':MasonUpdate', version = nil, @@ -316,22 +317,34 @@ return { } } - local null_ls = require('null-ls') - null_ls.setup({ - sources = { - null_ls.builtins.code_actions.gitsigns, - -- null_ls.builtins.formatting.black, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.xmlformat, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format, + local prettier = require('efmls-configs.formatters.prettier') + local stylua = require('efmls-configs.formatters.stylua') + local gersemi = require('efmls-configs.formatters.gersemi') + local black = require('efmls-configs.formatters.black') + local isort = require('efmls-configs.formatters.isort') + local languages = { + lua = { stylua }, + markdown = { prettier }, + cmake = { gersemi }, + python = { isort, black }, + } + + local efmls_config = { + -- filetypes = vim.tbl_keys(languages), + settings = { + rootMarkers = { '.git/' }, + languages = languages, }, - debug = true, + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, + } + + require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { on_attach = on_attach, capabilities = capabilities, - }) + })) vim.diagnostic.config({ virtual_text = false, -- 2.49.1 From ae5b5fd06bc7c5ae65e8cdb10163fba846a90c44 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 23:56:11 +0200 Subject: [PATCH 626/894] format with stylua --- lua/config/lazy.lua | 54 +-- lua/config/options.lua | 34 +- lua/my_autocommands.lua | 9 +- lua/my_keymappings.lua | 18 +- .../template/user/clang/clang-tidy.lua | 11 +- lua/overseer/template/user/cmake/build.lua | 14 +- lua/overseer/template/user/cmake/clean.lua | 10 +- lua/overseer/template/user/cmake/cmake.lua | 9 +- .../template/user/cmake/configure.lua | 10 +- lua/plugins/aerial.lua | 46 +- lua/plugins/cmake-tools.lua | 74 +-- lua/plugins/cmp.lua | 37 +- lua/plugins/comment.lua | 42 +- lua/plugins/dap.lua | 449 +++++++++--------- lua/plugins/diffview.lua | 12 +- lua/plugins/dressing.lua | 6 +- lua/plugins/flash.lua | 68 +-- lua/plugins/fzf-lua.lua | 16 +- lua/plugins/gitsigns.lua | 2 +- lua/plugins/indent_blankline.lua | 10 +- lua/plugins/init.lua | 3 +- lua/plugins/lazydev.lua | 4 +- lua/plugins/lspconfig.lua | 187 +++----- lua/plugins/lualine.lua | 38 +- lua/plugins/luasnip-snippets.lua | 2 +- lua/plugins/luasnip.lua | 75 ++- lua/plugins/markdown-preview.lua | 6 +- lua/plugins/neogen.lua | 68 +-- lua/plugins/neogit.lua | 54 +-- lua/plugins/neotest.lua | 78 +-- lua/plugins/nvim-highlight-colors.lua | 2 +- lua/plugins/nvim-lint.lua | 4 +- lua/plugins/nvim-rooter.lua | 8 +- lua/plugins/nvim-surround.lua | 4 +- lua/plugins/oil.lua | 4 +- lua/plugins/overseer.lua | 4 +- lua/plugins/pretty_hover.lua | 10 +- lua/plugins/rainbow-delimiters.lua | 10 +- lua/plugins/rustaceanvim.lua | 17 +- lua/plugins/toggleterm.lua | 8 +- lua/plugins/treesitter.lua | 110 ++--- lua/plugins/which-key.lua | 26 +- lua/plugins/workspaces.lua | 89 ++-- lua/themes/astrodark.lua | 21 +- lua/themes/bamboo.lua | 6 +- lua/themes/catppuccin.lua | 7 +- lua/themes/everforest.lua | 2 +- lua/themes/github-theme.lua | 7 +- lua/themes/gruvbox-baby.lua | 2 +- lua/themes/gruvbox.lua | 2 +- lua/themes/gruvbox_flat.lua | 38 +- lua/themes/gruvbox_material.lua | 84 ++-- lua/themes/kanagawa.lua | 10 +- lua/themes/material.lua | 38 +- lua/themes/monokai-pro.lua | 6 +- lua/utils/python_venv.lua | 16 +- stylua.toml | 2 +- 57 files changed, 994 insertions(+), 989 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index ffca987..bf487ae 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,27 +1,27 @@ -local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - 'https://github.com/folke/lazy.nvim.git', - '--branch=stable', -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require('lazy').setup({ - defaults = { - version = '', - }, - spec = { - { import = 'plugins' }, - { import = 'themes' } - }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = false, -- get a notification when changes are found - }, -}) +local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require('lazy').setup({ + defaults = { + version = '', + }, + spec = { + { import = 'plugins' }, + { import = 'themes' }, + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = false, -- get a notification when changes are found + }, +}) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4cf8b72..004ad91 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,24 +3,24 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.scrolloff = 4 @@ -90,7 +90,7 @@ opt.completeopt = 'menu,menuone,noselect' opt.expandtab = true opt.smartindent = true opt.title = true -opt.titlestring = '%(%{fnamemodify(getcwd(),\":t\")}%) Neovim' +opt.titlestring = '%(%{fnamemodify(getcwd(),":t")}%) Neovim' opt.laststatus = 3 -- for lualine opt.background = 'dark' diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 00ed704..6479dc2 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -78,16 +78,11 @@ vim.api.nvim_create_autocmd('BufReadPost', { end, }) - -- Check if we need to reload the file when it changed -api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, - { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) +api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = [[if !bufexists("[Command Line]") | checktime | endif]] }) -- windows to close with "q" -api.nvim_create_autocmd( - 'FileType', - { pattern = { 'help', 'startuptime', 'qf', 'lspinfo' }, command = [[nnoremap q :close]] } -) +api.nvim_create_autocmd('FileType', { pattern = { 'help', 'startuptime', 'qf', 'lspinfo' }, command = [[nnoremap q :close]] }) api.nvim_create_autocmd('FileType', { pattern = 'man', command = [[nnoremap q :quit]] }) -- don't auto comment new line diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 8033187..6e47120 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -53,7 +53,6 @@ vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, de vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' }) - vim.keymap.set({ 'n', 'x' }, 'y', '"+y', { desc = 'Copy from system clipboard' }) vim.keymap.set({ 'n', 'x' }, 'Y', '"+yg_', { desc = 'Copy from system clipboard' }) vim.keymap.set({ 'n', 'x' }, 'p', '"+p', { desc = 'Paste from system clipboard' }) @@ -68,9 +67,16 @@ if vim.g.neovide then vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta print(string.format('scaling: %f', vim.g.neovide_scale_factor)) end - vim.keymap.set('n', '', function() change_scale_factor(1.25) end) - vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) - vim.keymap.set('n', '', function() change_scale_factor(1.25) end) - vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) + vim.keymap.set('n', '', function() + change_scale_factor(1.25) + end) + vim.keymap.set('n', '', function() + change_scale_factor(1 / 1.25) + end) + vim.keymap.set('n', '', function() + change_scale_factor(1.25) + end) + vim.keymap.set('n', '', function() + change_scale_factor(1 / 1.25) + end) end - diff --git a/lua/overseer/template/user/clang/clang-tidy.lua b/lua/overseer/template/user/clang/clang-tidy.lua index b475fc0..0590f4c 100644 --- a/lua/overseer/template/user/clang/clang-tidy.lua +++ b/lua/overseer/template/user/clang/clang-tidy.lua @@ -10,11 +10,12 @@ return { args = { file, '-p', 'build_nvim', '--quiet', '--config-file', dir .. '/.clang-tidy' }, cwd = dir, components = { - { 'on_result_diagnostics_quickfix', open = false}, - { 'on_output_parse', problem_matcher = '$gcc' }, - { 'on_result_diagnostics', remove_on_restart = true }, - { 'restart_on_save'}, - 'default' }, + { 'on_result_diagnostics_quickfix', open = false }, + { 'on_output_parse', problem_matcher = '$gcc' }, + { 'on_result_diagnostics', remove_on_restart = true }, + { 'restart_on_save' }, + 'default', + }, } end, condition = { diff --git a/lua/overseer/template/user/cmake/build.lua b/lua/overseer/template/user/cmake/build.lua index a62f2d6..c51413d 100644 --- a/lua/overseer/template/user/cmake/build.lua +++ b/lua/overseer/template/user/cmake/build.lua @@ -1,26 +1,22 @@ - return { name = 'CMake Build for nvim', builder = function() return { cmd = { 'cmake' }, - args = { '--build', '.', - '--', '-j8' }, + args = { '--build', '.', '--', '-j8' }, cwd = 'build_nvim', -- components = {"on_output_parse", problem_matcher = "$gcc"} -- components = {'on_output_quickfix', set_diagnostics = true, open = true} - components = { { "on_output_quickfix", open = true, open_on_match = true }, - { 'on_output_parse', problem_matcher = '$gcc' }, - 'default' }, + components = { { 'on_output_quickfix', open = true, open_on_match = true }, { 'on_output_parse', problem_matcher = '$gcc' }, 'default' }, } end, condition = { callback = function(opts) - if vim.fn.executable("cmake") == 0 then + if vim.fn.executable('cmake') == 0 then return false, 'Command "cmake" not found' end - if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then - return false, "No CMakeLists.txt found" + if vim.fn.findfile('CMakeLists.txt', opts.dir .. ';') == '' then + return false, 'No CMakeLists.txt found' end return true end, diff --git a/lua/overseer/template/user/cmake/clean.lua b/lua/overseer/template/user/cmake/clean.lua index 5b8a28d..507eff9 100644 --- a/lua/overseer/template/user/cmake/clean.lua +++ b/lua/overseer/template/user/cmake/clean.lua @@ -1,21 +1,19 @@ - return { name = 'CMake Clean for nvim', builder = function() return { cmd = { 'cmake' }, - args = { '--build', '.', - '-t', 'clean' }, + args = { '--build', '.', '-t', 'clean' }, cwd = 'build_nvim', } end, condition = { callback = function(opts) - if vim.fn.executable("cmake") == 0 then + if vim.fn.executable('cmake') == 0 then return false, 'Command "cmake" not found' end - if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then - return false, "No CMakeLists.txt found" + if vim.fn.findfile('CMakeLists.txt', opts.dir .. ';') == '' then + return false, 'No CMakeLists.txt found' end return true end, diff --git a/lua/overseer/template/user/cmake/cmake.lua b/lua/overseer/template/user/cmake/cmake.lua index c970b46..47f8e61 100644 --- a/lua/overseer/template/user/cmake/cmake.lua +++ b/lua/overseer/template/user/cmake/cmake.lua @@ -1,6 +1,7 @@ return { -'builtin', -'user.cmake.configure', -'user.cmake.build', -'user.cmake.clean'} + 'builtin', + 'user.cmake.configure', + 'user.cmake.build', + 'user.cmake.clean', +} -- https://gitlab.com/ranjithshegde/dotbare/-/tree/master/.config/nvim/lua/overseer diff --git a/lua/overseer/template/user/cmake/configure.lua b/lua/overseer/template/user/cmake/configure.lua index 6075f5c..1c9808a 100644 --- a/lua/overseer/template/user/cmake/configure.lua +++ b/lua/overseer/template/user/cmake/configure.lua @@ -4,19 +4,17 @@ return { local cwd = vim.fn.getcwd() return { cmd = { 'cmake' }, - args = { '-B', 'build_nvim', - '-S', cwd, - '-G', 'Ninja' }, + args = { '-B', 'build_nvim', '-S', cwd, '-G', 'Ninja' }, cwd = build_nvim, } end, condition = { callback = function(opts) - if vim.fn.executable("cmake") == 0 then + if vim.fn.executable('cmake') == 0 then return false, 'Command "cmake" not found' end - if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then - return false, "No CMakeLists.txt found" + if vim.fn.findfile('CMakeLists.txt', opts.dir .. ';') == '' then + return false, 'No CMakeLists.txt found' end return true end, diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua index b265195..bbeeaa7 100644 --- a/lua/plugins/aerial.lua +++ b/lua/plugins/aerial.lua @@ -1,23 +1,23 @@ -return { - 'stevearc/aerial.nvim', - config = function() - require('aerial').setup({ - backends = { 'lsp', 'treesitter', 'markdown' }, - layout = { - default_direction = 'prefer_left' - }, - filter_kind = false, - show_guides = true, - }) - end, - cmd = 'AerialToggle', - keys = { - { - 's', - function() - require('aerial').toggle() - end, - desc = 'Symbols outline', - } - } -} +return { + 'stevearc/aerial.nvim', + config = function() + require('aerial').setup({ + backends = { 'lsp', 'treesitter', 'markdown' }, + layout = { + default_direction = 'prefer_left', + }, + filter_kind = false, + show_guides = true, + }) + end, + cmd = 'AerialToggle', + keys = { + { + 's', + function() + require('aerial').toggle() + end, + desc = 'Symbols outline', + }, + }, +} diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index e942a2b..81aabfa 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -1,37 +1,37 @@ -return { - 'Civitasv/cmake-tools.nvim', - opts = { - cmake_command = 'cmake', - cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, - cmake_show_console = 'always', - cmake_build_directory = 'build_nvim', - cmake_dap_configuration = { name = 'cpp', type = 'codelldb', request = 'launch' }, -- dap configuration, optional - }, - cmd = { - 'CMakeGenerate', - 'CMakeBuild', - 'CMakeRun', - 'CMakeDebug', - 'CMakeSelectBuildType', - 'CMakeSelectBuildTarget', - 'CMakeSelectLaunchTarget', - 'CMakeSelectKit', - 'CMakeSelectConfigurePreset', - 'CMakeSelectBuildPreset', - 'CMakeSelectLaunchTarget', - 'CMakeOpen', - 'CMakeClose', - 'CMakeInstall', - 'CMakeClean', - 'CMakeStop', - }, - keys = { - { - '', - function() - require('cmake-tools').debug({}) - end, - desc = 'Run and debug target from cmake' - } - } -} +return { + 'Civitasv/cmake-tools.nvim', + opts = { + cmake_command = 'cmake', + cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, + cmake_show_console = 'always', + cmake_build_directory = 'build_nvim', + cmake_dap_configuration = { name = 'cpp', type = 'codelldb', request = 'launch' }, -- dap configuration, optional + }, + cmd = { + 'CMakeGenerate', + 'CMakeBuild', + 'CMakeRun', + 'CMakeDebug', + 'CMakeSelectBuildType', + 'CMakeSelectBuildTarget', + 'CMakeSelectLaunchTarget', + 'CMakeSelectKit', + 'CMakeSelectConfigurePreset', + 'CMakeSelectBuildPreset', + 'CMakeSelectLaunchTarget', + 'CMakeOpen', + 'CMakeClose', + 'CMakeInstall', + 'CMakeClean', + 'CMakeStop', + }, + keys = { + { + '', + function() + require('cmake-tools').debug({}) + end, + desc = 'Run and debug target from cmake', + }, + }, +} diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 31dc365..59b27d8 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -70,18 +70,19 @@ return { else fallback() end - end, { 'i', 's', }), - [''] = cmp.mapping(cmp.mapping.complete( - { + end, { 'i', 's' }), + [''] = cmp.mapping( + cmp.mapping.complete({ config = { sources = { { - name = 'cmdline_history' - } - } - } - } - ), { 'c' }), + name = 'cmdline_history', + }, + }, + }, + }), + { 'c' } + ), }, snippet = { expand = function(args) @@ -89,15 +90,15 @@ return { end, }, sources = { - { name = 'neorg', priority = 8 }, + { name = 'neorg', priority = 8 }, { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', option = { markdown_oxide = { - keyword_pattern = [[\(\k\| \|\/\|#\)\+]] - } - } + keyword_pattern = [[\(\k\| \|\/\|#\)\+]], + }, + }, }, { name = 'nvim_lsp_signature_help', priority = 7 }, -- { name = 'treesitter', priority = 6 }, @@ -111,8 +112,8 @@ return { bufs[vim.api.nvim_win_get_buf(win)] = true end return vim.tbl_keys(bufs) - end - } + end, + }, }, -- { name = 'nvim_lua' }, -- { name = 'look' }, @@ -124,9 +125,9 @@ return { }, enabled = function() return vim.api.nvim_buf_get_option(0, 'buftype') ~= 'prompt' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' + or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' end, -- completion = { -- completeopt = 'menu,menuone,noinsert, noselect', diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 92acae7..2054015 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -1,21 +1,21 @@ -return { - 'numToStr/Comment.nvim', - version = '*', - opts = { - mappings = false, - }, - keys = { - { - '', - '(comment_toggle_linewise_current)', - desc = 'Toggle comment' - }, - - { - '', - '(comment_toggle_linewise_visual)gv', - mode = 'v', - desc = 'Toggle comment' - } - } -} +return { + 'numToStr/Comment.nvim', + version = '*', + opts = { + mappings = false, + }, + keys = { + { + '', + '(comment_toggle_linewise_current)', + desc = 'Toggle comment', + }, + + { + '', + '(comment_toggle_linewise_visual)gv', + mode = 'v', + desc = 'Toggle comment', + }, + }, +} diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index d07dbbf..a34462e 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -1,225 +1,224 @@ -return { - 'mfussenegger/nvim-dap', - dependencies = { - 'mfussenegger/nvim-dap-python', - 'theHamsta/nvim-dap-virtual-text', - { - 'rcarriga/nvim-dap-ui', - dependencies = { - 'nvim-neotest/nvim-nio' - } - }, - 'rcarriga/cmp-dap', - }, - keys = { - { - '', - function() - require('dap').continue() - end, - desc = 'DAP start or continue' - }, - { - '', - function() - require('dap').run_last() - end, - desc = 'DAP run last' - }, - { - '', - function() - loadConfigs() - end, - desc = 'DAP configs' - }, - { - '', - function() - require('dap').goto_() - end, - desc = 'DAP goto' - }, - { - '', - function() - require('dap.ui.widgets').hover() - end, - desc = 'DAP Hover' - }, - { - '', - function() - require('dap').toggle_breakpoint() - end, - desc = 'DAP breakpoint' - }, - { - '', - function() - require('dap').step_over() - end, - desc = 'DAP step_over' - }, - { - '', - function() - require('dap').step_into() - end, - desc = 'DAP step_into' - }, - { - '', - function() - require('dap').step_out() - end, - desc = 'DAP step_out' - }, - }, - config = function() - local dap = require('dap') - vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' }) - require('cmp_dap').is_dap_buffer() - - - -- make sure we can exit the terminal with esc - vim.api.nvim_create_autocmd({ 'TermOpen' }, { - pattern = { '*dap-terminal*' }, - callback = function() - local opts = { noremap = true } - vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) - end - }) - - local pythonVenv = require('utils.python_venv') - - function loadConfigs() - require('dap.ext.vscode').load_launchjs() - -- Make sure we use the correct python env even for the configs from launch.json - for _, config in pairs(dap.configurations.python) do - config.pythonPath = pythonVenv.getPythonEnv() - config.cwd = vim.fn.getcwd() - end - require('fzf-lua').dap_configurations() - end - - local masonpath = vim.fn.stdpath('data') .. '/mason' - - -- PYTHON - dap.adapters.python = { - type = 'executable', - command = 'python', - args = { '-m', 'debugpy.adapter' }, - options = { - detached = true, - }, - } - - local dapui = require('dapui') - dapui.setup() - dap.listeners.after.event_initialized['dapui_config'] = function() - dapui.open({}) - end - dap.listeners.before.event_terminated['dapui_config'] = function() - dapui.close({}) - end - dap.listeners.before.event_exited['dapui_config'] = function() - dapui.close({}) - end - - dap.configurations.python = { - { - type = 'python', - request = 'launch', - name = 'Launch file with venv', - justMyCode = false, - program = '${file}', - cwd = vim.fn.getcwd(), - pythonPath = pythonVenv.getPythonEnv - }, - } - - -- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') - -- table.insert(require('dap').configurations.python, { - -- -- type = 'python', - -- -- request = 'launch', - -- -- name = 'My custom launch configuration', - -- -- program = '${file}', - -- justMyCode = false - -- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings - -- }) - -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') - - -- CPP - dap.adapters.codelldb = { - type = 'server', - port = '${port}', - executable = { - command = require 'mason-core.path'.bin_prefix 'codelldb', - args = { '--port', '${port}' }, - - -- On windows you may have to uncomment this: - detached = false, - } - } - - dap.adapters.cppdbg = { - id = 'cppdbg', - type = 'executable', - command = masonpath .. '/bin/OpenDebugAD7', - } - - dap.adapters.lldb = { - type = 'executable', - command = function() - if vim.loop.os_uname().sysname == 'Linux' then - return 'lldb-vscode' - else - return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' - end - end, - name = 'lldb' - } - - dap.configurations.cpp = { - { - name = 'Launch codelldb', - type = 'codelldb', - request = 'launch', - program = function() - return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - }, - { - name = 'Launch lldb', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - - -- 💀 - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - -- runInTerminal = false, - }, - } - - -- EXTENSIONS - - require('nvim-dap-virtual-text').setup({}) - end, -} +return { + 'mfussenegger/nvim-dap', + dependencies = { + 'mfussenegger/nvim-dap-python', + 'theHamsta/nvim-dap-virtual-text', + { + 'rcarriga/nvim-dap-ui', + dependencies = { + 'nvim-neotest/nvim-nio', + }, + }, + 'rcarriga/cmp-dap', + }, + keys = { + { + '', + function() + require('dap').continue() + end, + desc = 'DAP start or continue', + }, + { + '', + function() + require('dap').run_last() + end, + desc = 'DAP run last', + }, + { + '', + function() + loadConfigs() + end, + desc = 'DAP configs', + }, + { + '', + function() + require('dap').goto_() + end, + desc = 'DAP goto', + }, + { + '', + function() + require('dap.ui.widgets').hover() + end, + desc = 'DAP Hover', + }, + { + '', + function() + require('dap').toggle_breakpoint() + end, + desc = 'DAP breakpoint', + }, + { + '', + function() + require('dap').step_over() + end, + desc = 'DAP step_over', + }, + { + '', + function() + require('dap').step_into() + end, + desc = 'DAP step_into', + }, + { + '', + function() + require('dap').step_out() + end, + desc = 'DAP step_out', + }, + }, + config = function() + local dap = require('dap') + vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' }) + require('cmp_dap').is_dap_buffer() + + -- make sure we can exit the terminal with esc + vim.api.nvim_create_autocmd({ 'TermOpen' }, { + pattern = { '*dap-terminal*' }, + callback = function() + local opts = { noremap = true } + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + end, + }) + + local pythonVenv = require('utils.python_venv') + + function loadConfigs() + require('dap.ext.vscode').load_launchjs() + -- Make sure we use the correct python env even for the configs from launch.json + for _, config in pairs(dap.configurations.python) do + config.pythonPath = pythonVenv.getPythonEnv() + config.cwd = vim.fn.getcwd() + end + require('fzf-lua').dap_configurations() + end + + local masonpath = vim.fn.stdpath('data') .. '/mason' + + -- PYTHON + dap.adapters.python = { + type = 'executable', + command = 'python', + args = { '-m', 'debugpy.adapter' }, + options = { + detached = true, + }, + } + + local dapui = require('dapui') + dapui.setup() + dap.listeners.after.event_initialized['dapui_config'] = function() + dapui.open({}) + end + dap.listeners.before.event_terminated['dapui_config'] = function() + dapui.close({}) + end + dap.listeners.before.event_exited['dapui_config'] = function() + dapui.close({}) + end + + dap.configurations.python = { + { + type = 'python', + request = 'launch', + name = 'Launch file with venv', + justMyCode = false, + program = '${file}', + cwd = vim.fn.getcwd(), + pythonPath = pythonVenv.getPythonEnv, + }, + } + + -- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') + -- table.insert(require('dap').configurations.python, { + -- -- type = 'python', + -- -- request = 'launch', + -- -- name = 'My custom launch configuration', + -- -- program = '${file}', + -- justMyCode = false + -- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings + -- }) + -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') + + -- CPP + dap.adapters.codelldb = { + type = 'server', + port = '${port}', + executable = { + command = require('mason-core.path').bin_prefix('codelldb'), + args = { '--port', '${port}' }, + + -- On windows you may have to uncomment this: + detached = false, + }, + } + + dap.adapters.cppdbg = { + id = 'cppdbg', + type = 'executable', + command = masonpath .. '/bin/OpenDebugAD7', + } + + dap.adapters.lldb = { + type = 'executable', + command = function() + if vim.loop.os_uname().sysname == 'Linux' then + return 'lldb-vscode' + else + return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' + end + end, + name = 'lldb', + } + + dap.configurations.cpp = { + { + name = 'Launch codelldb', + type = 'codelldb', + request = 'launch', + program = function() + return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + }, + { + name = 'Launch lldb', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + args = {}, + + -- 💀 + -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: + -- + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + -- + -- Otherwise you might get the following error: + -- + -- Error on launch: Failed to attach to the target process + -- + -- But you should be aware of the implications: + -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html + -- runInTerminal = false, + }, + } + + -- EXTENSIONS + + require('nvim-dap-virtual-text').setup({}) + end, +} diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 7b7ec41..9c91e75 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -1,20 +1,20 @@ return { 'sindrets/diffview.nvim', dependencies = { - 'nvim-lua/plenary.nvim' + 'nvim-lua/plenary.nvim', }, opts = { keymaps = { view = { - ['b'] = false + ['b'] = false, }, file_panel = { - ['b'] = false + ['b'] = false, }, file_history_panel = { - ['b'] = false + ['b'] = false, }, - } + }, }, cmd = 'DiffviewOpen', keys = { @@ -33,5 +33,5 @@ return { 'DiffviewOpen origin/master...', desc = 'Diffview vs master', }, - } + }, } diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua index 43a9c6c..9984933 100644 --- a/lua/plugins/dressing.lua +++ b/lua/plugins/dressing.lua @@ -1,3 +1,3 @@ -return { - 'stevearc/dressing.nvim' -} +return { + 'stevearc/dressing.nvim', +} diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index c9138ca..a8ba660 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -1,34 +1,34 @@ -return { - 'folke/flash.nvim', - event = 'VeryLazy', - ---@type Flash.Config - opts = { - modes = { - search = { - enabled = false - }, - char = { - keys = { 'f', 'F', 't', 'T', ';' }, - } - } - }, - keys = { - { - 's', - mode = { 'n', 'x', 'o' }, - function() - -- default options: exact mode, multi window, all directions, with a backdrop - require('flash').jump() - end, - desc = 'Flash jump' - }, - { - 'S', - mode = { 'n', 'o', 'x' }, - function() - require('flash').treesitter() - end, - desc = 'Flash treesitter' - }, - }, -} +return { + 'folke/flash.nvim', + event = 'VeryLazy', + ---@type Flash.Config + opts = { + modes = { + search = { + enabled = false, + }, + char = { + keys = { 'f', 'F', 't', 'T', ';' }, + }, + }, + }, + keys = { + { + 's', + mode = { 'n', 'x', 'o' }, + function() + -- default options: exact mode, multi window, all directions, with a backdrop + require('flash').jump() + end, + desc = 'Flash jump', + }, + { + 'S', + mode = { 'n', 'o', 'x' }, + function() + require('flash').treesitter() + end, + desc = 'Flash treesitter', + }, + }, +} diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 427e99d..b0fae48 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -2,7 +2,7 @@ return { 'ibhagwan/fzf-lua', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() - local actions = require 'fzf-lua.actions' + local actions = require('fzf-lua.actions') require('fzf-lua').setup({ 'borderless_full', actions = { @@ -17,12 +17,12 @@ return { }, buffers = { ['default'] = actions.buf_edit, - ['ctrl-s'] = actions.buf_split, - ['ctrl-v'] = actions.buf_vsplit, - ['ctrl-t'] = actions.buf_tabedit, - ['ctrl-x'] = actions.buf_split - } - } + ['ctrl-s'] = actions.buf_split, + ['ctrl-v'] = actions.buf_vsplit, + ['ctrl-t'] = actions.buf_tabedit, + ['ctrl-x'] = actions.buf_split, + }, + }, }) end, cmd = 'FzfLua', @@ -121,5 +121,5 @@ return { mode = { 'n', 'v', 'i' }, desc = 'Fuzzy complete path', }, - } + }, } diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 104dbe0..b5acb86 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -9,5 +9,5 @@ return { delay = 1000, ignore_whitespace = false, }, - } + }, } diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua index c662f37..381ef90 100644 --- a/lua/plugins/indent_blankline.lua +++ b/lua/plugins/indent_blankline.lua @@ -21,7 +21,7 @@ return { 'RainbowCyan', } - local hooks = require 'ibl.hooks' + local hooks = require('ibl.hooks') -- create the highlight groups in the highlight setup hook, so they are reset -- every time the colorscheme changes hooks.register(hooks.type.HIGHLIGHT_SETUP, function() @@ -35,12 +35,12 @@ return { end) vim.g.rainbow_delimiters = { highlight = highlight } - require('ibl').setup { + require('ibl').setup({ scope = { highlight = highlight, - show_start = false - } - } + show_start = false, + }, + }) hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) end, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 058678e..a564707 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,2 +1 @@ -return { -} +return {} diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index f3a7612..fad6d25 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -12,9 +12,9 @@ return { }, { 'Bilal2453/luvit-meta', - lazy = true + lazy = true, }, -- optional `vim.uv` typings - { -- optional completion source for require statements and module annotations + { -- optional completion source for require statements and module annotations 'hrsh7th/nvim-cmp', opts = function(_, opts) opts.sources = opts.sources or {} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index faafe59..d3a79d8 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,66 +1,49 @@ local lspKeys = function(client, bufnr) local fzf = require('fzf-lua') local options = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, - vim.tbl_extend('error', options, { desc = 'Diag prev' })) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, - vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - vim.tbl_extend('error', options, { desc = 'Code action' })) - vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, - vim.tbl_extend('error', options, { desc = 'Definition' })) - vim.keymap.set('n', 'e', - vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, - vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - vim.tbl_extend('error', options, { desc = 'Incoming calls' })) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, - vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'r', fzf.lsp_references, - vim.tbl_extend('error', options, { desc = 'References' })) - vim.keymap.set('n', '', fzf.lsp_document_symbols, - vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, - vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', 'V', fzf.diagnostics_document, - vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) + vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set('n', 'd', function() + fzf.lsp_definitions({ jump_to_single_result = true }) + end, vim.tbl_extend('error', options, { desc = 'Definition' })) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) + vim.keymap.set('n', 'h', function() + require('pretty_hover').hover() + end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) + vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then vim.keymap.set('n', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, - { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) end if client.server_capabilities.documentRangeFormattingProvider then vim.keymap.set('x', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, - { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) + vim.lsp.buf.format({ timeout_ms = 10000 }) + end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) end if client.supports_method('inlayHintProvider') then vim.keymap.set('n', 'i', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) - end, - { - noremap = true, - silent = false, - desc = 'Toggle inlay hints', - buffer = bufnr - }) + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) + end, { + noremap = true, + silent = false, + desc = 'Toggle inlay hints', + buffer = bufnr, + }) end end @@ -88,10 +71,10 @@ local document_highlight = function(bufnr) buffer = bufnr, callback = function() vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { + vim.api.nvim_clear_autocmds({ group = group, - buffer = bufnr - } + buffer = bufnr, + }) end, }) end @@ -127,8 +110,8 @@ return { config = function() require('mason').setup({ ui = { - border = 'rounded' - } + border = 'rounded', + }, }) require('mason-lspconfig').setup({ automatic_installation = false, @@ -141,7 +124,7 @@ return { 'lua_ls', 'jsonls', -- 'groovyls', -- Doesn't work in WSL - } + }, }) local lspconfig = require('lspconfig') @@ -161,9 +144,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -179,13 +162,12 @@ return { vim.diagnostic.open_float({ focusable = false, width = 80 }) end - -- lspconfig['pyright'].setup { -- capabilities = capabilities, -- on_attach = on_attach, -- } - lspconfig['basedpyright'].setup { + lspconfig['basedpyright'].setup({ capabilities = capabilities, on_attach = on_attach, settings = { @@ -193,12 +175,12 @@ return { typeCheckingMode = 'standard', }, }, - } + }) - lspconfig['groovyls'].setup { + lspconfig['groovyls'].setup({ capabilities = capabilities, on_attach = on_attach, - } + }) -- lspconfig['cmake'].setup { -- capabilities = capabilities, @@ -215,8 +197,8 @@ return { return lspconfig.util.find_git_ancestor(fname) end, single_file_support = true, -- suggested - on_attach = on_attach -- on_attach is the on_attach function you defined - } + on_attach = on_attach, -- on_attach is the on_attach function you defined + }, } lspconfig.neocmake.setup({}) end @@ -224,48 +206,42 @@ return { local clangd_capabilities = capabilities clangd_capabilities.textDocument.semanticHighlighting = true clangd_capabilities.offsetEncoding = { 'utf-16' } - lspconfig['clangd'].setup { + lspconfig['clangd'].setup({ capabilities = clangd_capabilities, on_attach = on_attach, - cmd = { 'clangd', + cmd = { + 'clangd', '--compile-commands-dir=build_nvim', - '--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--query-driver', + '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', '--clang-tidy', '--background-index', '--use-dirty-headers', - '--completion-style=detailed' }, - root_dir = lspconfig.util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) - } + '--completion-style=detailed', + }, + root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), + }) require('clangd_extensions').setup({ - extensions = - { + extensions = { inlay_hints = { -- Only show inlay hints for the current line only_current_line = true, - } - } + }, + }, }) - lspconfig['jsonls'].setup { + lspconfig['jsonls'].setup({ capabilities = capabilities, on_attach = on_attach, - } + }) -- lspconfig['rust_analyzer'].setup { -- capabilities = capabilities, -- on_attach = on_attach, -- } - lspconfig['lua_ls'].setup { + lspconfig['lua_ls'].setup({ capabilities = capabilities, on_attach = on_attach, settings = { @@ -274,7 +250,7 @@ return { checkThirdParty = false, }, completion = { - callSnippet = 'Replace' + callSnippet = 'Replace', }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { @@ -286,36 +262,36 @@ return { indent_style = 'space', indent_size = '2', quote_style = 'single', - } - } + }, + }, }, - } - } + }, + }) - lspconfig['dockerls'].setup { + lspconfig['dockerls'].setup({ capabilities = capabilities, on_attach = on_attach, - } + }) - lspconfig['markdown_oxide'].setup { + lspconfig['markdown_oxide'].setup({ capabilities = capabilities, on_attach = on_attach, - } + }) -- lspconfig['marksman'].setup { -- capabilities = capabilities, -- on_attach = on_attach, -- } - lspconfig['yamlls'].setup { + lspconfig['yamlls'].setup({ capabilities = capabilities, on_attach = on_attach, settings = { yaml = { - validate = true - } - } - } + validate = true, + }, + }, + }) local prettier = require('efmls-configs.formatters.prettier') local stylua = require('efmls-configs.formatters.stylua') @@ -352,15 +328,10 @@ return { float = { border = 'single', format = function(diagnostic) - return string.format( - '%s (%s) [%s]', - diagnostic.message, - diagnostic.source, - diagnostic.code or diagnostic.user_data.lsp.code - ) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) end, }, }) end, - event = 'VeryLazy' + event = 'VeryLazy', } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index c84a51c..460d5bc 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,10 +2,10 @@ return { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons', - 'Isrothy/lualine-diagnostic-message' + 'Isrothy/lualine-diagnostic-message', }, config = function() - require('lualine').setup { + require('lualine').setup({ options = { theme = 'bamboo', disabled_filetypes = { @@ -22,17 +22,17 @@ return { 'diff', { 'diagnostics', - sources = { 'nvim_diagnostic' } - } + sources = { 'nvim_diagnostic' }, + }, }, lualine_c = { 'hostname', 'getcwd', - { 'filename', path = 1, file_status = true } + { 'filename', path = 1, file_status = true }, }, lualine_y = { 'searchcount', - 'progress' + 'progress', }, }, inactive_sections = { @@ -41,9 +41,9 @@ return { { 'filename', path = 1, - file_status = true - } - } + file_status = true, + }, + }, }, winbar = { lualine_a = { @@ -65,15 +65,13 @@ return { warn = ' ', info = ' ', hint = ' ', - } - } - }, - lualine_c = { + }, + }, }, + lualine_c = {}, lualine_x = {}, lualine_y = {}, - lualine_z = { - } + lualine_z = {}, }, inactive_winbar = { lualine_a = { @@ -82,7 +80,7 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - } + }, }, lualine_b = { { @@ -92,7 +90,7 @@ return { lualine_c = {}, lualine_x = {}, lualine_y = {}, - lualine_z = {} + lualine_z = {}, }, tabline = { lualine_a = {}, @@ -101,12 +99,12 @@ return { { 'tabs', mode = 2, - } + }, }, lualine_x = {}, lualine_y = {}, - lualine_z = {} + lualine_z = {}, }, - } + }) end, } diff --git a/lua/plugins/luasnip-snippets.lua b/lua/plugins/luasnip-snippets.lua index 5c99142..109b031 100644 --- a/lua/plugins/luasnip-snippets.lua +++ b/lua/plugins/luasnip-snippets.lua @@ -5,5 +5,5 @@ return { -- Mandatory setup function require('luasnip_snippets.common.snip_utils').setup() end, - enabled = false + enabled = false, } diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index 982d266..888eedd 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -44,29 +44,68 @@ return { ls.snippets = { cpp = { - s('TEST_F_getset', - { - t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }), - i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({ ');', ' ' }), - i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({ '());', '' }), - t({ '', '}', '' }) - }), - s('TEST_fn_getset', - { - t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({ '()', '{', ' ' }), - i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({ ');', ' ' }), - i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({ '());', '' }), - t({ '', '}', '', '' }), + s('TEST_F_getset', { + t('TEST_F('), + i(1, 'TestClass'), + t(' ,test_'), + p(getRegA, false), + t({ '_set_get)', '{', ' ' }), + i(2, 'm_object'), + t('.set'), + p(getRegA, true), + t('('), + i(3, '32.F'), + t({ ');', ' ' }), + i(4, 'EXPECT_EQ('), + rep(3), + t(', '), + rep(2), + t('.get'), + p(getRegA, true), + t({ '());', '' }), + t({ '', '}', '' }), + }), + s('TEST_fn_getset', { + t('void '), + p(getRegA, false), + t('_'), + i(1, 'get'), + t('_'), + i(2, 'set'), + t({ '()', '{', ' ' }), + i(3, 'm_object'), + t('.set'), + p(getRegA, true), + t('('), + i(4, '32.F'), + t({ ');', ' ' }), + i(5, 'EXPECT_EQ('), + rep(4), + t(', '), + rep(3), + t('.get'), + p(getRegA, true), + t({ '());', '' }), + t({ '', '}', '', '' }), - t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }), - p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({ '();' }), - t({ '', '}' }), - }) + t('TEST_F('), + i(5), + t(' ,test_'), + p(getRegA, false), + t({ '_set_get)', '{', ' ' }), + p(getRegA, false), + t('_'), + rep(1), + t('_'), + rep(2), + t({ '();' }), + t({ '', '}' }), + }), }, } require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_vscode').lazy_load({ paths = { './my-snippets' } }) end, - cmd = 'LuaSnipListAvailable' + cmd = 'LuaSnipListAvailable', } diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua index 5fa64e0..06d2edc 100644 --- a/lua/plugins/markdown-preview.lua +++ b/lua/plugins/markdown-preview.lua @@ -3,17 +3,17 @@ return { cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', - 'MarkdownPreviewStop' + 'MarkdownPreviewStop', }, branch = 'master', ft = { 'markdown' }, build = function() vim.fn['mkdp#util#install']() end, - init = function () + init = function() vim.g.mkdp_auto_close = 0 vim.g.mkdp_auto_start = 1 vim.g.mkdp_combine_preview = 1 vim.g.mkdp_combine_preview_auto_refresh = 1 - end + end, } diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 4eca942..2eb0235 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -1,34 +1,34 @@ -return { - 'danymat/neogen', - dependencies = 'nvim-treesitter/nvim-treesitter', - opts = { - enabled = true, - languages = { - cpp = { - template = { - annotation_convention = 'custom', - custom = { - { nil, '/// file', { no_results = true, type = { 'file' } } }, - { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, - { nil, '', { no_results = true, type = { 'file' } } }, - - { nil, '/// $1', { type = { 'func' } } }, - { 'tparam', '/// \\tparam %s $1' }, - { 'parameters', '/// \\param %s $1' }, - { 'return_statement', '/// \\return $1' }, - }, - }, - }, - }, - }, - keys = { - { - 'n', - function() - require('neogen').generate({}) - end, - desc = 'Add comment', - } - }, - cmd = 'Neogen' -} +return { + 'danymat/neogen', + dependencies = 'nvim-treesitter/nvim-treesitter', + opts = { + enabled = true, + languages = { + cpp = { + template = { + annotation_convention = 'custom', + custom = { + { nil, '/// file', { no_results = true, type = { 'file' } } }, + { nil, '/// $1', { no_results = true, type = { 'func', 'file' } } }, + { nil, '', { no_results = true, type = { 'file' } } }, + + { nil, '/// $1', { type = { 'func' } } }, + { 'tparam', '/// \\tparam %s $1' }, + { 'parameters', '/// \\param %s $1' }, + { 'return_statement', '/// \\return $1' }, + }, + }, + }, + }, + }, + keys = { + { + 'n', + function() + require('neogen').generate({}) + end, + desc = 'Add comment', + }, + }, + cmd = 'Neogen', +} diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index b255600..724365d 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -1,27 +1,27 @@ -return { - 'TimUntersberger/neogit', - dependencies = { - 'nvim-lua/plenary.nvim', - 'sindrets/diffview.nvim' - }, - config = function() - local neogit = require('neogit') - neogit.setup { - integrations = { - diffview = true, - telescope = false, - fzf_lua = true - }, - graph_style = "unicode", - } - end, - keys = { - { - 't', - function() - require('neogit').open() - end - } - }, - cmd = { 'Neogit ' } -} +return { + 'TimUntersberger/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', + 'sindrets/diffview.nvim', + }, + config = function() + local neogit = require('neogit') + neogit.setup({ + integrations = { + diffview = true, + telescope = false, + fzf_lua = true, + }, + graph_style = 'unicode', + }) + end, + keys = { + { + 't', + function() + require('neogit').open() + end, + }, + }, + cmd = { 'Neogit ' }, +} diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index d74f687..960c605 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -1,39 +1,39 @@ -return { - 'nvim-neotest/neotest', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-treesitter/nvim-treesitter', - 'antoinemadec/FixCursorHold.nvim', - 'nvim-neotest/neotest-python' - }, - config = function() - local pythonVenv = require('utils.python_venv') - require('neotest').setup({ - adapters = { - require('neotest-python')({ - dap = { - justMyCode = false - }, - runner = 'pytest', - python = pythonVenv.getPythonEnv - }) - } - }) - end, - keys = { - { - '', - function() - require('neotest').run.run() - end, - desc = 'Run nearest test' - }, - { - '', - function() - require('neotest').run.run({ strategy = 'dap' }) - end, - desc = 'Run nearest test' - } - } -} +return { + 'nvim-neotest/neotest', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + 'antoinemadec/FixCursorHold.nvim', + 'nvim-neotest/neotest-python', + }, + config = function() + local pythonVenv = require('utils.python_venv') + require('neotest').setup({ + adapters = { + require('neotest-python')({ + dap = { + justMyCode = false, + }, + runner = 'pytest', + python = pythonVenv.getPythonEnv, + }), + }, + }) + end, + keys = { + { + '', + function() + require('neotest').run.run() + end, + desc = 'Run nearest test', + }, + { + '', + function() + require('neotest').run.run({ strategy = 'dap' }) + end, + desc = 'Run nearest test', + }, + }, +} diff --git a/lua/plugins/nvim-highlight-colors.lua b/lua/plugins/nvim-highlight-colors.lua index 01f957f..54b27ad 100644 --- a/lua/plugins/nvim-highlight-colors.lua +++ b/lua/plugins/nvim-highlight-colors.lua @@ -5,5 +5,5 @@ return { render = 'background', -- or 'foreground' or 'virtual', enable_named_colors = true, }, - cmd = { 'HighlightColors' } + cmd = { 'HighlightColors' }, } diff --git a/lua/plugins/nvim-lint.lua b/lua/plugins/nvim-lint.lua index 9ecf62e..99f2353 100644 --- a/lua/plugins/nvim-lint.lua +++ b/lua/plugins/nvim-lint.lua @@ -2,7 +2,7 @@ return { 'mfussenegger/nvim-lint', config = function() require('lint').linters_by_ft = { - cpp = { 'clangtidy', } + cpp = { 'clangtidy' }, } vim.api.nvim_create_autocmd({ 'BufWritePost' }, { callback = function() @@ -15,5 +15,5 @@ return { -- require('lint').try_lint('cspell') end, }) - end + end, } diff --git a/lua/plugins/nvim-rooter.lua b/lua/plugins/nvim-rooter.lua index 543d424..0a11b49 100644 --- a/lua/plugins/nvim-rooter.lua +++ b/lua/plugins/nvim-rooter.lua @@ -1,7 +1,8 @@ return { 'notjedi/nvim-rooter.lua', opts = { - rooter_patterns = { '.git', + rooter_patterns = { + '.git', '_darcs', '.hg', '.bzr', @@ -10,6 +11,7 @@ return { 'package.json', 'build_nvim', 'real_path.txt', - 'conaninfo.txt' }, - } + 'conaninfo.txt', + }, + }, } diff --git a/lua/plugins/nvim-surround.lua b/lua/plugins/nvim-surround.lua index 4ffa1e9..540f49c 100644 --- a/lua/plugins/nvim-surround.lua +++ b/lua/plugins/nvim-surround.lua @@ -1,10 +1,10 @@ return { 'kylechui/nvim-surround', - version = '*', -- Use for stability; omit to use `main` branch for the latest features + version = '*', -- Use for stability; omit to use `main` branch for the latest features event = 'VeryLazy', config = function() require('nvim-surround').setup({ -- Configuration here, or leave empty to use defaults }) - end + end, } diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index a711a98..51ea973 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -26,6 +26,6 @@ return { require('oil').open() end, desc = 'Open oil', - } - } + }, + }, } diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua index af9a5b5..f3953fe 100644 --- a/lua/plugins/overseer.lua +++ b/lua/plugins/overseer.lua @@ -28,6 +28,6 @@ return { 'OverseerBuild', 'OverseerQuickAction', 'OverseerTaskAction', - 'OverseerClearCache' - } + 'OverseerClearCache', + }, } diff --git a/lua/plugins/pretty_hover.lua b/lua/plugins/pretty_hover.lua index a4476f9..2a0b85d 100644 --- a/lua/plugins/pretty_hover.lua +++ b/lua/plugins/pretty_hover.lua @@ -1,5 +1,5 @@ -return { - 'Fildo7525/pretty_hover', - event = 'LspAttach', - opts = {}, -} +return { + 'Fildo7525/pretty_hover', + event = 'LspAttach', + opts = {}, +} diff --git a/lua/plugins/rainbow-delimiters.lua b/lua/plugins/rainbow-delimiters.lua index 285a558..08b01d3 100644 --- a/lua/plugins/rainbow-delimiters.lua +++ b/lua/plugins/rainbow-delimiters.lua @@ -1,5 +1,5 @@ -return { - 'HiPhish/rainbow-delimiters.nvim', - dependencies = 'nvim-treesitter/nvim-treesitter', - event = 'VeryLazy' -} +return { + 'HiPhish/rainbow-delimiters.nvim', + dependencies = 'nvim-treesitter/nvim-treesitter', + event = 'VeryLazy', +} diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index d3e079c..7821ed2 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -6,8 +6,9 @@ return { server = { on_attach = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', 'y', function() vim.cmd.RustLsp { 'hover', 'actions' } end, - vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'y', function() + vim.cmd.RustLsp({ 'hover', 'actions' }) + end, vim.tbl_extend('error', options, { desc = 'Hover' })) local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { @@ -31,14 +32,14 @@ return { buffer = bufnr, callback = function() vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { + vim.api.nvim_clear_autocmds({ group = group, - buffer = bufnr - } + buffer = bufnr, + }) end, }) - end - } + end, + }, } - end + end, } diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 83d91d8..e18d299 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -3,7 +3,7 @@ return { config = function() function _G.set_terminal_keymaps(term) local opts = { noremap = true } - if (term.cmd ~= 'lazygit') then + if term.cmd ~= 'lazygit' then vim.api.nvim_buf_set_keymap(term.bufnr, 't', '', [[]], opts) end vim.api.nvim_buf_set_keymap(term.bufnr, 't', 'jk', [[]], opts) @@ -14,7 +14,7 @@ return { end require('toggleterm').setup({ - on_open = set_terminal_keymaps + on_open = set_terminal_keymaps, }) local Terminal = require('toggleterm.terminal').Terminal @@ -46,8 +46,8 @@ return { function() _lazygit_toggle() end, - desc = 'LazyGit' - } + desc = 'LazyGit', + }, }, cmd = 'ToggleTerm', } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index adcbe35..afbe747 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,55 +1,55 @@ -return { - 'nvim-treesitter/nvim-treesitter', - version = '*', - build = ':TSUpdate', - config = function() - require('nvim-treesitter.install').compilers = { 'clang' } - require('nvim-treesitter.configs').setup({ - ensure_installed = '', - modules = {}, - sync_install = true, - auto_install = true, - ignore_install = {}, - highlight = { - enable = true, - additional_vim_regex_highlighting = { 'markdown' } - }, - 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 - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - indent = { - enable = false -- maybe buggy - }, - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - lsp_interop = { - enable = true, - border = 'none', - peek_definition_code = { - ['df'] = '@function.outer', - ['dF'] = '@class.outer', - }, - }, - }, - }) - vim.treesitter.language.register('groovy', 'java') - require('nvim-treesitter.install').prefer_git = false - end -} +return { + 'nvim-treesitter/nvim-treesitter', + version = '*', + build = ':TSUpdate', + config = function() + require('nvim-treesitter.install').compilers = { 'clang' } + require('nvim-treesitter.configs').setup({ + ensure_installed = '', + modules = {}, + sync_install = true, + auto_install = true, + ignore_install = {}, + highlight = { + enable = true, + additional_vim_regex_highlighting = { 'markdown' }, + }, + 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 + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + }, + indent = { + enable = false, -- maybe buggy + }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, + }, + lsp_interop = { + enable = true, + border = 'none', + peek_definition_code = { + ['df'] = '@function.outer', + ['dF'] = '@class.outer', + }, + }, + }, + }) + vim.treesitter.language.register('groovy', 'java') + require('nvim-treesitter.install').prefer_git = false + end, +} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index feba445..e894c23 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -1,13 +1,13 @@ -return { - 'folke/which-key.nvim', - version = '*', - opts = { - plugins = { - marks = false, - registers = false, - presets = { - operators = false - } - } - } -} +return { + 'folke/which-key.nvim', + version = '*', + opts = { + plugins = { + marks = false, + registers = false, + presets = { + operators = false, + }, + }, + }, +} diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua index adce631..601dfb2 100644 --- a/lua/plugins/workspaces.lua +++ b/lua/plugins/workspaces.lua @@ -1,45 +1,44 @@ -return { - 'natecraddock/workspaces.nvim', - config = function() - require('workspaces').setup() - end, - branch = 'master', - keys = { - { - 'p', - function() - local workspaces = require('workspaces') - local fzf_lua = require('fzf-lua') - fzf_lua.fzf_exec(function(cb) - local results = workspaces.get() - for _, e in ipairs(results) do - cb(e['name']) - end - cb() - end, - { - actions = { - ['default'] = { - function(selected) - workspaces.open(selected[1]) - fzf_lua.git_files() - end, - }, - ['ctrl-d'] = { - function(selected) - workspaces.remove(selected[1]) - end, - fzf_lua.actions.resume - }, - ['ctrl-a'] = { - function() - workspaces.add() - end, - fzf_lua.actions.resume - } - } - }) - end - } - } -} +return { + 'natecraddock/workspaces.nvim', + config = function() + require('workspaces').setup() + end, + branch = 'master', + keys = { + { + 'p', + function() + local workspaces = require('workspaces') + local fzf_lua = require('fzf-lua') + fzf_lua.fzf_exec(function(cb) + local results = workspaces.get() + for _, e in ipairs(results) do + cb(e['name']) + end + cb() + end, { + actions = { + ['default'] = { + function(selected) + workspaces.open(selected[1]) + fzf_lua.git_files() + end, + }, + ['ctrl-d'] = { + function(selected) + workspaces.remove(selected[1]) + end, + fzf_lua.actions.resume, + }, + ['ctrl-a'] = { + function() + workspaces.add() + end, + fzf_lua.actions.resume, + }, + }, + }) + end, + }, + }, +} diff --git a/lua/themes/astrodark.lua b/lua/themes/astrodark.lua index 0c0e405..1811821 100644 --- a/lua/themes/astrodark.lua +++ b/lua/themes/astrodark.lua @@ -5,11 +5,11 @@ return { config = function() local C = require('astrotheme.palettes.astrodark') require('astrotheme').setup({ - palette = 'astrodark', -- String of the default palette to use when calling `:colorscheme astrotheme` + palette = 'astrodark', -- String of the default palette to use when calling `:colorscheme astrotheme` - termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. + termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. - terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. + terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. plugin_default = 'auto', -- Sets how all plugins will be loaded -- "auto": Uses lazy / packer enabled plugins to load highlights. @@ -21,15 +21,12 @@ return { }, palettes = { - global = { - }, - astrodark = { - }, + global = {}, + astrodark = {}, }, highlights = { global = { - modify_hl_groups = function(hl, c) - end, + modify_hl_groups = function(hl, c) end, }, astrodark = { modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, @@ -57,10 +54,10 @@ return { ['TelescopeTitle'] = { bg = C.surface0 }, ['TelescopePromptNormal'] = { bg = C.surface0 }, ['TelescopePromptBorder'] = { link = 'TelescopeBorder' }, - } - } + }, + }, }) vim.cmd('colorscheme astrodark') end, - enabled = true + enabled = true, } diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index be312f0..ff82a25 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -4,7 +4,7 @@ return { priority = 1000, config = function() local colors = require('bamboo.palette') - require('bamboo').setup { + require('bamboo').setup({ dim_inactive = true, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, lualine = { @@ -33,8 +33,8 @@ return { ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['Delimiter'] = { fg = colors.vulgaris.fg }, }, - } + }) require('bamboo').load() end, - enabled = true + enabled = true, } diff --git a/lua/themes/catppuccin.lua b/lua/themes/catppuccin.lua index 3ba7131..d4fbbcb 100644 --- a/lua/themes/catppuccin.lua +++ b/lua/themes/catppuccin.lua @@ -1,5 +1,4 @@ -return -{ +return { 'catppuccin/nvim', name = 'catppuccin', lazy = true, @@ -63,7 +62,7 @@ return ['@namespace'] = { fg = colors.red }, ['@function.builtin'] = { link = 'Function' }, ['@property'] = { fg = colors.pink }, - Macro = { fg = colors.rosewater } + Macro = { fg = colors.rosewater }, } end, }, @@ -100,5 +99,5 @@ return }) vim.cmd('colorscheme catppuccin') end, - enabled = true + enabled = true, } diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua index 897712b..2248446 100644 --- a/lua/themes/everforest.lua +++ b/lua/themes/everforest.lua @@ -11,5 +11,5 @@ return { }) require('everforest').load() end, - enabled = true + enabled = true, } diff --git a/lua/themes/github-theme.lua b/lua/themes/github-theme.lua index f3202dc..91219cf 100644 --- a/lua/themes/github-theme.lua +++ b/lua/themes/github-theme.lua @@ -1,7 +1,6 @@ -return -{ +return { 'projekt0n/github-nvim-theme', - lazy = false, -- make sure we load this during startup if it is your main colorscheme + lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins config = function() require('github-theme').setup({ @@ -32,7 +31,7 @@ return 'treesitter', 'treesitter_context', 'whichkey', - } + }, }, }) diff --git a/lua/themes/gruvbox-baby.lua b/lua/themes/gruvbox-baby.lua index 512579d..7e2497b 100644 --- a/lua/themes/gruvbox-baby.lua +++ b/lua/themes/gruvbox-baby.lua @@ -5,5 +5,5 @@ return { config = function() vim.cmd('colorscheme gruvbox-baby') end, - enabled = true + enabled = true, } diff --git a/lua/themes/gruvbox.lua b/lua/themes/gruvbox.lua index d80c622..cb67c99 100644 --- a/lua/themes/gruvbox.lua +++ b/lua/themes/gruvbox.lua @@ -33,5 +33,5 @@ return { }) vim.cmd('colorscheme gruvbox') end, - enabled = true + enabled = true, } diff --git a/lua/themes/gruvbox_flat.lua b/lua/themes/gruvbox_flat.lua index fbdcfa5..d4de67a 100644 --- a/lua/themes/gruvbox_flat.lua +++ b/lua/themes/gruvbox_flat.lua @@ -1,19 +1,19 @@ -return { - 'eddyekofo94/gruvbox-flat.nvim', - priority = 1000, - config = function() - local colors = require('gruvbox.colors') - vim.g.gruvbox_flat_style = 'dark' - vim.g.gruvbox_colors = { - bg_search = 'purple', - fg_search = 'black', - } - vim.g.gruvbox_theme = { - Pmenu = { bg = 'bg_visual' }, - NormalFloat = { bg = 'bg_visual' } - } - vim.g.gruvbox_dark_float = false - vim.cmd('colorscheme gruvbox-flat') - end, - enabled = false -} +return { + 'eddyekofo94/gruvbox-flat.nvim', + priority = 1000, + config = function() + local colors = require('gruvbox.colors') + vim.g.gruvbox_flat_style = 'dark' + vim.g.gruvbox_colors = { + bg_search = 'purple', + fg_search = 'black', + } + vim.g.gruvbox_theme = { + Pmenu = { bg = 'bg_visual' }, + NormalFloat = { bg = 'bg_visual' }, + } + vim.g.gruvbox_dark_float = false + vim.cmd('colorscheme gruvbox-flat') + end, + enabled = false, +} diff --git a/lua/themes/gruvbox_material.lua b/lua/themes/gruvbox_material.lua index e8d8c99..c8a7629 100644 --- a/lua/themes/gruvbox_material.lua +++ b/lua/themes/gruvbox_material.lua @@ -1,42 +1,42 @@ -return { - 'sainnhe/gruvbox-material', - priority = 1000, - config = function() - -- local colors = require('gruvbox.colors') - -- vim.g.gruvbox_flat_style = "dark" - -- vim.g.gruvbox_colors = { - -- bg_search = 'purple', - -- fg_search = 'black', - -- } - -- vim.g.gruvbox_theme = { - -- Pmenu = { bg = 'bg_visual' }, - -- NormalFloat = { bg = 'bg_visual' } - -- } - -- vim.g.gruvbox_dark_float = false - vim.g.gruvbox_material_ui_contrast = 'high' - vim.g.gruvbox_material_dim_inactive_windows = 1 -- Dim inactive windows. Only works in neovim currently. - vim.g.gruvbox_material_disable_terminal_colors = 0 - local links = { - ['@lsp.type.namespace'] = '@namespace', - ['@lsp.type.type'] = '@type', - ['@lsp.type.class'] = '@type', - ['@lsp.type.enum'] = '@type', - ['@lsp.type.interface'] = '@type', - ['@lsp.type.struct'] = '@structure', - ['@lsp.type.parameter'] = '@parameter', - ['@lsp.type.variable'] = '@variable', - ['@lsp.type.property'] = '@property', - ['@lsp.type.enumMember'] = '@constant', - ['@lsp.type.function'] = '@function', - ['@lsp.type.method'] = '@method', - ['@lsp.type.macro'] = '@macro', - ['@lsp.type.decorator'] = '@function', - } - -- for newgroup, oldgroup in pairs(links) do - -- vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) - -- end - vim.cmd('colorscheme gruvbox-material') - vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { italic = true, fg = 'Purple' }) - end, - enabled = false -} +return { + 'sainnhe/gruvbox-material', + priority = 1000, + config = function() + -- local colors = require('gruvbox.colors') + -- vim.g.gruvbox_flat_style = "dark" + -- vim.g.gruvbox_colors = { + -- bg_search = 'purple', + -- fg_search = 'black', + -- } + -- vim.g.gruvbox_theme = { + -- Pmenu = { bg = 'bg_visual' }, + -- NormalFloat = { bg = 'bg_visual' } + -- } + -- vim.g.gruvbox_dark_float = false + vim.g.gruvbox_material_ui_contrast = 'high' + vim.g.gruvbox_material_dim_inactive_windows = 1 -- Dim inactive windows. Only works in neovim currently. + vim.g.gruvbox_material_disable_terminal_colors = 0 + local links = { + ['@lsp.type.namespace'] = '@namespace', + ['@lsp.type.type'] = '@type', + ['@lsp.type.class'] = '@type', + ['@lsp.type.enum'] = '@type', + ['@lsp.type.interface'] = '@type', + ['@lsp.type.struct'] = '@structure', + ['@lsp.type.parameter'] = '@parameter', + ['@lsp.type.variable'] = '@variable', + ['@lsp.type.property'] = '@property', + ['@lsp.type.enumMember'] = '@constant', + ['@lsp.type.function'] = '@function', + ['@lsp.type.method'] = '@method', + ['@lsp.type.macro'] = '@macro', + ['@lsp.type.decorator'] = '@function', + } + -- for newgroup, oldgroup in pairs(links) do + -- vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) + -- end + vim.cmd('colorscheme gruvbox-material') + vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { italic = true, fg = 'Purple' }) + end, + enabled = false, +} diff --git a/lua/themes/kanagawa.lua b/lua/themes/kanagawa.lua index 2922d11..9948a3b 100644 --- a/lua/themes/kanagawa.lua +++ b/lua/themes/kanagawa.lua @@ -3,15 +3,15 @@ return { lazy = true, config = function() require('kanagawa').setup({ - compile = false, -- enable compiling the colorscheme + compile = false, -- enable compiling the colorscheme undercurl = true, -- enable undercurls commentStyle = { italic = true }, functionStyle = {}, keywordStyle = { italic = true }, statementStyle = { bold = true }, typeStyle = {}, - transparent = false, -- do not set background color - dimInactive = true, -- dim inactive window `:h hl-NormalNC` + transparent = false, -- do not set background color + dimInactive = true, -- dim inactive window `:h hl-NormalNC` terminalColors = true, -- define vim.g.terminal_color_{0,17} colors = { -- add/modify theme and palette colors @@ -28,11 +28,11 @@ return { background = { -- map the value of 'background' option to a theme dark = 'wave', -- try "dragon" ! - light = 'lotus' + light = 'lotus', }, }) vim.cmd('colorscheme kanagawa') end, - enabled = true + enabled = true, } diff --git a/lua/themes/material.lua b/lua/themes/material.lua index fe1d337..d8ceaf2 100644 --- a/lua/themes/material.lua +++ b/lua/themes/material.lua @@ -2,7 +2,7 @@ return { 'marko-cerovac/material.nvim', priority = 1000, config = function() - local colors = require 'material.colors' + local colors = require('material.colors') require('material').setup({ contrast = { @@ -15,10 +15,14 @@ return { }, styles = { -- Give comments style such as bold, italic, underline etc. - comments = { --[[ italic = true ]] }, - strings = { --[[ bold = true ]] }, - keywords = { --[[ underline = true ]] }, - functions = { --[[ bold = true, undercurl = true ]] }, + comments = { --[[ italic = true ]] + }, + strings = { --[[ bold = true ]] + }, + keywords = { --[[ underline = true ]] + }, + functions = { --[[ bold = true, undercurl = true ]] + }, variables = {}, operators = {}, types = {}, @@ -26,23 +30,23 @@ return { plugins = { -- Uncomment the plugins that you use to highlight them -- Available plugins: - "dap", + 'dap', -- "dashboard", - "gitsigns", + 'gitsigns', -- "hop", - "indent-blankline", + 'indent-blankline', -- "lspsaga", -- "mini", -- "neogit", -- "neorg", - "nvim-cmp", - "nvim-navic", + 'nvim-cmp', + 'nvim-navic', -- "nvim-tree", - "nvim-web-devicons", + 'nvim-web-devicons', -- "sneak", - "telescope", + 'telescope', -- "trouble", - "which-key", + 'which-key', }, disable = { @@ -50,12 +54,12 @@ return { borders = false, -- Disable borders between verticaly split windows background = false, -- Prevent the theme from setting the background (NeoVim then uses your terminal background) term_colors = false, -- Prevent the theme from setting terminal colors - eob_lines = false -- Hide the end-of-buffer lines + eob_lines = false, -- Hide the end-of-buffer lines }, high_visibility = { lighter = false, -- Enable higher contrast text for lighter style - darker = true-- Enable higher contrast text for darker style + darker = true, -- Enable higher contrast text for darker style }, lualine_style = 'default', -- Lualine style ( can be 'stealth' or 'default' ) @@ -66,8 +70,8 @@ return { custom_highlights = {}, -- Overwrite highlights with your own }) - vim.g.material_style = "darker" + vim.g.material_style = 'darker' vim.cmd('colorscheme material') end, - enabled = false + enabled = false, } diff --git a/lua/themes/monokai-pro.lua b/lua/themes/monokai-pro.lua index 1894913..8b05f2a 100644 --- a/lua/themes/monokai-pro.lua +++ b/lua/themes/monokai-pro.lua @@ -43,9 +43,9 @@ return { -- ["@lsp.typemod.interface"] = {}, -- ["@lsp.typemod.macro"] = {}, -- ["@lsp.typemod.method"] = {}, - ["@lsp.typemod.namespace"] = { fg = c.base.red }, + ['@lsp.typemod.namespace'] = { fg = c.base.red }, -- ['@lsp.typemod.parameter.declaration'] = { fg = c.base.blue, italic = styles.parameter.italic }, - ["@lsp.typemod.property"] = { fg = '#9699f2' }, + ['@lsp.typemod.property'] = { fg = '#9699f2' }, -- ["@lsp.typemod.struct"] = {}, -- ["@lsp.typemod.type"] = {}, -- ["@lsp.typemod.typeParameter"] = {}, @@ -60,5 +60,5 @@ return { }) vim.cmd('colorscheme monokai-pro') end, - enabled = true + enabled = true, } diff --git a/lua/utils/python_venv.lua b/lua/utils/python_venv.lua index 21b0b85..d3090f2 100644 --- a/lua/utils/python_venv.lua +++ b/lua/utils/python_venv.lua @@ -62,14 +62,14 @@ function M.getPythonEnvs() if venv ~= nil then table.insert(venvs, { name = 'VIRTUAL_ENV', - path = string.format('%s/%s', venv, M.getVenvSuffix()) + path = string.format('%s/%s', venv, M.getVenvSuffix()), }) end local conda = os.getenv('CONDA_PREFIX') if conda ~= nil then table.insert(venvs, { name = 'CONDA_PREFIX', - path = string.format('%s/%s', conda, 'python.exe') + path = string.format('%s/%s', conda, 'python.exe'), }) end @@ -79,7 +79,7 @@ function M.getPythonEnvs() if jsonVenv ~= nil then table.insert(venvs, { name = 'pyrightconfig.json', - path = jsonVenv .. '/' .. M.getVenvSuffix() + path = jsonVenv .. '/' .. M.getVenvSuffix(), }) end @@ -88,20 +88,20 @@ function M.getPythonEnvs() if vim.fn.executable(cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix()) == 1 then table.insert(venvs, { name = envDir, - path = cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix() + path = cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix(), }) end end if vim.loop.os_uname().sysname == 'Linux' then table.insert(venvs, { name = 'system', - path = '/usr/bin/python' + path = '/usr/bin/python', }) end if vim.loop.os_uname().sysname == 'Windows_NT' then table.insert(venvs, { name = 'system', - path = os.getenv('SCOOP') .. '/apps/python/current/python.exe' + path = os.getenv('SCOOP') .. '/apps/python/current/python.exe', }) end return venvs @@ -110,7 +110,9 @@ end M.pick_venv = function() vim.ui.select(M.getPythonEnvs(), { prompt = 'Select python venv', - format_item = function(item) return string.format('%s (%s)', item.name, item.path) end, + format_item = function(item) + return string.format('%s (%s)', item.name, item.path) + end, }, function(choice) if not choice then return diff --git a/stylua.toml b/stylua.toml index 255bfd9..56619e8 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,4 +1,4 @@ -column_width = 120 +column_width = 160 line_endings = "Unix" indent_type = "Spaces" indent_width = 2 -- 2.49.1 From 02182b77114926354dd28e367f815bd639fbe1bc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 7 Jun 2024 00:24:45 +0200 Subject: [PATCH 627/894] fixed lazygit --- lua/plugins/toggleterm.lua | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index e18d299..dd1d3e0 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -18,26 +18,28 @@ return { }) local Terminal = require('toggleterm.terminal').Terminal - local lazygit = Terminal:new({ - cmd = 'lazygit', - dir = vim.fn.getcwd(), - direction = 'float', - float_opts = { - border = 'double', - }, - -- function to run on opening the terminal - on_open = function(term) - vim.cmd('startinsert!') - vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) - end, - -- function to run on closing the terminal - on_close = function(term) - vim.cmd('startinsert!') - end, - }) function _lazygit_toggle() - lazygit:toggle() + local lazygit = Terminal:new({ + cmd = 'lazygit', + direction = 'float', + cwd = function() + return vim.fn.getcwd() + end, + float_opts = { + border = 'double', + }, + -- function to run on opening the terminal + on_open = function(term) + vim.cmd('startinsert!') + vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) + end, + -- function to run on closing the terminal + on_close = function(term) + vim.cmd('startinsert!') + end, + }) + lazygit:open() end end, keys = { -- 2.49.1 From 7548554a89fe0062222ebda47552e4d32347bf6a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:42:50 +0200 Subject: [PATCH 628/894] added some efm linter --- lua/plugins/lspconfig.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index d3a79d8..6fca8fb 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -117,13 +117,15 @@ return { automatic_installation = false, ensure_installed = { 'clangd', - 'denols', + 'basedpyright', -- 'neocmake', - -- 'pyright', - -- 'zk', -- No support for windows + 'efm', 'lua_ls', 'jsonls', - -- 'groovyls', -- Doesn't work in WSL + 'markdown_oxide', + 'black', + 'flake8', + 'cmakelang', }, }) local lspconfig = require('lspconfig') @@ -298,11 +300,13 @@ return { local gersemi = require('efmls-configs.formatters.gersemi') local black = require('efmls-configs.formatters.black') local isort = require('efmls-configs.formatters.isort') + local cmake_lint = require('efmls-configs.linters.cmake_lint') + local flake8 = require('efmls-configs.linters.flake8') local languages = { lua = { stylua }, markdown = { prettier }, - cmake = { gersemi }, - python = { isort, black }, + cmake = { gersemi, cmake_lint }, + python = { isort, black, flake8 }, } local efmls_config = { -- 2.49.1 From 97e4abc26bd567535a849fe80ee9b7074c1ec505 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:42:57 +0200 Subject: [PATCH 629/894] format lspconfig --- lua/plugins/lspconfig.lua | 41 +++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6fca8fb..04ad19b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -3,7 +3,8 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, + vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) @@ -11,18 +12,26 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, + vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -146,9 +155,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -199,7 +208,7 @@ return { return lspconfig.util.find_git_ancestor(fname) end, single_file_support = true, -- suggested - on_attach = on_attach, -- on_attach is the on_attach function you defined + on_attach = on_attach, -- on_attach is the on_attach function you defined }, } lspconfig.neocmake.setup({}) @@ -221,7 +230,8 @@ return { '--use-dirty-headers', '--completion-style=detailed', }, - root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), + root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', + 'configure.ac', '.git', 'build_nvim'), }) require('clangd_extensions').setup({ @@ -332,7 +342,8 @@ return { float = { border = 'single', format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, + diagnostic.code or diagnostic.user_data.lsp.code) end, }, }) -- 2.49.1 From 1c9eea9dca21ea1b44dca4562ccd9ee871415c39 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:44:57 +0200 Subject: [PATCH 630/894] format lspconfig --- lua/plugins/lspconfig.lua | 41 ++++++++++++++------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 04ad19b..6fca8fb 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -3,8 +3,7 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) @@ -12,26 +11,18 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, - vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -155,9 +146,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -208,7 +199,7 @@ return { return lspconfig.util.find_git_ancestor(fname) end, single_file_support = true, -- suggested - on_attach = on_attach, -- on_attach is the on_attach function you defined + on_attach = on_attach, -- on_attach is the on_attach function you defined }, } lspconfig.neocmake.setup({}) @@ -230,8 +221,7 @@ return { '--use-dirty-headers', '--completion-style=detailed', }, - root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', - 'configure.ac', '.git', 'build_nvim'), + root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), }) require('clangd_extensions').setup({ @@ -342,8 +332,7 @@ return { float = { border = 'single', format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, - diagnostic.code or diagnostic.user_data.lsp.code) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) end, }, }) -- 2.49.1 From c5d0d9b6ad4fbbbb761977785f92d419604fa4f2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:46:35 +0200 Subject: [PATCH 631/894] removed cmakelang --- lua/plugins/lspconfig.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6fca8fb..2632c6d 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -125,7 +125,6 @@ return { 'markdown_oxide', 'black', 'flake8', - 'cmakelang', }, }) local lspconfig = require('lspconfig') -- 2.49.1 From 02fe760d390bac6713327ee4650df1f7e08753dc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:47:01 +0200 Subject: [PATCH 632/894] format build lua file --- lua/overseer/template/user/cmake/build.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/overseer/template/user/cmake/build.lua b/lua/overseer/template/user/cmake/build.lua index c51413d..52c60b2 100644 --- a/lua/overseer/template/user/cmake/build.lua +++ b/lua/overseer/template/user/cmake/build.lua @@ -7,7 +7,11 @@ return { cwd = 'build_nvim', -- components = {"on_output_parse", problem_matcher = "$gcc"} -- components = {'on_output_quickfix', set_diagnostics = true, open = true} - components = { { 'on_output_quickfix', open = true, open_on_match = true }, { 'on_output_parse', problem_matcher = '$gcc' }, 'default' }, + components = { + { 'on_output_quickfix', open = true, open_on_match = true }, + { 'on_output_parse', problem_matcher = '$gcc' }, + 'default', + }, } end, condition = { -- 2.49.1 From 45e25283f1d756e4e5e864d14f2a17c56110524e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 13 Jun 2024 23:58:58 +0200 Subject: [PATCH 633/894] removed non lsp server from automatic install --- lua/plugins/lspconfig.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2632c6d..ecdb55c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -123,8 +123,6 @@ return { 'lua_ls', 'jsonls', 'markdown_oxide', - 'black', - 'flake8', }, }) local lspconfig = require('lspconfig') -- 2.49.1 From d4037f677e0f6a91483480b264e7b0a816b5fd3c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:08:38 +0200 Subject: [PATCH 634/894] fixed deprecated warning --- lua/plugins/lspconfig.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ecdb55c..8369576 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -80,12 +80,8 @@ local document_highlight = function(bufnr) end local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') + vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { buf = 0 }) + vim.api.nvim_set_option_value('formatexpr', 'v:lua.vim.lsp.formatexpr()', { buf = 0 }) lspKeys(client, bufnr) -- 2.49.1 From ac1318acd28d02a422153ca07840a0383e2a2731 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:08:46 +0200 Subject: [PATCH 635/894] added trouble --- lua/plugins/trouble.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/plugins/trouble.lua diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua new file mode 100644 index 0000000..ca004f1 --- /dev/null +++ b/lua/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + 'folke/trouble.nvim', + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = 'Trouble', + keys = { + { + 'xx', + 'Trouble diagnostics toggle', + desc = 'Diagnostics (Trouble)', + }, + { + 'xX', + 'Trouble diagnostics toggle filter.buf=0', + desc = 'Buffer Diagnostics (Trouble)', + }, + { + 's', + 'Trouble symbols toggle focus=false', + desc = 'Symbols (Trouble)', + }, + { + 'cl', + 'Trouble lsp toggle focus=false win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'xL', + 'Trouble loclist toggle', + desc = 'Location List (Trouble)', + }, + { + 'xQ', + 'Trouble qflist toggle', + desc = 'Quickfix List (Trouble)', + }, + }, +} -- 2.49.1 From d864aef15acdf62789c4a486d72372893a3425d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:38:56 +0200 Subject: [PATCH 636/894] added black config --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 34a4b30..8d6083f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,3 +14,6 @@ analyzeUnannotatedFunctions = 'false' executionEnvironments = [ { root = "./" } ] + +[tool.black] +line-length=120 -- 2.49.1 From afae40cd40f49b6e1d5bbf9f02217f82ce22fb47 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:39:09 +0200 Subject: [PATCH 637/894] removed aerial --- lua/plugins/aerial.lua | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 lua/plugins/aerial.lua diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua deleted file mode 100644 index bbeeaa7..0000000 --- a/lua/plugins/aerial.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - 'stevearc/aerial.nvim', - config = function() - require('aerial').setup({ - backends = { 'lsp', 'treesitter', 'markdown' }, - layout = { - default_direction = 'prefer_left', - }, - filter_kind = false, - show_guides = true, - }) - end, - cmd = 'AerialToggle', - keys = { - { - 's', - function() - require('aerial').toggle() - end, - desc = 'Symbols outline', - }, - }, -} -- 2.49.1 From 51812867b2e675c21f78fd77d8f8e768b9c76867 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:44:34 +0200 Subject: [PATCH 638/894] removed nullls --- lua/plugins/lspconfig.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8369576..844fb63 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -96,7 +96,6 @@ return { 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', - 'jose-elias-alvarez/null-ls.nvim', 'Fildo7525/pretty_hover', 'creativenull/efmls-configs-nvim', }, -- 2.49.1 From 48e0a8f399ac660fc785c271eddfd740c013755f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 14 Jun 2024 23:52:06 +0200 Subject: [PATCH 639/894] moved mason to its own file --- lua/plugins/lspconfig.lua | 60 +++++++++++++++++---------------------- lua/plugins/mason.lua | 42 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 34 deletions(-) create mode 100644 lua/plugins/mason.lua diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 844fb63..8389506 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -3,7 +3,8 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, + vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) @@ -11,18 +12,26 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, + vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -94,32 +103,13 @@ return { 'neovim/nvim-lspconfig', dependencies = { 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', 'Fildo7525/pretty_hover', 'creativenull/efmls-configs-nvim', }, - build = ':MasonUpdate', version = nil, branch = 'master', config = function() - require('mason').setup({ - ui = { - border = 'rounded', - }, - }) - require('mason-lspconfig').setup({ - automatic_installation = false, - ensure_installed = { - 'clangd', - 'basedpyright', - -- 'neocmake', - 'efm', - 'lua_ls', - 'jsonls', - 'markdown_oxide', - }, - }) local lspconfig = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) @@ -138,9 +128,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do @@ -191,7 +181,7 @@ return { return lspconfig.util.find_git_ancestor(fname) end, single_file_support = true, -- suggested - on_attach = on_attach, -- on_attach is the on_attach function you defined + on_attach = on_attach, -- on_attach is the on_attach function you defined }, } lspconfig.neocmake.setup({}) @@ -213,7 +203,8 @@ return { '--use-dirty-headers', '--completion-style=detailed', }, - root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), + root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', + 'configure.ac', '.git', 'build_nvim'), }) require('clangd_extensions').setup({ @@ -324,7 +315,8 @@ return { float = { border = 'single', format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, + diagnostic.code or diagnostic.user_data.lsp.code) end, }, }) diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua new file mode 100644 index 0000000..e57500b --- /dev/null +++ b/lua/plugins/mason.lua @@ -0,0 +1,42 @@ +return { + 'williamboman/mason.nvim', + dependencies = { + 'williamboman/mason-lspconfig.nvim', + 'WhoIsSethDaniel/mason-tool-installer.nvim', + }, + build = ':MasonUpdate', + branch = 'master', + config = function() + require('mason').setup({ + ui = { + border = 'rounded', + }, + }) + require('mason-lspconfig').setup({ + automatic_installation = false, + ensure_installed = { + 'clangd', + 'basedpyright', + -- 'neocmake', + 'efm', + 'lua_ls', + 'jsonls', + 'markdown_oxide', + }, + }) + require('mason-tool-installer').setup({ + + -- a list of all tools you want to ensure are installed upon + -- start + ensure_installed = { + 'black', + 'flake8', + 'isort', + 'prettier', + 'stylua', + 'gersemi', + 'cmakelang', + }, + }) + end, +} -- 2.49.1 From 0a23e9529e19d0b23ac81d5a6f9b8a170018ba12 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Jun 2024 00:19:22 +0200 Subject: [PATCH 640/894] refactor lspconfig --- lua/config/options.lua | 44 ++++++++++++++--------- lua/plugins/lspconfig.lua | 75 +++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 004ad91..4bfd237 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,24 +3,24 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.scrolloff = 4 @@ -107,6 +107,18 @@ opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' opt.foldexpr = 'nvim_treesitter#foldexpr()' +vim.diagnostic.config({ + virtual_text = false, + signs = true, + float = { + border = 'single', + format = function(diagnostic) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, + diagnostic.code or diagnostic.user_data.lsp.code) + end, + }, +}) + -- Window border for floating windows require('lspconfig.ui.windows').default_options.border = 'rounded' diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8389506..c580e53 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -99,6 +99,38 @@ local on_attach = function(client, bufnr) end end +local efm_setup = function(capabilities) + local prettier = require('efmls-configs.formatters.prettier') + local stylua = require('efmls-configs.formatters.stylua') + local gersemi = require('efmls-configs.formatters.gersemi') + local black = require('efmls-configs.formatters.black') + local isort = require('efmls-configs.formatters.isort') + local cmake_lint = require('efmls-configs.linters.cmake_lint') + local flake8 = require('efmls-configs.linters.flake8') + local languages = { + lua = { stylua }, + markdown = { prettier }, + cmake = { gersemi, cmake_lint }, + python = { isort, black, flake8 }, + } + + local efmls_config = { + -- filetypes = vim.tbl_keys(languages), + settings = { + rootMarkers = { '.git/' }, + languages = languages, + }, + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, + } + require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { + on_attach = on_attach, + capabilities = capabilities, + })) +end + return { 'neovim/nvim-lspconfig', dependencies = { @@ -278,48 +310,7 @@ return { }, }) - local prettier = require('efmls-configs.formatters.prettier') - local stylua = require('efmls-configs.formatters.stylua') - local gersemi = require('efmls-configs.formatters.gersemi') - local black = require('efmls-configs.formatters.black') - local isort = require('efmls-configs.formatters.isort') - local cmake_lint = require('efmls-configs.linters.cmake_lint') - local flake8 = require('efmls-configs.linters.flake8') - local languages = { - lua = { stylua }, - markdown = { prettier }, - cmake = { gersemi, cmake_lint }, - python = { isort, black, flake8 }, - } - - local efmls_config = { - -- filetypes = vim.tbl_keys(languages), - settings = { - rootMarkers = { '.git/' }, - languages = languages, - }, - init_options = { - documentFormatting = true, - documentRangeFormatting = true, - }, - } - - require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { - on_attach = on_attach, - capabilities = capabilities, - })) - - vim.diagnostic.config({ - virtual_text = false, - signs = true, - float = { - border = 'single', - format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, - diagnostic.code or diagnostic.user_data.lsp.code) - end, - }, - }) + efm_setup(capabilities) end, event = 'VeryLazy', } -- 2.49.1 From 24994a4dbab9166a03309c5abfe8c64278dd821d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Jun 2024 00:42:53 +0200 Subject: [PATCH 641/894] added new server lua file --- lua/plugins/lsp/server.lua | 170 +++++++++++++++++++++++++++++++++++++ lua/plugins/lspconfig.lua | 166 +----------------------------------- 2 files changed, 171 insertions(+), 165 deletions(-) create mode 100644 lua/plugins/lsp/server.lua diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua new file mode 100644 index 0000000..140ebd8 --- /dev/null +++ b/lua/plugins/lsp/server.lua @@ -0,0 +1,170 @@ +local M = {} + +local efm_setup = function(lspconfig, capabilities, on_attach) + local prettier = require('efmls-configs.formatters.prettier') + local stylua = require('efmls-configs.formatters.stylua') + local gersemi = require('efmls-configs.formatters.gersemi') + local black = require('efmls-configs.formatters.black') + local isort = require('efmls-configs.formatters.isort') + local cmake_lint = require('efmls-configs.linters.cmake_lint') + local flake8 = require('efmls-configs.linters.flake8') + local languages = { + lua = { stylua }, + markdown = { prettier }, + cmake = { gersemi, cmake_lint }, + python = { isort, black, flake8 }, + } + + local efmls_config = { + -- filetypes = vim.tbl_keys(languages), + settings = { + rootMarkers = { '.git/' }, + languages = languages, + }, + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, + } + require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { + on_attach = on_attach, + capabilities = capabilities, + })) +end + +M.setup_server = function(lspconfig, capabilities, on_attach) + -- lspconfig['pyright'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + lspconfig['basedpyright'].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { + basedpyright = { + typeCheckingMode = 'standard', + }, + }, + }) + + lspconfig['groovyls'].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- lspconfig['cmake'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + local clangd_capabilities = capabilities + clangd_capabilities.textDocument.semanticHighlighting = true + clangd_capabilities.offsetEncoding = { 'utf-16' } + lspconfig['clangd'].setup({ + capabilities = clangd_capabilities, + on_attach = on_attach, + cmd = { + 'clangd', + '--compile-commands-dir=build_nvim', + '--query-driver', + '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--clang-tidy', + '--background-index', + '--use-dirty-headers', + '--completion-style=detailed', + }, + root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), + }) + + require('clangd_extensions').setup({ + extensions = { + inlay_hints = { + -- Only show inlay hints for the current line + only_current_line = true, + }, + }, + }) + + lspconfig['jsonls'].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- lspconfig['rust_analyzer'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + lspconfig['lua_ls'].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + callSnippet = 'Replace', + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + format = { + enable = true, + defaultConfig = { + indent_style = 'space', + indent_size = '2', + quote_style = 'single', + }, + }, + }, + }, + }) + + lspconfig['dockerls'].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + lspconfig['markdown_oxide'].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- lspconfig['marksman'].setup { + -- capabilities = capabilities, + -- on_attach = on_attach, + -- } + + lspconfig['yamlls'].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { + yaml = { + validate = true, + }, + }, + }) + + local configs = require('lspconfig.configs') + if not configs.neocmake then + configs.neocmake = { + default_config = { + cmd = { 'neocmakelsp', '--stdio' }, + filetypes = { 'cmake' }, + root_dir = function(fname) + return lspconfig.util.find_git_ancestor(fname) + end, + single_file_support = true, -- suggested + on_attach = on_attach, -- on_attach is the on_attach function you defined + }, + } + lspconfig.neocmake.setup({}) + end + + efm_setup(lspconfig, capabilities, on_attach) +end + +return M diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index c580e53..aa9d0ad 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -99,38 +99,6 @@ local on_attach = function(client, bufnr) end end -local efm_setup = function(capabilities) - local prettier = require('efmls-configs.formatters.prettier') - local stylua = require('efmls-configs.formatters.stylua') - local gersemi = require('efmls-configs.formatters.gersemi') - local black = require('efmls-configs.formatters.black') - local isort = require('efmls-configs.formatters.isort') - local cmake_lint = require('efmls-configs.linters.cmake_lint') - local flake8 = require('efmls-configs.linters.flake8') - local languages = { - lua = { stylua }, - markdown = { prettier }, - cmake = { gersemi, cmake_lint }, - python = { isort, black, flake8 }, - } - - local efmls_config = { - -- filetypes = vim.tbl_keys(languages), - settings = { - rootMarkers = { '.git/' }, - languages = languages, - }, - init_options = { - documentFormatting = true, - documentRangeFormatting = true, - }, - } - require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { - on_attach = on_attach, - capabilities = capabilities, - })) -end - return { 'neovim/nvim-lspconfig', dependencies = { @@ -178,139 +146,7 @@ return { vim.diagnostic.open_float({ focusable = false, width = 80 }) end - -- lspconfig['pyright'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['basedpyright'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - basedpyright = { - typeCheckingMode = 'standard', - }, - }, - }) - - lspconfig['groovyls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['cmake'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - local configs = require('lspconfig.configs') - if not configs.neocmake then - configs.neocmake = { - default_config = { - cmd = { 'neocmakelsp', '--stdio' }, - filetypes = { 'cmake' }, - root_dir = function(fname) - return lspconfig.util.find_git_ancestor(fname) - end, - single_file_support = true, -- suggested - on_attach = on_attach, -- on_attach is the on_attach function you defined - }, - } - lspconfig.neocmake.setup({}) - end - - local clangd_capabilities = capabilities - clangd_capabilities.textDocument.semanticHighlighting = true - clangd_capabilities.offsetEncoding = { 'utf-16' } - lspconfig['clangd'].setup({ - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { - 'clangd', - '--compile-commands-dir=build_nvim', - '--query-driver', - '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', - '--clang-tidy', - '--background-index', - '--use-dirty-headers', - '--completion-style=detailed', - }, - root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', - 'configure.ac', '.git', 'build_nvim'), - }) - - require('clangd_extensions').setup({ - extensions = { - inlay_hints = { - -- Only show inlay hints for the current line - only_current_line = true, - }, - }, - }) - - lspconfig['jsonls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['rust_analyzer'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['lua_ls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - workspace = { - checkThirdParty = false, - }, - completion = { - callSnippet = 'Replace', - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - format = { - enable = true, - defaultConfig = { - indent_style = 'space', - indent_size = '2', - quote_style = 'single', - }, - }, - }, - }, - }) - - lspconfig['dockerls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - lspconfig['markdown_oxide'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['marksman'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['yamlls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - yaml = { - validate = true, - }, - }, - }) - - efm_setup(capabilities) + require('plugins.lsp.server').setup_server(lspconfig, capabilities, on_attach) end, event = 'VeryLazy', } -- 2.49.1 From d1ae784c93f2810a8ad57cf7d4a72632d87c1f64 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Jun 2024 00:47:07 +0200 Subject: [PATCH 642/894] format lsp config --- lua/plugins/lspconfig.lua | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index aa9d0ad..77bb89b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -3,8 +3,7 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) @@ -12,26 +11,18 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, - vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -128,9 +119,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do -- 2.49.1 From 7cc886c641f06ee1affab888d6ead90af96a912d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Jun 2024 00:47:38 +0200 Subject: [PATCH 643/894] format options --- lua/config/options.lua | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4bfd237..10100fb 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,24 +3,24 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.scrolloff = 4 @@ -113,8 +113,7 @@ vim.diagnostic.config({ float = { border = 'single', format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, - diagnostic.code or diagnostic.user_data.lsp.code) + return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) end, }, }) -- 2.49.1 From 3860fb3d73a9a6daf3d57c36eb55cdf67a501dd6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 16 Jun 2024 22:48:08 +0200 Subject: [PATCH 644/894] added mini surround --- lua/plugins/flash.lua | 5 ++--- lua/plugins/mini-surround.lua | 20 ++++++++++++++++++++ lua/plugins/nvim-surround.lua | 10 ---------- 3 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 lua/plugins/mini-surround.lua delete mode 100644 lua/plugins/nvim-surround.lua diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index a8ba660..27161e3 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -1,7 +1,6 @@ return { 'folke/flash.nvim', event = 'VeryLazy', - ---@type Flash.Config opts = { modes = { search = { @@ -14,7 +13,7 @@ return { }, keys = { { - 's', + 'a', mode = { 'n', 'x', 'o' }, function() -- default options: exact mode, multi window, all directions, with a backdrop @@ -23,7 +22,7 @@ return { desc = 'Flash jump', }, { - 'S', + 'A', mode = { 'n', 'o', 'x' }, function() require('flash').treesitter() diff --git a/lua/plugins/mini-surround.lua b/lua/plugins/mini-surround.lua new file mode 100644 index 0000000..0287d90 --- /dev/null +++ b/lua/plugins/mini-surround.lua @@ -0,0 +1,20 @@ +return { + 'echasnovski/mini.surround', + version = '*', + config = function() + require('mini.surround').setup({ + mappings = { + add = 'sa', -- Add surrounding in Normal and Visual modes + delete = 'sd', -- Delete surrounding + find = 'sf', -- Find surrounding (to the right) + find_left = 'sF', -- Find surrounding (to the left) + highlight = 'sh', -- Highlight surrounding + replace = 'sr', -- Replace surrounding + update_n_lines = 'sn', -- Update `n_lines` + + suffix_last = 'l', -- Suffix to search with "prev" method + suffix_next = 'n', -- Suffix to search with "next" method + }, + }) + end, +} diff --git a/lua/plugins/nvim-surround.lua b/lua/plugins/nvim-surround.lua deleted file mode 100644 index 540f49c..0000000 --- a/lua/plugins/nvim-surround.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - 'kylechui/nvim-surround', - version = '*', -- Use for stability; omit to use `main` branch for the latest features - event = 'VeryLazy', - config = function() - require('nvim-surround').setup({ - -- Configuration here, or leave empty to use defaults - }) - end, -} -- 2.49.1 From 3c3e174dad9a3c0333376d33fd1fd9365f7b56fd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 16 Jun 2024 22:48:52 +0200 Subject: [PATCH 645/894] revert keymaps for flash --- lua/plugins/flash.lua | 4 ++-- lua/plugins/mini-surround.lua | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 27161e3..d639dc5 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -13,7 +13,7 @@ return { }, keys = { { - 'a', + 's', mode = { 'n', 'x', 'o' }, function() -- default options: exact mode, multi window, all directions, with a backdrop @@ -22,7 +22,7 @@ return { desc = 'Flash jump', }, { - 'A', + 'S', mode = { 'n', 'o', 'x' }, function() require('flash').treesitter() diff --git a/lua/plugins/mini-surround.lua b/lua/plugins/mini-surround.lua index 0287d90..c0b5168 100644 --- a/lua/plugins/mini-surround.lua +++ b/lua/plugins/mini-surround.lua @@ -4,13 +4,13 @@ return { config = function() require('mini.surround').setup({ mappings = { - add = 'sa', -- Add surrounding in Normal and Visual modes - delete = 'sd', -- Delete surrounding - find = 'sf', -- Find surrounding (to the right) - find_left = 'sF', -- Find surrounding (to the left) - highlight = 'sh', -- Highlight surrounding - replace = 'sr', -- Replace surrounding - update_n_lines = 'sn', -- Update `n_lines` + add = 'aa', -- Add surrounding in Normal and Visual modes + delete = 'ad', -- Delete surrounding + find = 'af', -- Find surrounding (to the right) + find_left = 'aF', -- Find surrounding (to the left) + highlight = 'ah', -- Highlight surrounding + replace = 'ar', -- Replace surrounding + update_n_lines = 'an', -- Update `n_lines` suffix_last = 'l', -- Suffix to search with "prev" method suffix_next = 'n', -- Suffix to search with "next" method -- 2.49.1 From c7fc18917564605f83be9c490a38790a3ee595a2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 16 Jun 2024 22:49:05 +0200 Subject: [PATCH 646/894] removed unused stuff in treesitter --- lua/plugins/treesitter.lua | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index afbe747..10ab2b3 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -24,30 +24,6 @@ return { indent = { enable = false, -- maybe buggy }, - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - lsp_interop = { - enable = true, - border = 'none', - peek_definition_code = { - ['df'] = '@function.outer', - ['dF'] = '@class.outer', - }, - }, - }, }) vim.treesitter.language.register('groovy', 'java') require('nvim-treesitter.install').prefer_git = false -- 2.49.1 From 92001c6537b9ad800d9948311b6d153dc271d3bc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 16 Jun 2024 23:04:49 +0200 Subject: [PATCH 647/894] fixed keymaps for surround --- lua/plugins/mini-surround.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/plugins/mini-surround.lua b/lua/plugins/mini-surround.lua index c0b5168..d8700ba 100644 --- a/lua/plugins/mini-surround.lua +++ b/lua/plugins/mini-surround.lua @@ -4,13 +4,13 @@ return { config = function() require('mini.surround').setup({ mappings = { - add = 'aa', -- Add surrounding in Normal and Visual modes - delete = 'ad', -- Delete surrounding - find = 'af', -- Find surrounding (to the right) - find_left = 'aF', -- Find surrounding (to the left) - highlight = 'ah', -- Highlight surrounding - replace = 'ar', -- Replace surrounding - update_n_lines = 'an', -- Update `n_lines` + add = 'aa', -- Add surrounding in Normal and Visual modes + delete = 'ad', -- Delete surrounding + find = 'af', -- Find surrounding (to the right) + find_left = 'aF', -- Find surrounding (to the left) + highlight = 'ah', -- Highlight surrounding + replace = 'ar', -- Replace surrounding + update_n_lines = 'an', -- Update `n_lines` suffix_last = 'l', -- Suffix to search with "prev" method suffix_next = 'n', -- Suffix to search with "next" method -- 2.49.1 From 5e902d667bd91957528e27fc113cc064bb5bb71a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 16 Jun 2024 23:53:33 +0200 Subject: [PATCH 648/894] some lualine fixes --- lua/plugins/lualine.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 460d5bc..714cb7a 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -5,9 +5,10 @@ return { 'Isrothy/lualine-diagnostic-message', }, config = function() + vim.opt.laststatus = 3 require('lualine').setup({ options = { - theme = 'bamboo', + theme = 'auto', disabled_filetypes = { statusline = {}, winbar = { 'dap-repl', 'dapui_console' }, @@ -15,7 +16,7 @@ return { section_separators = { left = '', right = '' }, }, globalstatus = true, - extensions = { 'aerial', 'oil', 'toggleterm' }, + extensions = { 'oil', 'toggleterm' }, sections = { lualine_b = { 'branch', @@ -52,6 +53,7 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, + color = { fg = '#000000', bg = '#ff9966', gui='bold' }, }, }, lualine_b = { @@ -80,6 +82,7 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, + color = { fg = '#000000', bg = '#8fb573' }, }, }, lualine_b = { -- 2.49.1 From 1b180e05679ed2489ef9c669acf0b29ae8434e8d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Jun 2024 00:24:00 +0200 Subject: [PATCH 649/894] added navic --- lua/plugins/lspconfig.lua | 7 +++++++ lua/plugins/lualine.lua | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 77bb89b..6ed6ecf 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -88,6 +88,11 @@ local on_attach = function(client, bufnr) if client.server_capabilities.documentHighlightProvider then document_highlight(bufnr) end + if client.server_capabilities.documentSymbolProvider then + print('attach navic') + local navic = require("nvim-navic") + navic.attach(client, bufnr) + end end return { @@ -97,11 +102,13 @@ return { 'p00f/clangd_extensions.nvim', 'Fildo7525/pretty_hover', 'creativenull/efmls-configs-nvim', + 'SmiteshP/nvim-navic', }, version = nil, branch = 'master', config = function() local lspconfig = require('lspconfig') + require("nvim-navic").setup({}) local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) capabilities.workspace = { diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 714cb7a..5e1f9c2 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -6,6 +6,8 @@ return { }, config = function() vim.opt.laststatus = 3 + local navic = require('nvim-navic') + local colors = require('bamboo.palette') require('lualine').setup({ options = { theme = 'auto', @@ -28,8 +30,24 @@ return { }, lualine_c = { 'hostname', - 'getcwd', - { 'filename', path = 1, file_status = true }, + { + 'getcwd', + color = { fg = colors.vulgaris.orange, gui = 'bold' }, + }, + { + 'filename', + path = 1, + file_status = true, + color = { fg = colors.vulgaris.light_blue, gui = 'bold' }, + }, + { + function() + return require('nvim-navic').get_location() + end, + cond = function() + return package.loaded['nvim-navic'] and require('nvim-navic').is_available() + end, + }, }, lualine_y = { 'searchcount', @@ -53,7 +71,7 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - color = { fg = '#000000', bg = '#ff9966', gui='bold' }, + color = { fg = '#000000', bg = '#ff9966', gui = 'bold' }, }, }, lualine_b = { -- 2.49.1 From 561f56d6a2a3b5b6d13bb75cf7a2c7d17cb6d77b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Jun 2024 00:24:24 +0200 Subject: [PATCH 650/894] format lspconfig --- lua/plugins/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6ed6ecf..eb01f34 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -90,7 +90,7 @@ local on_attach = function(client, bufnr) end if client.server_capabilities.documentSymbolProvider then print('attach navic') - local navic = require("nvim-navic") + local navic = require('nvim-navic') navic.attach(client, bufnr) end end @@ -108,7 +108,7 @@ return { branch = 'master', config = function() local lspconfig = require('lspconfig') - require("nvim-navic").setup({}) + require('nvim-navic').setup({}) local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) capabilities.workspace = { -- 2.49.1 From 5fdc9e902d22b96cab666a6e5d0919ee4ef4f0b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 19 Jun 2024 06:21:40 +0000 Subject: [PATCH 651/894] removed debug message --- lua/plugins/lspconfig.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index eb01f34..f81e7e8 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -89,7 +89,6 @@ local on_attach = function(client, bufnr) document_highlight(bufnr) end if client.server_capabilities.documentSymbolProvider then - print('attach navic') local navic = require('nvim-navic') navic.attach(client, bufnr) end -- 2.49.1 From 6dc6e2a2d33eda440df30b8f24fe1610df29880e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:31:38 +0200 Subject: [PATCH 652/894] fixed mason branch --- lua/plugins/mason.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index e57500b..9862fac 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -5,7 +5,7 @@ return { 'WhoIsSethDaniel/mason-tool-installer.nvim', }, build = ':MasonUpdate', - branch = 'master', + branch = 'main', config = function() require('mason').setup({ ui = { -- 2.49.1 From e20757dfff4b2edcb5baa196a98a271da33c2c0a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:31:42 +0200 Subject: [PATCH 653/894] updated plugins --- lazy-lock.json | 86 ++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f4d4fe7..9a057cd 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,73 +2,75 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "aerial.nvim": { "branch": "master", "commit": "399e276328be8242ccde01d90f6f6c619f7bb24f" }, - "astrotheme": { "branch": "main", "commit": "7e47b7900229365bc0dca2a2eee2acc62dfc9dc3" }, - "bamboo.nvim": { "branch": "master", "commit": "f624433d750dbf69ce93ee057fbc1c595aa13e31" }, + "astrotheme": { "branch": "main", "commit": "ab0cb19c32181126f92b8239700cec97ba81b0fd" }, + "bamboo.nvim": { "branch": "master", "commit": "b67ea789efd5e81692c802d2b42629db79683da1" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "430a8f56605cb1d0ed9876301d6e9bf675195e16" }, - "cmake-tools.nvim": { "branch": "master", "commit": "b221c5973ca520b0f079e16cd9919a8d944f7890" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "a8500531c4ed3a207e744a374ea038744a0f93eb" }, + "cmake-tools.nvim": { "branch": "master", "commit": "09bd61415ecdba84f378fe734680f69375260985" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, + "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, "cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, - "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, - "everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, + "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, + "everforest-nvim": { "branch": "main", "commit": "93ae58039f565ef51252e1177e00946bd6258228" }, "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, - "fzf-lua": { "branch": "main", "commit": "b64d2802d1349ae9c3d54062492856c2e071326a" }, - "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, + "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, + "fzf-lua": { "branch": "main", "commit": "5c404c613832e39c5caf8753d1b099d7abd1f1b8" }, + "gitsigns.nvim": { "branch": "main", "commit": "0dc886637f9686b7cfd245a4726f93abeab19d4a" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "c442515506caa166118e157980f62a9ac24fa8c3" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" }, - "lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" }, - "lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" }, + "gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, + "kanagawa.nvim": { "branch": "master", "commit": "fe5b2c9e2549862c3dc3f3c8e9cf7ddece0f40c2" }, + "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, + "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "luasnip-snippets": { "branch": "main", "commit": "731fc02d4b2e30ef0fddd345f9cad5f261479b7c" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "monokai-pro.nvim": { "branch": "master", "commit": "8940b2f87343db96ee2c62404a4e4ff9257ed514" }, - "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.surround": { "branch": "main", "commit": "3cb5b509ad34f2402df4b977be607a614c8c7524" }, + "monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, - "neogit": { "branch": "master", "commit": "bc0c609e3568a171e0549b449aa1b2b4b5b20e8c" }, - "neotest": { "branch": "master", "commit": "5caac5cc235d495a2382bc2980630ef36ac87032" }, + "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, + "neotest": { "branch": "master", "commit": "f30bab1faef13d47f3905e065215c96a42d075ad" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" }, - "nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" }, - "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, - "nvim-dap-python": { "branch": "master", "commit": "3dffa58541d1f52c121fe58ced046268c838d802" }, + "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, + "nvim-dap-python": { "branch": "master", "commit": "ae0225d0d4a46e18e6057ab3701ef87bbbd6aaad" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" }, - "nvim-highlight-colors": { "branch": "main", "commit": "432dc7a817a4973041f02b418169667c491f60fd" }, - "nvim-lint": { "branch": "master", "commit": "f3bcc28ffccb768212247294acccc106e029fc3c" }, - "nvim-lspconfig": { "branch": "master", "commit": "94513a5b246cf32a8f87ca714af50911df63351c" }, - "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, - "nvim-rooter.lua": { "branch": "main", "commit": "de7ffc3d704041cb4a65304229288a1329a2d298" }, - "nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, + "nvim-highlight-colors": { "branch": "main", "commit": "30f305d57d658615cd827146f5e56db8b6833475" }, + "nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" }, + "nvim-lspconfig": { "branch": "master", "commit": "6806370929cf6a35be6e5e0e74588515a4356e4d" }, + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, + "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "78aeb665e2dcbc8ab948b3397581dcc0b7b086f3" }, - "overseer.nvim": { "branch": "master", "commit": "8e701da79f3fd7c44c3e8ad1aed6512aedc50191" }, - "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, + "oil.nvim": { "branch": "master", "commit": "0883b109a7203d9ff2559db4a345407172cb29fa" }, + "overseer.nvim": { "branch": "master", "commit": "8278265e7ffd3420b8246004140df12255a9737c" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "4c6e6f2d968e34cd9d2074b1d37b5b58c5362348" }, + "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, - "rustaceanvim": { "branch": "master", "commit": "1c3d3a75bebcb16df2a093b147ba498185e4ab17" }, + "rustaceanvim": { "branch": "master", "commit": "1e7600b370db3caf37a1cd867e00aac27597a114" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, - "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, + "trouble.nvim": { "branch": "main", "commit": "09380a8ed0694dbfbbcf59f9eaac499e259cb75c" }, + "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, "workspaces.nvim": { "branch": "master", "commit": "c6f19b08123eaee37d27561299f2b4f1385fa9f0" } } \ No newline at end of file -- 2.49.1 From 56865bb02313da21f886c4ad256226c5c712b21d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:44:31 +0200 Subject: [PATCH 654/894] removed some depracted calls --- lua/plugins/cmp.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 59b27d8..be3da3c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -124,10 +124,10 @@ return { -- { name = 'emoji' }, }, enabled = function() - return vim.api.nvim_buf_get_option(0, 'buftype') ~= 'prompt' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches' - or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover' + return vim.api.nvim_get_option_value('buftype', { buf = 0 }) ~= 'prompt' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' end, -- completion = { -- completeopt = 'menu,menuone,noinsert, noselect', -- 2.49.1 From a01e7f84ade9921b90b07bb34bc791b7a4ded45a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:44:41 +0200 Subject: [PATCH 655/894] some bamboo configs --- lua/themes/bamboo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index ff82a25..fa14d19 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -5,10 +5,10 @@ return { config = function() local colors = require('bamboo.palette') require('bamboo').setup({ - dim_inactive = true, -- Dim inactive windows/buffers + dim_inactive = false, -- Dim inactive windows/buffers cmp_itemkind_reverse = true, lualine = { - transparent = true, -- lualine center bar transparency + transparent = false, -- lualine center bar transparency }, code_style = { comments = { italic = false }, -- 2.49.1 From 58660084365b43a6b235475760c6088078df89b8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:51:42 +0200 Subject: [PATCH 656/894] removed neorg from cmp --- lua/plugins/cmp.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index be3da3c..4af65c2 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -90,7 +90,6 @@ return { end, }, sources = { - { name = 'neorg', priority = 8 }, { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', -- 2.49.1 From 09e126899a36bef44fb48402a317ba31d8ffc6ff Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:51:53 +0200 Subject: [PATCH 657/894] added path to cmp again --- lua/plugins/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 4af65c2..fa978c3 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -116,7 +116,7 @@ return { }, -- { name = 'nvim_lua' }, -- { name = 'look' }, - -- { name = 'path' }, + { name = 'path' }, -- { name = 'cmp_tabnine' }, -- { name = 'calc' }, -- { name = 'spell' }, -- 2.49.1 From f639158d37bc87318b423f3dec0e522df058ab52 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:52:02 +0200 Subject: [PATCH 658/894] removed sorting --- lua/plugins/cmp.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index fa978c3..5b19106 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -156,19 +156,6 @@ return { return kind end, }, - sorting = { - comparators = { - cmp.config.compare.offset, - cmp.config.compare.exact, - cmp.config.compare.recently_used, - require('clangd_extensions.cmp_scores'), - cmp.config.compare.locality, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, - }, - }, -- experimental = { native_menu = true } }) -- 2.49.1 From 5caf3af08ed6adc42c04de4e4306d0053f1f59dc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:57:20 +0200 Subject: [PATCH 659/894] tuning cmp cmdline and search --- lua/plugins/cmp.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 5b19106..cb094a3 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -160,7 +160,8 @@ return { }) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline('/', { + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' }, }, @@ -168,12 +169,14 @@ return { -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { - sources = { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ { name = 'cmdline' }, -- { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, - }, + }), + matching = { disallow_symbol_nonprefix_matching = false }, }) require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { -- 2.49.1 From 6ec12aabbbf5a6aaa8c46576c2f611b859b03955 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:58:07 +0200 Subject: [PATCH 660/894] set prio 7 for lsp cmp --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index cb094a3..fa6e4b6 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -98,6 +98,7 @@ return { keyword_pattern = [[\(\k\| \|\/\|#\)\+]], }, }, + priority = 7, }, { name = 'nvim_lsp_signature_help', priority = 7 }, -- { name = 'treesitter', priority = 6 }, -- 2.49.1 From 7fe27982d565af9cbab2cf1b8fc37d59f8ef1272 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 22:58:21 +0200 Subject: [PATCH 661/894] format cmp file --- lua/plugins/cmp.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index fa6e4b6..24b888f 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -90,7 +90,7 @@ return { end, }, sources = { - { name = 'luasnip', priority = 8 }, + { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', option = { @@ -125,9 +125,9 @@ return { }, enabled = function() return vim.api.nvim_get_option_value('buftype', { buf = 0 }) ~= 'prompt' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' end, -- completion = { -- completeopt = 'menu,menuone,noinsert, noselect', -- 2.49.1 From e308de510afeed59d3ff3f81790f5d6abcdebfe8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 20 Jun 2024 23:10:07 +0200 Subject: [PATCH 662/894] added cmd history to cmp again --- lua/plugins/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 24b888f..13d3cb0 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -173,7 +173,7 @@ return { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'cmdline' }, - -- { name = 'cmdline_history' }, + { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, }), -- 2.49.1 From 426501b814a89a24fcd2fef79a70deef9a0f4eaa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 11:20:49 +0000 Subject: [PATCH 663/894] added mini ai --- lua/plugins/mini_ai.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/plugins/mini_ai.lua diff --git a/lua/plugins/mini_ai.lua b/lua/plugins/mini_ai.lua new file mode 100644 index 0000000..76d47a5 --- /dev/null +++ b/lua/plugins/mini_ai.lua @@ -0,0 +1,10 @@ +return { + 'echasnovski/mini.ai', + config = function() + require('mini.ai').setup({ + -- Number of lines within which textobject is searched + n_lines = 150, + search_method = 'cover', + }) + end, +} -- 2.49.1 From 4b5207e43d6d70851142d88f6b9d2e888e47caa3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 11:21:01 +0000 Subject: [PATCH 664/894] changed to ruff for python --- lua/plugins/lsp/server.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 140ebd8..2f3bd25 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -8,11 +8,14 @@ local efm_setup = function(lspconfig, capabilities, on_attach) local isort = require('efmls-configs.formatters.isort') local cmake_lint = require('efmls-configs.linters.cmake_lint') local flake8 = require('efmls-configs.linters.flake8') + local ruff_linter = require("efmls-configs.linters.ruff") + local ruff_format = require("efmls-configs.formatters.ruff") + local ruff_sort = require("efmls-configs.formatters.ruff_sort") local languages = { lua = { stylua }, markdown = { prettier }, cmake = { gersemi, cmake_lint }, - python = { isort, black, flake8 }, + python = { ruff_linter, ruff_format, ruff_sort}, } local efmls_config = { -- 2.49.1 From eee5d5bbf593d3705ae7083e7551e8319364e65a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 11:21:14 +0000 Subject: [PATCH 665/894] removed hostname from lualine --- lua/plugins/lualine.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 5e1f9c2..1953289 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -29,7 +29,6 @@ return { }, }, lualine_c = { - 'hostname', { 'getcwd', color = { fg = colors.vulgaris.orange, gui = 'bold' }, -- 2.49.1 From 5101091fe734ae4f13eab1feca9e334c715e8677 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 22:56:30 +0200 Subject: [PATCH 666/894] added todo comments --- lua/plugins/todo-comments.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/plugins/todo-comments.lua diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua new file mode 100644 index 0000000..d3d21dd --- /dev/null +++ b/lua/plugins/todo-comments.lua @@ -0,0 +1,9 @@ +return { + 'folke/todo-comments.nvim', + dependencies = { 'nvim-lua/plenary.nvim' }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, +} -- 2.49.1 From 39c648bbbedb616a81449c0d58fd25848715377b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 23:12:22 +0200 Subject: [PATCH 667/894] workaround for json decode --- lua/plugins/dap.lua | 2 ++ lua/utils/json_workaround.lua | 53 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 lua/utils/json_workaround.lua diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index a34462e..b2b263d 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -90,6 +90,8 @@ return { end, }) + require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json + local pythonVenv = require('utils.python_venv') function loadConfigs() diff --git a/lua/utils/json_workaround.lua b/lua/utils/json_workaround.lua new file mode 100644 index 0000000..d195128 --- /dev/null +++ b/lua/utils/json_workaround.lua @@ -0,0 +1,53 @@ +local M = {} +local function str_splice(string, start_idx, end_idx) + local new_content = string:sub(1, start_idx - 1) + if end_idx then + return new_content .. string:sub(end_idx + 1) + else + return new_content + end +end + +local function str_rfind(string, idx, needle) + for i = idx, 1, -1 do + if string:sub(i, i - 1 + needle:len()) == needle then + return i + end + end +end +local function get_to_line_end(string, idx) + local newline = string:find('\n', idx, true) + local to_end = newline and string:sub(idx, newline - 1) or string:sub(idx) + return to_end, newline +end + +M.decode_json = function(content) + local ok, data = pcall(vim.json.decode, content, { luanil = { object = true } }) + while not ok do + local char = data:match('invalid token at character (%d+)$') + if char then + local to_end, newline = get_to_line_end(content, char) + if to_end:match('^//') then + content = str_splice(content, char, newline) + goto continue + end + end + + char = data:match('Expected object key string but found [^%s]+ at character (%d+)$') + char = char or data:match('Expected value but found T_ARR_END at character (%d+)') + if char then + local comma_idx = str_rfind(content, char, ',') + if comma_idx then + content = str_splice(content, comma_idx, comma_idx) + goto continue + end + end + + error(data) + ::continue:: + ok, data = pcall(vim.json.decode, content, { luanil = { object = true } }) + end + return data +end + +return M -- 2.49.1 From cb8be9c3d25247281db21285d0b37f6c9510102f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 23:15:42 +0200 Subject: [PATCH 668/894] added yanky --- lua/plugins/cmp.lua | 10 ++++++++++ lua/plugins/yanky.lua | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lua/plugins/yanky.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 13d3cb0..78adc39 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -18,6 +18,7 @@ return { { 'dmitmel/cmp-cmdline-history' }, { 'ray-x/cmp-treesitter' }, { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { 'chrisgrieser/cmp_yanky' }, { 'p00f/clangd_extensions.nvim' }, { 'windwp/nvim-autopairs', @@ -102,6 +103,15 @@ return { }, { name = 'nvim_lsp_signature_help', priority = 7 }, -- { name = 'treesitter', priority = 6 }, + { + name = 'cmp_yanky', + option = { + -- only suggest items which match the current filetype + onlyCurrentFiletype = false, + -- only suggest items with a minimum length + minLength = 3, + }, + }, { name = 'buffer', priority = 3, diff --git a/lua/plugins/yanky.lua b/lua/plugins/yanky.lua new file mode 100644 index 0000000..8fdf62b --- /dev/null +++ b/lua/plugins/yanky.lua @@ -0,0 +1,13 @@ +return { + 'gbprod/yanky.nvim', + config = function() + require('yanky').setup({}) + vim.keymap.set({ 'n', 'x' }, 'p', '(YankyPutAfter)') + vim.keymap.set({ 'n', 'x' }, 'P', '(YankyPutBefore)') + vim.keymap.set({ 'n', 'x' }, 'gp', '(YankyGPutAfter)') + vim.keymap.set({ 'n', 'x' }, 'gP', '(YankyGPutBefore)') + + vim.keymap.set('n', '', '(YankyPreviousEntry)') + vim.keymap.set('n', '', '(YankyNextEntry)') + end, +} -- 2.49.1 From f305c8be6cf8265bdc0d1b32233b10d32a3d8318 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 23:16:27 +0200 Subject: [PATCH 669/894] update lock file --- lazy-lock.json | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 9a057cd..e96f6d3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,7 +6,7 @@ "bamboo.nvim": { "branch": "master", "commit": "b67ea789efd5e81692c802d2b42629db79683da1" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a8500531c4ed3a207e744a374ea038744a0f93eb" }, - "cmake-tools.nvim": { "branch": "master", "commit": "09bd61415ecdba84f378fe734680f69375260985" }, + "cmake-tools.nvim": { "branch": "master", "commit": "4be3c229fe932043fd83ad52fdf0ba9af7297789" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, @@ -21,21 +21,23 @@ "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "cmp_yanky": { "branch": "main", "commit": "c3d089186ccead26eba01023502f3eeadd7a92d2" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, "everforest-nvim": { "branch": "main", "commit": "93ae58039f565ef51252e1177e00946bd6258228" }, "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, - "fzf-lua": { "branch": "main", "commit": "5c404c613832e39c5caf8753d1b099d7abd1f1b8" }, - "gitsigns.nvim": { "branch": "main", "commit": "0dc886637f9686b7cfd245a4726f93abeab19d4a" }, + "fzf-lua": { "branch": "main", "commit": "98f315bfe61bca7ecb8e721b5c733dd2d23ee0cb" }, + "gitsigns.nvim": { "branch": "main", "commit": "fa42613096ebfa5fee1ea87d70f8625ab9685d01" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, - "kanagawa.nvim": { "branch": "master", "commit": "fe5b2c9e2549862c3dc3f3c8e9cf7ddece0f40c2" }, - "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, + "indent-blankline.nvim": { "branch": "master", "commit": "4288ce8128a52650e401dda42fd7651a6038f262" }, + "kanagawa.nvim": { "branch": "master", "commit": "7735b2147ee6d223e43287044caa4fb070bdfa3d" }, + "lazy.nvim": { "branch": "main", "commit": "20af3fcc4ef2fef0cb4021543c70410567fcf9aa" }, "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "lua-json5": { "branch": "master", "commit": "18d8308656f79fdaa5936b4e42bb07b4bbd2354e" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, @@ -43,6 +45,7 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.ai": { "branch": "main", "commit": "a7e90f110e6274262616311b93cef12cd2667a2d" }, "mini.surround": { "branch": "main", "commit": "3cb5b509ad34f2402df4b977be607a614c8c7524" }, "monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, @@ -52,12 +55,12 @@ "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, - "nvim-dap-python": { "branch": "master", "commit": "ae0225d0d4a46e18e6057ab3701ef87bbbd6aaad" }, + "nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, - "nvim-highlight-colors": { "branch": "main", "commit": "30f305d57d658615cd827146f5e56db8b6833475" }, - "nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" }, - "nvim-lspconfig": { "branch": "master", "commit": "6806370929cf6a35be6e5e0e74588515a4356e4d" }, + "nvim-highlight-colors": { "branch": "main", "commit": "ed03bc006a22aa58aeeb06059a0a41acbd5e5b44" }, + "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, + "nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, @@ -68,9 +71,11 @@ "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, - "rustaceanvim": { "branch": "master", "commit": "1e7600b370db3caf37a1cd867e00aac27597a114" }, + "rustaceanvim": { "branch": "master", "commit": "d6d7620b66d74b3b16defcf85cbef7b3582795b3" }, + "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, - "trouble.nvim": { "branch": "main", "commit": "09380a8ed0694dbfbbcf59f9eaac499e259cb75c" }, + "trouble.nvim": { "branch": "main", "commit": "57761ba7148164f0315ed203e714ac242329abd4" }, "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, - "workspaces.nvim": { "branch": "master", "commit": "c6f19b08123eaee37d27561299f2b4f1385fa9f0" } + "workspaces.nvim": { "branch": "master", "commit": "5a25ce9f1db03c4cf9bd6dcbb00177a734020d74" }, + "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } \ No newline at end of file -- 2.49.1 From 5ae060e30eaa8cbffda9e84592b6e59ee72d3a28 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Jun 2024 23:19:45 +0200 Subject: [PATCH 670/894] install ruff --- lua/plugins/mason.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 9862fac..995e4a0 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -36,6 +36,7 @@ return { 'stylua', 'gersemi', 'cmakelang', + 'ruff' }, }) end, -- 2.49.1 From 8c586aa58d556e8b92d1b7a89298557ad4f2d820 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 8 Jul 2024 23:50:45 +0200 Subject: [PATCH 671/894] added codium --- lazy-lock.json | 1 + lua/plugins/cmp.lua | 1 + lua/plugins/codium.lua | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 lua/plugins/codium.lua diff --git a/lazy-lock.json b/lazy-lock.json index e96f6d3..3143fb8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -22,6 +22,7 @@ "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_yanky": { "branch": "main", "commit": "c3d089186ccead26eba01023502f3eeadd7a92d2" }, + "codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 78adc39..caba6cc 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -158,6 +158,7 @@ return { format = function(entry, vim_item) local kind = require('lspkind').cmp_format({ mode = 'symbol_text', + symbol_map = { Codeium = "", }, maxwidth = 50, })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua new file mode 100644 index 0000000..13ffd0a --- /dev/null +++ b/lua/plugins/codium.lua @@ -0,0 +1,10 @@ +return { + 'Exafunction/codeium.nvim', + requires = { + 'nvim-lua/plenary.nvim', + 'hrsh7th/nvim-cmp', + }, + config = function() + require('codeium').setup({}) + end, +} -- 2.49.1 From ae40f9c438d3347f1eaa880df72276d382cfcf36 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 8 Jul 2024 23:51:02 +0200 Subject: [PATCH 672/894] disabled some warnings in the cmp file --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index caba6cc..144a263 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: missing-fields return { 'hrsh7th/nvim-cmp', branch = 'main', -- 2.49.1 From 8b58c302c1d0d11e7767894e0906ac94683cd20b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Jul 2024 00:15:11 +0200 Subject: [PATCH 673/894] fix lspkind --- lua/plugins/cmp.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 144a263..5f84b1f 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -29,6 +29,7 @@ return { config = function() local cmp = require('cmp') local luasnip = require('luasnip') + local lspkind = require('lspkind') local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) @@ -155,17 +156,14 @@ return { }), }, formatting = { - fields = { 'kind', 'abbr', 'menu' }, + fields = { 'kind', 'abbr' }, format = function(entry, vim_item) local kind = require('lspkind').cmp_format({ - mode = 'symbol_text', + mode = 'symbol', symbol_map = { Codeium = "", }, - maxwidth = 50, - })(entry, vim_item) + maxwidth = 50 })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) - kind.kind = ' ' .. strings[1] .. ' ' - -- kind.menu = ' (' .. strings[2] .. ')' - + kind.kind = ' ' .. (strings[1] or '') .. ' ' return kind end, }, -- 2.49.1 From 2554ed57cb1c3fa27f7019decb3b7c4d27ba0c46 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Jul 2024 00:15:33 +0200 Subject: [PATCH 674/894] format cmp file --- lua/plugins/cmp.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 5f84b1f..1471fab 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -93,7 +93,7 @@ return { end, }, sources = { - { name = 'luasnip', priority = 8 }, + { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', option = { @@ -137,9 +137,9 @@ return { }, enabled = function() return vim.api.nvim_get_option_value('buftype', { buf = 0 }) ~= 'prompt' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' end, -- completion = { -- completeopt = 'menu,menuone,noinsert, noselect', @@ -160,8 +160,9 @@ return { format = function(entry, vim_item) local kind = require('lspkind').cmp_format({ mode = 'symbol', - symbol_map = { Codeium = "", }, - maxwidth = 50 })(entry, vim_item) + symbol_map = { Codeium = '' }, + maxwidth = 50, + })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) kind.kind = ' ' .. (strings[1] or '') .. ' ' return kind -- 2.49.1 From 0ce702e20453f1486d4d3caefd7bd43c87106919 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 9 Jul 2024 00:32:17 +0200 Subject: [PATCH 675/894] added codium again to cmp --- lua/plugins/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 1471fab..80304fb 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -93,6 +93,7 @@ return { end, }, sources = { + { name = 'codeium' }, { name = 'luasnip', priority = 8 }, { name = 'nvim_lsp', -- 2.49.1 From 2cfa266df35db5225f0be9a04d2c46a616c92a6c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Jul 2024 23:40:42 +0200 Subject: [PATCH 676/894] yanky, dont sync with system --- lua/plugins/yanky.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lua/plugins/yanky.lua b/lua/plugins/yanky.lua index 8fdf62b..7a307ac 100644 --- a/lua/plugins/yanky.lua +++ b/lua/plugins/yanky.lua @@ -1,7 +1,19 @@ return { 'gbprod/yanky.nvim', config = function() - require('yanky').setup({}) + require('yanky').setup({ + ring = { + history_length = 100, + storage = 'shada', + sync_with_numbered_registers = true, + cancel_event = 'update', + ignore_registers = { '_' }, + update_register_on_cycle = false, + }, + system_clipboard = { + sync_with_ring = false, + }, + }) vim.keymap.set({ 'n', 'x' }, 'p', '(YankyPutAfter)') vim.keymap.set({ 'n', 'x' }, 'P', '(YankyPutBefore)') vim.keymap.set({ 'n', 'x' }, 'gp', '(YankyGPutAfter)') -- 2.49.1 From 010acd113f87243d03b5bc05225c6ebcce0ac2d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 11 Jul 2024 06:02:15 +0000 Subject: [PATCH 677/894] highlight with return --- lua/plugins/lspconfig.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index f81e7e8..d1b0c09 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -86,7 +86,15 @@ local on_attach = function(client, bufnr) lspKeys(client, bufnr) if client.server_capabilities.documentHighlightProvider then - document_highlight(bufnr) + vim.keymap.set( + 'n', + '', + function () + vim.lsp.buf.clear_references() + vim.lsp.buf.document_highlight() + end, + vim.tbl_extend('error', { noremap = true, silent = false, buffer = bufnr }, { desc = 'Document highlight' }) + ) end if client.server_capabilities.documentSymbolProvider then local navic = require('nvim-navic') -- 2.49.1 From dd52da19ff7d53db954dd7450ac7707299accb04 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 11 Jul 2024 23:37:30 +0200 Subject: [PATCH 678/894] added markview --- lua/plugins/markview.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lua/plugins/markview.lua diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua new file mode 100644 index 0000000..f9d3979 --- /dev/null +++ b/lua/plugins/markview.lua @@ -0,0 +1,7 @@ +return { + "OXY2DEV/markview.nvim", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons" + }, +} -- 2.49.1 From a69d5ccd897176771e243c154988a65269240b9b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 11 Jul 2024 23:46:47 +0200 Subject: [PATCH 679/894] trouble: only focus symbols --- lua/plugins/trouble.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index ca004f1..1feed92 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -15,7 +15,7 @@ return { }, { 's', - 'Trouble symbols toggle focus=false', + 'Trouble symbols focus', desc = 'Symbols (Trouble)', }, { -- 2.49.1 From affffaeabe5bff1c349c2b2f2904015dd4d60873 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 11 Jul 2024 23:46:55 +0200 Subject: [PATCH 680/894] dont autostart markdown preview --- lua/plugins/markdown-preview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua index 06d2edc..fc3113e 100644 --- a/lua/plugins/markdown-preview.lua +++ b/lua/plugins/markdown-preview.lua @@ -12,7 +12,7 @@ return { end, init = function() vim.g.mkdp_auto_close = 0 - vim.g.mkdp_auto_start = 1 + vim.g.mkdp_auto_start = 0 vim.g.mkdp_combine_preview = 1 vim.g.mkdp_combine_preview_auto_refresh = 1 end, -- 2.49.1 From de5b9c3cf792f3c427a86099b9cbe5da74959d21 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 11 Jul 2024 23:51:02 +0200 Subject: [PATCH 681/894] update plugins --- lazy-lock.json | 51 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 3143fb8..91af874 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,8 +2,8 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "astrotheme": { "branch": "main", "commit": "ab0cb19c32181126f92b8239700cec97ba81b0fd" }, - "bamboo.nvim": { "branch": "master", "commit": "b67ea789efd5e81692c802d2b42629db79683da1" }, + "astrotheme": { "branch": "main", "commit": "48b8cb48d5d9fad48324eec2a101a5fa2cac57f9" }, + "bamboo.nvim": { "branch": "master", "commit": "8d86d4b5dec2e35392d53a82602d4f2b12e3f014" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a8500531c4ed3a207e744a374ea038744a0f93eb" }, "cmake-tools.nvim": { "branch": "master", "commit": "4be3c229fe932043fd83ad52fdf0ba9af7297789" }, @@ -22,60 +22,61 @@ "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_yanky": { "branch": "main", "commit": "c3d089186ccead26eba01023502f3eeadd7a92d2" }, - "codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" }, + "codeium.nvim": { "branch": "main", "commit": "f6a2ef32a9e923cb0104a19d3e426b0e40e49505" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, - "everforest-nvim": { "branch": "main", "commit": "93ae58039f565ef51252e1177e00946bd6258228" }, - "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, - "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, - "fzf-lua": { "branch": "main", "commit": "98f315bfe61bca7ecb8e721b5c733dd2d23ee0cb" }, - "gitsigns.nvim": { "branch": "main", "commit": "fa42613096ebfa5fee1ea87d70f8625ab9685d01" }, + "everforest-nvim": { "branch": "main", "commit": "8fdccd1e45088be3309aaf82072b1f7fec2f6f2c" }, + "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, + "friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" }, + "fzf-lua": { "branch": "main", "commit": "975534f4861e2575396716225c1202572645583d" }, + "gitsigns.nvim": { "branch": "main", "commit": "7178d1a430dcfff8a4c92d78b9e39e0297a779c0" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4288ce8128a52650e401dda42fd7651a6038f262" }, - "kanagawa.nvim": { "branch": "master", "commit": "7735b2147ee6d223e43287044caa4fb070bdfa3d" }, - "lazy.nvim": { "branch": "main", "commit": "20af3fcc4ef2fef0cb4021543c70410567fcf9aa" }, + "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, + "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, + "lazy.nvim": { "branch": "main", "commit": "f918318d21956b0874a65ab35ce3d94d9057aabf" }, "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, - "lua-json5": { "branch": "master", "commit": "18d8308656f79fdaa5936b4e42bb07b4bbd2354e" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "markview.nvim": { "branch": "main", "commit": "b6e0fcb38d3593a898a1c66c5e245d68d28e9707" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, "mini.ai": { "branch": "main", "commit": "a7e90f110e6274262616311b93cef12cd2667a2d" }, "mini.surround": { "branch": "main", "commit": "3cb5b509ad34f2402df4b977be607a614c8c7524" }, "monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, - "neotest": { "branch": "master", "commit": "f30bab1faef13d47f3905e065215c96a42d075ad" }, + "neotest": { "branch": "master", "commit": "0fe9186afac9b7874ba304fd28d6325d07e5e274" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, + "neovim-ayu": { "branch": "master", "commit": "d64a8b7e8730095ff634e6586584e8543043e986" }, + "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, "nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, - "nvim-highlight-colors": { "branch": "main", "commit": "ed03bc006a22aa58aeeb06059a0a41acbd5e5b44" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, + "nvim-highlight-colors": { "branch": "main", "commit": "a8f6952cb1ff7bde864a34c502f1a42c360a6662" }, "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" }, + "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, - "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "0883b109a7203d9ff2559db4a345407172cb29fa" }, + "oil.nvim": { "branch": "master", "commit": "ace46a41a1ea56d544a3775adf30490f2abd9235" }, "overseer.nvim": { "branch": "master", "commit": "8278265e7ffd3420b8246004140df12255a9737c" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, - "rustaceanvim": { "branch": "master", "commit": "d6d7620b66d74b3b16defcf85cbef7b3582795b3" }, - "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, + "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, + "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, - "trouble.nvim": { "branch": "main", "commit": "57761ba7148164f0315ed203e714ac242329abd4" }, + "trouble.nvim": { "branch": "main", "commit": "026e420bf9878ee97133f8fbf906261f3249b17a" }, "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, "workspaces.nvim": { "branch": "master", "commit": "5a25ce9f1db03c4cf9bd6dcbb00177a734020d74" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } -- 2.49.1 From 041d681f7a9e9cf4de8806664ee978b6625e305e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 12 Jul 2024 20:48:52 +0200 Subject: [PATCH 682/894] some oil options --- lua/plugins/oil.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 51ea973..e411833 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -1,6 +1,10 @@ return { 'stevearc/oil.nvim', opts = { + delete_to_trash = true, + default_file_explorer = true, + skip_confirm_for_simple_edits = true, + show_hidden = true, keymaps = { ['g?'] = 'actions.show_help', [''] = 'actions.select', -- 2.49.1 From 9becf1cfcb32c3fa94716a2e9a0d318094c17c71 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 14 Jul 2024 22:04:17 +0200 Subject: [PATCH 683/894] updated treesitter and rainbox --- lua/plugins/rainbow-delimiters.lua | 1 + lua/plugins/treesitter.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/rainbow-delimiters.lua b/lua/plugins/rainbow-delimiters.lua index 08b01d3..e4f8aa0 100644 --- a/lua/plugins/rainbow-delimiters.lua +++ b/lua/plugins/rainbow-delimiters.lua @@ -2,4 +2,5 @@ return { 'HiPhish/rainbow-delimiters.nvim', dependencies = 'nvim-treesitter/nvim-treesitter', event = 'VeryLazy', + version = false, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 10ab2b3..52892d5 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,6 +1,6 @@ return { 'nvim-treesitter/nvim-treesitter', - version = '*', + version = false, build = ':TSUpdate', config = function() require('nvim-treesitter.install').compilers = { 'clang' } -- 2.49.1 From 9dcaa0def9ef2348aaab69d0bc57563d936bb09e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 14 Jul 2024 22:27:07 +0200 Subject: [PATCH 684/894] update plugins --- lazy-lock.json | 25 ++++++++++++------------- lua/plugins/fzf-lua.lua | 1 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 91af874..0d0931c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,7 +2,7 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "astrotheme": { "branch": "main", "commit": "48b8cb48d5d9fad48324eec2a101a5fa2cac57f9" }, + "astrotheme": { "branch": "main", "commit": "d0ce733852166dc1e89e3e837666cb772962e2f6" }, "bamboo.nvim": { "branch": "master", "commit": "8d86d4b5dec2e35392d53a82602d4f2b12e3f014" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "clangd_extensions.nvim": { "branch": "main", "commit": "a8500531c4ed3a207e744a374ea038744a0f93eb" }, @@ -29,20 +29,20 @@ "everforest-nvim": { "branch": "main", "commit": "8fdccd1e45088be3309aaf82072b1f7fec2f6f2c" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" }, - "fzf-lua": { "branch": "main", "commit": "975534f4861e2575396716225c1202572645583d" }, - "gitsigns.nvim": { "branch": "main", "commit": "7178d1a430dcfff8a4c92d78b9e39e0297a779c0" }, + "fzf-lua": { "branch": "main", "commit": "3d214f8db4a4119723ab5148b7a333aab3fa9063" }, + "gitsigns.nvim": { "branch": "main", "commit": "e9c4187c3774a46df2d086a66cf3a7e6bea4c432" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, "kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, - "lazy.nvim": { "branch": "main", "commit": "f918318d21956b0874a65ab35ce3d94d9057aabf" }, - "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, + "lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" }, + "lazydev.nvim": { "branch": "main", "commit": "a33be921553ba478743206161380edacfc25d69b" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "markview.nvim": { "branch": "main", "commit": "b6e0fcb38d3593a898a1c66c5e245d68d28e9707" }, + "markview.nvim": { "branch": "main", "commit": "d1b1162544c40071895664eaba903bd663d63208" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, @@ -51,33 +51,32 @@ "monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, - "neotest": { "branch": "master", "commit": "0fe9186afac9b7874ba304fd28d6325d07e5e274" }, + "neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "neovim-ayu": { "branch": "master", "commit": "d64a8b7e8730095ff634e6586584e8543043e986" }, "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-cmp": { "branch": "main", "commit": "7e348da6e5085ac447144a2ef4b637220ba27209" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, "nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, "nvim-highlight-colors": { "branch": "main", "commit": "a8f6952cb1ff7bde864a34c502f1a42c360a6662" }, "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, + "nvim-lspconfig": { "branch": "master", "commit": "216deb2d1b5fbf24398919228208649bbf5cbadf" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, - "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, + "nvim-treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "oil.nvim": { "branch": "master", "commit": "ace46a41a1ea56d544a3775adf30490f2abd9235" }, "overseer.nvim": { "branch": "master", "commit": "8278265e7ffd3420b8246004140df12255a9737c" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "b29da4a6061a88270e875b38367d82c04c856128" }, "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, "trouble.nvim": { "branch": "main", "commit": "026e420bf9878ee97133f8fbf906261f3249b17a" }, - "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, + "which-key.nvim": { "branch": "main", "commit": "4d5b8959fd2a4df065ff76ccb39019aaa70cb0dc" }, "workspaces.nvim": { "branch": "master", "commit": "5a25ce9f1db03c4cf9bd6dcbb00177a734020d74" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } \ No newline at end of file diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index b0fae48..0ff216d 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -1,6 +1,7 @@ return { 'ibhagwan/fzf-lua', dependencies = { 'nvim-tree/nvim-web-devicons' }, + version = false, config = function() local actions = require('fzf-lua.actions') require('fzf-lua').setup({ -- 2.49.1 From dd3e41ab6b1bf54613a1bbb2c1fa78f58135dd02 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Jul 2024 00:00:17 +0200 Subject: [PATCH 685/894] small cmp fix --- lua/plugins/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 80304fb..61908fd 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -159,7 +159,7 @@ return { formatting = { fields = { 'kind', 'abbr' }, format = function(entry, vim_item) - local kind = require('lspkind').cmp_format({ + local kind = lspkind.cmp_format({ mode = 'symbol', symbol_map = { Codeium = '' }, maxwidth = 50, -- 2.49.1 From 8de05c209ea8a0f348baa9aced71d79f9db33c69 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Jul 2024 09:54:18 +0200 Subject: [PATCH 686/894] markview settings --- lua/plugins/markview.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua index f9d3979..446b443 100644 --- a/lua/plugins/markview.lua +++ b/lua/plugins/markview.lua @@ -1,7 +1,11 @@ return { - "OXY2DEV/markview.nvim", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons" - }, + 'OXY2DEV/markview.nvim', + version = false, + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-tree/nvim-web-devicons', + }, + opts = { + buf_ignore = {}, + }, } -- 2.49.1 From a404864548d418952cfe5357587bad2f0100e65a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 17 Jul 2024 06:43:26 +0000 Subject: [PATCH 687/894] replaced markview with markdown --- lazy-lock.json | 1 + lua/plugins/markdown.lua | 10 ++++++++++ lua/plugins/markview.lua | 11 ----------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 lua/plugins/markdown.lua delete mode 100644 lua/plugins/markview.lua diff --git a/lazy-lock.json b/lazy-lock.json index 0d0931c..310e1bc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -72,6 +72,7 @@ "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "b29da4a6061a88270e875b38367d82c04c856128" }, + "render-markdown": { "branch": "main", "commit": "3578523f497a8ad3b4a356d1e54e609838ce0922" }, "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua new file mode 100644 index 0000000..90adcc5 --- /dev/null +++ b/lua/plugins/markdown.lua @@ -0,0 +1,10 @@ +return { + 'MeanderingProgrammer/markdown.nvim', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-tree/nvim-web-devicons', + }, -- if you prefer nvim-web-devicons + config = function() + require('render-markdown').setup({}) + end, +} diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua deleted file mode 100644 index 446b443..0000000 --- a/lua/plugins/markview.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'OXY2DEV/markview.nvim', - version = false, - dependencies = { - 'nvim-treesitter/nvim-treesitter', - 'nvim-tree/nvim-web-devicons', - }, - opts = { - buf_ignore = {}, - }, -} -- 2.49.1 From 0e0308a42d3d7cb325cc81e19b2b78e7bd99411e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 25 Jul 2024 08:48:11 +0200 Subject: [PATCH 688/894] added copilot --- lua/plugins/cmp.lua | 4 +++- lua/plugins/copilot.lua | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/copilot.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 61908fd..b70208d 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -21,6 +21,7 @@ return { { 'hrsh7th/cmp-nvim-lsp-signature-help' }, { 'chrisgrieser/cmp_yanky' }, { 'p00f/clangd_extensions.nvim' }, + { 'zbirenbaum/copilot-cmp' }, { 'windwp/nvim-autopairs', config = true, @@ -93,6 +94,7 @@ return { end, }, sources = { + { name = "copilot", group_index = 2 }, { name = 'codeium' }, { name = 'luasnip', priority = 8 }, { @@ -161,7 +163,7 @@ return { format = function(entry, vim_item) local kind = lspkind.cmp_format({ mode = 'symbol', - symbol_map = { Codeium = '' }, + symbol_map = { Codeium = '', Copilot = "", }, maxwidth = 50, })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua new file mode 100644 index 0000000..a54862d --- /dev/null +++ b/lua/plugins/copilot.lua @@ -0,0 +1,24 @@ +return { + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup({ + filetypes = { + yaml = false, + markdown = false, + help = false, + gitcommit = false, + gitrebase = false, + hgcommit = false, + svn = false, + cvs = false, + cpp = true, + ['.'] = false, + }, + suggestion = { enabled = false }, + panel = { enabled = false }, + }) + end, +} + -- 2.49.1 From ed34613fe53c19ed9c63c64f204054a842a91115 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 23 Sep 2024 09:07:56 +0200 Subject: [PATCH 689/894] fixed copilot --- lua/plugins/cmp.lua | 8 ++++++-- lua/plugins/copilot.lua | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index b70208d..f3081e0 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -94,7 +94,7 @@ return { end, }, sources = { - { name = "copilot", group_index = 2 }, + { name = 'copilot', priority = 9 }, { name = 'codeium' }, { name = 'luasnip', priority = 8 }, { @@ -163,7 +163,10 @@ return { format = function(entry, vim_item) local kind = lspkind.cmp_format({ mode = 'symbol', - symbol_map = { Codeium = '', Copilot = "", }, + symbol_map = { + Codeium = '', + Copilot = '', + }, maxwidth = 50, })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) @@ -173,6 +176,7 @@ return { }, -- experimental = { native_menu = true } }) + vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"}) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ '/', '?' }, { diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index a54862d..5e14ba1 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -16,9 +16,10 @@ return { cpp = true, ['.'] = false, }, - suggestion = { enabled = false }, + suggestion = { enabled = false, auto_trigger = false }, panel = { enabled = false }, }) end, + require("copilot_cmp").setup() } -- 2.49.1 From 2cc3afb6eeee50cd1fd63fa0dcdc83f83d474766 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 21:35:22 +0200 Subject: [PATCH 690/894] added dap repl highlights --- lua/plugins/dap.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index b2b263d..eb227e4 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -10,6 +10,7 @@ return { }, }, 'rcarriga/cmp-dap', + 'LiadOz/nvim-dap-repl-highlights', }, keys = { { @@ -90,7 +91,7 @@ return { end, }) - require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json + require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json local pythonVenv = require('utils.python_venv') @@ -221,6 +222,7 @@ return { -- EXTENSIONS + require('nvim-dap-repl-highlights').setup() require('nvim-dap-virtual-text').setup({}) end, } -- 2.49.1 From 117c8650178d02a632f90acd147a49fa09745834 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 21:35:39 +0200 Subject: [PATCH 691/894] added iron --- lua/plugins/iron.lua | 63 +++++++++++++++++++++++++++++++++++++++ lua/plugins/lspconfig.lua | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/iron.lua diff --git a/lua/plugins/iron.lua b/lua/plugins/iron.lua new file mode 100644 index 0000000..3dfa469 --- /dev/null +++ b/lua/plugins/iron.lua @@ -0,0 +1,63 @@ +return { + 'Vigemus/iron.nvim', + branch = 'master', + config = function() + local iron = require('iron.core') + + iron.setup({ + config = { + -- Whether a repl should be discarded or not + scratch_repl = true, + -- Your repl definitions come here + repl_definition = { + sh = { + -- Can be a table or a function that + -- returns a table (see below) + command = { 'zsh' }, + }, + python = { + command = { 'python3' }, -- or { "ipython", "--no-autoindent" } + format = require('iron.fts.common').bracketed_paste_python, + }, + }, + -- How the repl window will be displayed + -- See below for more information + repl_open_cmd = require('iron.view').split.vertical("50%") + }, + -- Iron doesn't set keymaps by default anymore. + -- You can set them here or manually add keymaps to the functions in iron.core + keymaps = { + send_motion = 'sc', + visual_send = 'sc', + send_file = 'sf', + send_line = 'sl', + send_paragraph = 'sp', + send_until_cursor = 'su', + send_mark = 'sm', + mark_motion = 'mc', + mark_visual = 'mc', + remove_mark = 'md', + cr = 's', + interrupt = 's', + exit = 'sq', + clear = 'cl', + }, + -- If the highlight is on, you can change how it looks + -- For the available options, check nvim_set_hl + highlight = { + italic = true, + }, + ignore_blank_lines = true, -- ignore blank lines when sending visual select lines + }) + + -- iron also has a list of commands, see :h iron-commands for all available commands + end, + cmd = { + 'IronRepl', + 'IronRestart', + 'IronFocus', + 'IronHide', + 'IronRepl', + 'IronReplHere', + }, +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index d1b0c09..a6d549b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -19,7 +19,7 @@ local lspKeys = function(client, bufnr) vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 's', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'w', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- 2.49.1 From a06663a6824ec36d1e9e2ad18103ec28859d76c4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 21:35:50 +0200 Subject: [PATCH 692/894] update on clang tidu --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index 9d00300..39dc07a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -5,6 +5,7 @@ Checks: 'readability-*, clang-analyzer-core.*, clang-analyzer-core.StackAddressEscape, bugprone-assert-side-effect, + bugprone-assignment-in-if-condition, bugprone-branch-clone, bugprone-copy-constructor-init, bugprone-exception-escape, -- 2.49.1 From 470eee2e4e3cfd1a9247c100af74ec4c0f507c2c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 21:50:28 +0200 Subject: [PATCH 693/894] update dap event --- lua/plugins/dap.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index eb227e4..d0594f2 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -119,14 +119,17 @@ return { local dapui = require('dapui') dapui.setup() - dap.listeners.after.event_initialized['dapui_config'] = function() - dapui.open({}) + dap.listeners.before.attach.dapui_config = function() + dapui.open() end - dap.listeners.before.event_terminated['dapui_config'] = function() - dapui.close({}) + dap.listeners.before.launch.dapui_config = function() + dapui.open() end - dap.listeners.before.event_exited['dapui_config'] = function() - dapui.close({}) + dap.listeners.before.event_terminated.dapui_config = function() + dapui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + dapui.close() end dap.configurations.python = { -- 2.49.1 From 5ed8c43e8e87e9e415fb0600a999b015d292f97a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 22:12:18 +0200 Subject: [PATCH 694/894] hover for dap --- lua/plugins/dap.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index d0594f2..b7eebf7 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -91,6 +91,29 @@ return { end, }) + -- Hover with K + local api = vim.api + local keymap_restore = {} + dap.listeners.after['event_initialized']['me'] = function() + for _, buf in pairs(api.nvim_list_bufs()) do + local keymaps = api.nvim_buf_get_keymap(buf, 'n') + for _, keymap in pairs(keymaps) do + if keymap.lhs == 'K' then + table.insert(keymap_restore, keymap) + api.nvim_buf_del_keymap(buf, 'n', 'K') + end + end + end + api.nvim_set_keymap('n', 'K', 'lua require("dap.ui.widgets").hover()', { silent = true }) + end + + dap.listeners.after['event_terminated']['me'] = function() + for _, keymap in pairs(keymap_restore) do + api.nvim_buf_set_keymap(keymap.buffer, keymap.mode, keymap.lhs, keymap.rhs, { silent = keymap.silent == 1 }) + end + keymap_restore = {} + end + require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json local pythonVenv = require('utils.python_venv') -- 2.49.1 From 30005980eaed987607bc9f3b1849caf5d028479c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 18 Oct 2024 22:12:24 +0200 Subject: [PATCH 695/894] updated plugins --- lazy-lock.json | 96 ++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 310e1bc..e693034 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,11 +2,11 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "astrotheme": { "branch": "main", "commit": "d0ce733852166dc1e89e3e837666cb772962e2f6" }, - "bamboo.nvim": { "branch": "master", "commit": "8d86d4b5dec2e35392d53a82602d4f2b12e3f014" }, - "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "a8500531c4ed3a207e744a374ea038744a0f93eb" }, - "cmake-tools.nvim": { "branch": "master", "commit": "4be3c229fe932043fd83ad52fdf0ba9af7297789" }, + "astrotheme": { "branch": "main", "commit": "b1405cc96823d5f6cdd5a2f7ebeb137183220840" }, + "bamboo.nvim": { "branch": "master", "commit": "7e5bcd10ae1f1f7cd315fa88049ea21babe11815" }, + "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, + "cmake-tools.nvim": { "branch": "master", "commit": "f1f917b584127b673c25138233cebf1d61a19f35" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, @@ -21,63 +21,65 @@ "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "cmp_yanky": { "branch": "main", "commit": "c3d089186ccead26eba01023502f3eeadd7a92d2" }, - "codeium.nvim": { "branch": "main", "commit": "f6a2ef32a9e923cb0104a19d3e426b0e40e49505" }, + "cmp_yanky": { "branch": "main", "commit": "38c3cc53f6d0ae748a8f737a2ee20cea39fd93da" }, + "codeium.nvim": { "branch": "main", "commit": "ca38490ef963b066d6f686146d73213c70ef7f6b" }, + "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, + "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, - "everforest-nvim": { "branch": "main", "commit": "8fdccd1e45088be3309aaf82072b1f7fec2f6f2c" }, + "everforest-nvim": { "branch": "main", "commit": "7c57941d5ef5a150f307b9295c00a59e95d78587" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, - "friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" }, - "fzf-lua": { "branch": "main", "commit": "3d214f8db4a4119723ab5148b7a333aab3fa9063" }, - "gitsigns.nvim": { "branch": "main", "commit": "e9c4187c3774a46df2d086a66cf3a7e6bea4c432" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "fzf-lua": { "branch": "main", "commit": "5dec364c9dedec00dcd6d06e323d7bc7f8d6b596" }, + "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, - "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, - "kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, - "lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" }, - "lazydev.nvim": { "branch": "main", "commit": "a33be921553ba478743206161380edacfc25d69b" }, - "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, + "iron.nvim": { "branch": "master", "commit": "e6b78ec1bc56eab63b3a9112d348b3d79836b672" }, + "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lspkind-nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, - "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "markview.nvim": { "branch": "main", "commit": "d1b1162544c40071895664eaba903bd663d63208" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, + "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, - "mini.ai": { "branch": "main", "commit": "a7e90f110e6274262616311b93cef12cd2667a2d" }, - "mini.surround": { "branch": "main", "commit": "3cb5b509ad34f2402df4b977be607a614c8c7524" }, - "monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" }, - "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.ai": { "branch": "main", "commit": "40e380a589d07ec2c856940c6422aafe5d949a0d" }, + "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, + "monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" }, + "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, - "neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" }, - "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, - "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, - "nvim-cmp": { "branch": "main", "commit": "7e348da6e5085ac447144a2ef4b637220ba27209" }, + "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, + "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, - "nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" }, + "nvim-dap-python": { "branch": "master", "commit": "03fe9592409236b9121c03b66a682dfca15a5cac" }, + "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, - "nvim-highlight-colors": { "branch": "main", "commit": "a8f6952cb1ff7bde864a34c502f1a42c360a6662" }, - "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "216deb2d1b5fbf24398919228208649bbf5cbadf" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "52638640ae309cacdaff785fdbb854437bd1ee5c" }, + "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, + "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, + "nvim-lspconfig": { "branch": "master", "commit": "b55b9659de9ac17e05df4787bb023e4c7ef45329" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, - "nvim-treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" }, + "nvim-treesitter": { "branch": "master", "commit": "68b2bdd99d889e9705f7e90ae64d990f3ff03cf3" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "ace46a41a1ea56d544a3775adf30490f2abd9235" }, + "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" }, "overseer.nvim": { "branch": "master", "commit": "8278265e7ffd3420b8246004140df12255a9737c" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "b3840660f379e125cac508d3d2d77cc47b3d5131" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "b29da4a6061a88270e875b38367d82c04c856128" }, - "render-markdown": { "branch": "main", "commit": "3578523f497a8ad3b4a356d1e54e609838ce0922" }, - "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, - "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, - "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, - "trouble.nvim": { "branch": "main", "commit": "026e420bf9878ee97133f8fbf906261f3249b17a" }, - "which-key.nvim": { "branch": "main", "commit": "4d5b8959fd2a4df065ff76ccb39019aaa70cb0dc" }, - "workspaces.nvim": { "branch": "master", "commit": "5a25ce9f1db03c4cf9bd6dcbb00177a734020d74" }, + "pretty_hover": { "branch": "master", "commit": "eda7ba0eb6095cebda95ebd2db7196693f47ace3" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, + "rustaceanvim": { "branch": "master", "commit": "6eb1c41463a0ad02a4fe799321cc7f651b87e576" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, + "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, + "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } -} \ No newline at end of file +} -- 2.49.1 From 1783d82fe2791bd040ffb76076c132ba68886f72 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 12 Nov 2024 12:48:31 +0000 Subject: [PATCH 696/894] use the ruff lsp server instead of efm --- lua/plugins/lsp/server.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 2f3bd25..abcfaec 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -8,14 +8,10 @@ local efm_setup = function(lspconfig, capabilities, on_attach) local isort = require('efmls-configs.formatters.isort') local cmake_lint = require('efmls-configs.linters.cmake_lint') local flake8 = require('efmls-configs.linters.flake8') - local ruff_linter = require("efmls-configs.linters.ruff") - local ruff_format = require("efmls-configs.formatters.ruff") - local ruff_sort = require("efmls-configs.formatters.ruff_sort") local languages = { lua = { stylua }, markdown = { prettier }, cmake = { gersemi, cmake_lint }, - python = { ruff_linter, ruff_format, ruff_sort}, } local efmls_config = { @@ -51,6 +47,11 @@ M.setup_server = function(lspconfig, capabilities, on_attach) }, }) + lspconfig['ruff'].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + lspconfig['groovyls'].setup({ capabilities = capabilities, on_attach = on_attach, -- 2.49.1 From 3836f866d66c23a352def081197ca27ec30ba4eb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 15 Nov 2024 07:53:59 +0000 Subject: [PATCH 697/894] show hidden files in oil --- lua/plugins/oil.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index e411833..93bfffe 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -4,7 +4,10 @@ return { delete_to_trash = true, default_file_explorer = true, skip_confirm_for_simple_edits = true, - show_hidden = true, + view_options = { + -- Show files and directories that start with "." + show_hidden = true, + }, keymaps = { ['g?'] = 'actions.show_help', [''] = 'actions.select', -- 2.49.1 From faf9573534b6cdab2b72b4a14a0b8906ae74c2e4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 06:57:20 +0000 Subject: [PATCH 698/894] use main branch for efmls configs --- lua/plugins/lspconfig.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a6d549b..a9d650d 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -108,7 +108,10 @@ return { 'williamboman/mason.nvim', 'p00f/clangd_extensions.nvim', 'Fildo7525/pretty_hover', - 'creativenull/efmls-configs-nvim', + { + 'creativenull/efmls-configs-nvim', + branch = 'main' + }, 'SmiteshP/nvim-navic', }, version = nil, -- 2.49.1 From 000a7051f1f773bd2ef667ed4d9907caf4cddd77 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 07:22:31 +0000 Subject: [PATCH 699/894] added snacks --- lua/plugins/snacks.lua | 40 ++++++++++++++++++++++++++++++++++++++ lua/plugins/toggleterm.lua | 9 --------- 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 lua/plugins/snacks.lua diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua new file mode 100644 index 0000000..e840363 --- /dev/null +++ b/lua/plugins/snacks.lua @@ -0,0 +1,40 @@ +return { + 'folke/snacks.nvim', + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + bigfile = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + dashboard = { enabled = true }, + }, + keys = { + { + 'g', + function() + Snacks.lazygit() + end, + desc = 'Lazygit', + }, + { + 'gf', + function() + Snacks.lazygit.log_file() + end, + desc = 'Lazygit Current File History', + }, + { + 'gl', + function() + Snacks.lazygit.log() + end, + desc = 'Lazygit Log (cwd)', + }, + }, +} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index dd1d3e0..3f38743 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -42,14 +42,5 @@ return { lazygit:open() end end, - keys = { - { - 'g', - function() - _lazygit_toggle() - end, - desc = 'LazyGit', - }, - }, cmd = 'ToggleTerm', } -- 2.49.1 From ea7760b0ffce7ebd6ca612caa68f5166fa30cb4b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 08:02:17 +0000 Subject: [PATCH 700/894] map return and shift return to jump lsp definitions --- lua/plugins/lspconfig.lua | 11 ----------- lua/plugins/snacks.lua | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a9d650d..afcb45b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -85,17 +85,6 @@ local on_attach = function(client, bufnr) lspKeys(client, bufnr) - if client.server_capabilities.documentHighlightProvider then - vim.keymap.set( - 'n', - '', - function () - vim.lsp.buf.clear_references() - vim.lsp.buf.document_highlight() - end, - vim.tbl_extend('error', { noremap = true, silent = false, buffer = bufnr }, { desc = 'Document highlight' }) - ) - end if client.server_capabilities.documentSymbolProvider then local navic = require('nvim-navic') navic.attach(client, bufnr) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index e840363..c7a1b69 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -36,5 +36,21 @@ return { end, desc = 'Lazygit Log (cwd)', }, + { + '', + function() + Snacks.words.jump(vim.v.count1) + end, + desc = 'Next Reference', + mode = { 'n' }, + }, + { + '', + function() + Snacks.words.jump(-vim.v.count1) + end, + desc = 'Prev Reference', + mode = { 'n' }, + }, }, } -- 2.49.1 From f45d6ebb139fd106876c0ec14d21f9d2a22eacf4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 08:11:53 +0000 Subject: [PATCH 701/894] added mini sessions --- lua/plugins/mini-sessions.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lua/plugins/mini-sessions.lua diff --git a/lua/plugins/mini-sessions.lua b/lua/plugins/mini-sessions.lua new file mode 100644 index 0000000..58f72b2 --- /dev/null +++ b/lua/plugins/mini-sessions.lua @@ -0,0 +1,7 @@ +return { + 'echasnovski/mini.sessions', + version = '*', + config = function() + require('mini.sessions').setup() + end, +} -- 2.49.1 From bdee2b0401c85dd40c93c1f2ee00377b877d6ac5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 08:12:05 +0000 Subject: [PATCH 702/894] configured dashboard --- lua/plugins/snacks.lua | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index c7a1b69..2fc4e41 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -12,7 +12,34 @@ return { quickfile = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, - dashboard = { enabled = true }, + dashboard = { + sections = { + { section = 'header' }, + { + pane = 2, + section = 'terminal', + cmd = 'colorscript -e square', + height = 5, + padding = 1, + }, + { section = 'keys', gap = 1, padding = 1 }, + { pane = 2, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, + { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, + { + pane = 2, + icon = ' ', + title = 'Git Status', + section = 'terminal', + enabled = vim.fn.isdirectory('.git') == 1, + cmd = 'hub status --short --branch --renames', + height = 5, + padding = 1, + ttl = 5 * 60, + indent = 3, + }, + { section = 'startup' }, + }, + }, }, keys = { { @@ -42,7 +69,7 @@ return { Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', - mode = { 'n' }, + mode = { 'n' }, }, { '', -- 2.49.1 From 71b603512c3a37958ef12b6bff4cc8cb4f0ddc88 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 19:28:29 +0000 Subject: [PATCH 703/894] remove terminal from dashboard --- lua/plugins/snacks.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 2fc4e41..93f2d56 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -15,13 +15,6 @@ return { dashboard = { sections = { { section = 'header' }, - { - pane = 2, - section = 'terminal', - cmd = 'colorscript -e square', - height = 5, - padding = 1, - }, { section = 'keys', gap = 1, padding = 1 }, { pane = 2, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, -- 2.49.1 From c6a6997667ff5f305d5b2e9a0e4a7f5d3ca2b654 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 19:28:46 +0000 Subject: [PATCH 704/894] snacks to dev version --- lua/plugins/snacks.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 93f2d56..d39e7fe 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -1,6 +1,7 @@ return { 'folke/snacks.nvim', priority = 1000, + version = false, lazy = false, ---@type snacks.Config opts = { -- 2.49.1 From 7726b043d16e0dbff1549829111109980c129c40 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 19 Nov 2024 19:29:01 +0000 Subject: [PATCH 705/894] new keybindings for snack words --- lua/plugins/snacks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index d39e7fe..990c9d3 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -58,7 +58,7 @@ return { desc = 'Lazygit Log (cwd)', }, { - '', + 'm', function() Snacks.words.jump(vim.v.count1) end, @@ -66,7 +66,7 @@ return { mode = { 'n' }, }, { - '', + '', function() Snacks.words.jump(-vim.v.count1) end, -- 2.49.1 From 1c0e7f6d14118510b1937ee5217e4cfbaff6aec8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Nov 2024 13:08:50 +0000 Subject: [PATCH 706/894] disable notifier from snacks --- lua/plugins/snacks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 990c9d3..72d3f60 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -9,7 +9,7 @@ return { -- or leave it empty to use the default settings -- refer to the configuration section below bigfile = { enabled = true }, - notifier = { enabled = true }, + notifier = { enabled = false }, quickfile = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, -- 2.49.1 From 18c0f0063a7274c0c56520f58721b357229c0faf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 20 Nov 2024 13:09:02 +0000 Subject: [PATCH 707/894] reworked the dashboard --- lua/plugins/snacks.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 72d3f60..15fc112 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -17,16 +17,17 @@ return { sections = { { section = 'header' }, { section = 'keys', gap = 1, padding = 1 }, - { pane = 2, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, + { title = 'Sessions', padding = 1 }, + { pane = 1, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Git Status', section = 'terminal', - enabled = vim.fn.isdirectory('.git') == 1, - cmd = 'hub status --short --branch --renames', - height = 5, + cmd = 'output=$(CLICOLOR=1 GH_FORCE_TTY=1 gh pr status 2>&1) && echo -e "$output" || true', + height = 30, + width = 80, padding = 1, ttl = 5 * 60, indent = 3, -- 2.49.1 From 45f399847409e9f85e0d39854b512832ff43c19c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 2 Dec 2024 23:41:16 +0100 Subject: [PATCH 708/894] use newest version from dap plugins --- lua/plugins/dap.lua | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index b7eebf7..1964eda 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -1,16 +1,27 @@ return { 'mfussenegger/nvim-dap', + version = false, dependencies = { - 'mfussenegger/nvim-dap-python', - 'theHamsta/nvim-dap-virtual-text', + { + 'mfussenegger/nvim-dap-python', + version = false, + }, + -- 'theHamsta/nvim-dap-virtual-text', { 'rcarriga/nvim-dap-ui', + version = false, dependencies = { 'nvim-neotest/nvim-nio', }, }, - 'rcarriga/cmp-dap', - 'LiadOz/nvim-dap-repl-highlights', + { + 'rcarriga/cmp-dap', + version = false, + }, + { + 'LiadOz/nvim-dap-repl-highlights', + version = false, + }, }, keys = { { -- 2.49.1 From d13360cad699cf795616611df4f7014674971906 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 12 Dec 2024 14:37:23 +0100 Subject: [PATCH 709/894] added codecompanion --- lua/plugins/codecompanion.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/plugins/codecompanion.lua diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua new file mode 100644 index 0000000..599f26e --- /dev/null +++ b/lua/plugins/codecompanion.lua @@ -0,0 +1,30 @@ +return { + "olimorris/codecompanion.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + branch = "main", + config = function() + require("codecompanion").setup({ + strategies = { + chat = { + adapter = "copilot", + }, + inline = { + adapter = "copilot", + }, + }, + -- adapters = { + -- anthropic = function() + -- return require("codecompanion.adapters").extend("copilot", { + -- env = { + -- api_key = "ghu_8hbMItSdtNIrzMI4svd94dem3ZCsk23VG446", + -- }, + -- }) + -- end, + -- }, + }) + end, +} + -- 2.49.1 From bf5afab3abfe516be6ea7ea9ce55017f6496cb4e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 13 Dec 2024 08:04:08 +0100 Subject: [PATCH 710/894] fixed cmp call from copilot --- lua/plugins/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 5e14ba1..818c0fd 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -19,7 +19,7 @@ return { suggestion = { enabled = false, auto_trigger = false }, panel = { enabled = false }, }) + require("copilot_cmp").setup() end, - require("copilot_cmp").setup() } -- 2.49.1 From 18a711ec5643eff52a1fc3adacab3bb4c76d9673 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:13:04 +0100 Subject: [PATCH 711/894] disable stylua because it is supported by lsp --- lua/plugins/lsp/server.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index abcfaec..02a3045 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -2,14 +2,12 @@ local M = {} local efm_setup = function(lspconfig, capabilities, on_attach) local prettier = require('efmls-configs.formatters.prettier') - local stylua = require('efmls-configs.formatters.stylua') local gersemi = require('efmls-configs.formatters.gersemi') local black = require('efmls-configs.formatters.black') local isort = require('efmls-configs.formatters.isort') local cmake_lint = require('efmls-configs.linters.cmake_lint') local flake8 = require('efmls-configs.linters.flake8') local languages = { - lua = { stylua }, markdown = { prettier }, cmake = { gersemi, cmake_lint }, } -- 2.49.1 From 2a72ba7b33ac9eb31a0ac09daec1e0d7f475a0fb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:37:20 +0100 Subject: [PATCH 712/894] fixed floating window color --- lua/themes/bamboo.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index fa14d19..da8fa46 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -6,7 +6,6 @@ return { local colors = require('bamboo.palette') require('bamboo').setup({ dim_inactive = false, -- Dim inactive windows/buffers - cmp_itemkind_reverse = true, lualine = { transparent = false, -- lualine center bar transparency }, @@ -32,6 +31,9 @@ return { ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['Delimiter'] = { fg = colors.vulgaris.fg }, + ['NormalFloat'] = { bg = colors.vulgaris.bg3 }, + ['FloatNormal'] = { bg = colors.vulgaris.bg3 }, + ['PmenuSel'] = { bg = colors.vulgaris.bg1 }, }, }) require('bamboo').load() -- 2.49.1 From 24bb5db0fff5358959ef07677e43477e816b156e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:40:59 +0100 Subject: [PATCH 713/894] added blink, but still disabled --- lua/plugins/blink.lua | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lua/plugins/blink.lua diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua new file mode 100644 index 0000000..c00964d --- /dev/null +++ b/lua/plugins/blink.lua @@ -0,0 +1,70 @@ +return { + 'saghen/blink.cmp', + lazy = false, -- lazy loading handled internally + -- optional: provides snippets for the snippet source + dependencies = 'rafamadriz/friendly-snippets', + + -- use a release tag to download pre-built binaries + version = 'v0.*', + -- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', + + opts = { + -- 'default' for mappings similar to built-in completion + -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate) + -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept + -- see the "default configuration" section below for full documentation on how to define + -- your own keymap. + keymap = { preset = 'enter' }, + + appearance = { + -- Sets the fallback highlight groups to nvim-cmp's highlight groups + -- Useful for when your theme doesn't support blink.cmp + -- will be removed in a future release + use_nvim_cmp_as_default = true, + -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = 'mono', + }, + + -- default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, via `opts_extend` + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, + -- optionally disable cmdline completions + -- cmdline = {}, + }, + + completion = { + list = { + selection = 'auto_insert', + }, + menu = { + max_height = 25, + draw = { + padding = 1, + gap = 1, + -- treesitter = { "lsp" }, + -- columns = { + -- { "kind_icon", width = { fill = true } }, + -- { "label", "label_description", gap = 1, highlight = "BlinkCmpLabelDescription" }, + -- }, + }, + }, + documentation = { + auto_show = true, + auto_show_delay = 300, + }, + signature = { enabled = true } + }, + + -- experimental signature help support + -- signature = { enabled = true } + }, + -- allows extending the providers array elsewhere in your config + -- without having to redefine it + opts_extend = { 'sources.default' }, + enabled = false +} -- 2.49.1 From 787ec2764fcdcdb8c69384a954de525282a1993e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:53:34 +0100 Subject: [PATCH 714/894] added comment blink lsp capas --- lua/plugins/lspconfig.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index afcb45b..e6b620d 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -110,6 +110,9 @@ return { require('nvim-navic').setup({}) local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) capabilities.workspace = { didChangeWatchedFiles = { dynamicRegistration = true, -- 2.49.1 From eb27bfb343d4f7991ea33b391a7823afa2bd7bdc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:53:44 +0100 Subject: [PATCH 715/894] format lspconfig --- lua/plugins/lspconfig.lua | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index e6b620d..4dce675 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -3,7 +3,8 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, + vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'd', function() fzf.lsp_definitions({ jump_to_single_result = true }) end, vim.tbl_extend('error', options, { desc = 'Definition' })) @@ -11,18 +12,26 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, + vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, + vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, + vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, + vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 'w', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 'w', fzf.lsp_live_workspace_symbols, + vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) + vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', + vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then @@ -109,7 +118,6 @@ return { local lspconfig = require('lspconfig') require('nvim-navic').setup({}) - local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) @@ -128,9 +136,9 @@ return { } local signs = { { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, + { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, + { name = 'DiagnosticSignHint', text = diagnostics.Hint }, + { name = 'DiagnosticSignInfo', text = diagnostics.Information }, } for _, sign in ipairs(signs) do -- 2.49.1 From dc4e43aec4f5c671debb214b31bb90c8e048390a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 17 Dec 2024 13:55:24 +0100 Subject: [PATCH 716/894] removed tabs --- lua/plugins/blink.lua | 6 ++-- lua/plugins/codecompanion.lua | 55 +++++++++++++++++------------------ 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index c00964d..a917844 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -46,10 +46,10 @@ return { draw = { padding = 1, gap = 1, - -- treesitter = { "lsp" }, + -- treesitter = { 'lsp' }, -- columns = { - -- { "kind_icon", width = { fill = true } }, - -- { "label", "label_description", gap = 1, highlight = "BlinkCmpLabelDescription" }, + -- { 'kind_icon', width = { fill = true } }, + -- { 'label', 'label_description', gap = 1, highlight = 'BlinkCmpLabelDescription' }, -- }, }, }, diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index 599f26e..db82774 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -1,30 +1,29 @@ return { - "olimorris/codecompanion.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - branch = "main", - config = function() - require("codecompanion").setup({ - strategies = { - chat = { - adapter = "copilot", - }, - inline = { - adapter = "copilot", - }, - }, - -- adapters = { - -- anthropic = function() - -- return require("codecompanion.adapters").extend("copilot", { - -- env = { - -- api_key = "ghu_8hbMItSdtNIrzMI4svd94dem3ZCsk23VG446", - -- }, - -- }) - -- end, - -- }, - }) - end, + 'olimorris/codecompanion.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + branch = 'main', + config = function() + require('codecompanion').setup({ + strategies = { + chat = { + adapter = 'copilot', + }, + inline = { + adapter = 'copilot', + }, + }, + -- adapters = { + -- anthropic = function() + -- return require('codecompanion.adapters').extend('copilot', { + -- env = { + -- api_key = 'ghu_8hbMItSdtNIrzMI4svd94dem3ZCsk23VG446', + -- }, + -- }) + -- end, + -- }, + }) + end, } - -- 2.49.1 From c94599346a6b0a95a98dd79e2832c503fb502b4d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 21 Dec 2024 00:30:11 +0100 Subject: [PATCH 717/894] switch to blink --- lua/plugins/blink.lua | 37 ++++++++++++++++++++++++++++++------- lua/plugins/cmp.lua | 1 + lua/plugins/codium.lua | 2 +- lua/plugins/copilot.lua | 1 - lua/plugins/lspconfig.lua | 4 ++-- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index a917844..7061fc4 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -2,7 +2,19 @@ return { 'saghen/blink.cmp', lazy = false, -- lazy loading handled internally -- optional: provides snippets for the snippet source - dependencies = 'rafamadriz/friendly-snippets', + dependencies = { + 'rafamadriz/friendly-snippets', + 'giuxtaposition/blink-cmp-copilot', + { + 'saghen/blink.compat', + -- use the latest release, via version = '*', if you also use the latest release for blink.cmp + version = '*', + -- lazy.nvim will automatically load the plugin when it's required by blink.cmp + lazy = true, + -- make sure to set opts so that lazy.nvim calls blink.compat's setup + opts = {}, + }, + }, -- use a release tag to download pre-built binaries version = 'v0.*', @@ -32,14 +44,26 @@ return { -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { - default = { 'lsp', 'path', 'snippets', 'buffer' }, + default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot', 'codeium' }, -- optionally disable cmdline completions -- cmdline = {}, + providers = { + copilot = { + name = 'copilot', + module = 'blink-cmp-copilot', + score_offset = 100, + async = true, + }, + codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 + name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp + module = 'blink.compat.source', + }, + }, }, completion = { list = { - selection = 'auto_insert', + selection = 'manual', }, menu = { max_height = 25, @@ -55,16 +79,15 @@ return { }, documentation = { auto_show = true, - auto_show_delay = 300, + auto_show_delay_ms = 300, }, - signature = { enabled = true } }, -- experimental signature help support - -- signature = { enabled = true } + signature = { enabled = true } }, -- allows extending the providers array elsewhere in your config -- without having to redefine it opts_extend = { 'sources.default' }, - enabled = false + enabled = true } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index f3081e0..450aae5 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -213,4 +213,5 @@ return { local cmp_autopairs = require('nvim-autopairs.completion.cmp') cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) end, + enabled = false } diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua index 13ffd0a..79ab97c 100644 --- a/lua/plugins/codium.lua +++ b/lua/plugins/codium.lua @@ -2,9 +2,9 @@ return { 'Exafunction/codeium.nvim', requires = { 'nvim-lua/plenary.nvim', - 'hrsh7th/nvim-cmp', }, config = function() require('codeium').setup({}) end, + enabled = true } diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 818c0fd..f7ded21 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -19,7 +19,6 @@ return { suggestion = { enabled = false, auto_trigger = false }, panel = { enabled = false }, }) - require("copilot_cmp").setup() end, } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4dce675..cd68b92 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -119,8 +119,8 @@ return { require('nvim-navic').setup({}) local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) capabilities.workspace = { didChangeWatchedFiles = { dynamicRegistration = true, -- 2.49.1 From 72154419ebbb5ef357998742e2f3da8c155099be Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 21 Dec 2024 00:55:44 +0100 Subject: [PATCH 718/894] format blink file --- lua/plugins/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 7061fc4..528283c 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -54,7 +54,7 @@ return { score_offset = 100, async = true, }, - codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 + codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp module = 'blink.compat.source', }, -- 2.49.1 From af6a028aa5d2554e3dba2c79009bae3896f7b7e0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 21 Dec 2024 01:19:17 +0100 Subject: [PATCH 719/894] some blink adjustments --- lua/plugins/blink.lua | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 528283c..8b2e545 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -5,6 +5,7 @@ return { dependencies = { 'rafamadriz/friendly-snippets', 'giuxtaposition/blink-cmp-copilot', + 'L3MON4D3/LuaSnip', { 'saghen/blink.compat', -- use the latest release, via version = '*', if you also use the latest release for blink.cmp @@ -44,7 +45,7 @@ return { -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { - default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot', 'codeium' }, + default = { 'lsp', 'path', 'luasnip', 'buffer', 'copilot', 'codeium' }, -- optionally disable cmdline completions -- cmdline = {}, providers = { @@ -57,13 +58,14 @@ return { codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp module = 'blink.compat.source', + async = true }, }, }, completion = { list = { - selection = 'manual', + selection = 'auto_insert', }, menu = { max_height = 25, @@ -71,20 +73,29 @@ return { padding = 1, gap = 1, -- treesitter = { 'lsp' }, - -- columns = { - -- { 'kind_icon', width = { fill = true } }, - -- { 'label', 'label_description', gap = 1, highlight = 'BlinkCmpLabelDescription' }, - -- }, }, }, documentation = { auto_show = true, auto_show_delay_ms = 300, + window = { + border = 'padded' + } }, }, -- experimental signature help support - signature = { enabled = true } + signature = { enabled = true }, + snippets = { + expand = function(snippet) require('luasnip').lsp_expand(snippet) end, + active = function(filter) + if filter and filter.direction then + return require('luasnip').jumpable(filter.direction) + end + return require('luasnip').in_snippet() + end, + jump = function(direction) require('luasnip').jump(direction) end, + }, }, -- allows extending the providers array elsewhere in your config -- without having to redefine it -- 2.49.1 From 7b81bf1dd156ad554916a147fc92470cb6a7b7bf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 5 Jan 2025 13:01:22 +0100 Subject: [PATCH 720/894] better highlight for pmenu --- lua/themes/bamboo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index da8fa46..391c01c 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -33,7 +33,7 @@ return { ['Delimiter'] = { fg = colors.vulgaris.fg }, ['NormalFloat'] = { bg = colors.vulgaris.bg3 }, ['FloatNormal'] = { bg = colors.vulgaris.bg3 }, - ['PmenuSel'] = { bg = colors.vulgaris.bg1 }, + ['PmenuSel'] = { bg = colors.vulgaris.grey }, }, }) require('bamboo').load() -- 2.49.1 From ed7efcc18ec6e8885786bfaa7211c73ebf8ee329 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 5 Jan 2025 13:15:15 +0100 Subject: [PATCH 721/894] tuning of blink --- lazy-lock.json | 29 +++++++++-------------------- lua/plugins/blink.lua | 17 ++++++++++++++++- lua/plugins/lazydev.lua | 1 + 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index e693034..461a747 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,26 +4,16 @@ "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "astrotheme": { "branch": "main", "commit": "b1405cc96823d5f6cdd5a2f7ebeb137183220840" }, "bamboo.nvim": { "branch": "master", "commit": "7e5bcd10ae1f1f7cd315fa88049ea21babe11815" }, + "blink-cmp-copilot": { "branch": "main", "commit": "c5c5cbce5748d21073f1d5348a92ebe6ce63f387" }, + "blink.cmp": { "branch": "main", "commit": "e3b7cb4a1094377c3093a021300de123d9fc60d3" }, + "blink.compat": { "branch": "main", "commit": "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, "cmake-tools.nvim": { "branch": "master", "commit": "f1f917b584127b673c25138233cebf1d61a19f35" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, - "cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, - "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "cmp_yanky": { "branch": "main", "commit": "38c3cc53f6d0ae748a8f737a2ee20cea39fd93da" }, + "codecompanion.nvim": { "branch": "main", "commit": "c9e8ce9278d456cb413209ed363db602a0615673" }, "codeium.nvim": { "branch": "main", "commit": "ca38490ef963b066d6f686146d73213c70ef7f6b" }, - "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, + "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, @@ -37,9 +27,8 @@ "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, "iron.nvim": { "branch": "master", "commit": "e6b78ec1bc56eab63b3a9112d348b3d79836b672" }, "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, - "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, - "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, - "lspkind-nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, @@ -49,19 +38,18 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "40e380a589d07ec2c856940c6422aafe5d949a0d" }, + "mini.sessions": { "branch": "main", "commit": "62f2e3823f98673fcf1b79322cc06d8a1f453d30" }, "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, "monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" }, "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, "nvim-dap-python": { "branch": "master", "commit": "03fe9592409236b9121c03b66a682dfca15a5cac" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "52638640ae309cacdaff785fdbb854437bd1ee5c" }, "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, "nvim-lspconfig": { "branch": "master", "commit": "b55b9659de9ac17e05df4787bb023e4c7ef45329" }, @@ -76,6 +64,7 @@ "pretty_hover": { "branch": "master", "commit": "eda7ba0eb6095cebda95ebd2db7196693f47ace3" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, "rustaceanvim": { "branch": "master", "commit": "6eb1c41463a0ad02a4fe799321cc7f651b87e576" }, + "snacks.nvim": { "branch": "main", "commit": "d312053f78b4fb55523def179ac502438dd93193" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 8b2e545..896bf20 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -5,6 +5,7 @@ return { dependencies = { 'rafamadriz/friendly-snippets', 'giuxtaposition/blink-cmp-copilot', + 'folke/lazydev.nvim', 'L3MON4D3/LuaSnip', { 'saghen/blink.compat', @@ -45,9 +46,17 @@ return { -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { - default = { 'lsp', 'path', 'luasnip', 'buffer', 'copilot', 'codeium' }, + default = { 'copilot', 'lazydev', 'lsp', 'path', 'luasnip', 'buffer', 'codeium' }, -- optionally disable cmdline completions -- cmdline = {}, + cmdline = function() + local type = vim.fn.getcmdtype() + -- Search forward and backward + if type == '/' or type == '?' then return { 'buffer' } end + -- Commands + if type == ':' or type == '@' then return { 'cmdline', 'buffer' } end + return {} + end, providers = { copilot = { name = 'copilot', @@ -55,6 +64,12 @@ return { score_offset = 100, async = true, }, + lazydev = { + name = 'LazyDev', + module = 'lazydev.integrations.blink', + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp module = 'blink.compat.source', diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index fad6d25..b6557fc 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -2,6 +2,7 @@ return { { 'folke/lazydev.nvim', ft = 'lua', -- only load on lua files + branch='main', opts = { library = { -- See the configuration section for more details -- 2.49.1 From a2ff3fa50f838a08dd7925a37587190231beecd6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 7 Jan 2025 09:32:52 +0000 Subject: [PATCH 722/894] added icon for copilot in blink --- lua/plugins/blink.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 896bf20..b58a6ae 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -41,6 +41,39 @@ return { -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono', + kind_icons = { + Copilot = '', + Text = '󰉿', + Method = '󰊕', + Function = '󰊕', + Constructor = '󰒓', + + Field = '󰜢', + Variable = '󰆦', + Property = '󰖷', + + Class = '󱡠', + Interface = '󱡠', + Struct = '󱡠', + Module = '󰅩', + + Unit = '󰪚', + Value = '󰦨', + Enum = '󰦨', + EnumMember = '󰦨', + + Keyword = '󰻾', + Constant = '󰏿', + + Snippet = '󱄽', + Color = '󰏘', + File = '󰈔', + Reference = '󰬲', + Folder = '󰉋', + Event = '󱐋', + Operator = '󰪚', + TypeParameter = '󰬛', + }, }, -- default list of enabled providers defined so that you can extend it @@ -63,6 +96,15 @@ return { module = 'blink-cmp-copilot', score_offset = 100, async = true, + transform_items = function(_, items) + local CompletionItemKind = require('blink.cmp.types').CompletionItemKind + local kind_idx = #CompletionItemKind + 1 + CompletionItemKind[kind_idx] = 'Copilot' + for _, item in ipairs(items) do + item.kind = kind_idx + end + return items + end, }, lazydev = { name = 'LazyDev', -- 2.49.1 From 0c777ffad488acefe779b3e05a081e2bdfdd7adb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 25 Jan 2025 13:01:47 +0100 Subject: [PATCH 723/894] fixed blink cfg --- lua/plugins/blink.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index b58a6ae..7119b0d 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -122,7 +122,10 @@ return { completion = { list = { - selection = 'auto_insert', + selection = { + auto_insert = true, + preselect = false + } }, menu = { max_height = 25, -- 2.49.1 From a2a67558c062c14deb5078dcdc99f9ce66d319fc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 25 Jan 2025 13:01:58 +0100 Subject: [PATCH 724/894] added markview --- lua/plugins/markdown.lua | 1 + lua/plugins/markview.lua | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 lua/plugins/markview.lua diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua index 90adcc5..60f8181 100644 --- a/lua/plugins/markdown.lua +++ b/lua/plugins/markdown.lua @@ -7,4 +7,5 @@ return { config = function() require('render-markdown').setup({}) end, + enabled = false } diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua new file mode 100644 index 0000000..185fc5c --- /dev/null +++ b/lua/plugins/markview.lua @@ -0,0 +1,14 @@ +return { + 'OXY2DEV/markview.nvim', + lazy = false, + config = function() + vim.api.nvim_create_autocmd('User', { + pattern = 'MarkviewAttach', + callback = function(event) + print(event.buf) + vim.keymap.set('n', '', require('markview').commands.open, + { buffer = event.buf, desc = 'Open Link', silent = false }) + end + }) + end +}; -- 2.49.1 From 0e3f5dd9d2f992ef488f6aa901398e0ff2e2affa Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 25 Jan 2025 13:02:22 +0100 Subject: [PATCH 725/894] removed cmp from lazydev --- lua/plugins/cmp.lua | 217 ---------------------------------------- lua/plugins/lazydev.lua | 14 +-- 2 files changed, 2 insertions(+), 229 deletions(-) delete mode 100644 lua/plugins/cmp.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua deleted file mode 100644 index 450aae5..0000000 --- a/lua/plugins/cmp.lua +++ /dev/null @@ -1,217 +0,0 @@ ----@diagnostic disable: missing-fields -return { - 'hrsh7th/nvim-cmp', - branch = 'main', - event = { 'InsertEnter', 'CmdlineEnter' }, - dependencies = { - { 'onsails/lspkind-nvim' }, - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { 'L3MON4D3/LuaSnip' }, - { 'saadparwaiz1/cmp_luasnip' }, - { 'hrsh7th/cmp-nvim-lua' }, - { 'octaltree/cmp-look' }, - { 'hrsh7th/cmp-path' }, - { 'hrsh7th/cmp-calc' }, - { 'f3fora/cmp-spell' }, - { 'hrsh7th/cmp-emoji' }, - { 'hrsh7th/cmp-cmdline' }, - { 'dmitmel/cmp-cmdline-history' }, - { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' }, - { 'chrisgrieser/cmp_yanky' }, - { 'p00f/clangd_extensions.nvim' }, - { 'zbirenbaum/copilot-cmp' }, - { - 'windwp/nvim-autopairs', - config = true, - }, - }, - config = function() - local cmp = require('cmp') - local luasnip = require('luasnip') - local lspkind = require('lspkind') - - local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) - end - - cmp.setup({ - preselect = cmp.PreselectMode.None, - mapping = { - [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), - [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), - [''] = cmp.mapping({ - i = function(fallback) - if cmp.visible() and cmp.get_active_entry() then - cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }) - else - fallback() - end - end, - c = cmp.mapping.confirm({ select = false }), - s = cmp.mapping.confirm({ select = false }), - }), - [''] = cmp.mapping(function(fallback) - if luasnip.expand_or_jumpable() then - vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) - else - fallback() - end - end, { - 'i', - 's', - }), - [''] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) - else - fallback() - end - end, { 'i', 's' }), - [''] = cmp.mapping( - cmp.mapping.complete({ - config = { - sources = { - { - name = 'cmdline_history', - }, - }, - }, - }), - { 'c' } - ), - }, - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - sources = { - { name = 'copilot', priority = 9 }, - { name = 'codeium' }, - { name = 'luasnip', priority = 8 }, - { - name = 'nvim_lsp', - option = { - markdown_oxide = { - keyword_pattern = [[\(\k\| \|\/\|#\)\+]], - }, - }, - priority = 7, - }, - { name = 'nvim_lsp_signature_help', priority = 7 }, - -- { name = 'treesitter', priority = 6 }, - { - name = 'cmp_yanky', - option = { - -- only suggest items which match the current filetype - onlyCurrentFiletype = false, - -- only suggest items with a minimum length - minLength = 3, - }, - }, - { - name = 'buffer', - priority = 3, - option = { - get_bufnrs = function() - local bufs = {} - for _, win in ipairs(vim.api.nvim_list_wins()) do - bufs[vim.api.nvim_win_get_buf(win)] = true - end - return vim.tbl_keys(bufs) - end, - }, - }, - -- { name = 'nvim_lua' }, - -- { name = 'look' }, - { name = 'path' }, - -- { name = 'cmp_tabnine' }, - -- { name = 'calc' }, - -- { name = 'spell' }, - -- { name = 'emoji' }, - }, - enabled = function() - return vim.api.nvim_get_option_value('buftype', { buf = 0 }) ~= 'prompt' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' - or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' - end, - -- completion = { - -- completeopt = 'menu,menuone,noinsert, noselect', - -- border = 'rounded', - -- }, - window = { - completion = cmp.config.window.bordered({ - col_offset = -3, - side_padding = 0, - winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None', - }), - documentation = cmp.config.window.bordered({ - winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None', - }), - }, - formatting = { - fields = { 'kind', 'abbr' }, - format = function(entry, vim_item) - local kind = lspkind.cmp_format({ - mode = 'symbol', - symbol_map = { - Codeium = '', - Copilot = '', - }, - maxwidth = 50, - })(entry, vim_item) - local strings = vim.split(kind.kind, '%s', { trimempty = true }) - kind.kind = ' ' .. (strings[1] or '') .. ' ' - return kind - end, - }, - -- experimental = { native_menu = true } - }) - vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"}) - - -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' }, - }, - }) - - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'cmdline' }, - { name = 'cmdline_history' }, - { name = 'path' }, - { name = 'buffer' }, - }), - matching = { disallow_symbol_nonprefix_matching = false }, - }) - - require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, { - sources = { - { name = 'dap' }, - }, - }) - - -- Autopairs - --require("nvim-autopairs.completion.cmp").setup({ - -- map_cr = true, - -- map_complete = true, - -- auto_select = true - --}) - local cmp_autopairs = require('nvim-autopairs.completion.cmp') - cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) - end, - enabled = false -} diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index b6557fc..9710f42 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -2,7 +2,7 @@ return { { 'folke/lazydev.nvim', ft = 'lua', -- only load on lua files - branch='main', + branch = 'main', opts = { library = { -- See the configuration section for more details @@ -14,15 +14,5 @@ return { { 'Bilal2453/luvit-meta', lazy = true, - }, -- optional `vim.uv` typings - { -- optional completion source for require statements and module annotations - 'hrsh7th/nvim-cmp', - opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { - name = 'lazydev', - group_index = 0, -- set group index to 0 to skip loading LuaLS completions - }) - end, - }, + } } -- 2.49.1 From ff9d07518c82d1c799534b46116c798ed0e70fba Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 25 Jan 2025 13:02:38 +0100 Subject: [PATCH 726/894] update plugins --- lazy-lock.json | 86 +++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 461a747..53f008e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,73 +2,73 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "astrotheme": { "branch": "main", "commit": "b1405cc96823d5f6cdd5a2f7ebeb137183220840" }, - "bamboo.nvim": { "branch": "master", "commit": "7e5bcd10ae1f1f7cd315fa88049ea21babe11815" }, - "blink-cmp-copilot": { "branch": "main", "commit": "c5c5cbce5748d21073f1d5348a92ebe6ce63f387" }, - "blink.cmp": { "branch": "main", "commit": "e3b7cb4a1094377c3093a021300de123d9fc60d3" }, + "astrotheme": { "branch": "main", "commit": "7aa05c0ada35ff127f151f70b0ba2d042953eeb4" }, + "bamboo.nvim": { "branch": "master", "commit": "0a94f81705733951be286493b8d1876d0e3d990f" }, + "blink-cmp-copilot": { "branch": "main", "commit": "5d4ed42c5d7d144012792bb6cc4ac7899a108169" }, + "blink.cmp": { "branch": "main", "commit": "1cc3b1a908fbcfd15451c4772759549724f38524" }, "blink.compat": { "branch": "main", "commit": "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, - "cmake-tools.nvim": { "branch": "master", "commit": "f1f917b584127b673c25138233cebf1d61a19f35" }, + "cmake-tools.nvim": { "branch": "master", "commit": "83268ea6f969f1e6eaa85f72118a11acb6198bf0" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "c9e8ce9278d456cb413209ed363db602a0615673" }, - "codeium.nvim": { "branch": "main", "commit": "ca38490ef963b066d6f686146d73213c70ef7f6b" }, + "codecompanion.nvim": { "branch": "main", "commit": "56bdccd4ec7071b413d7526399f99568db6ebf4b" }, + "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, - "efmls-configs-nvim": { "branch": "main", "commit": "f477186ecc12ac025a9948d17edc69242e1ee96b" }, - "everforest-nvim": { "branch": "main", "commit": "7c57941d5ef5a150f307b9295c00a59e95d78587" }, + "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, + "efmls-configs-nvim": { "branch": "main", "commit": "8d7ede48afa7d0344fa62fefb95132c0dad41e97" }, + "everforest-nvim": { "branch": "main", "commit": "616864c0c534b1eaf650ef913512dcde80ababfb" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, - "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "fzf-lua": { "branch": "main", "commit": "5dec364c9dedec00dcd6d06e323d7bc7f8d6b596" }, - "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "b3ca8af8795c28d600569c25c13fea244013a054" }, + "gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, - "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, - "iron.nvim": { "branch": "master", "commit": "e6b78ec1bc56eab63b3a9112d348b3d79836b672" }, - "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, + "gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7a698a1d7ed755af9f5a88733b23ca246ce2df28" }, + "iron.nvim": { "branch": "master", "commit": "705bdb8ff387c9ea744d65423178e4c5dd7b846b" }, + "kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" }, "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, - "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, - "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, - "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, - "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, + "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, + "markview.nvim": { "branch": "main", "commit": "07afabf6080eb7aa7ec663b527586dfe025bd71a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "40e380a589d07ec2c856940c6422aafe5d949a0d" }, "mini.sessions": { "branch": "main", "commit": "62f2e3823f98673fcf1b79322cc06d8a1f453d30" }, "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, - "monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" }, - "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, - "neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" }, - "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, + "monokai-pro.nvim": { "branch": "master", "commit": "6c15e36834a624a32f46c6db8f9fc063995b24b6" }, + "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, + "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, + "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, - "nvim-dap-python": { "branch": "master", "commit": "03fe9592409236b9121c03b66a682dfca15a5cac" }, + "nvim-dap": { "branch": "master", "commit": "1c96e487dd4180edc5a3c075ea1f03b6b751ef4f" }, + "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, - "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, - "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, - "nvim-lspconfig": { "branch": "master", "commit": "b55b9659de9ac17e05df4787bb023e4c7ef45329" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-highlight-colors": { "branch": "main", "commit": "68a4df620cf58e2c7336e53738e8cf3a522ad694" }, + "nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" }, + "nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, - "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, - "nvim-treesitter": { "branch": "master", "commit": "68b2bdd99d889e9705f7e90ae64d990f3ff03cf3" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, + "nvim-treesitter": { "branch": "master", "commit": "f3d7c0dafcbc86c4d63f765649c884a03bc1360a" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" }, - "overseer.nvim": { "branch": "master", "commit": "8278265e7ffd3420b8246004140df12255a9737c" }, + "oil.nvim": { "branch": "master", "commit": "ba858b662599eab8ef1cba9ab745afded99cb180" }, + "overseer.nvim": { "branch": "master", "commit": "c136856c7556c0eeb0554839ddcd499b02f66832" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "eda7ba0eb6095cebda95ebd2db7196693f47ace3" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, - "rustaceanvim": { "branch": "master", "commit": "6eb1c41463a0ad02a4fe799321cc7f651b87e576" }, - "snacks.nvim": { "branch": "main", "commit": "d312053f78b4fb55523def179ac502438dd93193" }, + "pretty_hover": { "branch": "master", "commit": "d55017dd7cf2470c9f44401b31def2dd565b43a3" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11" }, + "rustaceanvim": { "branch": "master", "commit": "e15c262f81e8adb139ef3e3de775493d377919a2" }, + "snacks.nvim": { "branch": "main", "commit": "b96bd540f785c725289f9f15f0147b1b2dac5a35" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } -- 2.49.1 From eac29c96f3c7cdad59827dc05e7abe1615447659 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Feb 2025 16:20:35 +0100 Subject: [PATCH 727/894] fixed lua style file --- stylua.toml => .stylua.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stylua.toml => .stylua.toml (100%) diff --git a/stylua.toml b/.stylua.toml similarity index 100% rename from stylua.toml rename to .stylua.toml -- 2.49.1 From 3b88285fc11447836c05c57c3817abf70333e3f3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Feb 2025 21:05:50 +0100 Subject: [PATCH 728/894] fixed blink breaking changes --- lua/plugins/blink.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 7119b0d..43c5e92 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -79,9 +79,10 @@ return { -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { - default = { 'copilot', 'lazydev', 'lsp', 'path', 'luasnip', 'buffer', 'codeium' }, + default = { 'copilot', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'codeium' }, -- optionally disable cmdline completions -- cmdline = {}, + cmdline = function() local type = vim.fn.getcmdtype() -- Search forward and backward @@ -147,14 +148,7 @@ return { -- experimental signature help support signature = { enabled = true }, snippets = { - expand = function(snippet) require('luasnip').lsp_expand(snippet) end, - active = function(filter) - if filter and filter.direction then - return require('luasnip').jumpable(filter.direction) - end - return require('luasnip').in_snippet() - end, - jump = function(direction) require('luasnip').jump(direction) end, + preset = 'luasnip' }, }, -- allows extending the providers array elsewhere in your config -- 2.49.1 From 6a96a1f27343b152e00fb100d97c83b5ae81c391 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Feb 2025 21:06:02 +0100 Subject: [PATCH 729/894] update plugins --- lazy-lock.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 53f008e..28ab55b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,13 +5,13 @@ "astrotheme": { "branch": "main", "commit": "7aa05c0ada35ff127f151f70b0ba2d042953eeb4" }, "bamboo.nvim": { "branch": "master", "commit": "0a94f81705733951be286493b8d1876d0e3d990f" }, "blink-cmp-copilot": { "branch": "main", "commit": "5d4ed42c5d7d144012792bb6cc4ac7899a108169" }, - "blink.cmp": { "branch": "main", "commit": "1cc3b1a908fbcfd15451c4772759549724f38524" }, - "blink.compat": { "branch": "main", "commit": "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc" }, + "blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" }, + "blink.compat": { "branch": "main", "commit": "1176525a78319a208300a1910b6fd9e0cfabff25" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, "cmake-tools.nvim": { "branch": "master", "commit": "83268ea6f969f1e6eaa85f72118a11acb6198bf0" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "56bdccd4ec7071b413d7526399f99568db6ebf4b" }, + "codecompanion.nvim": { "branch": "main", "commit": "1b6b8a87eb9b5e59b2b2e9d04b0047ddb25f4edd" }, "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, @@ -20,12 +20,12 @@ "everforest-nvim": { "branch": "main", "commit": "616864c0c534b1eaf650ef913512dcde80ababfb" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzf-lua": { "branch": "main", "commit": "b3ca8af8795c28d600569c25c13fea244013a054" }, - "gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" }, + "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, + "gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, "indent-blankline.nvim": { "branch": "master", "commit": "7a698a1d7ed755af9f5a88733b23ca246ce2df28" }, - "iron.nvim": { "branch": "master", "commit": "705bdb8ff387c9ea744d65423178e4c5dd7b846b" }, + "iron.nvim": { "branch": "master", "commit": "e0d93de8390eb8460049e50f8e677a052ca57e7c" }, "kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" }, "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, @@ -34,41 +34,41 @@ "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, - "markview.nvim": { "branch": "main", "commit": "07afabf6080eb7aa7ec663b527586dfe025bd71a" }, + "markview.nvim": { "branch": "main", "commit": "68902d7cba78a7fe331c13d531376b4be494a05c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.ai": { "branch": "main", "commit": "40e380a589d07ec2c856940c6422aafe5d949a0d" }, - "mini.sessions": { "branch": "main", "commit": "62f2e3823f98673fcf1b79322cc06d8a1f453d30" }, - "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, + "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, + "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, + "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "monokai-pro.nvim": { "branch": "master", "commit": "6c15e36834a624a32f46c6db8f9fc063995b24b6" }, "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nvim-dap": { "branch": "master", "commit": "1c96e487dd4180edc5a3c075ea1f03b6b751ef4f" }, + "nvim-dap": { "branch": "master", "commit": "b4f27d451c187de912fa8d3229025a952917eb9e" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, "nvim-highlight-colors": { "branch": "main", "commit": "68a4df620cf58e2c7336e53738e8cf3a522ad694" }, "nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" }, - "nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" }, + "nvim-lspconfig": { "branch": "master", "commit": "f98fa715acc975c2dd5fb5ba7ceddeb1cc725ad2" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "f3d7c0dafcbc86c4d63f765649c884a03bc1360a" }, + "nvim-treesitter": { "branch": "master", "commit": "16a51977dcaab1e1adc3152471ac862202f9be83" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "oil.nvim": { "branch": "master", "commit": "ba858b662599eab8ef1cba9ab745afded99cb180" }, "overseer.nvim": { "branch": "master", "commit": "c136856c7556c0eeb0554839ddcd499b02f66832" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "d55017dd7cf2470c9f44401b31def2dd565b43a3" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11" }, - "rustaceanvim": { "branch": "master", "commit": "e15c262f81e8adb139ef3e3de775493d377919a2" }, - "snacks.nvim": { "branch": "main", "commit": "b96bd540f785c725289f9f15f0147b1b2dac5a35" }, + "pretty_hover": { "branch": "master", "commit": "2dfe4885a1c0a678a0ffe667fcb6650d797ea66a" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "cf0da2516b0684596b09c51dbc93c609cdc2f455" }, + "rustaceanvim": { "branch": "master", "commit": "66d688fc6934dde2f1c4b0139682fe7b3935f154" }, + "snacks.nvim": { "branch": "main", "commit": "9f03de4fda9dfcf1e5c61180965b1b7aeca77155" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, - "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, + "trouble.nvim": { "branch": "main", "commit": "bac1d9a9f51eecf4424b6ca8675db5a170fe572b" }, + "which-key.nvim": { "branch": "main", "commit": "b74a3c85f03225bc91f4f5a9056518d3fa9a3470" }, "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } -- 2.49.1 From fff9f428f9c046e07a5332710cded08d71bf7ce0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 3 Feb 2025 21:37:41 +0100 Subject: [PATCH 730/894] added grug-far --- lua/plugins/grug-far.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/plugins/grug-far.lua diff --git a/lua/plugins/grug-far.lua b/lua/plugins/grug-far.lua new file mode 100644 index 0000000..dfc3395 --- /dev/null +++ b/lua/plugins/grug-far.lua @@ -0,0 +1,19 @@ +return { + 'MagicDuck/grug-far.nvim', + config = function() + require('grug-far').setup({ + }); + end, + keys = + { + { + '', + function() + require('grug-far').open() + end, + desc = 'GrugFar', + mode = { 'n', 'v' } + } + } + +} -- 2.49.1 From 5ec3e6623d319f91a19b89bc9fa242fa108a0b06 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 8 Feb 2025 21:30:14 +0100 Subject: [PATCH 731/894] switch to snacks picker --- lua/plugins/fzf-lua.lua | 1 + lua/plugins/lspconfig.lua | 11 ---- lua/plugins/snacks.lua | 105 ++++++++++++++++++++++++------------- lua/plugins/trouble.lua | 5 -- lua/plugins/workspaces.lua | 1 + lua/themes/bamboo.lua | 4 -- 6 files changed, 70 insertions(+), 57 deletions(-) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua index 0ff216d..7f093ff 100644 --- a/lua/plugins/fzf-lua.lua +++ b/lua/plugins/fzf-lua.lua @@ -123,4 +123,5 @@ return { desc = 'Fuzzy complete path', }, }, + enabled = false } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index cd68b92..bdce254 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,13 +1,9 @@ local lspKeys = function(client, bufnr) - local fzf = require('fzf-lua') local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) - vim.keymap.set('n', 'd', function() - fzf.lsp_definitions({ jump_to_single_result = true }) - end, vim.tbl_extend('error', options, { desc = 'Definition' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) vim.keymap.set('n', 'h', function() require('pretty_hover').hover() @@ -17,19 +13,12 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', '', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' })) - vim.keymap.set('n', '', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' })) - vim.keymap.set('n', 'w', fzf.lsp_live_workspace_symbols, - vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) vim.keymap.set('n', 'v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', 'V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 15fc112..087168e 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -35,44 +35,75 @@ return { { section = 'startup' }, }, }, + picker = { + matcher = { + frecency = true + } + } }, keys = { - { - 'g', - function() - Snacks.lazygit() - end, - desc = 'Lazygit', - }, - { - 'gf', - function() - Snacks.lazygit.log_file() - end, - desc = 'Lazygit Current File History', - }, - { - 'gl', - function() - Snacks.lazygit.log() - end, - desc = 'Lazygit Log (cwd)', - }, - { - 'm', - function() - Snacks.words.jump(vim.v.count1) - end, - desc = 'Next Reference', - mode = { 'n' }, - }, - { - '', - function() - Snacks.words.jump(-vim.v.count1) - end, - desc = 'Prev Reference', - mode = { 'n' }, - }, + { 'g', function() Snacks.lazygit() end, desc = 'Lazygit', }, + { 'gf', function() Snacks.lazygit.log_file() end, desc = 'Lazygit Current File History', }, + { 'gl', function() Snacks.lazygit.log() end, desc = 'Lazygit Log (cwd)', }, + { 'm', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n' }, }, + { '', function() Snacks.words.jump(-vim.v.count1) end, desc = 'Prev Reference', mode = { 'n' }, }, + -- Top Pickers & Explorer + { '', function() Snacks.picker.smart() end, desc = 'Smart Find Files' }, + { 'b', function() Snacks.picker.buffers() end, desc = 'Buffers' }, + { 'l', function() Snacks.picker.grep() end, desc = 'Grep' }, + { ':', function() Snacks.picker.command_history() end, desc = 'Command History' }, + { 'n', function() Snacks.picker.notifications() end, desc = 'Notification History' }, + { 'e', function() Snacks.explorer() end, desc = 'File Explorer' }, + -- find + -- { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + -- { "f", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, + { 'f', function() Snacks.picker.files() end, desc = 'Find Files' }, + { 'g', function() Snacks.picker.git_files() end, desc = 'Find Git Files' }, + { 'p', function() Snacks.picker.projects() end, desc = 'Projects' }, + { 'o', function() Snacks.picker.recent() end, desc = 'Recent' }, + { 'i', function() Snacks.picker.recent({ filter = { cwd = true } }) end, desc = 'Recent in cwd' }, + -- git + -- { "gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, + -- { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, + -- { "gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" }, + -- { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + -- { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, + -- { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, + -- { "gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, + -- Grep + { 'sb', function() Snacks.picker.lines() end, desc = 'Buffer Lines' }, + { 'sB', function() Snacks.picker.grep_buffers() end, desc = 'Grep Open Buffers' }, + -- { "sg", function() Snacks.picker.grep() end, desc = "Grep" }, + { 'd', function() Snacks.picker.grep_word() end, desc = 'Visual selection or word', mode = { 'n', 'x' } }, + -- search + -- { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + -- { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, + -- { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, + -- { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, + -- { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, + -- { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + -- { "v", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { 'V', function() Snacks.picker.diagnostics_buffer() end, desc = 'Buffer Diagnostics' }, + { 'sh', function() Snacks.picker.help() end, desc = 'Help Pages' }, + { 'sH', function() Snacks.picker.highlights() end, desc = 'Highlights' }, + { 'si', function() Snacks.picker.icons() end, desc = 'Icons' }, + { 'j', function() Snacks.picker.jumps() end, desc = 'Jumps' }, + -- { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + -- { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + -- { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + -- { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, + -- { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, + -- { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + -- { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + -- { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, + -- { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, + -- LSP + { 'd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' }, + { 'D', function() Snacks.picker.lsp_declarations() end, desc = 'Goto Declaration' }, + { 'r', function() Snacks.picker.lsp_references() end, nowait = true, desc = 'References' }, + { 'I', function() Snacks.picker.lsp_implementations() end, desc = 'Goto Implementation' }, + { 'e', function() Snacks.picker.lsp_type_definitions() end, desc = 'Goto T[y]pe Definition' }, + { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, + { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, }, } diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 1feed92..4200a5b 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -13,11 +13,6 @@ return { 'Trouble diagnostics toggle filter.buf=0', desc = 'Buffer Diagnostics (Trouble)', }, - { - 's', - 'Trouble symbols focus', - desc = 'Symbols (Trouble)', - }, { 'cl', 'Trouble lsp toggle focus=false win.position=right', diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua index 601dfb2..9fbd5e9 100644 --- a/lua/plugins/workspaces.lua +++ b/lua/plugins/workspaces.lua @@ -41,4 +41,5 @@ return { end, }, }, + enabled = false } diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 391c01c..aab1af3 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -30,10 +30,6 @@ return { ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, - ['Delimiter'] = { fg = colors.vulgaris.fg }, - ['NormalFloat'] = { bg = colors.vulgaris.bg3 }, - ['FloatNormal'] = { bg = colors.vulgaris.bg3 }, - ['PmenuSel'] = { bg = colors.vulgaris.grey }, }, }) require('bamboo').load() -- 2.49.1 From abc1a1367c47eb16915668984f026f00ce122de1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 8 Feb 2025 22:31:06 +0100 Subject: [PATCH 732/894] enabled some snacks keys --- lua/plugins/snacks.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 087168e..eca5fde 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -88,14 +88,14 @@ return { { 'sH', function() Snacks.picker.highlights() end, desc = 'Highlights' }, { 'si', function() Snacks.picker.icons() end, desc = 'Icons' }, { 'j', function() Snacks.picker.jumps() end, desc = 'Jumps' }, - -- { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, - -- { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, - -- { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, - -- { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, - -- { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, - -- { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, - -- { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, - -- { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, + { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, -- { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, -- LSP { 'd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' }, -- 2.49.1 From c14f537921fefe95e2c9fd35e53a58f9974e2d55 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Feb 2025 10:30:36 +0000 Subject: [PATCH 733/894] added c-t to snacks picker --- lua/plugins/snacks.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index eca5fde..dceccd4 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -38,7 +38,14 @@ return { picker = { matcher = { frecency = true - } + }, + win = { + input = { + keys = { + [''] = { 'edit_tab', mode = { 'n', 'i' } }, + }, + }, + }, } }, keys = { -- 2.49.1 From d5e60bf5ef7b878b1a3fdaeded3e2b051f186eed Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 10 Feb 2025 12:37:45 +0000 Subject: [PATCH 734/894] tune snack pickers format --- lua/plugins/snacks.lua | 10 +++++++++- lua/themes/bamboo.lua | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index dceccd4..64610c4 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -37,7 +37,9 @@ return { }, picker = { matcher = { - frecency = true + frecency = true, + cwd_bonus = true, + filename_bonus = true, }, win = { input = { @@ -46,6 +48,12 @@ return { }, }, }, + formatters = { + file = { + truncate = 100, + filename_first = true + } + } } }, keys = { diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index aab1af3..320d62a 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -30,6 +30,7 @@ return { ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, + ['NonText'] = { fg = colors.vulgaris.blue } }, }) require('bamboo').load() -- 2.49.1 From 59ae8682846829ad6aa0899ceba790290e24cd2b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:23:21 +0000 Subject: [PATCH 735/894] fixed for blink breaking changes --- lua/plugins/blink.lua | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 43c5e92..ddf8d71 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -80,17 +80,7 @@ return { -- elsewhere in your config, without redefining it, via `opts_extend` sources = { default = { 'copilot', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'codeium' }, - -- optionally disable cmdline completions - -- cmdline = {}, - cmdline = function() - local type = vim.fn.getcmdtype() - -- Search forward and backward - if type == '/' or type == '?' then return { 'buffer' } end - -- Commands - if type == ':' or type == '@' then return { 'cmdline', 'buffer' } end - return {} - end, providers = { copilot = { name = 'copilot', @@ -121,6 +111,29 @@ return { }, }, + cmdline = { + sources = function() + local type = vim.fn.getcmdtype() + -- Search forward and backward + if type == '/' or type == '?' then return { 'buffer' } end + -- Commands + if type == ':' or type == '@' then return { 'cmdline', 'buffer' } end + return {} + end, + completion = { + trigger = { + show_on_blocked_trigger_characters = {}, + show_on_x_blocked_trigger_characters = nil, -- Inherits from top level `completion.trigger.show_on_blocked_trigger_characters` config when not set + }, + menu = { + auto_show = nil, -- Inherits from top level `completion.menu.auto_show` config when not set + draw = { + columns = { { 'label', 'label_description', gap = 1 } }, + }, + } + } + }, + completion = { list = { selection = { -- 2.49.1 From 36afa8eb812a4aec91b96d0b18015667696553ac Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:23:33 +0000 Subject: [PATCH 736/894] new copilot completion --- lua/plugins/blink.lua | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index ddf8d71..fadff96 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -5,6 +5,14 @@ return { dependencies = { 'rafamadriz/friendly-snippets', 'giuxtaposition/blink-cmp-copilot', + { + 'fang2hou/blink-copilot', + opts = { + max_completions = 1, -- Global default for max completions + max_attempts = 2, -- Global default for max attempts + -- `kind` is not set, so the default value is "Copilot" + } + }, 'folke/lazydev.nvim', 'L3MON4D3/LuaSnip', { @@ -84,18 +92,14 @@ return { providers = { copilot = { name = 'copilot', - module = 'blink-cmp-copilot', + module = 'blink-copilot', score_offset = 100, async = true, - transform_items = function(_, items) - local CompletionItemKind = require('blink.cmp.types').CompletionItemKind - local kind_idx = #CompletionItemKind + 1 - CompletionItemKind[kind_idx] = 'Copilot' - for _, item in ipairs(items) do - item.kind = kind_idx - end - return items - end, + opts = { + -- Local options override global ones + -- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot" + max_completions = 3, -- Override global max_completions + } }, lazydev = { name = 'LazyDev', -- 2.49.1 From 8d553071dd72a574799579f57b5a81025c6202a7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:24:19 +0000 Subject: [PATCH 737/894] copilot for python --- lua/plugins/copilot.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index f7ded21..f96c56b 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -7,6 +7,7 @@ return { filetypes = { yaml = false, markdown = false, + python = true, help = false, gitcommit = false, gitrebase = false, -- 2.49.1 From c8c795e65b76c15a584cb16d8442567fca6f5ad7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:25:53 +0000 Subject: [PATCH 738/894] some gitsings keymaps --- lua/plugins/gitsigns.lua | 83 +++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index b5acb86..23885c8 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,13 +1,78 @@ return { 'lewis6991/gitsigns.nvim', branch = 'main', - opts = { - current_line_blame = false, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - }, + config = function() + require('gitsigns').setup { + current_line_blame = false, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + on_attach = function(bufnr) + local gitsigns = require('gitsigns') + + + -- Navigation + vim.keymap.set('n', ']c', function() + if vim.wo.diff then + vim.cmd.normal({ ']c', bang = true }) + else + gitsigns.nav_hunk('next') + end + end, + { desc = 'Next hunk' } + ) + + vim.keymap.set('n', '[c', function() + if vim.wo.diff then + vim.cmd.normal({ '[c', bang = true }) + else + gitsigns.nav_hunk('prev') + end + end, + { desc = 'Previous hunk' } + ) + + -- Actions + vim.keymap.set('n', 'hs', gitsigns.stage_hunk, { desc = 'Stage hunk' }) + vim.keymap.set('n', 'hr', gitsigns.reset_hunk, { desc = 'Reset hunk' }) + + vim.keymap.set('v', 'hs', function() + gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, + { desc = 'Stage hunk' } + ) + + vim.keymap.set('v', 'hr', function() + gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, + { desc = 'Reset hunk' } + ) + + vim.keymap.set('n', 'hS', gitsigns.stage_buffer, { desc = 'Stage buffer' }) + vim.keymap.set('n', 'hR', gitsigns.reset_buffer, { desc = 'Reset buffer' }) + vim.keymap.set('n', 'hp', gitsigns.preview_hunk, { desc = 'Preview hunk' }) + vim.keymap.set('n', 'hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' }) + + vim.keymap.set('n', 'hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' }) + + vim.keymap.set('n', 'hd', gitsigns.diffthis, { desc = 'Diff this' }) + + vim.keymap.set('n', 'hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' }) + + vim.keymap.set('n', 'hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' }) + vim.keymap.set('n', 'hq', gitsigns.setqflist, { desc = 'Set quickfix list' }) + + -- Toggles + vim.keymap.set('n', 'tb', gitsigns.toggle_current_line_blame, { desc = 'Toggle blame' }) + vim.keymap.set('n', 'td', gitsigns.toggle_deleted, { desc = 'Toggle deleted' }) + vim.keymap.set('n', 'tw', gitsigns.toggle_word_diff, { desc = 'Toggle word diff' }) + + -- Text object + vim.keymap.set({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') + end + } + end } -- 2.49.1 From d992b116105db2fe4bc6b81056fb001691cd9e18 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:26:19 +0000 Subject: [PATCH 739/894] updated plugins --- lazy-lock.json | 56 ++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 28ab55b..cda41ac 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,42 +2,44 @@ "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "astrotheme": { "branch": "main", "commit": "7aa05c0ada35ff127f151f70b0ba2d042953eeb4" }, + "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, "bamboo.nvim": { "branch": "master", "commit": "0a94f81705733951be286493b8d1876d0e3d990f" }, "blink-cmp-copilot": { "branch": "main", "commit": "5d4ed42c5d7d144012792bb6cc4ac7899a108169" }, - "blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" }, - "blink.compat": { "branch": "main", "commit": "1176525a78319a208300a1910b6fd9e0cfabff25" }, + "blink-copilot": { "branch": "main", "commit": "feb9cbd4b67eb45a1be09c84dd6a7a434b74487a" }, + "blink.cmp": { "branch": "main", "commit": "18b352d12b35bca148427b607098df14b75a218f" }, + "blink.compat": { "branch": "main", "commit": "b0c87b64f9c669d3bcfaea8a80396fbc16e0fcb5" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, - "cmake-tools.nvim": { "branch": "master", "commit": "83268ea6f969f1e6eaa85f72118a11acb6198bf0" }, + "cmake-tools.nvim": { "branch": "master", "commit": "680a50111f6ebbbc0f126d07ad701bdbd4d1c599" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "1b6b8a87eb9b5e59b2b2e9d04b0047ddb25f4edd" }, + "codecompanion.nvim": { "branch": "main", "commit": "3e71a1a7c0b3788bdb7bc72c6f3478d928d796da" }, "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, - "copilot.lua": { "branch": "master", "commit": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9" }, + "copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, - "efmls-configs-nvim": { "branch": "main", "commit": "8d7ede48afa7d0344fa62fefb95132c0dad41e97" }, - "everforest-nvim": { "branch": "main", "commit": "616864c0c534b1eaf650ef913512dcde80ababfb" }, + "efmls-configs-nvim": { "branch": "main", "commit": "f769e051831782732b392da412892cd2eb9c104d" }, + "everforest-nvim": { "branch": "main", "commit": "76cd62618afd415215e5bcdd7d2667c0323669bb" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, - "gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" }, + "gitsigns.nvim": { "branch": "main", "commit": "8b00147519d6f8353867d5d0b55f587306b0cfb6" }, + "grug-far.nvim": { "branch": "main", "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, + "gruvbox.nvim": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" }, "indent-blankline.nvim": { "branch": "master", "commit": "7a698a1d7ed755af9f5a88733b23ca246ce2df28" }, - "iron.nvim": { "branch": "master", "commit": "e0d93de8390eb8460049e50f8e677a052ca57e7c" }, - "kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" }, + "iron.nvim": { "branch": "master", "commit": "e2021d242088bc98f7df75bee487a0ae1bfafc5f" }, + "kanagawa.nvim": { "branch": "master", "commit": "2de175482f215c69a1d12ab10a8bf2a7a2e44ff2" }, "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, - "markview.nvim": { "branch": "main", "commit": "68902d7cba78a7fe331c13d531376b4be494a05c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "markview.nvim": { "branch": "main", "commit": "f1e2a57388b61fff8e9d7519ce05cee27a59a57e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, @@ -46,28 +48,28 @@ "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nvim-dap": { "branch": "master", "commit": "b4f27d451c187de912fa8d3229025a952917eb9e" }, + "nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-highlight-colors": { "branch": "main", "commit": "68a4df620cf58e2c7336e53738e8cf3a522ad694" }, - "nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" }, - "nvim-lspconfig": { "branch": "master", "commit": "f98fa715acc975c2dd5fb5ba7ceddeb1cc725ad2" }, + "nvim-highlight-colors": { "branch": "main", "commit": "a770df5fbd98abbb0fc1a95d9a3f2bb1e51e3e2c" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, + "nvim-lspconfig": { "branch": "master", "commit": "7af2c37192deae28d1305ae9e68544f7fb5408e1" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "16a51977dcaab1e1adc3152471ac862202f9be83" }, + "nvim-treesitter": { "branch": "master", "commit": "2cade9e3d105732b794bc37e7cb2dc53b1cf99dc" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "ba858b662599eab8ef1cba9ab745afded99cb180" }, - "overseer.nvim": { "branch": "master", "commit": "c136856c7556c0eeb0554839ddcd499b02f66832" }, + "oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" }, + "overseer.nvim": { "branch": "master", "commit": "2c23513a4fd3a3be0459b3b62996fb0732c2fd7e" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "2dfe4885a1c0a678a0ffe667fcb6650d797ea66a" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "cf0da2516b0684596b09c51dbc93c609cdc2f455" }, - "rustaceanvim": { "branch": "master", "commit": "66d688fc6934dde2f1c4b0139682fe7b3935f154" }, - "snacks.nvim": { "branch": "main", "commit": "9f03de4fda9dfcf1e5c61180965b1b7aeca77155" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562" }, + "rustaceanvim": { "branch": "master", "commit": "f03035fa03ccb36cd26d0792c946fbacba1d1a39" }, + "snacks.nvim": { "branch": "main", "commit": "95878ad32aaf310f465a004ef12e9edddf939287" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "trouble.nvim": { "branch": "main", "commit": "bac1d9a9f51eecf4424b6ca8675db5a170fe572b" }, + "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, "which-key.nvim": { "branch": "main", "commit": "b74a3c85f03225bc91f4f5a9056518d3fa9a3470" }, "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } -- 2.49.1 From c52ee918562e5b1c9f36c0e941e9829aa0ab224c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:42:27 +0000 Subject: [PATCH 740/894] fixed some blink visuals --- lua/plugins/blink.lua | 6 +++++- lua/themes/bamboo.lua | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index fadff96..56dd426 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -141,10 +141,14 @@ return { completion = { list = { selection = { - auto_insert = true, + auto_insert = false, preselect = false } }, + accept = + { + dot_repeat = false, + }, menu = { max_height = 25, draw = { diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 320d62a..a0191ff 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -30,7 +30,9 @@ return { ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, - ['NonText'] = { fg = colors.vulgaris.blue } + ['NonText'] = { fg = colors.vulgaris.blue }, + ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, + ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey } }, }) require('bamboo').load() -- 2.49.1 From 8bad13c702e6174d31353f164f231d7d4265a0cc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 17 Feb 2025 10:50:00 +0000 Subject: [PATCH 741/894] more blink tuning --- lua/plugins/blink.lua | 5 +---- lua/themes/bamboo.lua | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 56dd426..0927f6b 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -159,10 +159,7 @@ return { }, documentation = { auto_show = true, - auto_show_delay_ms = 300, - window = { - border = 'padded' - } + auto_show_delay_ms = 200, }, }, diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index a0191ff..d11428e 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -32,6 +32,7 @@ return { ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['NonText'] = { fg = colors.vulgaris.blue }, ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, + ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey } }, }) -- 2.49.1 From fcc007ff754ba6b0a1b4f6a0f6296a5d68e0a757 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Feb 2025 22:51:05 +0100 Subject: [PATCH 742/894] flash S in visual line mode and toggle with v --- lua/my_keymappings.lua | 9 +++++++++ lua/plugins/flash.lua | 1 + 2 files changed, 10 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 6e47120..d6ffec9 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -58,6 +58,15 @@ vim.keymap.set({ 'n', 'x' }, 'Y', '"+yg_', { desc = 'Copy from system cl vim.keymap.set({ 'n', 'x' }, 'p', '"+p', { desc = 'Paste from system clipboard' }) vim.keymap.set({ 'n', 'x' }, 'P', '"+P', { desc = 'Paste from system clipboard' }) +vim.keymap.set('v', 'v', function() + local mode = vim.fn.mode() + if mode == 'v' then + vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode + elseif mode == 'V' then + vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode + end +end, { noremap = true, silent = true }) + vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {}) vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {}) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index d639dc5..4695298 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -26,6 +26,7 @@ return { mode = { 'n', 'o', 'x' }, function() require('flash').treesitter() + vim.api.nvim_feedkeys('V', 'n', true) end, desc = 'Flash treesitter', }, -- 2.49.1 From 0c8520dd913e835a97ebb362c81bda0594f809bb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Feb 2025 23:11:45 +0100 Subject: [PATCH 743/894] adjust to new blink --- lua/plugins/blink.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 0927f6b..13dd371 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -130,11 +130,14 @@ return { show_on_x_blocked_trigger_characters = nil, -- Inherits from top level `completion.trigger.show_on_blocked_trigger_characters` config when not set }, menu = { - auto_show = nil, -- Inherits from top level `completion.menu.auto_show` config when not set - draw = { - columns = { { 'label', 'label_description', gap = 1 } }, - }, + auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set } + }, + keymap = { + [''] = { 'select_next' }, + [''] = { 'select_prev' }, + [''] = { 'accept', 'fallback' }, + [''] = { 'cancel' }, } }, -- 2.49.1 From 58a98904accb4c4beb8d2ed23e832df7c5c688d9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Feb 2025 23:14:42 +0100 Subject: [PATCH 744/894] fixed blink cmdline auto insert --- lua/plugins/blink.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 13dd371..950b627 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -129,6 +129,12 @@ return { show_on_blocked_trigger_characters = {}, show_on_x_blocked_trigger_characters = nil, -- Inherits from top level `completion.trigger.show_on_blocked_trigger_characters` config when not set }, + list = { + selection = { + auto_insert = false, + preselect = false + } + }, menu = { auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set } -- 2.49.1 From c63bf6b008a7903ff00e75c141df2970a214598d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Feb 2025 23:14:58 +0100 Subject: [PATCH 745/894] enable dot repeat again --- lua/plugins/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 950b627..54695ef 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -156,7 +156,7 @@ return { }, accept = { - dot_repeat = false, + dot_repeat = true, }, menu = { max_height = 25, -- 2.49.1 From 3be7150ca70bb6a3b879949a9e07f78a9e408489 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Feb 2025 08:33:34 +0000 Subject: [PATCH 746/894] fixed cmdline in blink --- lua/plugins/blink.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 54695ef..ea32ea1 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -140,8 +140,8 @@ return { } }, keymap = { - [''] = { 'select_next' }, - [''] = { 'select_prev' }, + [''] = { 'select_next', 'fallback' }, + [''] = { 'select_prev', 'fallback' }, [''] = { 'accept', 'fallback' }, [''] = { 'cancel' }, } -- 2.49.1 From 3a079ee728b6e418c7b634c159bffef87de52537 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Feb 2025 08:34:03 +0000 Subject: [PATCH 747/894] enable git function from snacks picker again with leader-n --- lua/plugins/snacks.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 64610c4..250f92c 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -78,13 +78,13 @@ return { { 'o', function() Snacks.picker.recent() end, desc = 'Recent' }, { 'i', function() Snacks.picker.recent({ filter = { cwd = true } }) end, desc = 'Recent in cwd' }, -- git - -- { "gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, - -- { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, - -- { "gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" }, - -- { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, - -- { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, - -- { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, - -- { "gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, + { "nb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, + { "nl", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "nL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" }, + { "ns", function() Snacks.picker.git_status() end, desc = "Git Status" }, + { "nS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, + { "nd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, + { "nf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, -- Grep { 'sb', function() Snacks.picker.lines() end, desc = 'Buffer Lines' }, { 'sB', function() Snacks.picker.grep_buffers() end, desc = 'Grep Open Buffers' }, -- 2.49.1 From cc2d3b770aee495adbe89999f424454fa9c941d3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Mar 2025 22:34:07 +0100 Subject: [PATCH 748/894] added cmdline history --- lua/plugins/blink.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index ea32ea1..b802cb6 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -13,6 +13,7 @@ return { -- `kind` is not set, so the default value is "Copilot" } }, + 'dmitmel/cmp-cmdline-history', 'folke/lazydev.nvim', 'L3MON4D3/LuaSnip', { @@ -112,6 +113,10 @@ return { module = 'blink.compat.source', async = true }, + cmdline_history = { + name = 'cmdline_history', + module = 'blink.compat.source', + } }, }, @@ -121,7 +126,7 @@ return { -- Search forward and backward if type == '/' or type == '?' then return { 'buffer' } end -- Commands - if type == ':' or type == '@' then return { 'cmdline', 'buffer' } end + if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end return {} end, completion = { -- 2.49.1 From b8db9122eb108edd0a877ce050bcea8b8cb1dfab Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Mar 2025 22:34:54 +0100 Subject: [PATCH 749/894] lspkind icons --- lua/plugins/blink.lua | 69 ++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index b802cb6..b36802b 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -14,6 +14,7 @@ return { } }, 'dmitmel/cmp-cmdline-history', + 'onsails/lspkind.nvim', 'folke/lazydev.nvim', 'L3MON4D3/LuaSnip', { @@ -50,39 +51,6 @@ return { -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono', - kind_icons = { - Copilot = '', - Text = '󰉿', - Method = '󰊕', - Function = '󰊕', - Constructor = '󰒓', - - Field = '󰜢', - Variable = '󰆦', - Property = '󰖷', - - Class = '󱡠', - Interface = '󱡠', - Struct = '󱡠', - Module = '󰅩', - - Unit = '󰪚', - Value = '󰦨', - Enum = '󰦨', - EnumMember = '󰦨', - - Keyword = '󰻾', - Constant = '󰏿', - - Snippet = '󱄽', - Color = '󰏘', - File = '󰈔', - Reference = '󰬲', - Folder = '󰉋', - Event = '󱐋', - Operator = '󰪚', - TypeParameter = '󰬛', - }, }, -- default list of enabled providers defined so that you can extend it @@ -169,6 +137,41 @@ return { padding = 1, gap = 1, -- treesitter = { 'lsp' }, + components = { + kind_icon = { + ellipsis = false, + text = function(ctx) + local lspkind = require('lspkind') + local icon = ctx.kind_icon + if vim.tbl_contains({ 'Path' }, ctx.source_name) then + local dev_icon, _ = require('nvim-web-devicons').get_icon(ctx.label) + if dev_icon then + icon = dev_icon + end + else + icon = lspkind.symbolic(ctx.kind, { + mode = 'symbol', + }) + end + + return icon .. ctx.icon_gap + end, + + -- Optionally, use the highlight groups from nvim-web-devicons + -- You can also add the same function for `kind.highlight` if you want to + -- keep the highlight groups in sync with the icons. + highlight = function(ctx) + local hl = ctx.kind_hl + if vim.tbl_contains({ 'Path' }, ctx.source_name) then + local dev_icon, dev_hl = require('nvim-web-devicons').get_icon(ctx.label) + if dev_icon then + hl = dev_hl + end + end + return hl + end, + } + } }, }, documentation = { -- 2.49.1 From 55423e59646be2100df3813d0b2d63d19abd8066 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Mar 2025 23:01:31 +0100 Subject: [PATCH 750/894] blink: show from all buffers in this win --- lua/plugins/blink.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index b36802b..b64819e 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -84,7 +84,21 @@ return { cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', - } + }, + buffer = { + name = 'Buffer', + module = 'blink.cmp.sources.buffer', + opts = { + -- default to all visible buffers + get_bufnrs = function() + return vim + .iter(vim.api.nvim_list_wins()) + :map(function(win) return vim.api.nvim_win_get_buf(win) end) + :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) + :totable() + end, + } + }, }, }, -- 2.49.1 From 8020b6efc978c76d9984a8a42768c7a190ac6a7a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Mar 2025 23:01:42 +0100 Subject: [PATCH 751/894] history score offset --- lua/plugins/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index b64819e..ba526fd 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -84,6 +84,7 @@ return { cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', + score_offset = -50 }, buffer = { name = 'Buffer', -- 2.49.1 From 89c5cdb7f5779ae4a1593b143825a0017fbbc8bd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 2 Mar 2025 23:01:58 +0100 Subject: [PATCH 752/894] icons and highlights for cmdline --- lua/plugins/blink.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index ba526fd..07ac0f2 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -158,7 +158,9 @@ return { text = function(ctx) local lspkind = require('lspkind') local icon = ctx.kind_icon - if vim.tbl_contains({ 'Path' }, ctx.source_name) then + if ctx.source_name == 'cmdline_history' then + icon = require('nvim-web-devicons').get_icon('log') + elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then local dev_icon, _ = require('nvim-web-devicons').get_icon(ctx.label) if dev_icon then icon = dev_icon @@ -177,7 +179,11 @@ return { -- keep the highlight groups in sync with the icons. highlight = function(ctx) local hl = ctx.kind_hl - if vim.tbl_contains({ 'Path' }, ctx.source_name) then + if ctx.source_name == 'cmdline_history' then + _, hl = require('nvim-web-devicons').get_icon('log') + elseif ctx.source_name == 'cmdline' then + _, hl = require('nvim-web-devicons').get_icon('cc') + elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then local dev_icon, dev_hl = require('nvim-web-devicons').get_icon(ctx.label) if dev_icon then hl = dev_hl -- 2.49.1 From 7b1d7ef35e479ba16ff2177b45fe86f98290fd84 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 3 Mar 2025 07:07:50 +0000 Subject: [PATCH 753/894] disable dot repeat in blink --- lua/plugins/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 07ac0f2..3730ffb 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -144,7 +144,7 @@ return { }, accept = { - dot_repeat = true, + dot_repeat = false, }, menu = { max_height = 25, -- 2.49.1 From aca5a2c8587441f67b085395fa7982160ed6d5de Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 9 Mar 2025 23:49:38 +0100 Subject: [PATCH 754/894] added avante --- lua/plugins/avante.lua | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 lua/plugins/avante.lua diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua new file mode 100644 index 0000000..272a539 --- /dev/null +++ b/lua/plugins/avante.lua @@ -0,0 +1,62 @@ +return { + 'yetone/avante.nvim', + event = 'VeryLazy', + lazy = false, + version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes. + opts = { + debug = true, + provider = 'gemini', + auto_suggestions_provider = 'openai', -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot + openai = { + endpoint = 'https://api.openai.com/v1', + -- model = 'o3-mini', + timeout = 30000, -- Timeout in milliseconds + temperature = 0, + max_tokens = 4096, + }, + gemini = { + api_key_name = 'GEMINI_API_KEY', + model = 'gemini-2.0-flash', + }, + }, + -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` + build = 'make', + -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows + dependencies = { + 'stevearc/dressing.nvim', + 'nvim-lua/plenary.nvim', + 'MunifTanjim/nui.nvim', + --- The below dependencies are optional, + -- 'echasnovski/mini.pick', -- for file_selector provider mini.pick + -- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope + -- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions + 'ibhagwan/fzf-lua', -- for file_selector provider fzf + 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons + -- 'zbirenbaum/copilot.lua', -- for providers='copilot' + { + -- support for image pasting + 'HakonHarnes/img-clip.nvim', + event = 'VeryLazy', + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, + }, + -- { + -- -- Make sure to set this up properly if you have lazy=true + -- 'MeanderingProgrammer/render-markdown.nvim', + -- opts = { + -- file_types = { 'markdown', 'Avante' }, + -- }, + -- ft = { 'markdown', 'Avante' }, + -- }, + }, +} -- 2.49.1 From 4604fde5d14d17de9a260e088a0fad9f439290a5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 9 Mar 2025 23:49:55 +0100 Subject: [PATCH 755/894] updated plugins --- lazy-lock.json | 57 +++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index cda41ac..e37a8bf 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,74 +3,83 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, - "bamboo.nvim": { "branch": "master", "commit": "0a94f81705733951be286493b8d1876d0e3d990f" }, - "blink-cmp-copilot": { "branch": "main", "commit": "5d4ed42c5d7d144012792bb6cc4ac7899a108169" }, - "blink-copilot": { "branch": "main", "commit": "feb9cbd4b67eb45a1be09c84dd6a7a434b74487a" }, - "blink.cmp": { "branch": "main", "commit": "18b352d12b35bca148427b607098df14b75a218f" }, + "avante.nvim": { "branch": "main", "commit": "cdbfe79097fa2c72578b5560559b88e680f137c8" }, + "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, + "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, + "blink-copilot": { "branch": "main", "commit": "ad40ac22ed53a1f8f6b6449479d6f72382afecdd" }, + "blink.cmp": { "branch": "main", "commit": "dcda20d3aa345025699a920c45b0a0603551f41d" }, "blink.compat": { "branch": "main", "commit": "b0c87b64f9c669d3bcfaea8a80396fbc16e0fcb5" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, - "cmake-tools.nvim": { "branch": "master", "commit": "680a50111f6ebbbc0f126d07ad701bdbd4d1c599" }, + "cmake-tools.nvim": { "branch": "master", "commit": "a5d5bf0a93bb96085502334a5036fc054ad9cf33" }, + "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "3e71a1a7c0b3788bdb7bc72c6f3478d928d796da" }, + "codecompanion.nvim": { "branch": "main", "commit": "855c4bce42eca5209a0ef53f7a4188d78d520ed1" }, "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, "copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "efmls-configs-nvim": { "branch": "main", "commit": "f769e051831782732b392da412892cd2eb9c104d" }, - "everforest-nvim": { "branch": "main", "commit": "76cd62618afd415215e5bcdd7d2667c0323669bb" }, + "everforest-nvim": { "branch": "main", "commit": "135cc21a45756e688dd1a3cbeb1c80a04b569b46" }, "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, - "gitsigns.nvim": { "branch": "main", "commit": "8b00147519d6f8353867d5d0b55f587306b0cfb6" }, - "grug-far.nvim": { "branch": "main", "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" }, + "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, + "grug-far.nvim": { "branch": "main", "commit": "3a370c3a47b579f67a365c16d7bb740fa9d8eb7d" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, - "gruvbox.nvim": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" }, + "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, + "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, + "img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" }, "indent-blankline.nvim": { "branch": "master", "commit": "7a698a1d7ed755af9f5a88733b23ca246ce2df28" }, "iron.nvim": { "branch": "master", "commit": "e2021d242088bc98f7df75bee487a0ae1bfafc5f" }, - "kanagawa.nvim": { "branch": "master", "commit": "2de175482f215c69a1d12ab10a8bf2a7a2e44ff2" }, - "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, - "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, + "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, - "markview.nvim": { "branch": "main", "commit": "f1e2a57388b61fff8e9d7519ce05cee27a59a57e" }, + "markview.nvim": { "branch": "main", "commit": "665ad501245a2acc7234939dec748bfb50121d2f" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, - "monokai-pro.nvim": { "branch": "master", "commit": "6c15e36834a624a32f46c6db8f9fc063995b24b6" }, + "monokai-pro.nvim": { "branch": "master", "commit": "872f774303f79416000e8049630052f4124d9534" }, "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" }, + "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, + "nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, "nvim-highlight-colors": { "branch": "main", "commit": "a770df5fbd98abbb0fc1a95d9a3f2bb1e51e3e2c" }, "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, - "nvim-lspconfig": { "branch": "master", "commit": "7af2c37192deae28d1305ae9e68544f7fb5408e1" }, + "nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "2cade9e3d105732b794bc37e7cb2dc53b1cf99dc" }, + "nvim-treesitter": { "branch": "master", "commit": "afe977dadd8bccbd3919b29a8b5beb5b8bfc6cdb" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" }, + "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, "overseer.nvim": { "branch": "master", "commit": "2c23513a4fd3a3be0459b3b62996fb0732c2fd7e" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "2dfe4885a1c0a678a0ffe667fcb6650d797ea66a" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562" }, - "rustaceanvim": { "branch": "master", "commit": "f03035fa03ccb36cd26d0792c946fbacba1d1a39" }, - "snacks.nvim": { "branch": "main", "commit": "95878ad32aaf310f465a004ef12e9edddf939287" }, + "pretty_hover": { "branch": "master", "commit": "7840c9403f6431f198feeca37b18e29412fe99e6" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "c2255b20bb1accb0e83e70f995adf99b78dee13d" }, + "rustaceanvim": { "branch": "master", "commit": "2b0f0b7e03751cf8ed123322f9b02d8f73fa9df7" }, + "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "tokyonight.nvim": { "branch": "main", "commit": "b262293ef481b0d1f7a14c708ea7ca649672e200" }, "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, - "which-key.nvim": { "branch": "main", "commit": "b74a3c85f03225bc91f4f5a9056518d3fa9a3470" }, + "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } -- 2.49.1 From 54e224ee7504ec34f1acc27e0fd6f1b8cbbaa0c8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 18 Mar 2025 20:24:03 +0100 Subject: [PATCH 756/894] avante adjust for markview --- lua/plugins/markview.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua index 185fc5c..ce79419 100644 --- a/lua/plugins/markview.lua +++ b/lua/plugins/markview.lua @@ -2,6 +2,36 @@ return { 'OXY2DEV/markview.nvim', lazy = false, config = function() + require('markview').setup({ + preview = { + filetypes = { + 'md', + 'markdown', + 'norg', + 'rmd', + 'org', + 'vimwiki', + 'typst', + 'latex', + 'quarto', + 'Avante', + 'codecompanion', + }, + ignore_buftypes = {}, + + condition = function(buffer) + local ft, bt = vim.bo[buffer].ft, vim.bo[buffer].bt; + + if bt == 'nofile' and ft == 'Avante' then + return true; + elseif bt == 'nofile' then + return false; + else + return true; + end + end + } + }) vim.api.nvim_create_autocmd('User', { pattern = 'MarkviewAttach', callback = function(event) -- 2.49.1 From e97c34d65d7610180dac6a3dcbc43fcf2cc81783 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 18 Mar 2025 21:29:32 +0100 Subject: [PATCH 757/894] dap completion with blink --- lua/plugins/blink.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 3730ffb..bbf1009 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -26,6 +26,7 @@ return { -- make sure to set opts so that lazy.nvim calls blink.compat's setup opts = {}, }, + 'rcarriga/cmp-dap' }, -- use a release tag to download pre-built binaries @@ -53,11 +54,24 @@ return { nerd_font_variant = 'mono', }, + enabled = function() + return (vim.bo.buftype ~= 'prompt' and vim.b.completion ~= false) or require('cmp_dap').is_dap_buffer() + end, -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { default = { 'copilot', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'codeium' }, + per_filetype = { + ['dap-repl'] = { + 'copilot', + 'dap', + 'snippets', + 'path', + 'buffer', + } + }, + providers = { copilot = { name = 'copilot', @@ -86,6 +100,14 @@ return { module = 'blink.compat.source', score_offset = -50 }, + dap = { + name = 'dap', + module = 'blink.compat.source', + async = true, + enabled = function() + return require('cmp_dap').is_dap_buffer() + end, + }, buffer = { name = 'Buffer', module = 'blink.cmp.sources.buffer', -- 2.49.1 From 9b58d16e6e23ada2b32d49230d3d11ce80076b0f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 18 Mar 2025 21:31:04 +0100 Subject: [PATCH 758/894] removed cmp from dap --- lua/plugins/dap.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 1964eda..fcfc54c 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -14,10 +14,6 @@ return { 'nvim-neotest/nvim-nio', }, }, - { - 'rcarriga/cmp-dap', - version = false, - }, { 'LiadOz/nvim-dap-repl-highlights', version = false, @@ -91,7 +87,6 @@ return { config = function() local dap = require('dap') vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' }) - require('cmp_dap').is_dap_buffer() -- make sure we can exit the terminal with esc vim.api.nvim_create_autocmd({ 'TermOpen' }, { -- 2.49.1 From 725721af8bd74059515dc3fb4dbaafa0b32a06b5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 25 Mar 2025 20:56:04 +0100 Subject: [PATCH 759/894] update to blink v1.0.0 --- lazy-lock.json | 38 +++++++++++++++++++------------------- lua/plugins/blink.lua | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index e37a8bf..954524d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,20 +3,20 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, - "avante.nvim": { "branch": "main", "commit": "cdbfe79097fa2c72578b5560559b88e680f137c8" }, + "avante.nvim": { "branch": "main", "commit": "39787969c769204861f1339e52ffcdd00e648220" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, "blink-copilot": { "branch": "main", "commit": "ad40ac22ed53a1f8f6b6449479d6f72382afecdd" }, - "blink.cmp": { "branch": "main", "commit": "dcda20d3aa345025699a920c45b0a0603551f41d" }, - "blink.compat": { "branch": "main", "commit": "b0c87b64f9c669d3bcfaea8a80396fbc16e0fcb5" }, + "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, + "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, "cmake-tools.nvim": { "branch": "master", "commit": "a5d5bf0a93bb96085502334a5036fc054ad9cf33" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "855c4bce42eca5209a0ef53f7a4188d78d520ed1" }, + "codecompanion.nvim": { "branch": "main", "commit": "57bc5689a64a15b12251a8cd3c28dddd0d52c0cc" }, "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, - "copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" }, + "copilot.lua": { "branch": "master", "commit": "d296017e588215df3f7b5796d1172f0d690fa13c" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "efmls-configs-nvim": { "branch": "main", "commit": "f769e051831782732b392da412892cd2eb9c104d" }, @@ -24,26 +24,26 @@ "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, - "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, - "grug-far.nvim": { "branch": "main", "commit": "3a370c3a47b579f67a365c16d7bb740fa9d8eb7d" }, + "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, + "grug-far.nvim": { "branch": "main", "commit": "7aea7cdf040b7586068fa198bd7364e3f642850d" }, "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, "img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7a698a1d7ed755af9f5a88733b23ca246ce2df28" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "iron.nvim": { "branch": "master", "commit": "e2021d242088bc98f7df75bee487a0ae1bfafc5f" }, - "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, + "kanagawa.nvim": { "branch": "master", "commit": "709018d5af92d2e5780bfb8a6d36e9cad01a6402" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, + "lualine.nvim": { "branch": "master", "commit": "9fef261b53fbe3a2ef01ee9667f6fde064b1ed10" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, - "markview.nvim": { "branch": "main", "commit": "665ad501245a2acc7234939dec748bfb50121d2f" }, + "markview.nvim": { "branch": "main", "commit": "556cac8bb8eeb461013ebe0d015e2c48d3527c36" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, @@ -55,25 +55,25 @@ "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, - "nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" }, + "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-highlight-colors": { "branch": "main", "commit": "a770df5fbd98abbb0fc1a95d9a3f2bb1e51e3e2c" }, - "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, - "nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" }, + "nvim-highlight-colors": { "branch": "main", "commit": "7eeaa05eab26fb840c4fe7bca91710bf37cb13ed" }, + "nvim-lint": { "branch": "master", "commit": "936197073214c26a347fb933c9459c8766376b23" }, + "nvim-lspconfig": { "branch": "master", "commit": "200280dab91a7df2ca42fd2ab3cb4c5fab056666" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "afe977dadd8bccbd3919b29a8b5beb5b8bfc6cdb" }, + "nvim-treesitter": { "branch": "master", "commit": "e329e94a6a0a5ccf6ec8bfec1d10faf5eaae665f" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" }, "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, "overseer.nvim": { "branch": "master", "commit": "2c23513a4fd3a3be0459b3b62996fb0732c2fd7e" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "pretty_hover": { "branch": "master", "commit": "7840c9403f6431f198feeca37b18e29412fe99e6" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "c2255b20bb1accb0e83e70f995adf99b78dee13d" }, - "rustaceanvim": { "branch": "master", "commit": "2b0f0b7e03751cf8ed123322f9b02d8f73fa9df7" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "de39919a57e1a40a4c7dc5bae0de276f9c616ef3" }, + "rustaceanvim": { "branch": "master", "commit": "1486b5a2cc0de646d6d0837ec77127c9d6e2c50f" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index bbf1009..f444166 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -30,7 +30,7 @@ return { }, -- use a release tag to download pre-built binaries - version = 'v0.*', + version = '*', -- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust -- build = 'cargo build --release', -- If you use nix, you can build from source using latest nightly rust with: -- 2.49.1 From 497429a1c362874d95bbec0cb00dd287c0c70b8c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 25 Mar 2025 21:31:13 +0100 Subject: [PATCH 760/894] colors lualine --- lua/plugins/lualine.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 1953289..4f8992c 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -46,6 +46,7 @@ return { cond = function() return package.loaded['nvim-navic'] and require('nvim-navic').is_available() end, + color = { fg = colors.vulgaris.blue } }, }, lualine_y = { -- 2.49.1 From 9c904b2f84cc62fa4a1ad3ad77dd23a5ff9d0105 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:06:15 +0100 Subject: [PATCH 761/894] show floating boarder --- lua/config/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/config/options.lua b/lua/config/options.lua index 10100fb..395ec15 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -23,6 +23,7 @@ opt.showmatch = true -- Show matching braces opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true +opt.winborder = 'rounded' opt.scrolloff = 4 opt.shiftround = true opt.relativenumber = false -- 2.49.1 From 028ca26b085e197e1a4029d60a6ec424a9f20253 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:06:48 +0100 Subject: [PATCH 762/894] deprecated function --- lua/config/options.lua | 36 +++++++++++++++++++++++++++++------- lua/plugins/lspconfig.lua | 16 ---------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 395ec15..388990b 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -109,14 +109,36 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()' opt.foldexpr = 'nvim_treesitter#foldexpr()' vim.diagnostic.config({ - virtual_text = false, - signs = true, - float = { - border = 'single', - format = function(diagnostic) - return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code) - end, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon + [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon + [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon + [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) + }, + -- Define the highlight group to use for the sign text for each severity + texthl = { + [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', + [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', + [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', + [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', + }, + -- Optional: Highlight the line number column + numhl = { + [vim.diagnostic.severity.ERROR] = 'DiagnosticLineNrError', + -- Add others for WARN, INFO, HINT if desired + }, + -- Optional: Highlight the whole line + linehl = { + -- Define highlight groups like 'DiagnosticLineError', 'DiagnosticLineWarn', etc. + [vim.diagnostic.severity.ERROR] = 'DiagnosticLineError', + }, }, + -- Other diagnostic configurations (optional examples) + virtual_text = false, -- Disable virtual text (inline messages) + underline = true, -- Enable underlining diagnostics + update_in_insert = false, -- Don't update diagnostics in insert mode + severity_sort = true, -- Sort diagnostics by severity }) -- Window border for floating windows diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index bdce254..0c85aac 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -116,23 +116,7 @@ return { }, } - local diagnostics = { - Error = ' ', - Warning = ' ', - Information = ' ', - Question = ' ', - Hint = ' ', - } - local signs = { - { name = 'DiagnosticSignError', text = diagnostics.Error }, - { name = 'DiagnosticSignWarn', text = diagnostics.Warning }, - { name = 'DiagnosticSignHint', text = diagnostics.Hint }, - { name = 'DiagnosticSignInfo', text = diagnostics.Information }, - } - for _, sign in ipairs(signs) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name }) - end OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do -- 2.49.1 From a1b2f4da153dab0eab966d779ce3ed6063fc9474 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:07:19 +0100 Subject: [PATCH 763/894] format options file --- lua/config/options.lua | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 388990b..c1a6b37 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,24 +3,24 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.winborder = 'rounded' @@ -135,10 +135,10 @@ vim.diagnostic.config({ }, }, -- Other diagnostic configurations (optional examples) - virtual_text = false, -- Disable virtual text (inline messages) - underline = true, -- Enable underlining diagnostics - update_in_insert = false, -- Don't update diagnostics in insert mode - severity_sort = true, -- Sort diagnostics by severity + virtual_text = false, -- Disable virtual text (inline messages) + underline = true, -- Enable underlining diagnostics + update_in_insert = false, -- Don't update diagnostics in insert mode + severity_sort = true, -- Sort diagnostics by severity }) -- Window border for floating windows -- 2.49.1 From 9498c776b91d59fe718848def9d45b39f44b9259 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:07:26 +0100 Subject: [PATCH 764/894] new gemini model --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 272a539..d50c09b 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -16,7 +16,7 @@ return { }, gemini = { api_key_name = 'GEMINI_API_KEY', - model = 'gemini-2.0-flash', + model = 'gemini-2.5-pro-exp-03-25', }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` -- 2.49.1 From 2eb6baa6262b793e2f8d1d6a1f70ecb736f6fe4c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:09:44 +0100 Subject: [PATCH 765/894] disabled git status pane --- lua/plugins/snacks.lua | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 250f92c..06ccd4b 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -20,18 +20,6 @@ return { { title = 'Sessions', padding = 1 }, { pane = 1, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, - { - pane = 2, - icon = ' ', - title = 'Git Status', - section = 'terminal', - cmd = 'output=$(CLICOLOR=1 GH_FORCE_TTY=1 gh pr status 2>&1) && echo -e "$output" || true', - height = 30, - width = 80, - padding = 1, - ttl = 5 * 60, - indent = 3, - }, { section = 'startup' }, }, }, -- 2.49.1 From 2f6ba7cd62fca68c194c0c3a5a2baaacc76ced52 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:21:16 +0100 Subject: [PATCH 766/894] removed debug output --- lua/plugins/markview.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua index ce79419..75f11a9 100644 --- a/lua/plugins/markview.lua +++ b/lua/plugins/markview.lua @@ -35,7 +35,6 @@ return { vim.api.nvim_create_autocmd('User', { pattern = 'MarkviewAttach', callback = function(event) - print(event.buf) vim.keymap.set('n', '', require('markview').commands.open, { buffer = event.buf, desc = 'Open Link', silent = false }) end -- 2.49.1 From ed4a7f86b57591f583e9be3d0173b69e40d7bcb1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Mar 2025 21:21:26 +0100 Subject: [PATCH 767/894] removed unused import --- lua/plugins/lualine.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 4f8992c..d51cf35 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -6,7 +6,6 @@ return { }, config = function() vim.opt.laststatus = 3 - local navic = require('nvim-navic') local colors = require('bamboo.palette') require('lualine').setup({ options = { -- 2.49.1 From 405cf6e7aca018c1282fcf5e4be7d453303d799e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Mar 2025 07:47:06 +0000 Subject: [PATCH 768/894] Fixed tab color in lualine --- lua/plugins/lualine.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index d51cf35..342b7af 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -119,6 +119,11 @@ return { { 'tabs', mode = 2, + tabs_color = { + -- Same values as the general color option can be used here. + active = { bg = 'orange', fg = 'black' }, + inactive = { bg = 'grey'}, + }, }, }, lualine_x = {}, -- 2.49.1 From aff6baa61e073260982a0d5fb72ec0b0a5c06bf0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Mar 2025 23:18:49 +0100 Subject: [PATCH 769/894] diagnostic config --- lua/config/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index c1a6b37..9de33a5 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -135,7 +135,8 @@ vim.diagnostic.config({ }, }, -- Other diagnostic configurations (optional examples) - virtual_text = false, -- Disable virtual text (inline messages) + virtual_text = false, + virtual_lines = false, underline = true, -- Enable underlining diagnostics update_in_insert = false, -- Don't update diagnostics in insert mode severity_sort = true, -- Sort diagnostics by severity -- 2.49.1 From 0f83d5805835fc61a5e788c729276035f591286f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Mar 2025 23:22:51 +0100 Subject: [PATCH 770/894] codium only on my home pc --- lua/plugins/codium.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua index 79ab97c..7654ef5 100644 --- a/lua/plugins/codium.lua +++ b/lua/plugins/codium.lua @@ -6,5 +6,5 @@ return { config = function() require('codeium').setup({}) end, - enabled = true + enabled = vim.fn.hostname() == 'perryLinux64' } -- 2.49.1 From 345147cc91e76d667ced0318fa311b7c5a0007a6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Mar 2025 23:25:10 +0100 Subject: [PATCH 771/894] remove pretty hover --- lua/plugins/pretty_hover.lua | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 lua/plugins/pretty_hover.lua diff --git a/lua/plugins/pretty_hover.lua b/lua/plugins/pretty_hover.lua deleted file mode 100644 index 2a0b85d..0000000 --- a/lua/plugins/pretty_hover.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'Fildo7525/pretty_hover', - event = 'LspAttach', - opts = {}, -} -- 2.49.1 From 0ccaeed2e5d1d2d475fbcee9d40cb2bf5498ceca Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 28 Mar 2025 23:43:47 +0100 Subject: [PATCH 772/894] format codecompanion --- lua/plugins/codecompanion.lua | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index db82774..9509e10 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -1,29 +1,29 @@ -return { - 'olimorris/codecompanion.nvim', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-treesitter/nvim-treesitter', - }, - branch = 'main', - config = function() - require('codecompanion').setup({ - strategies = { - chat = { - adapter = 'copilot', - }, - inline = { - adapter = 'copilot', - }, - }, - -- adapters = { - -- anthropic = function() - -- return require('codecompanion.adapters').extend('copilot', { - -- env = { - -- api_key = 'ghu_8hbMItSdtNIrzMI4svd94dem3ZCsk23VG446', - -- }, - -- }) - -- end, - -- }, - }) - end, -} +return { + 'olimorris/codecompanion.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + branch = 'main', + config = function() + require('codecompanion').setup({ + strategies = { + chat = { + adapter = 'copilot', + }, + inline = { + adapter = 'copilot', + }, + }, + -- adapters = { + -- anthropic = function() + -- return require('codecompanion.adapters').extend('copilot', { + -- env = { + -- api_key = 'ghu_8hbMItSdtNIrzMI4svd94dem3ZCsk23VG446', + -- }, + -- }) + -- end, + -- }, + }) + end, +} -- 2.49.1 From 4e5b9743505f3b67274ee3c3ff87830ae561c834 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 29 Mar 2025 00:13:08 +0100 Subject: [PATCH 773/894] markdown changes --- lua/plugins/markdown.lua | 11 --------- lua/plugins/markview.lua | 43 --------------------------------- lua/plugins/render-markdown.lua | 9 +++++++ 3 files changed, 9 insertions(+), 54 deletions(-) delete mode 100644 lua/plugins/markdown.lua delete mode 100644 lua/plugins/markview.lua create mode 100644 lua/plugins/render-markdown.lua diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua deleted file mode 100644 index 60f8181..0000000 --- a/lua/plugins/markdown.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'MeanderingProgrammer/markdown.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - 'nvim-tree/nvim-web-devicons', - }, -- if you prefer nvim-web-devicons - config = function() - require('render-markdown').setup({}) - end, - enabled = false -} diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua deleted file mode 100644 index 75f11a9..0000000 --- a/lua/plugins/markview.lua +++ /dev/null @@ -1,43 +0,0 @@ -return { - 'OXY2DEV/markview.nvim', - lazy = false, - config = function() - require('markview').setup({ - preview = { - filetypes = { - 'md', - 'markdown', - 'norg', - 'rmd', - 'org', - 'vimwiki', - 'typst', - 'latex', - 'quarto', - 'Avante', - 'codecompanion', - }, - ignore_buftypes = {}, - - condition = function(buffer) - local ft, bt = vim.bo[buffer].ft, vim.bo[buffer].bt; - - if bt == 'nofile' and ft == 'Avante' then - return true; - elseif bt == 'nofile' then - return false; - else - return true; - end - end - } - }) - vim.api.nvim_create_autocmd('User', { - pattern = 'MarkviewAttach', - callback = function(event) - vim.keymap.set('n', '', require('markview').commands.open, - { buffer = event.buf, desc = 'Open Link', silent = false }) - end - }) - end -}; diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua new file mode 100644 index 0000000..125da72 --- /dev/null +++ b/lua/plugins/render-markdown.lua @@ -0,0 +1,9 @@ +return { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = { + completions = { blink = { enabled = true } }, + } +} -- 2.49.1 From 1393c83f4f5855fb341b17b9501b5c9c0acf354d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 29 Mar 2025 00:13:38 +0100 Subject: [PATCH 774/894] lspconfig removed pretty hover --- lua/plugins/lspconfig.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 0c85aac..64e72e7 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -5,9 +5,7 @@ local lspKeys = function(client, bufnr) vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', function() - require('pretty_hover').hover() - end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'h', vim.lsp.buf.hover, vim.tbl_extend('error', options, { desc = 'Hover' })) vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, -- 2.49.1 From 08ec2a4579434744f0f68093162bde79538ec336 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 29 Mar 2025 00:20:01 +0100 Subject: [PATCH 775/894] removed fzf lua --- lua/plugins/fzf-lua.lua | 127 ---------------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 lua/plugins/fzf-lua.lua diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua deleted file mode 100644 index 7f093ff..0000000 --- a/lua/plugins/fzf-lua.lua +++ /dev/null @@ -1,127 +0,0 @@ -return { - 'ibhagwan/fzf-lua', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - version = false, - config = function() - local actions = require('fzf-lua.actions') - require('fzf-lua').setup({ - 'borderless_full', - actions = { - files = { - ['default'] = actions.file_edit_or_qf, - ['ctrl-s'] = actions.file_split, - ['ctrl-v'] = actions.file_vsplit, - ['ctrl-t'] = actions.file_tabedit, - ['alt-q'] = actions.file_sel_to_qf, - ['alt-l'] = actions.file_sel_to_ll, - ['ctrl-x'] = actions.file_split, - }, - buffers = { - ['default'] = actions.buf_edit, - ['ctrl-s'] = actions.buf_split, - ['ctrl-v'] = actions.buf_vsplit, - ['ctrl-t'] = actions.buf_tabedit, - ['ctrl-x'] = actions.buf_split, - }, - }, - }) - end, - cmd = 'FzfLua', - keys = { - { - 'f', - function() - require('fzf-lua').files() - end, - desc = 'Find files', - }, - { - 'c', - function() - require('fzf-lua').commands() - end, - desc = 'Find commands', - }, - { - 'g', - function() - require('fzf-lua').git_files() - end, - desc = 'Find git files', - }, - { - 'o', - function() - require('fzf-lua').oldfiles() - end, - desc = 'Find old files', - }, - { - 'i', - function() - require('fzf-lua').oldfiles({ cwd_only = true }) - end, - desc = 'Find old files in cwd', - }, - { - 'b', - function() - require('fzf-lua').buffers() - end, - desc = 'Select buffer', - }, - { - 'q', - function() - require('fzf-lua').quickfix() - end, - desc = 'Quickfix list', - }, - { - 'l', - function() - require('fzf-lua').live_grep_native() - end, - desc = 'Search in project', - }, - { - 'd', - function() - require('fzf-lua').grep_cword() - end, - mode = { 'n' }, - desc = 'Find word under cursor', - }, - { - 'd', - function() - require('fzf-lua').grep_visual() - end, - mode = { 'x', 'v' }, - desc = 'Find word under cursor', - }, - { - 'j', - function() - require('fzf-lua').jumps() - end, - desc = 'Open jumplist', - }, - { - '', - function() - require('fzf-lua').grep_curbuf() - end, - desc = 'Find in buffer', - }, - { - '', - function() - require('fzf-lua').complete_path() - end, - mode = { 'n', 'v', 'i' }, - desc = 'Fuzzy complete path', - }, - }, - enabled = false -} -- 2.49.1 From 6f56fa264c7ad0aea21bb68b930e063fe6b1c414 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Mar 2025 21:04:50 +0200 Subject: [PATCH 776/894] neogit adjust --- lua/plugins/neogit.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 724365d..e8aad9d 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -9,8 +9,6 @@ return { neogit.setup({ integrations = { diffview = true, - telescope = false, - fzf_lua = true, }, graph_style = 'unicode', }) -- 2.49.1 From 07487ff91a50d6a8fea231093b2bb04d96b0e582 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Mar 2025 21:25:50 +0200 Subject: [PATCH 777/894] snacks picker for dap --- lua/plugins/dap.lua | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index fcfc54c..9932b37 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -123,7 +123,46 @@ return { require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json local pythonVenv = require('utils.python_venv') + local snacks = require('snacks') + local dap = require('dap') + local function get_all_dap_configurations() + require('dap.ext.vscode').load_launchjs() + local configs = {} + + for filetype, entries in pairs(dap.configurations or {}) do + for _, cfg in ipairs(entries) do + table.insert(configs, { + label = cfg.name or '[No name]', + desc = string.format('Type: %s | Filetype: %s', cfg.type, filetype), + config = cfg, -- store actual config separately + }) + end + end + + return configs + end + + local function pick_dap_configuration() + local items = get_all_dap_configurations() + + snacks.picker({ + items = items, + prompt = 'DAP Configurations', + confirm = function(picker, item) + picker:close() + local config = item.config + if config then + dap.run(config) + else + vim.notify('Invalid DAP config', vim.log.levels.ERROR) + end + end, + }) + end + + -- Create a Neovim command for convenience + vim.api.nvim_create_user_command('PickDapConfig', pick_dap_configuration, {}) function loadConfigs() require('dap.ext.vscode').load_launchjs() -- Make sure we use the correct python env even for the configs from launch.json -- 2.49.1 From 12d2dd05b584bb616f637f18cd000d7d18705d12 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Mar 2025 21:51:51 +0200 Subject: [PATCH 778/894] cleanup dap --- lua/plugins/dap.lua | 122 +++++--------------------------------------- 1 file changed, 14 insertions(+), 108 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 9932b37..b9e5d88 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -37,9 +37,9 @@ return { { '', function() - loadConfigs() + require('dap').run_last() end, - desc = 'DAP configs', + desc = 'Run last', }, { '', @@ -97,93 +97,15 @@ return { end, }) - -- Hover with K - local api = vim.api - local keymap_restore = {} - dap.listeners.after['event_initialized']['me'] = function() - for _, buf in pairs(api.nvim_list_bufs()) do - local keymaps = api.nvim_buf_get_keymap(buf, 'n') - for _, keymap in pairs(keymaps) do - if keymap.lhs == 'K' then - table.insert(keymap_restore, keymap) - api.nvim_buf_del_keymap(buf, 'n', 'K') - end - end - end - api.nvim_set_keymap('n', 'K', 'lua require("dap.ui.widgets").hover()', { silent = true }) - end - - dap.listeners.after['event_terminated']['me'] = function() - for _, keymap in pairs(keymap_restore) do - api.nvim_buf_set_keymap(keymap.buffer, keymap.mode, keymap.lhs, keymap.rhs, { silent = keymap.silent == 1 }) - end - keymap_restore = {} - end - require('dap.ext.vscode').json_decode = require('utils.json_workaround').decode_json - local pythonVenv = require('utils.python_venv') - local snacks = require('snacks') - local dap = require('dap') - - local function get_all_dap_configurations() - require('dap.ext.vscode').load_launchjs() - local configs = {} - - for filetype, entries in pairs(dap.configurations or {}) do - for _, cfg in ipairs(entries) do - table.insert(configs, { - label = cfg.name or '[No name]', - desc = string.format('Type: %s | Filetype: %s', cfg.type, filetype), - config = cfg, -- store actual config separately - }) - end - end - - return configs - end - - local function pick_dap_configuration() - local items = get_all_dap_configurations() - - snacks.picker({ - items = items, - prompt = 'DAP Configurations', - confirm = function(picker, item) - picker:close() - local config = item.config - if config then - dap.run(config) - else - vim.notify('Invalid DAP config', vim.log.levels.ERROR) - end - end, - }) - end - - -- Create a Neovim command for convenience - vim.api.nvim_create_user_command('PickDapConfig', pick_dap_configuration, {}) - function loadConfigs() - require('dap.ext.vscode').load_launchjs() - -- Make sure we use the correct python env even for the configs from launch.json - for _, config in pairs(dap.configurations.python) do - config.pythonPath = pythonVenv.getPythonEnv() - config.cwd = vim.fn.getcwd() - end - require('fzf-lua').dap_configurations() - end - local masonpath = vim.fn.stdpath('data') .. '/mason' - -- PYTHON - dap.adapters.python = { - type = 'executable', - command = 'python', - args = { '-m', 'debugpy.adapter' }, - options = { - detached = true, - }, - } + vim.keymap.set('x', 'k', function() + local lines = vim.fn.getregion(vim.fn.getpos('.'), vim.fn.getpos('v'), { type = vim.fn.mode() }) + -- dap.repl.open() + dap.repl.execute(table.concat(lines, '\n')) + end) local dapui = require('dapui') dapui.setup() @@ -200,28 +122,12 @@ return { dapui.close() end - dap.configurations.python = { - { - type = 'python', - request = 'launch', - name = 'Launch file with venv', - justMyCode = false, - program = '${file}', - cwd = vim.fn.getcwd(), - pythonPath = pythonVenv.getPythonEnv, - }, - } - - -- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python') - -- table.insert(require('dap').configurations.python, { - -- -- type = 'python', - -- -- request = 'launch', - -- -- name = 'My custom launch configuration', - -- -- program = '${file}', - -- justMyCode = false - -- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings - -- }) - -- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe') + local path = require('mason-registry').get_package('debugpy'):get_install_path() + if vim.loop.os_uname().sysname:find('Windows') then + require('dap-python').setup(path .. 'dap-python' .. 'python') + else + require('dap-python').setup(path .. '/venv/bin/python') + end -- CPP dap.adapters.codelldb = { @@ -294,6 +200,6 @@ return { -- EXTENSIONS require('nvim-dap-repl-highlights').setup() - require('nvim-dap-virtual-text').setup({}) + -- require('nvim-dap-virtual-text').setup({}) end, } -- 2.49.1 From 088f95146151a0d8a178d4f93b9ecdf1b3745b50 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Mar 2025 22:07:10 +0200 Subject: [PATCH 779/894] execute keymaps for dap --- lua/plugins/dap.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index b9e5d88..519283e 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -103,9 +103,12 @@ return { vim.keymap.set('x', 'k', function() local lines = vim.fn.getregion(vim.fn.getpos('.'), vim.fn.getpos('v'), { type = vim.fn.mode() }) - -- dap.repl.open() dap.repl.execute(table.concat(lines, '\n')) - end) + end, { desc = 'Dapl execute selection' }) + vim.keymap.set('n', 'k', function() + local line = vim.api.nvim_get_current_line() + dap.repl.execute(line) + end, { desc = 'DAP execute' }) local dapui = require('dapui') dapui.setup() -- 2.49.1 From 942111542b34e2798e75f324766f8295213c8db8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 31 Mar 2025 22:43:57 +0200 Subject: [PATCH 780/894] more delay for doc in blink --- lua/plugins/blink.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index f444166..e5bb245 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -103,7 +103,7 @@ return { dap = { name = 'dap', module = 'blink.compat.source', - async = true, + async = false, enabled = function() return require('cmp_dap').is_dap_buffer() end, @@ -219,7 +219,8 @@ return { }, documentation = { auto_show = true, - auto_show_delay_ms = 200, + auto_show_delay_ms = 500, + treesitter_highlighting = true }, }, -- 2.49.1 From e835520de0df6a33059dcce076dbebb24b7ad12a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Apr 2025 09:08:27 +0000 Subject: [PATCH 781/894] added cmp back --- lua/plugins/cmp.lua | 113 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 lua/plugins/cmp.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua new file mode 100644 index 0000000..e3b3973 --- /dev/null +++ b/lua/plugins/cmp.lua @@ -0,0 +1,113 @@ +return { + 'hrsh7th/nvim-cmp', + lazy = false, + dependencies = { + 'neovim/nvim-lspconfig', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + 'onsails/lspkind.nvim', + }, + config = function() + local cmp = require('cmp') + local lspkind = require('lspkind') + + local kind_icons = { + Text = '', + Method = '󰆧', + Function = '󰊕', + Constructor = '', + Field = '󰇽', + Variable = '󰂡', + Class = '󰠱', + Interface = '', + Module = '', + Property = '󰜢', + Unit = '', + Value = '󰎠', + Enum = '', + Keyword = '󰌋', + Snippet = '', + Color = '󰏘', + File = '󰈙', + Reference = '', + Folder = '󰉋', + EnumMember = '', + Constant = '󰏿', + Struct = '', + Event = '', + Operator = '󰆕', + TypeParameter = '󰅲', + } + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + }, { + { name = 'buffer' }, + }), + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol', + menu = ({ + buffer = '[Buffer]', + nvim_lsp = '[LSP]', + luasnip = '[LuaSnip]', + nvim_lua = '[Lua]', + latex_symbols = '[Latex]', + }) + }), + }, + }) + + -- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below + -- Set configuration for specific filetype. + --[[ cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, + }, { + { name = 'buffer' }, + }) + }) + require("cmp_git").setup() ]] -- + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + matching = { disallow_symbol_nonprefix_matching = false } + }) + end +} -- 2.49.1 From cf05586a0064515595203ba502f719a3d52c7be4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Apr 2025 20:27:10 +0000 Subject: [PATCH 782/894] added copilot to cmp --- lua/plugins/cmp.lua | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index e3b3973..23f0632 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -10,38 +10,18 @@ return { 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', + 'zbirenbaum/copilot-cmp', }, config = function() local cmp = require('cmp') local lspkind = require('lspkind') + lspkind.init({ + symbol_map = { + Copilot = '', + }, + }) + require('copilot_cmp').setup() - local kind_icons = { - Text = '', - Method = '󰆧', - Function = '󰊕', - Constructor = '', - Field = '󰇽', - Variable = '󰂡', - Class = '󰠱', - Interface = '', - Module = '', - Property = '󰜢', - Unit = '', - Value = '󰎠', - Enum = '', - Keyword = '󰌋', - Snippet = '', - Color = '󰏘', - File = '󰈙', - Reference = '', - Folder = '󰉋', - EnumMember = '', - Constant = '󰏿', - Struct = '', - Event = '', - Operator = '󰆕', - TypeParameter = '󰅲', - } cmp.setup({ snippet = { -- REQUIRED - you must specify a snippet engine @@ -61,9 +41,9 @@ return { [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. }), sources = cmp.config.sources({ + { name = 'copilot' }, { name = 'nvim_lsp' }, { name = 'luasnip' }, -- For luasnip users. - }, { { name = 'buffer' }, }), formatting = { -- 2.49.1 From 8dedf49447730afa55f7793652e72df288e5f0ec Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Apr 2025 23:20:23 +0200 Subject: [PATCH 783/894] more cmp changes --- lua/plugins/cmp.lua | 110 +++++++++++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 31 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 23f0632..abaf30c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,5 +1,6 @@ return { 'hrsh7th/nvim-cmp', + branch = 'main', lazy = false, dependencies = { 'neovim/nvim-lspconfig', @@ -11,10 +12,18 @@ return { 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', 'zbirenbaum/copilot-cmp', + 'hrsh7th/cmp-path', + 'dmitmel/cmp-cmdline-history', + 'hrsh7th/cmp-nvim-lsp-signature-help', }, config = function() + local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) + end + local cmp = require('cmp') local lspkind = require('lspkind') + local luasnip = require('luasnip') lspkind.init({ symbol_map = { Copilot = '', @@ -23,29 +32,75 @@ return { require('copilot_cmp').setup() cmp.setup({ + preselect = cmp.PreselectMode.None, snippet = { - -- REQUIRED - you must specify a snippet engine expand = function(args) require('luasnip').lsp_expand(args.body) -- For `luasnip` users. end, }, + mapping = { + [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }), + [''] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }), + [''] = cmp.mapping({ + i = function(fallback) + if cmp.visible() and cmp.get_active_entry() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }) + else + fallback() + end + end, + c = cmp.mapping.confirm({ select = false }), + s = cmp.mapping.confirm({ select = false }), + }), + [''] = cmp.mapping(function(fallback) + if luasnip.expand_or_jumpable() then + vim.api.nvim_feedkeys(t('luasnip-expand-or-jump'), '', true) + else + fallback() + end + end, { + 'i', + 's', + }), + [''] = cmp.mapping(function(fallback) + if luasnip.jumpable(-1) then + vim.api.nvim_feedkeys(t('luasnip-jump-prev'), '', true) + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping( + cmp.mapping.complete({ + config = { + sources = { + { + name = 'cmdline_history', + }, + }, + }, + }), + { 'c' } + ), + }, + sources = cmp.config.sources({ + { name = 'copilot' }, + { name = 'nvim_lsp' }, + { name = 'nvim_lsp_signature_help' }, + { name = 'luasnip' }, + { name = 'buffer' }, + { name = 'path' }, + }), + window = { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }), - sources = cmp.config.sources({ - { name = 'copilot' }, - { name = 'nvim_lsp' }, - { name = 'luasnip' }, -- For luasnip users. - { name = 'buffer' }, - }), formatting = { format = lspkind.cmp_format({ mode = 'symbol', @@ -60,33 +115,26 @@ return { }, }) - -- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below - -- Set configuration for specific filetype. - --[[ cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'git' }, - }, { - { name = 'buffer' }, - }) - }) - require("cmp_git").setup() ]] -- - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { - { name = 'buffer' } + { name = 'buffer' }, + { name = 'cmdline_history' }, + { name = 'path' }, + { name = 'buffer' }, } }) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }), + sources = { + { name = 'cmdline', priority = 200 }, + { name = 'path', priority = 3 }, + { name = 'cmdline_history', priority = 3 }, + { name = 'buffer', priority = 3 } + }, matching = { disallow_symbol_nonprefix_matching = false } }) end -- 2.49.1 From 0699d2a3a8ef33d0a56ff0ef5cc1af36f6b6c748 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 1 Apr 2025 23:20:31 +0200 Subject: [PATCH 784/894] disable blink --- lua/plugins/blink.lua | 2 +- lua/plugins/lspconfig.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index e5bb245..09198f0 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -233,5 +233,5 @@ return { -- allows extending the providers array elsewhere in your config -- without having to redefine it opts_extend = { 'sources.default' }, - enabled = true + enabled = false } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 64e72e7..efb9f0b 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -106,8 +106,8 @@ return { require('nvim-navic').setup({}) local capabilities = vim.lsp.protocol.make_client_capabilities() - -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) capabilities.workspace = { didChangeWatchedFiles = { dynamicRegistration = true, -- 2.49.1 From 18a85dd23959f140f67bb213780e82dc547187de Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Apr 2025 22:38:30 +0200 Subject: [PATCH 785/894] border for cmp and float windows --- lua/config/options.lua | 2 +- lua/plugins/cmp.lua | 5 +++-- lua/plugins/lspconfig.lua | 11 +++++++++-- lua/themes/bamboo.lua | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 9de33a5..94d2c0e 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -23,7 +23,7 @@ opt.showmatch = true -- Show matching braces opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true -opt.winborder = 'rounded' +opt.winborder = 'none' opt.scrolloff = 4 opt.shiftround = true opt.relativenumber = false diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index abaf30c..88a8b18 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -98,8 +98,9 @@ return { }), window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), + documentation = { + winhighlight = 'Normal:CmpDocumentation' + }, }, formatting = { format = lspkind.cmp_format({ diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index efb9f0b..9f894f6 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -5,7 +5,11 @@ local lspKeys = function(client, bufnr) vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'h', + function() + vim.lsp.buf.hover({ border = 'rounded' }) + end, + vim.tbl_extend('error', options, { desc = 'Hover' })) vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, @@ -15,7 +19,10 @@ local lspKeys = function(client, bufnr) vim.tbl_extend('error', options, { desc = 'Type definition' })) vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.keymap.set('n', 'v', + function() + vim.diagnostic.open_float({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index d11428e..f5d23d2 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -33,6 +33,7 @@ return { ['NonText'] = { fg = colors.vulgaris.blue }, ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, + ['CmpDocumentation'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey } }, }) -- 2.49.1 From 0d24406fa9241b29dfd7b2a061b23eaea8694d16 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Apr 2025 22:38:43 +0200 Subject: [PATCH 786/894] removed some unused funtions in lspconfig --- lua/plugins/lspconfig.lua | 43 --------------------------------------- 1 file changed, 43 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 9f894f6..ada11b2 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -50,38 +50,6 @@ local lspKeys = function(client, bufnr) end end -local document_highlight = function(bufnr) - -- Set autocommands conditional on server_capabilities - local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { - callback = function() - vim.lsp.buf.document_highlight() - end, - buffer = bufnr, - group = group, - desc = 'Document Highlight', - }) - vim.api.nvim_create_autocmd('CursorMoved', { - callback = function() - vim.lsp.buf.clear_references() - end, - buffer = bufnr, - group = group, - desc = 'Clear All the References', - }) - vim.api.nvim_create_autocmd({ 'LspDetach' }, { - group = group, - buffer = bufnr, - callback = function() - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds({ - group = group, - buffer = bufnr, - }) - end, - }) -end - local on_attach = function(client, bufnr) vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { buf = 0 }) vim.api.nvim_set_option_value('formatexpr', 'v:lua.vim.lsp.formatexpr()', { buf = 0 }) @@ -121,17 +89,6 @@ return { }, } - - - OpenDiagFloat = function() - for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end - end - vim.diagnostic.open_float({ focusable = false, width = 80 }) - end - require('plugins.lsp.server').setup_server(lspconfig, capabilities, on_attach) end, event = 'VeryLazy', -- 2.49.1 From a1ce67e857533825a24090d9b963a6110308ea25 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Apr 2025 22:57:23 +0200 Subject: [PATCH 787/894] cmp format --- lua/plugins/cmp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 88a8b18..47d0157 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -103,6 +103,8 @@ return { }, }, formatting = { + fields = { 'kind', 'abbr' }, + expandable_indicator = false, format = lspkind.cmp_format({ mode = 'symbol', menu = ({ -- 2.49.1 From 353553c16726e56a944f912b747e2f801f4cecdf Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Apr 2025 23:15:18 +0200 Subject: [PATCH 788/894] cmp menu formated --- lua/plugins/cmp.lua | 20 +++++++++----------- lua/themes/bamboo.lua | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 47d0157..141ebb8 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -103,18 +103,16 @@ return { }, }, formatting = { - fields = { 'kind', 'abbr' }, + fields = { 'kind', 'abbr', 'menu' }, expandable_indicator = false, - format = lspkind.cmp_format({ - mode = 'symbol', - menu = ({ - buffer = '[Buffer]', - nvim_lsp = '[LSP]', - luasnip = '[LuaSnip]', - nvim_lua = '[Lua]', - latex_symbols = '[Latex]', - }) - }), + format = function(entry, vim_item) + local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item) + local strings = vim.split(kind.kind, '%s', { trimempty = true }) + kind.kind = ' ' .. (strings[1] or '') .. ' ' + kind.menu = ' (' .. (strings[2] or '') .. ')' + + return kind + end, }, }) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index f5d23d2..5ce2467 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -5,7 +5,7 @@ return { config = function() local colors = require('bamboo.palette') require('bamboo').setup({ - dim_inactive = false, -- Dim inactive windows/buffers + dim_inactive = false, -- Dim inactive windows/buffers lualine = { transparent = false, -- lualine center bar transparency }, @@ -34,7 +34,38 @@ return { ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, ['CmpDocumentation'] = { bg = colors.vulgaris.bg2 }, - ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey } + ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey }, + ['PmenuSel'] = { bg = '#282C34', fg = 'NONE' }, + ['Pmenu'] = { fg = '#C5CDD9', bg = '#22252A' }, + ['CmpItemAbbrDeprecated'] = { fg = '#7E8294', bg = 'NONE', strikethrough = true }, + ['CmpItemAbbrMatch'] = { fg = '#82AAFF', bg = 'NONE', bold = true }, + ['CmpItemAbbrMatchFuzzy'] = { fg = '#82AAFF', bg = 'NONE', bold = true }, + ['CmpItemMenu'] = { fg = '#C792EA', bg = 'NONE', italic = true }, + ['CmpItemKindField'] = { fg = '#EED8DA', bg = '#B5585F' }, + ['CmpItemKindProperty'] = { fg = '#EED8DA', bg = '#B5585F' }, + ['CmpItemKindEvent'] = { fg = '#EED8DA', bg = '#B5585F' }, + ['CmpItemKindText'] = { fg = '#C3E88D', bg = '#9FBD73' }, + ['CmpItemKindEnum'] = { fg = '#C3E88D', bg = '#9FBD73' }, + ['CmpItemKindKeyword'] = { fg = '#C3E88D', bg = '#9FBD73' }, + ['CmpItemKindConstant'] = { fg = '#FFE082', bg = '#D4BB6C' }, + ['CmpItemKindConstructor'] = { fg = '#FFE082', bg = '#D4BB6C' }, + ['CmpItemKindReference'] = { fg = '#FFE082', bg = '#D4BB6C' }, + ['CmpItemKindFunction'] = { fg = '#EADFF0', bg = '#A377BF' }, + ['CmpItemKindStruct'] = { fg = '#EADFF0', bg = '#A377BF' }, + ['CmpItemKindClass'] = { fg = '#EADFF0', bg = '#A377BF' }, + ['CmpItemKindModule'] = { fg = '#EADFF0', bg = '#A377BF' }, + ['CmpItemKindOperator'] = { fg = '#EADFF0', bg = '#A377BF' }, + ['CmpItemKindVariable'] = { fg = '#C5CDD9', bg = '#7E8294' }, + ['CmpItemKindFile'] = { fg = '#C5CDD9', bg = '#7E8294' }, + ['CmpItemKindUnit'] = { fg = '#F5EBD9', bg = '#D4A959' }, + ['CmpItemKindSnippet'] = { fg = '#F5EBD9', bg = '#D4A959' }, + ['CmpItemKindFolder'] = { fg = '#F5EBD9', bg = '#D4A959' }, + ['CmpItemKindMethod'] = { fg = '#DDE5F5', bg = '#6C8ED4' }, + ['CmpItemKindValue'] = { fg = '#DDE5F5', bg = '#6C8ED4' }, + ['CmpItemKindEnumMember'] = { fg = '#DDE5F5', bg = '#6C8ED4' }, + ['CmpItemKindInterface'] = { fg = '#D8EEEB', bg = '#58B5A8' }, + ['CmpItemKindColor'] = { fg = '#D8EEEB', bg = '#58B5A8' }, + ['CmpItemKindTypeParameter'] = { fg = '#D8EEEB', bg = '#58B5A8' }, }, }) require('bamboo').load() -- 2.49.1 From cdfc208d3a4d6349630fde2225ff6a09f4d233dc Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 3 Apr 2025 23:30:31 +0200 Subject: [PATCH 789/894] finalized cmp menu colors --- lua/plugins/cmp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 141ebb8..8abc8b5 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -101,12 +101,18 @@ return { documentation = { winhighlight = 'Normal:CmpDocumentation' }, + completion = { + winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None', + col_offset = -3, + side_padding = 0, + }, }, formatting = { fields = { 'kind', 'abbr', 'menu' }, expandable_indicator = false, format = function(entry, vim_item) - local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item) + local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })( + entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) kind.kind = ' ' .. (strings[1] or '') .. ' ' kind.menu = ' (' .. (strings[2] or '') .. ')' -- 2.49.1 From fec3bf1ed50ed0406bbc443748e93409f47ae40e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Apr 2025 07:12:08 +0000 Subject: [PATCH 790/894] limit the number of entries in the completion menu --- lua/config/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/config/options.lua b/lua/config/options.lua index 94d2c0e..4173451 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -30,6 +30,7 @@ opt.relativenumber = false opt.splitbelow = true opt.splitright = true opt.wildmode = 'longest:full,full' +opt.pumheight = 15 opt.splitbelow = true opt.splitright = true opt.shiftwidth = indent -- 2.49.1 From e1ade38e0421d2878f8b36a6557b434769bdb6d9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Apr 2025 12:04:47 +0000 Subject: [PATCH 791/894] configure prettier for yaml --- lua/plugins/lsp/server.lua | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 02a3045..65fdf4b 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -7,13 +7,26 @@ local efm_setup = function(lspconfig, capabilities, on_attach) local isort = require('efmls-configs.formatters.isort') local cmake_lint = require('efmls-configs.linters.cmake_lint') local flake8 = require('efmls-configs.linters.flake8') + local yamlfmt = { + command = require('mason-core.path').bin_prefix('yamlfmt') .. ' -', + formatStdin = true, + rootMarkers = { '.yamlfmt' }, + prefix = 'yamlfmt' + } local languages = { markdown = { prettier }, cmake = { gersemi, cmake_lint }, + yaml = { + prettier, + -- yamlfmt + } } local efmls_config = { - -- filetypes = vim.tbl_keys(languages), + filetypes = vim.tbl_keys(languages), + capabilities = capabilities, + on_attach = on_attach, + cmd = { require('mason-core.path').bin_prefix('efm-langserver') }, settings = { rootMarkers = { '.git/' }, languages = languages, @@ -23,10 +36,7 @@ local efm_setup = function(lspconfig, capabilities, on_attach) documentRangeFormatting = true, }, } - require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { - on_attach = on_attach, - capabilities = capabilities, - })) + lspconfig.efm.setup(efmls_config) end M.setup_server = function(lspconfig, capabilities, on_attach) -- 2.49.1 From 8966af72892d809dba9ef6281fd8423949ee19d6 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Apr 2025 13:36:50 +0000 Subject: [PATCH 792/894] added conform --- lua/plugins/conform.lua | 27 ++++++++++++++++++++++++++ lua/plugins/lsp/server.lua | 39 -------------------------------------- lua/plugins/lspconfig.lua | 11 ----------- 3 files changed, 27 insertions(+), 50 deletions(-) create mode 100644 lua/plugins/conform.lua diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua new file mode 100644 index 0000000..7a58228 --- /dev/null +++ b/lua/plugins/conform.lua @@ -0,0 +1,27 @@ +return { + 'stevearc/conform.nvim', + cmd = { 'ConformInfo' }, + opts = { + default_format_opts = { + lsp_format = 'fallback', + }, + log_level = vim.log.levels.ERROR, + formatters_by_ft = { + lua = { 'stylua' }, + python = { 'ruff_format' }, + yaml = { 'yamlfmt' }, + cmake = { 'gersemi' }, + markdown = { 'prettier' }, + }, + }, + keys = { + { + 'f', + mode = { 'n', 'x', 'v' }, + function() + require('conform').format() + end, + desc = 'Format with Conform', + }, + }, +} diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 65fdf4b..7c5e0e2 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -1,43 +1,5 @@ local M = {} -local efm_setup = function(lspconfig, capabilities, on_attach) - local prettier = require('efmls-configs.formatters.prettier') - local gersemi = require('efmls-configs.formatters.gersemi') - local black = require('efmls-configs.formatters.black') - local isort = require('efmls-configs.formatters.isort') - local cmake_lint = require('efmls-configs.linters.cmake_lint') - local flake8 = require('efmls-configs.linters.flake8') - local yamlfmt = { - command = require('mason-core.path').bin_prefix('yamlfmt') .. ' -', - formatStdin = true, - rootMarkers = { '.yamlfmt' }, - prefix = 'yamlfmt' - } - local languages = { - markdown = { prettier }, - cmake = { gersemi, cmake_lint }, - yaml = { - prettier, - -- yamlfmt - } - } - - local efmls_config = { - filetypes = vim.tbl_keys(languages), - capabilities = capabilities, - on_attach = on_attach, - cmd = { require('mason-core.path').bin_prefix('efm-langserver') }, - settings = { - rootMarkers = { '.git/' }, - languages = languages, - }, - init_options = { - documentFormatting = true, - documentRangeFormatting = true, - }, - } - lspconfig.efm.setup(efmls_config) -end M.setup_server = function(lspconfig, capabilities, on_attach) -- lspconfig['pyright'].setup { @@ -176,7 +138,6 @@ M.setup_server = function(lspconfig, capabilities, on_attach) lspconfig.neocmake.setup({}) end - efm_setup(lspconfig, capabilities, on_attach) end return M diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ada11b2..142723c 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -27,17 +27,6 @@ local lspKeys = function(client, bufnr) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, { noremap = true, silent = false, desc = 'Format file', buffer = bufnr }) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', function() - vim.lsp.buf.format({ timeout_ms = 10000 }) - end, { noremap = true, silent = false, desc = 'Format visual', buffer = bufnr }) - end if client.supports_method('inlayHintProvider') then vim.keymap.set('n', 'i', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) -- 2.49.1 From abc79b29702ad88cbacab9253fc6e3dbe223e66c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 4 Apr 2025 13:48:57 +0000 Subject: [PATCH 793/894] added fixjson --- lua/plugins/conform.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 7a58228..c3517b5 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -12,6 +12,7 @@ return { yaml = { 'yamlfmt' }, cmake = { 'gersemi' }, markdown = { 'prettier' }, + json = { 'fixjson' }, }, }, keys = { -- 2.49.1 From 88c1f1b9ed969c4f9a7b082a3f5a00992ee5dfa2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 6 Apr 2025 21:42:29 +0200 Subject: [PATCH 794/894] added aider (disabled) --- lua/plugins/aider.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/plugins/aider.lua diff --git a/lua/plugins/aider.lua b/lua/plugins/aider.lua new file mode 100644 index 0000000..1ef5a37 --- /dev/null +++ b/lua/plugins/aider.lua @@ -0,0 +1,32 @@ +return { + 'GeorgesAlkhouri/nvim-aider', + cmd = { + 'AiderTerminalToggle', + 'AiderHealth', + }, + keys = { + { 'a/', 'AiderTerminalToggle', desc = 'Open Aider' }, + { 'as', 'AiderTerminalSend', desc = 'Send to Aider', mode = { 'n', 'v' } }, + { 'ac', 'AiderQuickSendCommand', desc = 'Send Command To Aider' }, + { 'ab', 'AiderQuickSendBuffer', desc = 'Send Buffer To Aider' }, + { 'a+', 'AiderQuickAddFile', desc = 'Add File to Aider' }, + { 'a-', 'AiderQuickDropFile', desc = 'Drop File from Aider' }, + { 'ar', 'AiderQuickReadOnlyFile', desc = 'Add File as Read-Only' }, + -- Example nvim-tree.lua integration if needed + { 'a+', 'AiderTreeAddFile', desc = 'Add File from Tree to Aider', ft = 'NvimTree' }, + { 'a-', 'AiderTreeDropFile', desc = 'Drop File from Tree from Aider', ft = 'NvimTree' }, + }, + dependencies = { + 'folke/snacks.nvim', + }, + opts = { + args = { + '--model gemini-2.5-pro', + '--no-auto-commits', + '--pretty', + '--stream', + }, + }, + config = true, + enabled = false +} -- 2.49.1 From 1b892ce287f65b0f78596607d055691f02f47a34 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 6 Apr 2025 21:43:13 +0200 Subject: [PATCH 795/894] deleted catppuccin theme --- lua/themes/catppuccin.lua | 103 -------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 lua/themes/catppuccin.lua diff --git a/lua/themes/catppuccin.lua b/lua/themes/catppuccin.lua deleted file mode 100644 index d4fbbcb..0000000 --- a/lua/themes/catppuccin.lua +++ /dev/null @@ -1,103 +0,0 @@ -return { - 'catppuccin/nvim', - name = 'catppuccin', - lazy = true, - config = function() - require('catppuccin').setup({ - flavour = 'mocha', -- latte, frappe, macchiato, mocha - no_italic = true, - dim_inactive = { - enabled = true, - shade = 'dark', - percentage = 0.15, - }, - integrations = { - cmp = true, - gitsigns = true, - nvimtree = true, - telescope = true, - aerial = true, - indent_blankline = { - enabled = true, - colored_indent_levels = false, - }, - dap = { - enabled = true, - enable_ui = true, -- enable nvim-dap-ui - }, - neotest = true, - neotree = true, - notify = false, - mini = false, - which_key = true, - leap = true, - native_lsp = { - enabled = true, - virtual_text = { - errors = { 'italic' }, - hints = { 'italic' }, - warnings = { 'italic' }, - information = { 'italic' }, - }, - underlines = { - errors = { 'underline' }, - hints = { 'underline' }, - warnings = { 'underline' }, - information = { 'underline' }, - }, - }, - -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) - }, - highlight_overrides = { - all = function(colors) - return { - -- ['@lsp.mod.readonly'] = { style = { 'bold' } }, - CmpBorder = { fg = '#fe4145' }, - } - end, - mocha = function(colors) - return { - ['@lsp.mod.readonly'] = { style = { 'bold' } }, - ['@type.qualifier'] = { fg = colors.sky }, - ['@namespace'] = { fg = colors.red }, - ['@function.builtin'] = { link = 'Function' }, - ['@property'] = { fg = colors.pink }, - Macro = { fg = colors.rosewater }, - } - end, - }, - custom_highlights = function(C) - return { - CmpItemKindSnippet = { fg = C.base, bg = C.mauve }, - CmpItemKindKeyword = { fg = C.base, bg = C.red }, - CmpItemKindText = { fg = C.base, bg = C.teal }, - CmpItemKindMethod = { fg = C.base, bg = C.blue }, - CmpItemKindConstructor = { fg = C.base, bg = C.blue }, - CmpItemKindFunction = { fg = C.base, bg = C.blue }, - CmpItemKindFolder = { fg = C.base, bg = C.blue }, - CmpItemKindModule = { fg = C.base, bg = C.blue }, - CmpItemKindConstant = { fg = C.base, bg = C.peach }, - CmpItemKindField = { fg = C.base, bg = C.green }, - CmpItemKindProperty = { fg = C.base, bg = C.green }, - CmpItemKindEnum = { fg = C.base, bg = C.green }, - CmpItemKindUnit = { fg = C.base, bg = C.green }, - CmpItemKindClass = { fg = C.base, bg = C.yellow }, - CmpItemKindVariable = { fg = C.base, bg = C.flamingo }, - CmpItemKindFile = { fg = C.base, bg = C.blue }, - CmpItemKindInterface = { fg = C.base, bg = C.yellow }, - CmpItemKindColor = { fg = C.base, bg = C.red }, - CmpItemKindReference = { fg = C.base, bg = C.red }, - CmpItemKindEnumMember = { fg = C.base, bg = C.red }, - CmpItemKindStruct = { fg = C.base, bg = C.blue }, - CmpItemKindValue = { fg = C.base, bg = C.peach }, - CmpItemKindEvent = { fg = C.base, bg = C.blue }, - CmpItemKindOperator = { fg = C.base, bg = C.blue }, - CmpItemKindTypeParameter = { fg = C.base, bg = C.blue }, - CmpItemKindCopilot = { fg = C.base, bg = C.teal }, - } - end, - }) - vim.cmd('colorscheme catppuccin') - end, - enabled = true, -} -- 2.49.1 From 473a877089e3db5fddcafd9852956e4eecfaca5b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 6 Apr 2025 21:46:34 +0200 Subject: [PATCH 796/894] set master branch for neogit --- lua/plugins/neogit.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index e8aad9d..39a76a6 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -1,4 +1,5 @@ return { + branch = 'master', 'TimUntersberger/neogit', dependencies = { 'nvim-lua/plenary.nvim', -- 2.49.1 From ee5de708e0047d12feb451f32faa37e34ae29c94 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 6 Apr 2025 21:51:14 +0200 Subject: [PATCH 797/894] set spelllang to en --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4173451..5bdeee2 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -87,7 +87,7 @@ else end opt.swapfile = false opt.backup = false -opt.spelllang = 'en,de' +opt.spelllang = 'en' opt.completeopt = 'menu,menuone,noselect' opt.expandtab = true opt.smartindent = true -- 2.49.1 From f6c84d7d5b5605e9aaa6a8a677631a92a48af3bb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 8 Apr 2025 22:42:00 +0200 Subject: [PATCH 798/894] new dashboard --- lua/plugins/snacks.lua | 387 +++++++++++++++++++++++++++++++++++------ 1 file changed, 333 insertions(+), 54 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 06ccd4b..ca06282 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -16,10 +16,9 @@ return { dashboard = { sections = { { section = 'header' }, - { section = 'keys', gap = 1, padding = 1 }, - { title = 'Sessions', padding = 1 }, - { pane = 1, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, - { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, + { icon = ' ', title = 'Keymaps', section = 'keys', indent = 2, padding = 1 }, + { icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, + { icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, { section = 'startup' }, }, }, @@ -39,45 +38,204 @@ return { formatters = { file = { truncate = 100, - filename_first = true - } - } - } + filename_first = true, + }, + }, + }, }, keys = { - { 'g', function() Snacks.lazygit() end, desc = 'Lazygit', }, - { 'gf', function() Snacks.lazygit.log_file() end, desc = 'Lazygit Current File History', }, - { 'gl', function() Snacks.lazygit.log() end, desc = 'Lazygit Log (cwd)', }, - { 'm', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n' }, }, - { '', function() Snacks.words.jump(-vim.v.count1) end, desc = 'Prev Reference', mode = { 'n' }, }, + { + 'g', + function() + Snacks.lazygit() + end, + desc = 'Lazygit', + }, + { + 'gf', + function() + Snacks.lazygit.log_file() + end, + desc = 'Lazygit Current File History', + }, + { + 'gl', + function() + Snacks.lazygit.log() + end, + desc = 'Lazygit Log (cwd)', + }, + { + 'm', + function() + Snacks.words.jump(vim.v.count1) + end, + desc = 'Next Reference', + mode = { 'n' }, + }, + { + '', + function() + Snacks.words.jump(-vim.v.count1) + end, + desc = 'Prev Reference', + mode = { 'n' }, + }, -- Top Pickers & Explorer - { '', function() Snacks.picker.smart() end, desc = 'Smart Find Files' }, - { 'b', function() Snacks.picker.buffers() end, desc = 'Buffers' }, - { 'l', function() Snacks.picker.grep() end, desc = 'Grep' }, - { ':', function() Snacks.picker.command_history() end, desc = 'Command History' }, - { 'n', function() Snacks.picker.notifications() end, desc = 'Notification History' }, - { 'e', function() Snacks.explorer() end, desc = 'File Explorer' }, + { + '', + function() + Snacks.picker.smart() + end, + desc = 'Smart Find Files', + }, + { + 'b', + function() + Snacks.picker.buffers() + end, + desc = 'Buffers', + }, + { + 'l', + function() + Snacks.picker.grep() + end, + desc = 'Grep', + }, + { + ':', + function() + Snacks.picker.command_history() + end, + desc = 'Command History', + }, + { + 'n', + function() + Snacks.picker.notifications() + end, + desc = 'Notification History', + }, + { + 'e', + function() + Snacks.explorer() + end, + desc = 'File Explorer', + }, -- find -- { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, -- { "f", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, - { 'f', function() Snacks.picker.files() end, desc = 'Find Files' }, - { 'g', function() Snacks.picker.git_files() end, desc = 'Find Git Files' }, - { 'p', function() Snacks.picker.projects() end, desc = 'Projects' }, - { 'o', function() Snacks.picker.recent() end, desc = 'Recent' }, - { 'i', function() Snacks.picker.recent({ filter = { cwd = true } }) end, desc = 'Recent in cwd' }, + { + 'f', + function() + Snacks.picker.files() + end, + desc = 'Find Files', + }, + { + 'g', + function() + Snacks.picker.git_files() + end, + desc = 'Find Git Files', + }, + { + 'p', + function() + Snacks.picker.projects() + end, + desc = 'Projects', + }, + { + 'o', + function() + Snacks.picker.recent() + end, + desc = 'Recent', + }, + { + 'i', + function() + Snacks.picker.recent({ filter = { cwd = true } }) + end, + desc = 'Recent in cwd', + }, -- git - { "nb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, - { "nl", function() Snacks.picker.git_log() end, desc = "Git Log" }, - { "nL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" }, - { "ns", function() Snacks.picker.git_status() end, desc = "Git Status" }, - { "nS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, - { "nd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, - { "nf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, + { + 'nb', + function() + Snacks.picker.git_branches() + end, + desc = 'Git Branches', + }, + { + 'nl', + function() + Snacks.picker.git_log() + end, + desc = 'Git Log', + }, + { + 'nL', + function() + Snacks.picker.git_log_line() + end, + desc = 'Git Log Line', + }, + { + 'ns', + function() + Snacks.picker.git_status() + end, + desc = 'Git Status', + }, + { + 'nS', + function() + Snacks.picker.git_stash() + end, + desc = 'Git Stash', + }, + { + 'nd', + function() + Snacks.picker.git_diff() + end, + desc = 'Git Diff (Hunks)', + }, + { + 'nf', + function() + Snacks.picker.git_log_file() + end, + desc = 'Git Log File', + }, -- Grep - { 'sb', function() Snacks.picker.lines() end, desc = 'Buffer Lines' }, - { 'sB', function() Snacks.picker.grep_buffers() end, desc = 'Grep Open Buffers' }, + { + 'sb', + function() + Snacks.picker.lines() + end, + desc = 'Buffer Lines', + }, + { + 'sB', + function() + Snacks.picker.grep_buffers() + end, + desc = 'Grep Open Buffers', + }, -- { "sg", function() Snacks.picker.grep() end, desc = "Grep" }, - { 'd', function() Snacks.picker.grep_word() end, desc = 'Visual selection or word', mode = { 'n', 'x' } }, + { + 'd', + function() + Snacks.picker.grep_word() + end, + desc = 'Visual selection or word', + mode = { 'n', 'x' }, + }, -- search -- { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, -- { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, @@ -86,27 +244,148 @@ return { -- { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, -- { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, -- { "v", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, - { 'V', function() Snacks.picker.diagnostics_buffer() end, desc = 'Buffer Diagnostics' }, - { 'sh', function() Snacks.picker.help() end, desc = 'Help Pages' }, - { 'sH', function() Snacks.picker.highlights() end, desc = 'Highlights' }, - { 'si', function() Snacks.picker.icons() end, desc = 'Icons' }, - { 'j', function() Snacks.picker.jumps() end, desc = 'Jumps' }, - { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, - { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, - { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, - { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, - { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, - { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, - { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, - { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, + { + 'V', + function() + Snacks.picker.diagnostics_buffer() + end, + desc = 'Buffer Diagnostics', + }, + { + 'sh', + function() + Snacks.picker.help() + end, + desc = 'Help Pages', + }, + { + 'sH', + function() + Snacks.picker.highlights() + end, + desc = 'Highlights', + }, + { + 'si', + function() + Snacks.picker.icons() + end, + desc = 'Icons', + }, + { + 'j', + function() + Snacks.picker.jumps() + end, + desc = 'Jumps', + }, + { + 'sk', + function() + Snacks.picker.keymaps() + end, + desc = 'Keymaps', + }, + { + 'sl', + function() + Snacks.picker.loclist() + end, + desc = 'Location List', + }, + { + 'sm', + function() + Snacks.picker.marks() + end, + desc = 'Marks', + }, + { + 'sM', + function() + Snacks.picker.man() + end, + desc = 'Man Pages', + }, + { + 'sp', + function() + Snacks.picker.lazy() + end, + desc = 'Search for Plugin Spec', + }, + { + 'sq', + function() + Snacks.picker.qflist() + end, + desc = 'Quickfix List', + }, + { + 'sR', + function() + Snacks.picker.resume() + end, + desc = 'Resume', + }, + { + 'su', + function() + Snacks.picker.undo() + end, + desc = 'Undo History', + }, -- { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, -- LSP - { 'd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' }, - { 'D', function() Snacks.picker.lsp_declarations() end, desc = 'Goto Declaration' }, - { 'r', function() Snacks.picker.lsp_references() end, nowait = true, desc = 'References' }, - { 'I', function() Snacks.picker.lsp_implementations() end, desc = 'Goto Implementation' }, - { 'e', function() Snacks.picker.lsp_type_definitions() end, desc = 'Goto T[y]pe Definition' }, - { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, - { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, + { + 'd', + function() + Snacks.picker.lsp_definitions() + end, + desc = 'Goto Definition', + }, + { + 'D', + function() + Snacks.picker.lsp_declarations() + end, + desc = 'Goto Declaration', + }, + { + 'r', + function() + Snacks.picker.lsp_references() + end, + nowait = true, + desc = 'References', + }, + { + 'I', + function() + Snacks.picker.lsp_implementations() + end, + desc = 'Goto Implementation', + }, + { + 'e', + function() + Snacks.picker.lsp_type_definitions() + end, + desc = 'Goto T[y]pe Definition', + }, + { + '', + function() + Snacks.picker.lsp_symbols() + end, + desc = 'LSP Symbols', + }, + { + 'sS', + function() + Snacks.picker.lsp_workspace_symbols() + end, + desc = 'LSP Workspace Symbols', + }, }, } -- 2.49.1 From 584ad307d68fdeb15131f893c828aa0eb9af0d18 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 9 Apr 2025 22:17:37 +0200 Subject: [PATCH 799/894] use snacks indent --- lua/config/options.lua | 5 ++++ lua/plugins/indent_blankline.lua | 47 -------------------------------- lua/plugins/snacks.lua | 18 ++++++++++++ 3 files changed, 23 insertions(+), 47 deletions(-) delete mode 100644 lua/plugins/indent_blankline.lua diff --git a/lua/config/options.lua b/lua/config/options.lua index 5bdeee2..f2606b2 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -6,6 +6,11 @@ local indent = 2 opt.termguicolors = true -- Enable colors in terminal opt.hlsearch = true --Set highlight on search opt.number = true --Make line numbers default +opt.listchars:append('eol:↴') +-- opt.listchars:append("space: ") +-- opt.listchars:append 'space:⋅' +opt.listchars:append('trail: ') +opt.listchars:append('tab:→ ') opt.relativenumber = false --Make relative number default opt.mouse = 'a' --Enable mouse mode opt.breakindent = true --Enable break indent diff --git a/lua/plugins/indent_blankline.lua b/lua/plugins/indent_blankline.lua deleted file mode 100644 index 381ef90..0000000 --- a/lua/plugins/indent_blankline.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - 'lukas-reineke/indent-blankline.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - }, - main = 'ibl', - config = function() - local opt = vim.opt -- to set options - opt.listchars:append('eol:↴') - -- opt.listchars:append("space: ") - -- opt.listchars:append 'space:⋅' - opt.listchars:append('trail: ') - opt.listchars:append('tab:→ ') - local highlight = { - 'RainbowRed', - 'RainbowYellow', - 'RainbowBlue', - 'RainbowOrange', - 'RainbowGreen', - 'RainbowViolet', - 'RainbowCyan', - } - - local hooks = require('ibl.hooks') - -- create the highlight groups in the highlight setup hook, so they are reset - -- every time the colorscheme changes - hooks.register(hooks.type.HIGHLIGHT_SETUP, function() - vim.api.nvim_set_hl(0, 'RainbowRed', { fg = '#E06C75' }) - vim.api.nvim_set_hl(0, 'RainbowYellow', { fg = '#E5C07B' }) - vim.api.nvim_set_hl(0, 'RainbowBlue', { fg = '#61AFEF' }) - vim.api.nvim_set_hl(0, 'RainbowOrange', { fg = '#D19A66' }) - vim.api.nvim_set_hl(0, 'RainbowGreen', { fg = '#98C379' }) - vim.api.nvim_set_hl(0, 'RainbowViolet', { fg = '#C678DD' }) - vim.api.nvim_set_hl(0, 'RainbowCyan', { fg = '#56B6C2' }) - end) - - vim.g.rainbow_delimiters = { highlight = highlight } - require('ibl').setup({ - scope = { - highlight = highlight, - show_start = false, - }, - }) - - hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) - end, -} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index ca06282..c8413ce 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -13,6 +13,24 @@ return { quickfile = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, + indent = { + indent = { + hl = 'CmpItemKindNull', + only_scope = false, + only_current = false, + }, + enabled = true, + animate = { + enabled = false, + }, + scope = { + enabled = false, + }, + chunk = { + enabled = false, + hl = 'Debug', + }, + }, dashboard = { sections = { { section = 'header' }, -- 2.49.1 From 2b21ea5e4eae698416e6bf0e217889932de56e9d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 9 Apr 2025 22:22:12 +0200 Subject: [PATCH 800/894] format lua files --- lua/config/options.lua | 48 ++++++------ lua/my_keymappings.lua | 4 +- lua/plugins/aider.lua | 2 +- lua/plugins/avante.lua | 2 +- lua/plugins/blink.lua | 63 +++++++++------- lua/plugins/cmp.lua | 17 ++--- lua/plugins/codium.lua | 2 +- lua/plugins/copilot.lua | 49 ++++++------- lua/plugins/gitsigns.lua | 61 ++++++++-------- lua/plugins/grug-far.lua | 13 ++-- lua/plugins/iron.lua | 126 ++++++++++++++++---------------- lua/plugins/lazydev.lua | 2 +- lua/plugins/lsp/server.lua | 2 - lua/plugins/lspconfig.lua | 36 ++++----- lua/plugins/lualine.lua | 4 +- lua/plugins/mason.lua | 2 +- lua/plugins/render-markdown.lua | 2 +- lua/plugins/workspaces.lua | 2 +- lua/themes/bamboo.lua | 2 +- .stylua.toml => stylua.toml | 0 20 files changed, 213 insertions(+), 226 deletions(-) rename .stylua.toml => stylua.toml (100%) diff --git a/lua/config/options.lua b/lua/config/options.lua index f2606b2..639a5ae 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,29 +3,29 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.listchars:append('eol:↴') -- opt.listchars:append("space: ") -- opt.listchars:append 'space:⋅' opt.listchars:append('trail: ') opt.listchars:append('tab:→ ') opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -opt.showmatch = true -- Show matching braces -opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line +opt.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +opt.showmatch = true -- Show matching braces +opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.list = true opt.hidden = true opt.winborder = 'none' @@ -118,16 +118,16 @@ vim.diagnostic.config({ signs = { text = { [vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon - [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon - [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon - [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) + [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon + [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon + [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) }, -- Define the highlight group to use for the sign text for each severity texthl = { [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', - [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', - [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', - [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', + [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', + [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', + [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', }, -- Optional: Highlight the line number column numhl = { @@ -143,9 +143,9 @@ vim.diagnostic.config({ -- Other diagnostic configurations (optional examples) virtual_text = false, virtual_lines = false, - underline = true, -- Enable underlining diagnostics + underline = true, -- Enable underlining diagnostics update_in_insert = false, -- Don't update diagnostics in insert mode - severity_sort = true, -- Sort diagnostics by severity + severity_sort = true, -- Sort diagnostics by severity }) -- Window border for floating windows diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index d6ffec9..eaf3877 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -61,9 +61,9 @@ vim.keymap.set({ 'n', 'x' }, 'P', '"+P', { desc = 'Paste from system cli vim.keymap.set('v', 'v', function() local mode = vim.fn.mode() if mode == 'v' then - vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode + vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode elseif mode == 'V' then - vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode + vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode end end, { noremap = true, silent = true }) diff --git a/lua/plugins/aider.lua b/lua/plugins/aider.lua index 1ef5a37..52cb8bf 100644 --- a/lua/plugins/aider.lua +++ b/lua/plugins/aider.lua @@ -28,5 +28,5 @@ return { }, }, config = true, - enabled = false + enabled = false, } diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index d50c09b..63c7f26 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -30,7 +30,7 @@ return { -- 'echasnovski/mini.pick', -- for file_selector provider mini.pick -- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope -- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions - 'ibhagwan/fzf-lua', -- for file_selector provider fzf + 'ibhagwan/fzf-lua', -- for file_selector provider fzf 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons -- 'zbirenbaum/copilot.lua', -- for providers='copilot' { diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 09198f0..e268fa5 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -9,9 +9,9 @@ return { 'fang2hou/blink-copilot', opts = { max_completions = 1, -- Global default for max completions - max_attempts = 2, -- Global default for max attempts + max_attempts = 2, -- Global default for max attempts -- `kind` is not set, so the default value is "Copilot" - } + }, }, 'dmitmel/cmp-cmdline-history', 'onsails/lspkind.nvim', @@ -26,7 +26,7 @@ return { -- make sure to set opts so that lazy.nvim calls blink.compat's setup opts = {}, }, - 'rcarriga/cmp-dap' + 'rcarriga/cmp-dap', }, -- use a release tag to download pre-built binaries @@ -69,7 +69,7 @@ return { 'snippets', 'path', 'buffer', - } + }, }, providers = { @@ -82,7 +82,7 @@ return { -- Local options override global ones -- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot" max_completions = 3, -- Override global max_completions - } + }, }, lazydev = { name = 'LazyDev', @@ -90,15 +90,15 @@ return { -- make lazydev completions top priority (see `:h blink.cmp`) score_offset = 100, }, - codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 + codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp module = 'blink.compat.source', - async = true + async = true, }, cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', - score_offset = -50 + score_offset = -50, }, dap = { name = 'dap', @@ -115,12 +115,16 @@ return { -- default to all visible buffers get_bufnrs = function() return vim - .iter(vim.api.nvim_list_wins()) - :map(function(win) return vim.api.nvim_win_get_buf(win) end) - :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) - :totable() + .iter(vim.api.nvim_list_wins()) + :map(function(win) + return vim.api.nvim_win_get_buf(win) + end) + :filter(function(buf) + return vim.bo[buf].buftype ~= 'nofile' + end) + :totable() end, - } + }, }, }, }, @@ -129,9 +133,13 @@ return { sources = function() local type = vim.fn.getcmdtype() -- Search forward and backward - if type == '/' or type == '?' then return { 'buffer' } end + if type == '/' or type == '?' then + return { 'buffer' } + end -- Commands - if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end + if type == ':' or type == '@' then + return { 'cmdline', 'buffer', 'cmdline_history' } + end return {} end, completion = { @@ -142,30 +150,29 @@ return { list = { selection = { auto_insert = false, - preselect = false - } + preselect = false, + }, }, menu = { auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set - } + }, }, keymap = { [''] = { 'select_next', 'fallback' }, [''] = { 'select_prev', 'fallback' }, [''] = { 'accept', 'fallback' }, [''] = { 'cancel' }, - } + }, }, completion = { list = { selection = { auto_insert = false, - preselect = false - } + preselect = false, + }, }, - accept = - { + accept = { dot_repeat = false, }, menu = { @@ -213,25 +220,25 @@ return { end return hl end, - } - } + }, + }, }, }, documentation = { auto_show = true, auto_show_delay_ms = 500, - treesitter_highlighting = true + treesitter_highlighting = true, }, }, -- experimental signature help support signature = { enabled = true }, snippets = { - preset = 'luasnip' + preset = 'luasnip', }, }, -- allows extending the providers array elsewhere in your config -- without having to redefine it opts_extend = { 'sources.default' }, - enabled = false + enabled = false, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 8abc8b5..c04d06c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -99,7 +99,7 @@ return { window = { documentation = { - winhighlight = 'Normal:CmpDocumentation' + winhighlight = 'Normal:CmpDocumentation', }, completion = { winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None', @@ -111,8 +111,7 @@ return { fields = { 'kind', 'abbr', 'menu' }, expandable_indicator = false, format = function(entry, vim_item) - local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })( - entry, vim_item) + local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) kind.kind = ' ' .. (strings[1] or '') .. ' ' kind.menu = ' (' .. (strings[2] or '') .. ')' @@ -130,19 +129,19 @@ return { { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, - } + }, }) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = { - { name = 'cmdline', priority = 200 }, - { name = 'path', priority = 3 }, + { name = 'cmdline', priority = 200 }, + { name = 'path', priority = 3 }, { name = 'cmdline_history', priority = 3 }, - { name = 'buffer', priority = 3 } + { name = 'buffer', priority = 3 }, }, - matching = { disallow_symbol_nonprefix_matching = false } + matching = { disallow_symbol_nonprefix_matching = false }, }) - end + end, } diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua index 7654ef5..64f9a98 100644 --- a/lua/plugins/codium.lua +++ b/lua/plugins/codium.lua @@ -6,5 +6,5 @@ return { config = function() require('codeium').setup({}) end, - enabled = vim.fn.hostname() == 'perryLinux64' + enabled = vim.fn.hostname() == 'perryLinux64', } diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index f96c56b..d65085a 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -1,25 +1,24 @@ -return { - 'zbirenbaum/copilot.lua', - cmd = 'Copilot', - event = 'InsertEnter', - config = function() - require('copilot').setup({ - filetypes = { - yaml = false, - markdown = false, - python = true, - help = false, - gitcommit = false, - gitrebase = false, - hgcommit = false, - svn = false, - cvs = false, - cpp = true, - ['.'] = false, - }, - suggestion = { enabled = false, auto_trigger = false }, - panel = { enabled = false }, - }) - end, -} - +return { + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup({ + filetypes = { + yaml = false, + markdown = false, + python = true, + help = false, + gitcommit = false, + gitrebase = false, + hgcommit = false, + svn = false, + cvs = false, + cpp = true, + ['.'] = false, + }, + suggestion = { enabled = false, auto_trigger = false }, + panel = { enabled = false }, + }) + end, +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 23885c8..a3bb97b 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -2,7 +2,7 @@ return { 'lewis6991/gitsigns.nvim', branch = 'main', config = function() - require('gitsigns').setup { + require('gitsigns').setup({ current_line_blame = false, current_line_blame_opts = { virt_text = true, @@ -13,56 +13,53 @@ return { on_attach = function(bufnr) local gitsigns = require('gitsigns') - -- Navigation vim.keymap.set('n', ']c', function() - if vim.wo.diff then - vim.cmd.normal({ ']c', bang = true }) - else - gitsigns.nav_hunk('next') - end - end, - { desc = 'Next hunk' } - ) + if vim.wo.diff then + vim.cmd.normal({ ']c', bang = true }) + else + gitsigns.nav_hunk('next') + end + end, { desc = 'Next hunk' }) vim.keymap.set('n', '[c', function() - if vim.wo.diff then - vim.cmd.normal({ '[c', bang = true }) - else - gitsigns.nav_hunk('prev') - end - end, - { desc = 'Previous hunk' } - ) + if vim.wo.diff then + vim.cmd.normal({ '[c', bang = true }) + else + gitsigns.nav_hunk('prev') + end + end, { desc = 'Previous hunk' }) -- Actions vim.keymap.set('n', 'hs', gitsigns.stage_hunk, { desc = 'Stage hunk' }) vim.keymap.set('n', 'hr', gitsigns.reset_hunk, { desc = 'Reset hunk' }) vim.keymap.set('v', 'hs', function() - gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, - { desc = 'Stage hunk' } - ) + gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, { desc = 'Stage hunk' }) vim.keymap.set('v', 'hr', function() - gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, - { desc = 'Reset hunk' } - ) + gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, { desc = 'Reset hunk' }) vim.keymap.set('n', 'hS', gitsigns.stage_buffer, { desc = 'Stage buffer' }) vim.keymap.set('n', 'hR', gitsigns.reset_buffer, { desc = 'Reset buffer' }) vim.keymap.set('n', 'hp', gitsigns.preview_hunk, { desc = 'Preview hunk' }) vim.keymap.set('n', 'hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' }) - vim.keymap.set('n', 'hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' }) + vim.keymap.set('n', 'hb', function() + gitsigns.blame_line({ full = true }) + end, { desc = 'Blame line' }) vim.keymap.set('n', 'hd', gitsigns.diffthis, { desc = 'Diff this' }) - vim.keymap.set('n', 'hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' }) + vim.keymap.set('n', 'hD', function() + gitsigns.diffthis('~') + end, { desc = 'Diff this (cached)' }) - vim.keymap.set('n', 'hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' }) + vim.keymap.set('n', 'hQ', function() + gitsigns.setqflist('all') + end, { desc = 'Set quickfix list all' }) vim.keymap.set('n', 'hq', gitsigns.setqflist, { desc = 'Set quickfix list' }) -- Toggles @@ -72,7 +69,7 @@ return { -- Text object vim.keymap.set({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') - end - } - end + end, + }) + end, } diff --git a/lua/plugins/grug-far.lua b/lua/plugins/grug-far.lua index dfc3395..5e6c7ef 100644 --- a/lua/plugins/grug-far.lua +++ b/lua/plugins/grug-far.lua @@ -1,19 +1,16 @@ return { 'MagicDuck/grug-far.nvim', config = function() - require('grug-far').setup({ - }); + require('grug-far').setup({}) end, - keys = - { + keys = { { '', function() require('grug-far').open() end, desc = 'GrugFar', - mode = { 'n', 'v' } - } - } - + mode = { 'n', 'v' }, + }, + }, } diff --git a/lua/plugins/iron.lua b/lua/plugins/iron.lua index 3dfa469..ce10ed5 100644 --- a/lua/plugins/iron.lua +++ b/lua/plugins/iron.lua @@ -1,63 +1,63 @@ -return { - 'Vigemus/iron.nvim', - branch = 'master', - config = function() - local iron = require('iron.core') - - iron.setup({ - config = { - -- Whether a repl should be discarded or not - scratch_repl = true, - -- Your repl definitions come here - repl_definition = { - sh = { - -- Can be a table or a function that - -- returns a table (see below) - command = { 'zsh' }, - }, - python = { - command = { 'python3' }, -- or { "ipython", "--no-autoindent" } - format = require('iron.fts.common').bracketed_paste_python, - }, - }, - -- How the repl window will be displayed - -- See below for more information - repl_open_cmd = require('iron.view').split.vertical("50%") - }, - -- Iron doesn't set keymaps by default anymore. - -- You can set them here or manually add keymaps to the functions in iron.core - keymaps = { - send_motion = 'sc', - visual_send = 'sc', - send_file = 'sf', - send_line = 'sl', - send_paragraph = 'sp', - send_until_cursor = 'su', - send_mark = 'sm', - mark_motion = 'mc', - mark_visual = 'mc', - remove_mark = 'md', - cr = 's', - interrupt = 's', - exit = 'sq', - clear = 'cl', - }, - -- If the highlight is on, you can change how it looks - -- For the available options, check nvim_set_hl - highlight = { - italic = true, - }, - ignore_blank_lines = true, -- ignore blank lines when sending visual select lines - }) - - -- iron also has a list of commands, see :h iron-commands for all available commands - end, - cmd = { - 'IronRepl', - 'IronRestart', - 'IronFocus', - 'IronHide', - 'IronRepl', - 'IronReplHere', - }, -} +return { + 'Vigemus/iron.nvim', + branch = 'master', + config = function() + local iron = require('iron.core') + + iron.setup({ + config = { + -- Whether a repl should be discarded or not + scratch_repl = true, + -- Your repl definitions come here + repl_definition = { + sh = { + -- Can be a table or a function that + -- returns a table (see below) + command = { 'zsh' }, + }, + python = { + command = { 'python3' }, -- or { "ipython", "--no-autoindent" } + format = require('iron.fts.common').bracketed_paste_python, + }, + }, + -- How the repl window will be displayed + -- See below for more information + repl_open_cmd = require('iron.view').split.vertical('50%'), + }, + -- Iron doesn't set keymaps by default anymore. + -- You can set them here or manually add keymaps to the functions in iron.core + keymaps = { + send_motion = 'sc', + visual_send = 'sc', + send_file = 'sf', + send_line = 'sl', + send_paragraph = 'sp', + send_until_cursor = 'su', + send_mark = 'sm', + mark_motion = 'mc', + mark_visual = 'mc', + remove_mark = 'md', + cr = 's', + interrupt = 's', + exit = 'sq', + clear = 'cl', + }, + -- If the highlight is on, you can change how it looks + -- For the available options, check nvim_set_hl + highlight = { + italic = true, + }, + ignore_blank_lines = true, -- ignore blank lines when sending visual select lines + }) + + -- iron also has a list of commands, see :h iron-commands for all available commands + end, + cmd = { + 'IronRepl', + 'IronRestart', + 'IronFocus', + 'IronHide', + 'IronRepl', + 'IronReplHere', + }, +} diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index 9710f42..e44d7b2 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -14,5 +14,5 @@ return { { 'Bilal2453/luvit-meta', lazy = true, - } + }, } diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 7c5e0e2..0d7b773 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -1,6 +1,5 @@ local M = {} - M.setup_server = function(lspconfig, capabilities, on_attach) -- lspconfig['pyright'].setup { -- capabilities = capabilities, @@ -137,7 +136,6 @@ M.setup_server = function(lspconfig, capabilities, on_attach) } lspconfig.neocmake.setup({}) end - end return M diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 142723c..be88142 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -2,30 +2,20 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', - function() - vim.lsp.buf.hover({ border = 'rounded' }) - end, - vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'h', function() + vim.lsp.buf.hover({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'v', - function() - vim.diagnostic.open_float({ border = 'rounded' }) - end, - vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', 'v', function() + vim.diagnostic.open_float({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) if client.supports_method('inlayHintProvider') then vim.keymap.set('n', 'i', function() @@ -59,7 +49,7 @@ return { 'Fildo7525/pretty_hover', { 'creativenull/efmls-configs-nvim', - branch = 'main' + branch = 'main', }, 'SmiteshP/nvim-navic', }, diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 342b7af..94b4da8 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -45,7 +45,7 @@ return { cond = function() return package.loaded['nvim-navic'] and require('nvim-navic').is_available() end, - color = { fg = colors.vulgaris.blue } + color = { fg = colors.vulgaris.blue }, }, }, lualine_y = { @@ -122,7 +122,7 @@ return { tabs_color = { -- Same values as the general color option can be used here. active = { bg = 'orange', fg = 'black' }, - inactive = { bg = 'grey'}, + inactive = { bg = 'grey' }, }, }, }, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 995e4a0..4bd91b6 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -36,7 +36,7 @@ return { 'stylua', 'gersemi', 'cmakelang', - 'ruff' + 'ruff', }, }) end, diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 125da72..8d260e5 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -5,5 +5,5 @@ return { ---@type render.md.UserConfig opts = { completions = { blink = { enabled = true } }, - } + }, } diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua index 9fbd5e9..9ff8cf0 100644 --- a/lua/plugins/workspaces.lua +++ b/lua/plugins/workspaces.lua @@ -41,5 +41,5 @@ return { end, }, }, - enabled = false + enabled = false, } diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 5ce2467..78168ca 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -5,7 +5,7 @@ return { config = function() local colors = require('bamboo.palette') require('bamboo').setup({ - dim_inactive = false, -- Dim inactive windows/buffers + dim_inactive = false, -- Dim inactive windows/buffers lualine = { transparent = false, -- lualine center bar transparency }, diff --git a/.stylua.toml b/stylua.toml similarity index 100% rename from .stylua.toml rename to stylua.toml -- 2.49.1 From f8ebdf89636c17e90eb8b7fd4d0397eec40b5449 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Apr 2025 08:55:03 +0000 Subject: [PATCH 801/894] cmp, get text from all buffers --- lua/plugins/cmp.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c04d06c..83356aa 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -93,7 +93,14 @@ return { { name = 'nvim_lsp' }, { name = 'nvim_lsp_signature_help' }, { name = 'luasnip' }, - { name = 'buffer' }, + { + name = 'buffer', + option = { + get_bufnrs = function() + return vim.api.nvim_list_bufs() + end, + }, + }, { name = 'path' }, }), -- 2.49.1 From 1c828c6e89bd67d8f348eba8ca3555a1f13e75c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 10 Apr 2025 08:55:18 +0000 Subject: [PATCH 802/894] use prettier to format yaml --- lua/plugins/conform.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index c3517b5..68ce984 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -9,7 +9,7 @@ return { formatters_by_ft = { lua = { 'stylua' }, python = { 'ruff_format' }, - yaml = { 'yamlfmt' }, + yaml = { 'prettier', timeout_ms = 5000 }, cmake = { 'gersemi' }, markdown = { 'prettier' }, json = { 'fixjson' }, -- 2.49.1 From 0830d8cd5c148dc5e21e5122327ace7c0d37786c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 11 Apr 2025 22:06:59 +0200 Subject: [PATCH 803/894] added history bonus to snacks picker --- lua/plugins/snacks.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index c8413ce..4d6b530 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -45,6 +45,7 @@ return { frecency = true, cwd_bonus = true, filename_bonus = true, + history_bonus = true, }, win = { input = { -- 2.49.1 From 13eddb6b56bcb99d4ac8814fbbe2999928137455 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 12 Apr 2025 21:42:27 +0200 Subject: [PATCH 804/894] some bamboo tuning --- lua/themes/bamboo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 78168ca..9148806 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -30,13 +30,14 @@ return { ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, + ['NormalFloat'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, ['NonText'] = { fg = colors.vulgaris.blue }, ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, ['CmpDocumentation'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey }, ['PmenuSel'] = { bg = '#282C34', fg = 'NONE' }, - ['Pmenu'] = { fg = '#C5CDD9', bg = '#22252A' }, + ['Pmenu'] = { fg = '#C5CDD9', bg = colors.vulgaris.bg3 }, ['CmpItemAbbrDeprecated'] = { fg = '#7E8294', bg = 'NONE', strikethrough = true }, ['CmpItemAbbrMatch'] = { fg = '#82AAFF', bg = 'NONE', bold = true }, ['CmpItemAbbrMatchFuzzy'] = { fg = '#82AAFF', bg = 'NONE', bold = true }, -- 2.49.1 From b690aa49e622d3fb932ec4feea0f58e5cd26467b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 12 Apr 2025 21:52:08 +0200 Subject: [PATCH 805/894] dont use version by default --- lua/config/lazy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index bf487ae..3f7c862 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -13,7 +13,7 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ defaults = { - version = '', + version = false, }, spec = { { import = 'plugins' }, -- 2.49.1 From af38ccadc5a86cb00c0edef2a17ddacf1ab5c5de Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 12 Apr 2025 22:12:57 +0200 Subject: [PATCH 806/894] removed some border --- lua/config/options.lua | 1 - lua/plugins/lspconfig.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 639a5ae..106e615 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -149,6 +149,5 @@ vim.diagnostic.config({ }) -- Window border for floating windows -require('lspconfig.ui.windows').default_options.border = 'rounded' require('bamboo').load() diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index be88142..769e214 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -5,7 +5,7 @@ local lspKeys = function(client, bufnr) vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) vim.keymap.set('n', 'h', function() - vim.lsp.buf.hover({ border = 'rounded' }) + vim.lsp.buf.hover({ border = 'none' }) end, vim.tbl_extend('error', options, { desc = 'Hover' })) vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) -- 2.49.1 From db93b002c1d7637c2b92a4206467e506fd0e0c18 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Apr 2025 09:27:17 +0000 Subject: [PATCH 807/894] fixed some colors for snacks picker --- lua/themes/bamboo.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 9148806..4b8b52f 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -31,6 +31,13 @@ return { ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['NormalFloat'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, + ['FloatBorder'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + ['SnacksPickerList'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + ['SnacksPickerListCursorLine'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, + ['SnacksPickerPrompt'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + ['SnacksPickerInput'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + ['SnacksPickerPreview'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + ['SnacksPickerInputBorder'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, ['NonText'] = { fg = colors.vulgaris.blue }, ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, -- 2.49.1 From 2e1386a781df8957940435749204daff21855300 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Apr 2025 23:32:31 +0200 Subject: [PATCH 808/894] switched to new lsp config --- lua/plugins/lsp.lua | 169 +++++++++++++++++++++++++++++++++++++ lua/plugins/lsp/server.lua | 141 ------------------------------- lua/plugins/lspconfig.lua | 74 ---------------- 3 files changed, 169 insertions(+), 215 deletions(-) create mode 100644 lua/plugins/lsp.lua delete mode 100644 lua/plugins/lsp/server.lua delete mode 100644 lua/plugins/lspconfig.lua diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..dc4dc95 --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,169 @@ +local lspKeys = function(client, bufnr) + local options = { noremap = true, silent = false, buffer = bufnr } + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) + vim.keymap.set('n', 'h', function() + vim.lsp.buf.hover({ border = 'none' }) + end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', 'v', function() + vim.diagnostic.open_float({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + + if client.supports_method('inlayHintProvider') then + vim.keymap.set('n', 'i', function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) + end, { + noremap = true, + silent = false, + desc = 'Toggle inlay hints', + buffer = bufnr, + }) + end +end +return { + { + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'p00f/clangd_extensions.nvim', + 'Fildo7525/pretty_hover', + { + 'creativenull/efmls-configs-nvim', + branch = 'main', + }, + 'SmiteshP/nvim-navic', + }, + lazy = false, + config = function() + local servers = { + basedpyright = { + settings = { + basedpyright = { + typeCheckingMode = 'standard', + }, + }, + }, + ruff = {}, + clangd = { + cmd = { + 'clangd', + '--compile-commands-dir=build_nvim', + '--query-driver', + '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--clang-tidy', + '--background-index', + '--use-dirty-headers', + '--completion-style=detailed', + }, + root_markers = { + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim', + }, + }, + lua_ls = { + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + callSnippet = 'Replace', + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + diagnostics = { + disable = { 'missing-fields' }, + }, + format = { + enable = true, + defaultConfig = { + indent_style = 'space', + indent_size = '2', + quote_style = 'single', + }, + }, + }, + }, + }, + jsonls = {}, + dockerls = {}, + yamlls = { + settings = { + yaml = { + validate = true, + }, + }, + }, + neocmake = {}, + markdown_oxide = {}, + } + + local ensure_installed = vim.tbl_keys(servers or {}) + + require('mason').setup() + require('mason-lspconfig').setup({ + ensure_installed = ensure_installed, + }) + + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + vim.lsp.config('*', { + capabilities = capabilities, + }) + + for server, settings in pairs(servers) do + vim.lsp.config(server, settings) + vim.lsp.enable(server) + end + + local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) + vim.api.nvim_create_autocmd('LspAttach', { + group = lsp_group, + desc = 'Set buffer‑local keymaps and options after an LSP client attaches', + callback = function(args) + local bufnr = args.buf + local client = vim.lsp.get_client_by_id(args.data.client_id) + if not client then + return + end + lspKeys(client, bufnr) + + if client.server_capabilities.completionProvider then + vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc' + vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr()' + end + + if client.server_capabilities.inlayHintProvider then + vim.keymap.set('n', 'i', function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) + end, { + noremap = true, + silent = false, + desc = 'Toggle inlay hints', + buffer = bufnr, + }) + end + + if client.server_capabilities.documentSymbolProvider then + local navic = require('nvim-navic') + navic.attach(client, bufnr) + end + end, + }) + end, + }, +} diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua deleted file mode 100644 index 0d7b773..0000000 --- a/lua/plugins/lsp/server.lua +++ /dev/null @@ -1,141 +0,0 @@ -local M = {} - -M.setup_server = function(lspconfig, capabilities, on_attach) - -- lspconfig['pyright'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['basedpyright'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - basedpyright = { - typeCheckingMode = 'standard', - }, - }, - }) - - lspconfig['ruff'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - lspconfig['groovyls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['cmake'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - local clangd_capabilities = capabilities - clangd_capabilities.textDocument.semanticHighlighting = true - clangd_capabilities.offsetEncoding = { 'utf-16' } - lspconfig['clangd'].setup({ - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { - 'clangd', - '--compile-commands-dir=build_nvim', - '--query-driver', - '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', - '--clang-tidy', - '--background-index', - '--use-dirty-headers', - '--completion-style=detailed', - }, - root_dir = lspconfig.util.root_pattern('.clangd', '.clang-tidy', '.clang-format', 'compile_flags.txt', 'configure.ac', '.git', 'build_nvim'), - }) - - require('clangd_extensions').setup({ - extensions = { - inlay_hints = { - -- Only show inlay hints for the current line - only_current_line = true, - }, - }, - }) - - lspconfig['jsonls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['rust_analyzer'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['lua_ls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - workspace = { - checkThirdParty = false, - }, - completion = { - callSnippet = 'Replace', - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - format = { - enable = true, - defaultConfig = { - indent_style = 'space', - indent_size = '2', - quote_style = 'single', - }, - }, - }, - }, - }) - - lspconfig['dockerls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - lspconfig['markdown_oxide'].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - -- lspconfig['marksman'].setup { - -- capabilities = capabilities, - -- on_attach = on_attach, - -- } - - lspconfig['yamlls'].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - yaml = { - validate = true, - }, - }, - }) - - local configs = require('lspconfig.configs') - if not configs.neocmake then - configs.neocmake = { - default_config = { - cmd = { 'neocmakelsp', '--stdio' }, - filetypes = { 'cmake' }, - root_dir = function(fname) - return lspconfig.util.find_git_ancestor(fname) - end, - single_file_support = true, -- suggested - on_attach = on_attach, -- on_attach is the on_attach function you defined - }, - } - lspconfig.neocmake.setup({}) - end -end - -return M diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua deleted file mode 100644 index 769e214..0000000 --- a/lua/plugins/lspconfig.lua +++ /dev/null @@ -1,74 +0,0 @@ -local lspKeys = function(client, bufnr) - local options = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', function() - vim.lsp.buf.hover({ border = 'none' }) - end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'v', function() - vim.diagnostic.open_float({ border = 'rounded' }) - end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) - - if client.supports_method('inlayHintProvider') then - vim.keymap.set('n', 'i', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) - end, { - noremap = true, - silent = false, - desc = 'Toggle inlay hints', - buffer = bufnr, - }) - end -end - -local on_attach = function(client, bufnr) - vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { buf = 0 }) - vim.api.nvim_set_option_value('formatexpr', 'v:lua.vim.lsp.formatexpr()', { buf = 0 }) - - lspKeys(client, bufnr) - - if client.server_capabilities.documentSymbolProvider then - local navic = require('nvim-navic') - navic.attach(client, bufnr) - end -end - -return { - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'p00f/clangd_extensions.nvim', - 'Fildo7525/pretty_hover', - { - 'creativenull/efmls-configs-nvim', - branch = 'main', - }, - 'SmiteshP/nvim-navic', - }, - version = nil, - branch = 'master', - config = function() - local lspconfig = require('lspconfig') - require('nvim-navic').setup({}) - - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) - capabilities.workspace = { - didChangeWatchedFiles = { - dynamicRegistration = true, - }, - } - - require('plugins.lsp.server').setup_server(lspconfig, capabilities, on_attach) - end, - event = 'VeryLazy', -} -- 2.49.1 From 39d973b28b803750b5be3b6939896db7eaeba714 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 16 Apr 2025 23:36:07 +0200 Subject: [PATCH 809/894] removed some unused dependencies --- lua/plugins/lsp.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index dc4dc95..4493869 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -32,12 +32,6 @@ return { dependencies = { 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', - 'p00f/clangd_extensions.nvim', - 'Fildo7525/pretty_hover', - { - 'creativenull/efmls-configs-nvim', - branch = 'main', - }, 'SmiteshP/nvim-navic', }, lazy = false, -- 2.49.1 From 92ec6976c5431cd9d4c187769bea3ae9ed4c4175 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 21:47:34 +0200 Subject: [PATCH 810/894] cleanup lsp --- lua/plugins/lsp.lua | 72 ++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 4493869..6842dc3 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,31 +1,35 @@ local lspKeys = function(client, bufnr) - local options = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', function() - vim.lsp.buf.hover({ border = 'none' }) - end, vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'v', function() - vim.diagnostic.open_float({ border = 'rounded' }) - end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + local base_opts = { noremap = true, silent = false, buffer = bufnr } + + local function opts(desc) return vim.tbl_extend('error', base_opts, { desc = desc }) end + + local mappings = { + { mode = { 'n', 'x' }, key = 'a', fn = vim.lsp.buf.code_action, desc = 'Code action' }, + { mode = 'n', key = 'e', fn = vim.lsp.buf.declaration, desc = 'Declaration' }, + { mode = 'n', key = 'h', fn = function() vim.lsp.buf.hover({ border = 'none' }) end, desc = 'Hover' }, + { mode = 'n', key = 'c', fn = vim.lsp.buf.outgoing_calls, desc = 'Outgoing calls' }, + { mode = 'n', key = 'C', fn = vim.lsp.buf.incoming_calls, desc = 'Incoming calls' }, + { mode = 'n', key = 'm', fn = vim.lsp.buf.rename, desc = 'Rename' }, + { mode = 'n', key = 'D', fn = vim.lsp.buf.type_definition, desc = 'Type definition' }, + { mode = { 'n', 'i', 'x' }, key = '', fn = vim.lsp.buf.signature_help, desc = 'Signature help' }, + { mode = 'n', key = 'v', fn = function() vim.diagnostic.open_float({ border = 'rounded' }) end, desc = 'Diagnostics Float' }, + { mode = 'n', key = '', fn = 'ClangdSwitchSourceHeader', desc = 'Switch Source/Header' }, + } + + for _, map in ipairs(mappings) do + vim.keymap.set(map.mode, map.key, map.fn, opts(map.desc)) + end if client.supports_method('inlayHintProvider') then - vim.keymap.set('n', 'i', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) - end, { - noremap = true, - silent = false, - desc = 'Toggle inlay hints', - buffer = bufnr, - }) + vim.keymap.set( + 'n', + 'i', + function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) end, + opts('Toggle inlay hints') + ) end end + return { { 'neovim/nvim-lspconfig', @@ -83,12 +87,7 @@ return { disable = { 'missing-fields' }, }, format = { - enable = true, - defaultConfig = { - indent_style = 'space', - indent_size = '2', - quote_style = 'single', - }, + enable = false, }, }, }, @@ -131,9 +130,7 @@ return { callback = function(args) local bufnr = args.buf local client = vim.lsp.get_client_by_id(args.data.client_id) - if not client then - return - end + if not client then return end lspKeys(client, bufnr) if client.server_capabilities.completionProvider then @@ -141,17 +138,6 @@ return { vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr()' end - if client.server_capabilities.inlayHintProvider then - vim.keymap.set('n', 'i', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) - end, { - noremap = true, - silent = false, - desc = 'Toggle inlay hints', - buffer = bufnr, - }) - end - if client.server_capabilities.documentSymbolProvider then local navic = require('nvim-navic') navic.attach(client, bufnr) -- 2.49.1 From 8b99910bb4398b29488de52546c3bc80d4d9bc89 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 21:58:34 +0200 Subject: [PATCH 811/894] new lua style --- lua/my_autocommands.lua | 24 +- lua/my_keymappings.lua | 16 +- lua/plugins/blink.lua | 16 +- lua/plugins/cmake-tools.lua | 4 +- lua/plugins/cmp.lua | 8 +- lua/plugins/codium.lua | 4 +- lua/plugins/conform.lua | 4 +- lua/plugins/dap.lua | 96 ++------ lua/plugins/gitsigns.lua | 20 +- lua/plugins/grug-far.lua | 8 +- lua/plugins/lsp.lua | 4 +- lua/plugins/lualine.lua | 8 +- lua/plugins/markdown-preview.lua | 4 +- lua/plugins/mini-sessions.lua | 4 +- lua/plugins/neogen.lua | 4 +- lua/plugins/neogit.lua | 4 +- lua/plugins/neotest.lua | 8 +- lua/plugins/oil.lua | 4 +- lua/plugins/overseer.lua | 4 +- lua/plugins/rustaceanvim.lua | 12 +- lua/plugins/snacks.lua | 374 ++++--------------------------- lua/plugins/toggleterm.lua | 8 +- lua/plugins/workspaces.lua | 45 ---- lua/themes/gruvbox-baby.lua | 4 +- lua/utils/python_venv.lua | 4 +- stylua.toml | 1 + 26 files changed, 109 insertions(+), 583 deletions(-) delete mode 100644 lua/plugins/workspaces.lua diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 6479dc2..0f11c3a 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -11,44 +11,32 @@ api.nvim_create_autocmd('TextYankPost', { local fileGrp = api.nvim_create_augroup('file_type', { clear = true }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { '*.simvis', '*.manifest' }, - callback = function() - vim.bo.filetype = 'xml' - end, + callback = function() vim.bo.filetype = 'xml' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { '*.simcfg', '*.simcon', '*.simudex' }, - callback = function() - vim.bo.filetype = 'xml' - end, + callback = function() vim.bo.filetype = 'xml' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { 'JenkinsFile*' }, - callback = function() - vim.bo.filetype = 'groovy' - end, + callback = function() vim.bo.filetype = 'groovy' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { 'SConstruct', 'SConscript' }, - callback = function() - vim.bo.filetype = 'python' - end, + callback = function() vim.bo.filetype = 'python' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { 'doskey' }, - callback = function() - vim.bo.filetype = 'dosini' - end, + callback = function() vim.bo.filetype = 'dosini' end, group = fileGrp, }) api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { pattern = { '.clangd', '.clang-tidy' }, - callback = function() - vim.bo.filetype = 'yaml' - end, + callback = function() vim.bo.filetype = 'yaml' end, group = fileGrp, }) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index eaf3877..c27e516 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -76,16 +76,8 @@ if vim.g.neovide then vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta print(string.format('scaling: %f', vim.g.neovide_scale_factor)) end - vim.keymap.set('n', '', function() - change_scale_factor(1.25) - end) - vim.keymap.set('n', '', function() - change_scale_factor(1 / 1.25) - end) - vim.keymap.set('n', '', function() - change_scale_factor(1.25) - end) - vim.keymap.set('n', '', function() - change_scale_factor(1 / 1.25) - end) + vim.keymap.set('n', '', function() change_scale_factor(1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1.25) end) + vim.keymap.set('n', '', function() change_scale_factor(1 / 1.25) end) end diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index e268fa5..3eb49b1 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -54,9 +54,7 @@ return { nerd_font_variant = 'mono', }, - enabled = function() - return (vim.bo.buftype ~= 'prompt' and vim.b.completion ~= false) or require('cmp_dap').is_dap_buffer() - end, + enabled = function() return (vim.bo.buftype ~= 'prompt' and vim.b.completion ~= false) or require('cmp_dap').is_dap_buffer() end, -- default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, via `opts_extend` sources = { @@ -104,9 +102,7 @@ return { name = 'dap', module = 'blink.compat.source', async = false, - enabled = function() - return require('cmp_dap').is_dap_buffer() - end, + enabled = function() return require('cmp_dap').is_dap_buffer() end, }, buffer = { name = 'Buffer', @@ -116,12 +112,8 @@ return { get_bufnrs = function() return vim .iter(vim.api.nvim_list_wins()) - :map(function(win) - return vim.api.nvim_win_get_buf(win) - end) - :filter(function(buf) - return vim.bo[buf].buftype ~= 'nofile' - end) + :map(function(win) return vim.api.nvim_win_get_buf(win) end) + :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) :totable() end, }, diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 81aabfa..c7d9061 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -28,9 +28,7 @@ return { keys = { { '', - function() - require('cmake-tools').debug({}) - end, + function() require('cmake-tools').debug({}) end, desc = 'Run and debug target from cmake', }, }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 83356aa..28a7615 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -17,9 +17,7 @@ return { 'hrsh7th/cmp-nvim-lsp-signature-help', }, config = function() - local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) - end + local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end local cmp = require('cmp') local lspkind = require('lspkind') @@ -96,9 +94,7 @@ return { { name = 'buffer', option = { - get_bufnrs = function() - return vim.api.nvim_list_bufs() - end, + get_bufnrs = function() return vim.api.nvim_list_bufs() end, }, }, { name = 'path' }, diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua index 64f9a98..06476cf 100644 --- a/lua/plugins/codium.lua +++ b/lua/plugins/codium.lua @@ -3,8 +3,6 @@ return { requires = { 'nvim-lua/plenary.nvim', }, - config = function() - require('codeium').setup({}) - end, + config = function() require('codeium').setup({}) end, enabled = vim.fn.hostname() == 'perryLinux64', } diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 68ce984..60f8ac1 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -19,9 +19,7 @@ return { { 'f', mode = { 'n', 'x', 'v' }, - function() - require('conform').format() - end, + function() require('conform').format() end, desc = 'Format with Conform', }, }, diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 519283e..48007cb 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -20,69 +20,15 @@ return { }, }, keys = { - { - '', - function() - require('dap').continue() - end, - desc = 'DAP start or continue', - }, - { - '', - function() - require('dap').run_last() - end, - desc = 'DAP run last', - }, - { - '', - function() - require('dap').run_last() - end, - desc = 'Run last', - }, - { - '', - function() - require('dap').goto_() - end, - desc = 'DAP goto', - }, - { - '', - function() - require('dap.ui.widgets').hover() - end, - desc = 'DAP Hover', - }, - { - '', - function() - require('dap').toggle_breakpoint() - end, - desc = 'DAP breakpoint', - }, - { - '', - function() - require('dap').step_over() - end, - desc = 'DAP step_over', - }, - { - '', - function() - require('dap').step_into() - end, - desc = 'DAP step_into', - }, - { - '', - function() - require('dap').step_out() - end, - desc = 'DAP step_out', - }, + { '', function() require('dap').continue() end, desc = 'DAP start or continue' }, + { '', function() require('dap').run_last() end, desc = 'DAP run last' }, + { '', function() require('dap').run_last() end, desc = 'Run last' }, + { '', function() require('dap').goto_() end, desc = 'DAP goto' }, + { '', function() require('dap.ui.widgets').hover() end, desc = 'DAP Hover' }, + { '', function() require('dap').toggle_breakpoint() end, desc = 'DAP breakpoint' }, + { '', function() require('dap').step_over() end, desc = 'DAP step_over' }, + { '', function() require('dap').step_into() end, desc = 'DAP step_into' }, + { '', function() require('dap').step_out() end, desc = 'DAP step_out' }, }, config = function() local dap = require('dap') @@ -112,18 +58,10 @@ return { local dapui = require('dapui') dapui.setup() - dap.listeners.before.attach.dapui_config = function() - dapui.open() - end - dap.listeners.before.launch.dapui_config = function() - dapui.open() - end - dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() - end - dap.listeners.before.event_exited.dapui_config = function() - dapui.close() - end + dap.listeners.before.attach.dapui_config = function() dapui.open() end + dap.listeners.before.launch.dapui_config = function() dapui.open() end + dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end + dap.listeners.before.event_exited.dapui_config = function() dapui.close() end local path = require('mason-registry').get_package('debugpy'):get_install_path() if vim.loop.os_uname().sysname:find('Windows') then @@ -168,9 +106,7 @@ return { name = 'Launch codelldb', type = 'codelldb', request = 'launch', - program = function() - return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) - end, + program = function() return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) end, cwd = '${workspaceFolder}', stopOnEntry = false, }, @@ -178,9 +114,7 @@ return { name = 'Launch lldb', type = 'lldb', request = 'launch', - program = function() - return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) - end, + program = function() return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) end, cwd = '${workspaceFolder}', stopOnEntry = false, args = {}, diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index a3bb97b..fb1083c 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -34,32 +34,22 @@ return { vim.keymap.set('n', 'hs', gitsigns.stage_hunk, { desc = 'Stage hunk' }) vim.keymap.set('n', 'hr', gitsigns.reset_hunk, { desc = 'Reset hunk' }) - vim.keymap.set('v', 'hs', function() - gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, { desc = 'Stage hunk' }) + vim.keymap.set('v', 'hs', function() gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end, { desc = 'Stage hunk' }) - vim.keymap.set('v', 'hr', function() - gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, { desc = 'Reset hunk' }) + vim.keymap.set('v', 'hr', function() gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end, { desc = 'Reset hunk' }) vim.keymap.set('n', 'hS', gitsigns.stage_buffer, { desc = 'Stage buffer' }) vim.keymap.set('n', 'hR', gitsigns.reset_buffer, { desc = 'Reset buffer' }) vim.keymap.set('n', 'hp', gitsigns.preview_hunk, { desc = 'Preview hunk' }) vim.keymap.set('n', 'hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' }) - vim.keymap.set('n', 'hb', function() - gitsigns.blame_line({ full = true }) - end, { desc = 'Blame line' }) + vim.keymap.set('n', 'hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' }) vim.keymap.set('n', 'hd', gitsigns.diffthis, { desc = 'Diff this' }) - vim.keymap.set('n', 'hD', function() - gitsigns.diffthis('~') - end, { desc = 'Diff this (cached)' }) + vim.keymap.set('n', 'hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' }) - vim.keymap.set('n', 'hQ', function() - gitsigns.setqflist('all') - end, { desc = 'Set quickfix list all' }) + vim.keymap.set('n', 'hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' }) vim.keymap.set('n', 'hq', gitsigns.setqflist, { desc = 'Set quickfix list' }) -- Toggles diff --git a/lua/plugins/grug-far.lua b/lua/plugins/grug-far.lua index 5e6c7ef..77783b9 100644 --- a/lua/plugins/grug-far.lua +++ b/lua/plugins/grug-far.lua @@ -1,14 +1,10 @@ return { 'MagicDuck/grug-far.nvim', - config = function() - require('grug-far').setup({}) - end, + config = function() require('grug-far').setup({}) end, keys = { { '', - function() - require('grug-far').open() - end, + function() require('grug-far').open() end, desc = 'GrugFar', mode = { 'n', 'v' }, }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 6842dc3..957f56f 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -130,7 +130,9 @@ return { callback = function(args) local bufnr = args.buf local client = vim.lsp.get_client_by_id(args.data.client_id) - if not client then return end + if not client then + return + end lspKeys(client, bufnr) if client.server_capabilities.completionProvider then diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 94b4da8..d5711ff 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -39,12 +39,8 @@ return { color = { fg = colors.vulgaris.light_blue, gui = 'bold' }, }, { - function() - return require('nvim-navic').get_location() - end, - cond = function() - return package.loaded['nvim-navic'] and require('nvim-navic').is_available() - end, + function() return require('nvim-navic').get_location() end, + cond = function() return package.loaded['nvim-navic'] and require('nvim-navic').is_available() end, color = { fg = colors.vulgaris.blue }, }, }, diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua index fc3113e..5ef3da6 100644 --- a/lua/plugins/markdown-preview.lua +++ b/lua/plugins/markdown-preview.lua @@ -7,9 +7,7 @@ return { }, branch = 'master', ft = { 'markdown' }, - build = function() - vim.fn['mkdp#util#install']() - end, + build = function() vim.fn['mkdp#util#install']() end, init = function() vim.g.mkdp_auto_close = 0 vim.g.mkdp_auto_start = 0 diff --git a/lua/plugins/mini-sessions.lua b/lua/plugins/mini-sessions.lua index 58f72b2..59ca65b 100644 --- a/lua/plugins/mini-sessions.lua +++ b/lua/plugins/mini-sessions.lua @@ -1,7 +1,5 @@ return { 'echasnovski/mini.sessions', version = '*', - config = function() - require('mini.sessions').setup() - end, + config = function() require('mini.sessions').setup() end, } diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 2eb0235..6db094f 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -24,9 +24,7 @@ return { keys = { { 'n', - function() - require('neogen').generate({}) - end, + function() require('neogen').generate({}) end, desc = 'Add comment', }, }, diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 39a76a6..a01d599 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -17,9 +17,7 @@ return { keys = { { 't', - function() - require('neogit').open() - end, + function() require('neogit').open() end, }, }, cmd = { 'Neogit ' }, diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index 960c605..bf4375f 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -23,16 +23,12 @@ return { keys = { { '', - function() - require('neotest').run.run() - end, + function() require('neotest').run.run() end, desc = 'Run nearest test', }, { '', - function() - require('neotest').run.run({ strategy = 'dap' }) - end, + function() require('neotest').run.run({ strategy = 'dap' }) end, desc = 'Run nearest test', }, }, diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 93bfffe..069908f 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -29,9 +29,7 @@ return { keys = { { '-', - function() - require('oil').open() - end, + function() require('oil').open() end, desc = 'Open oil', }, }, diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua index f3953fe..6eb15f1 100644 --- a/lua/plugins/overseer.lua +++ b/lua/plugins/overseer.lua @@ -8,9 +8,7 @@ return { keys = { { '', - function() - require('overseer').run_template() - end, + function() require('overseer').run_template() end, mode = { 'n', 'x' }, desc = 'Start task (overseer)', }, diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua index 7821ed2..465d13e 100644 --- a/lua/plugins/rustaceanvim.lua +++ b/lua/plugins/rustaceanvim.lua @@ -6,23 +6,17 @@ return { server = { on_attach = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', 'y', function() - vim.cmd.RustLsp({ 'hover', 'actions' }) - end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'y', function() vim.cmd.RustLsp({ 'hover', 'actions' }) end, vim.tbl_extend('error', options, { desc = 'Hover' })) local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { - callback = function() - vim.lsp.buf.document_highlight() - end, + callback = function() vim.lsp.buf.document_highlight() end, buffer = bufnr, group = group, desc = 'Document Highlight', }) vim.api.nvim_create_autocmd('CursorMoved', { - callback = function() - vim.lsp.buf.clear_references() - end, + callback = function() vim.lsp.buf.clear_references() end, buffer = bufnr, group = group, desc = 'Clear All the References', diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 4d6b530..ca7d585 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -63,198 +63,39 @@ return { }, }, keys = { - { - 'g', - function() - Snacks.lazygit() - end, - desc = 'Lazygit', - }, - { - 'gf', - function() - Snacks.lazygit.log_file() - end, - desc = 'Lazygit Current File History', - }, - { - 'gl', - function() - Snacks.lazygit.log() - end, - desc = 'Lazygit Log (cwd)', - }, - { - 'm', - function() - Snacks.words.jump(vim.v.count1) - end, - desc = 'Next Reference', - mode = { 'n' }, - }, - { - '', - function() - Snacks.words.jump(-vim.v.count1) - end, - desc = 'Prev Reference', - mode = { 'n' }, - }, + { 'g', function() Snacks.lazygit() end, desc = 'Lazygit' }, + { 'gf', function() Snacks.lazygit.log_file() end, desc = 'Lazygit Current File History' }, + { 'gl', function() Snacks.lazygit.log() end, desc = 'Lazygit Log (cwd)' }, + { 'm', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n' } }, + { '', function() Snacks.words.jump(-vim.v.count1) end, desc = 'Prev Reference', mode = { 'n' } }, -- Top Pickers & Explorer - { - '', - function() - Snacks.picker.smart() - end, - desc = 'Smart Find Files', - }, - { - 'b', - function() - Snacks.picker.buffers() - end, - desc = 'Buffers', - }, - { - 'l', - function() - Snacks.picker.grep() - end, - desc = 'Grep', - }, - { - ':', - function() - Snacks.picker.command_history() - end, - desc = 'Command History', - }, - { - 'n', - function() - Snacks.picker.notifications() - end, - desc = 'Notification History', - }, - { - 'e', - function() - Snacks.explorer() - end, - desc = 'File Explorer', - }, + { '', function() Snacks.picker.smart() end, desc = 'Smart Find Files' }, + { 'b', function() Snacks.picker.buffers() end, desc = 'Buffers' }, + { 'l', function() Snacks.picker.grep() end, desc = 'Grep' }, + { ':', function() Snacks.picker.command_history() end, desc = 'Command History' }, + { 'n', function() Snacks.picker.notifications() end, desc = 'Notification History' }, + { 'e', function() Snacks.explorer() end, desc = 'File Explorer' }, -- find -- { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, -- { "f", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, - { - 'f', - function() - Snacks.picker.files() - end, - desc = 'Find Files', - }, - { - 'g', - function() - Snacks.picker.git_files() - end, - desc = 'Find Git Files', - }, - { - 'p', - function() - Snacks.picker.projects() - end, - desc = 'Projects', - }, - { - 'o', - function() - Snacks.picker.recent() - end, - desc = 'Recent', - }, - { - 'i', - function() - Snacks.picker.recent({ filter = { cwd = true } }) - end, - desc = 'Recent in cwd', - }, + { 'f', function() Snacks.picker.files() end, desc = 'Find Files' }, + { 'g', function() Snacks.picker.git_files() end, desc = 'Find Git Files' }, + { 'p', function() Snacks.picker.projects() end, desc = 'Projects' }, + { 'o', function() Snacks.picker.recent() end, desc = 'Recent' }, + { 'i', function() Snacks.picker.recent({ filter = { cwd = true } }) end, desc = 'Recent in cwd' }, -- git - { - 'nb', - function() - Snacks.picker.git_branches() - end, - desc = 'Git Branches', - }, - { - 'nl', - function() - Snacks.picker.git_log() - end, - desc = 'Git Log', - }, - { - 'nL', - function() - Snacks.picker.git_log_line() - end, - desc = 'Git Log Line', - }, - { - 'ns', - function() - Snacks.picker.git_status() - end, - desc = 'Git Status', - }, - { - 'nS', - function() - Snacks.picker.git_stash() - end, - desc = 'Git Stash', - }, - { - 'nd', - function() - Snacks.picker.git_diff() - end, - desc = 'Git Diff (Hunks)', - }, - { - 'nf', - function() - Snacks.picker.git_log_file() - end, - desc = 'Git Log File', - }, + { 'nb', function() Snacks.picker.git_branches() end, desc = 'Git Branches' }, + { 'nl', function() Snacks.picker.git_log() end, desc = 'Git Log' }, + { 'nL', function() Snacks.picker.git_log_line() end, desc = 'Git Log Line' }, + { 'ns', function() Snacks.picker.git_status() end, desc = 'Git Status' }, + { 'nS', function() Snacks.picker.git_stash() end, desc = 'Git Stash' }, + { 'nd', function() Snacks.picker.git_diff() end, desc = 'Git Diff (Hunks)' }, + { 'nf', function() Snacks.picker.git_log_file() end, desc = 'Git Log File' }, -- Grep - { - 'sb', - function() - Snacks.picker.lines() - end, - desc = 'Buffer Lines', - }, - { - 'sB', - function() - Snacks.picker.grep_buffers() - end, - desc = 'Grep Open Buffers', - }, + { 'sb', function() Snacks.picker.lines() end, desc = 'Buffer Lines' }, + { 'sB', function() Snacks.picker.grep_buffers() end, desc = 'Grep Open Buffers' }, -- { "sg", function() Snacks.picker.grep() end, desc = "Grep" }, - { - 'd', - function() - Snacks.picker.grep_word() - end, - desc = 'Visual selection or word', - mode = { 'n', 'x' }, - }, + { 'd', function() Snacks.picker.grep_word() end, desc = 'Visual selection or word', mode = { 'n', 'x' } }, -- search -- { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, -- { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, @@ -262,149 +103,28 @@ return { -- { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, -- { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, -- { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, - -- { "v", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, - { - 'V', - function() - Snacks.picker.diagnostics_buffer() - end, - desc = 'Buffer Diagnostics', - }, - { - 'sh', - function() - Snacks.picker.help() - end, - desc = 'Help Pages', - }, - { - 'sH', - function() - Snacks.picker.highlights() - end, - desc = 'Highlights', - }, - { - 'si', - function() - Snacks.picker.icons() - end, - desc = 'Icons', - }, - { - 'j', - function() - Snacks.picker.jumps() - end, - desc = 'Jumps', - }, - { - 'sk', - function() - Snacks.picker.keymaps() - end, - desc = 'Keymaps', - }, - { - 'sl', - function() - Snacks.picker.loclist() - end, - desc = 'Location List', - }, - { - 'sm', - function() - Snacks.picker.marks() - end, - desc = 'Marks', - }, - { - 'sM', - function() - Snacks.picker.man() - end, - desc = 'Man Pages', - }, - { - 'sp', - function() - Snacks.picker.lazy() - end, - desc = 'Search for Plugin Spec', - }, - { - 'sq', - function() - Snacks.picker.qflist() - end, - desc = 'Quickfix List', - }, - { - 'sR', - function() - Snacks.picker.resume() - end, - desc = 'Resume', - }, - { - 'su', - function() - Snacks.picker.undo() - end, - desc = 'Undo History', - }, + { 'v', function() Snacks.picker.diagnostics() end, desc = 'Diagnostics' }, + { 'V', function() Snacks.picker.diagnostics_buffer() end, desc = 'Buffer Diagnostics' }, + { 'sh', function() Snacks.picker.help() end, desc = 'Help Pages' }, + { 'sH', function() Snacks.picker.highlights() end, desc = 'Highlights' }, + { 'si', function() Snacks.picker.icons() end, desc = 'Icons' }, + { 'j', function() Snacks.picker.jumps() end, desc = 'Jumps' }, + { 'sk', function() Snacks.picker.keymaps() end, desc = 'Keymaps' }, + { 'sl', function() Snacks.picker.loclist() end, desc = 'Location List' }, + { 'sm', function() Snacks.picker.marks() end, desc = 'Marks' }, + { 'sM', function() Snacks.picker.man() end, desc = 'Man Pages' }, + { 'sp', function() Snacks.picker.lazy() end, desc = 'Search for Plugin Spec' }, + { 'sq', function() Snacks.picker.qflist() end, desc = 'Quickfix List' }, + { 'sR', function() Snacks.picker.resume() end, desc = 'Resume' }, + { 'su', function() Snacks.picker.undo() end, desc = 'Undo History' }, -- { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, -- LSP - { - 'd', - function() - Snacks.picker.lsp_definitions() - end, - desc = 'Goto Definition', - }, - { - 'D', - function() - Snacks.picker.lsp_declarations() - end, - desc = 'Goto Declaration', - }, - { - 'r', - function() - Snacks.picker.lsp_references() - end, - nowait = true, - desc = 'References', - }, - { - 'I', - function() - Snacks.picker.lsp_implementations() - end, - desc = 'Goto Implementation', - }, - { - 'e', - function() - Snacks.picker.lsp_type_definitions() - end, - desc = 'Goto T[y]pe Definition', - }, - { - '', - function() - Snacks.picker.lsp_symbols() - end, - desc = 'LSP Symbols', - }, - { - 'sS', - function() - Snacks.picker.lsp_workspace_symbols() - end, - desc = 'LSP Workspace Symbols', - }, + { 'd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' }, + { 'D', function() Snacks.picker.lsp_declarations() end, desc = 'Goto Declaration' }, + { 'r', function() Snacks.picker.lsp_references() end, nowait = true, desc = 'References' }, + { 'I', function() Snacks.picker.lsp_implementations() end, desc = 'Goto Implementation' }, + { 'e', function() Snacks.picker.lsp_type_definitions() end, desc = 'Goto T[y]pe Definition' }, + { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, + { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, }, } diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 3f38743..6cdbb60 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -23,9 +23,7 @@ return { local lazygit = Terminal:new({ cmd = 'lazygit', direction = 'float', - cwd = function() - return vim.fn.getcwd() - end, + cwd = function() return vim.fn.getcwd() end, float_opts = { border = 'double', }, @@ -35,9 +33,7 @@ return { vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) end, -- function to run on closing the terminal - on_close = function(term) - vim.cmd('startinsert!') - end, + on_close = function(term) vim.cmd('startinsert!') end, }) lazygit:open() end diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua deleted file mode 100644 index 9ff8cf0..0000000 --- a/lua/plugins/workspaces.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - 'natecraddock/workspaces.nvim', - config = function() - require('workspaces').setup() - end, - branch = 'master', - keys = { - { - 'p', - function() - local workspaces = require('workspaces') - local fzf_lua = require('fzf-lua') - fzf_lua.fzf_exec(function(cb) - local results = workspaces.get() - for _, e in ipairs(results) do - cb(e['name']) - end - cb() - end, { - actions = { - ['default'] = { - function(selected) - workspaces.open(selected[1]) - fzf_lua.git_files() - end, - }, - ['ctrl-d'] = { - function(selected) - workspaces.remove(selected[1]) - end, - fzf_lua.actions.resume, - }, - ['ctrl-a'] = { - function() - workspaces.add() - end, - fzf_lua.actions.resume, - }, - }, - }) - end, - }, - }, - enabled = false, -} diff --git a/lua/themes/gruvbox-baby.lua b/lua/themes/gruvbox-baby.lua index 7e2497b..6850639 100644 --- a/lua/themes/gruvbox-baby.lua +++ b/lua/themes/gruvbox-baby.lua @@ -2,8 +2,6 @@ return { 'luisiacc/gruvbox-baby', lazy = true, priority = 1000, -- make sure to load this before all the other start plugins - config = function() - vim.cmd('colorscheme gruvbox-baby') - end, + config = function() vim.cmd('colorscheme gruvbox-baby') end, enabled = true, } diff --git a/lua/utils/python_venv.lua b/lua/utils/python_venv.lua index d3090f2..866870b 100644 --- a/lua/utils/python_venv.lua +++ b/lua/utils/python_venv.lua @@ -110,9 +110,7 @@ end M.pick_venv = function() vim.ui.select(M.getPythonEnvs(), { prompt = 'Select python venv', - format_item = function(item) - return string.format('%s (%s)', item.name, item.path) - end, + format_item = function(item) return string.format('%s (%s)', item.name, item.path) end, }, function(choice) if not choice then return diff --git a/stylua.toml b/stylua.toml index 56619e8..251e8aa 100644 --- a/stylua.toml +++ b/stylua.toml @@ -4,3 +4,4 @@ indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle" call_parentheses = "Always" +collapse_simple_statement = "FunctionOnly" -- 2.49.1 From 68a86423024dea1791caebb8bd636b080480aed7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:26:30 +0200 Subject: [PATCH 812/894] new formatting --- lua/plugins/comment.lua | 14 ++------------ lua/plugins/diffview.lua | 18 +++--------------- lua/plugins/lsp.lua | 4 +--- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 2054015..be7cedf 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -5,17 +5,7 @@ return { mappings = false, }, keys = { - { - '', - '(comment_toggle_linewise_current)', - desc = 'Toggle comment', - }, - - { - '', - '(comment_toggle_linewise_visual)gv', - mode = 'v', - desc = 'Toggle comment', - }, + { '', '(comment_toggle_linewise_current)', desc = 'Toggle comment' }, + { '', '(comment_toggle_linewise_visual)gv', mode = 'v', desc = 'Toggle comment' }, }, } diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 9c91e75..bce417c 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -18,20 +18,8 @@ return { }, cmd = 'DiffviewOpen', keys = { - { - 'bb', - 'DiffviewOpen', - desc = 'Diffview local', - }, - { - 'bd', - 'DiffviewOpen origin/develop...', - desc = 'Diffview vs develop', - }, - { - 'bm', - 'DiffviewOpen origin/master...', - desc = 'Diffview vs master', - }, + { 'bb', 'DiffviewOpen', desc = 'Diffview local' }, + { 'bd', 'DiffviewOpen origin/develop...', desc = 'Diffview vs develop' }, + { 'bm', 'DiffviewOpen origin/master...', desc = 'Diffview vs master' }, }, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 957f56f..61d0c97 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -105,11 +105,9 @@ return { markdown_oxide = {}, } - local ensure_installed = vim.tbl_keys(servers or {}) - require('mason').setup() require('mason-lspconfig').setup({ - ensure_installed = ensure_installed, + ensure_installed = vim.tbl_keys(servers or {}), }) local capabilities = vim.lsp.protocol.make_client_capabilities() -- 2.49.1 From 4692812dd9f26c5545727460aba9f6f010f8bafb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:27:26 +0200 Subject: [PATCH 813/894] satisfy pre commit hook --- after/syntax/norg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/after/syntax/norg.lua b/after/syntax/norg.lua index df6a488..46bb63d 100644 --- a/after/syntax/norg.lua +++ b/after/syntax/norg.lua @@ -1 +1 @@ -vim.opt_local.conceallevel = 3 +vim.opt_local.conceallevel = 3 -- 2.49.1 From 5b6177042d55d5cd52c527df573468606a2a2c02 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:27:32 +0200 Subject: [PATCH 814/894] added pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c8af39a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/JohnnyMorganz/stylua + rev: v2.0.2 + hooks: + - id: stylua-system -- 2.49.1 From 58ad88736c60dc983338b0f789cbd96d8cfdf3fe Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:29:59 +0200 Subject: [PATCH 815/894] added readme --- readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..cdd8c91 --- /dev/null +++ b/readme.md @@ -0,0 +1,9 @@ +# pre-commit + +Install with + +```bash +pre-commit install +``` + +`stylua` has to be installed in the system -- 2.49.1 From f882a43f0bc14d3099e1da6cfcda42f0d615e19c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:31:01 +0200 Subject: [PATCH 816/894] added session to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index add2517..02e3f90 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ plugin/packer_compiled.lua venv_debugpy .luarc.json .luarc.json +Session.vim -- 2.49.1 From 46272b5e46dca4dcaaa456de3ae790ca60a0f3c2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 22:31:08 +0200 Subject: [PATCH 817/894] update plugins --- lazy-lock.json | 103 ++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 954524d..a1e70ab 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,85 +1,82 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, - "avante.nvim": { "branch": "main", "commit": "39787969c769204861f1339e52ffcdd00e648220" }, + "avante.nvim": { "branch": "main", "commit": "1eb0fd82536718b38fcbdac55cde2901f8dbdcff" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, - "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, - "blink-copilot": { "branch": "main", "commit": "ad40ac22ed53a1f8f6b6449479d6f72382afecdd" }, "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, - "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, - "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, "cmake-tools.nvim": { "branch": "master", "commit": "a5d5bf0a93bb96085502334a5036fc054ad9cf33" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "codecompanion.nvim": { "branch": "main", "commit": "57bc5689a64a15b12251a8cd3c28dddd0d52c0cc" }, - "codeium.nvim": { "branch": "main", "commit": "ebed4f7cc8a18184d8332d421ca10bed5f7d59a1" }, - "copilot.lua": { "branch": "master", "commit": "d296017e588215df3f7b5796d1172f0d690fa13c" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "codecompanion.nvim": { "branch": "main", "commit": "071f738ac152690b5518612dfbd17e1249ad819a" }, + "codeium.nvim": { "branch": "main", "commit": "9569c9095a70370849345c861cdb2b06c4cadac7" }, + "conform.nvim": { "branch": "master", "commit": "6632e7d788a85bf8405ea0c812d343fc308b7b8c" }, + "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, + "copilot.lua": { "branch": "master", "commit": "0b435497295f01e253f3c1777e02f4553da7f59d" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, - "efmls-configs-nvim": { "branch": "main", "commit": "f769e051831782732b392da412892cd2eb9c104d" }, + "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "everforest-nvim": { "branch": "main", "commit": "135cc21a45756e688dd1a3cbeb1c80a04b569b46" }, - "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, - "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzf-lua": { "branch": "main", "commit": "e3fefd97875827e47dc4bbf1074ee464b2d8e6a8" }, - "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, - "grug-far.nvim": { "branch": "main", "commit": "7aea7cdf040b7586068fa198bd7364e3f642850d" }, - "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, + "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "friendly-snippets": { "branch": "main", "commit": "31f2a2657b6261724313281fe0d8ba6f43f4a4fa" }, + "fzf-lua": { "branch": "main", "commit": "a09296cf7afaf22842b3bff7e5bfdec943a3c29c" }, + "gitsigns.nvim": { "branch": "main", "commit": "d600d3922c1d001422689319a8f915136bb64e1e" }, + "grug-far.nvim": { "branch": "main", "commit": "d6c682af0033b4fbb3645a997e3b4a9189ed1ed6" }, + "gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, - "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, - "img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "iron.nvim": { "branch": "master", "commit": "e2021d242088bc98f7df75bee487a0ae1bfafc5f" }, - "kanagawa.nvim": { "branch": "master", "commit": "709018d5af92d2e5780bfb8a6d36e9cad01a6402" }, + "gruvbox.nvim": { "branch": "main", "commit": "a933d8666dad9363dc6908ae72cfc832299c2f59" }, + "img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" }, + "iron.nvim": { "branch": "master", "commit": "93b3b97cf4313613fba5e91055deaf091cd78483" }, + "kanagawa.nvim": { "branch": "master", "commit": "cc3b68b08e6a0cb6e6bf9944932940091e49bb83" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "9fef261b53fbe3a2ef01ee9667f6fde064b1ed10" }, + "lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "markdown.nvim": { "branch": "main", "commit": "7808306438e51d7222534759011cddedf36ce580" }, - "markview.nvim": { "branch": "main", "commit": "556cac8bb8eeb461013ebe0d015e2c48d3527c36" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, - "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, + "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "monokai-pro.nvim": { "branch": "master", "commit": "872f774303f79416000e8049630052f4124d9534" }, - "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, - "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, - "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, + "neogen": { "branch": "main", "commit": "05d754004da8c89115b291f2a23ca530a8cac8fd" }, + "neogit": { "branch": "master", "commit": "97f83f1dc51dee41e08e3c7a8adf00e1083e3178" }, + "neotest": { "branch": "master", "commit": "747775fc22dfeb6102bdde6559ccb5126dac0ff8" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, - "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, - "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-highlight-colors": { "branch": "main", "commit": "7eeaa05eab26fb840c4fe7bca91710bf37cb13ed" }, - "nvim-lint": { "branch": "master", "commit": "936197073214c26a347fb933c9459c8766376b23" }, - "nvim-lspconfig": { "branch": "master", "commit": "200280dab91a7df2ca42fd2ab3cb4c5fab056666" }, - "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, + "nvim-dap-ui": { "branch": "master", "commit": "881a69e25bd6658864fab47450025490b74be878" }, + "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, + "nvim-lint": { "branch": "master", "commit": "3615c26c4922ae5f7366f0c1943a0e7cece04325" }, + "nvim-lspconfig": { "branch": "master", "commit": "cb5680882ed1f18e67429516e45b810de3d148b8" }, + "nvim-navic": { "branch": "master", "commit": "39231352aec0d1e09cebbffdd9dc20a5dc691ffe" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "e329e94a6a0a5ccf6ec8bfec1d10faf5eaae665f" }, - "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" }, - "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, - "overseer.nvim": { "branch": "master", "commit": "2c23513a4fd3a3be0459b3b62996fb0732c2fd7e" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "pretty_hover": { "branch": "master", "commit": "7840c9403f6431f198feeca37b18e29412fe99e6" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "de39919a57e1a40a4c7dc5bae0de276f9c616ef3" }, - "rustaceanvim": { "branch": "master", "commit": "1486b5a2cc0de646d6d0837ec77127c9d6e2c50f" }, + "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, + "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, + "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, + "overseer.nvim": { "branch": "master", "commit": "72c68aab0358c92f451168b704c411c4a3e3410e" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "ed4299e21e6ffc5db022cea608f44f8d26aba2cc" }, + "render-markdown.nvim": { "branch": "main", "commit": "a2c2493c21cf61e5554ee8bc83da75bd695921da" }, + "rustaceanvim": { "branch": "master", "commit": "3f327d15a3c1ed48b1e1087e16873a28a39768c2" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "tokyonight.nvim": { "branch": "main", "commit": "b262293ef481b0d1f7a14c708ea7ca649672e200" }, - "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, - "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } + "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } } -- 2.49.1 From 9914c9bd884ce7a1ca10dcb623422355dad3a844 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 17 Apr 2025 23:39:18 +0200 Subject: [PATCH 818/894] added toml formatter and lsp --- lua/plugins/conform.lua | 1 + lua/plugins/lsp.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 60f8ac1..76c16d8 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -13,6 +13,7 @@ return { cmake = { 'gersemi' }, markdown = { 'prettier' }, json = { 'fixjson' }, + toml = { 'taplo' }, }, }, keys = { diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 61d0c97..2004553 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -103,6 +103,7 @@ return { }, neocmake = {}, markdown_oxide = {}, + taplo = {}, } require('mason').setup() -- 2.49.1 From 23dd1811ee3c567e4fcf347b5d95049a179615f5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 20 Apr 2025 23:00:32 +0200 Subject: [PATCH 819/894] change api for new filetypes --- lua/my_autocommands.lua | 47 ++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 0f11c3a..30b6efc 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -7,37 +7,22 @@ api.nvim_create_autocmd('TextYankPost', { group = yankGrp, }) --- Filetypes -local fileGrp = api.nvim_create_augroup('file_type', { clear = true }) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { '*.simvis', '*.manifest' }, - callback = function() vim.bo.filetype = 'xml' end, - group = fileGrp, -}) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { '*.simcfg', '*.simcon', '*.simudex' }, - callback = function() vim.bo.filetype = 'xml' end, - group = fileGrp, -}) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { 'JenkinsFile*' }, - callback = function() vim.bo.filetype = 'groovy' end, - group = fileGrp, -}) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { 'SConstruct', 'SConscript' }, - callback = function() vim.bo.filetype = 'python' end, - group = fileGrp, -}) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { 'doskey' }, - callback = function() vim.bo.filetype = 'dosini' end, - group = fileGrp, -}) -api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { - pattern = { '.clangd', '.clang-tidy' }, - callback = function() vim.bo.filetype = 'yaml' end, - group = fileGrp, +vim.filetype.add({ + extension = { + simvis = 'xml', + manifest = 'xml', + simcfg = 'xml', + simcon = 'xml', + simudex = 'xml' + }, + filename = { + ['JenkinsFile'] = 'groovy', + ['SConstruct'] = 'python', + ['SConscript'] = 'python', + ['doskey'] = 'dosini', + ['.clangd'] = 'yaml', + ['.clang-tidy'] = 'yaml', + }, }) -- Read and write shada file -- 2.49.1 From df0db2470236f06279420bac57b3f741e294b643 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 20 Apr 2025 23:34:31 +0200 Subject: [PATCH 820/894] moved lsp server config to after dir --- after/lsp/basedpyright.lua | 7 ++++ after/lsp/clangd.lua | 21 ++++++++++ after/lsp/lua_ls.lua | 22 +++++++++++ after/lsp/yamlls.lua | 7 ++++ lua/plugins/lsp.lua | 80 ++++++-------------------------------- 5 files changed, 69 insertions(+), 68 deletions(-) create mode 100644 after/lsp/basedpyright.lua create mode 100644 after/lsp/clangd.lua create mode 100644 after/lsp/lua_ls.lua create mode 100644 after/lsp/yamlls.lua diff --git a/after/lsp/basedpyright.lua b/after/lsp/basedpyright.lua new file mode 100644 index 0000000..5d369c0 --- /dev/null +++ b/after/lsp/basedpyright.lua @@ -0,0 +1,7 @@ +return { + settings = { + basedpyright = { + typeCheckingMode = 'standard', + }, + }, +} diff --git a/after/lsp/clangd.lua b/after/lsp/clangd.lua new file mode 100644 index 0000000..36c7b6e --- /dev/null +++ b/after/lsp/clangd.lua @@ -0,0 +1,21 @@ +return { + cmd = { + 'clangd', + '--compile-commands-dir=build_nvim', + '--query-driver', + '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', + '--clang-tidy', + '--background-index', + '--use-dirty-headers', + '--completion-style=detailed', + }, + root_markers = { + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_flags.txt', + 'configure.ac', + '.git', + 'build_nvim', + }, +} diff --git a/after/lsp/lua_ls.lua b/after/lsp/lua_ls.lua new file mode 100644 index 0000000..1769114 --- /dev/null +++ b/after/lsp/lua_ls.lua @@ -0,0 +1,22 @@ +return { + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + callSnippet = 'Replace', + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + diagnostics = { + disable = { 'missing-fields' }, + }, + format = { + enable = false, + }, + }, + }, +} diff --git a/after/lsp/yamlls.lua b/after/lsp/yamlls.lua new file mode 100644 index 0000000..46dd36b --- /dev/null +++ b/after/lsp/yamlls.lua @@ -0,0 +1,7 @@ +return { + settings = { + yaml = { + validate = true, + }, + }, +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 2004553..57e226b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -41,74 +41,21 @@ return { lazy = false, config = function() local servers = { - basedpyright = { - settings = { - basedpyright = { - typeCheckingMode = 'standard', - }, - }, - }, - ruff = {}, - clangd = { - cmd = { - 'clangd', - '--compile-commands-dir=build_nvim', - '--query-driver', - '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*', - '--clang-tidy', - '--background-index', - '--use-dirty-headers', - '--completion-style=detailed', - }, - root_markers = { - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim', - }, - }, - lua_ls = { - settings = { - Lua = { - workspace = { - checkThirdParty = false, - }, - completion = { - callSnippet = 'Replace', - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - diagnostics = { - disable = { 'missing-fields' }, - }, - format = { - enable = false, - }, - }, - }, - }, - jsonls = {}, - dockerls = {}, - yamlls = { - settings = { - yaml = { - validate = true, - }, - }, - }, - neocmake = {}, - markdown_oxide = {}, - taplo = {}, + 'basedpyright', + 'ruff', + 'clangd', + 'lua_ls', + 'jsonls', + 'dockerls', + 'yamlls', + 'neocmake', + 'markdown_oxide', + 'taplo', } require('mason').setup() require('mason-lspconfig').setup({ - ensure_installed = vim.tbl_keys(servers or {}), + ensure_installed = servers, }) local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -117,10 +64,7 @@ return { capabilities = capabilities, }) - for server, settings in pairs(servers) do - vim.lsp.config(server, settings) - vim.lsp.enable(server) - end + vim.lsp.enable(servers) local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) vim.api.nvim_create_autocmd('LspAttach', { -- 2.49.1 From 946c9a8a859b2f9d68c67cfcefbba1da2869dd32 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 20 Apr 2025 23:36:28 +0200 Subject: [PATCH 821/894] removed additional braces --- lua/plugins/lsp.lua | 116 ++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 57e226b..b355dee 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -31,64 +31,62 @@ local lspKeys = function(client, bufnr) end return { - { - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - 'SmiteshP/nvim-navic', - }, - lazy = false, - config = function() - local servers = { - 'basedpyright', - 'ruff', - 'clangd', - 'lua_ls', - 'jsonls', - 'dockerls', - 'yamlls', - 'neocmake', - 'markdown_oxide', - 'taplo', - } - - require('mason').setup() - require('mason-lspconfig').setup({ - ensure_installed = servers, - }) - - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - vim.lsp.config('*', { - capabilities = capabilities, - }) - - vim.lsp.enable(servers) - - local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) - vim.api.nvim_create_autocmd('LspAttach', { - group = lsp_group, - desc = 'Set buffer‑local keymaps and options after an LSP client attaches', - callback = function(args) - local bufnr = args.buf - local client = vim.lsp.get_client_by_id(args.data.client_id) - if not client then - return - end - lspKeys(client, bufnr) - - if client.server_capabilities.completionProvider then - vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc' - vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr()' - end - - if client.server_capabilities.documentSymbolProvider then - local navic = require('nvim-navic') - navic.attach(client, bufnr) - end - end, - }) - end, + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'SmiteshP/nvim-navic', }, + lazy = false, + config = function() + local servers = { + 'basedpyright', + 'ruff', + 'clangd', + 'lua_ls', + 'jsonls', + 'dockerls', + 'yamlls', + 'neocmake', + 'markdown_oxide', + 'taplo', + } + + require('mason').setup() + require('mason-lspconfig').setup({ + ensure_installed = servers, + }) + + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + vim.lsp.config('*', { + capabilities = capabilities, + }) + + vim.lsp.enable(servers) + + local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) + vim.api.nvim_create_autocmd('LspAttach', { + group = lsp_group, + desc = 'Set buffer‑local keymaps and options after an LSP client attaches', + callback = function(args) + local bufnr = args.buf + local client = vim.lsp.get_client_by_id(args.data.client_id) + if not client then + return + end + lspKeys(client, bufnr) + + if client.server_capabilities.completionProvider then + vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc' + vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr()' + end + + if client.server_capabilities.documentSymbolProvider then + local navic = require('nvim-navic') + navic.attach(client, bufnr) + end + end, + }) + end, } -- 2.49.1 From 232f4df97a677e565d00436a3ee54c869d9cbf67 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 21 Apr 2025 20:57:44 +0200 Subject: [PATCH 822/894] switch to blink again --- lua/plugins/blink.lua | 3 +-- lua/plugins/cmp.lua | 1 + lua/plugins/lsp.lua | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 3eb49b1..074a73b 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -231,6 +231,5 @@ return { }, -- allows extending the providers array elsewhere in your config -- without having to redefine it - opts_extend = { 'sources.default' }, - enabled = false, + enabled = true, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 28a7615..49faa09 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -147,4 +147,5 @@ return { matching = { disallow_symbol_nonprefix_matching = false }, }) end, + enabled = false } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index b355dee..eae5780 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -58,7 +58,8 @@ return { }) local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) vim.lsp.config('*', { capabilities = capabilities, }) -- 2.49.1 From 6860da39b00d2c19d0e3f7c71322cbf84798bec7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 22 Apr 2025 22:46:37 +0200 Subject: [PATCH 823/894] blink still has bugs --- lua/plugins/blink.lua | 2 +- lua/plugins/cmp.lua | 2 +- lua/plugins/lsp.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 074a73b..333cdf7 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -231,5 +231,5 @@ return { }, -- allows extending the providers array elsewhere in your config -- without having to redefine it - enabled = true, + enabled = false, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 49faa09..0231af4 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -147,5 +147,5 @@ return { matching = { disallow_symbol_nonprefix_matching = false }, }) end, - enabled = false + enabled = true, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index eae5780..ab0c78b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -58,8 +58,8 @@ return { }) local capabilities = vim.lsp.protocol.make_client_capabilities() - -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) vim.lsp.config('*', { capabilities = capabilities, }) -- 2.49.1 From e570d1d51b8cb85ea947e20cfa0918db1a3c6aa5 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 22 Apr 2025 23:05:59 +0200 Subject: [PATCH 824/894] fixed lazygit style again --- lua/themes/bamboo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 4b8b52f..9494fa7 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -30,8 +30,8 @@ return { ['LspReferenceRead'] = { bg = colors.vulgaris.green, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceWrite'] = { bg = colors.vulgaris.red, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, ['LspReferenceText'] = { bg = colors.vulgaris.cyan, fg = colors.vulgaris.bg1, fmt = 'nocombine' }, - ['NormalFloat'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, - ['FloatBorder'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, + -- ['NormalFloat'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, + -- ['FloatBorder'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, ['SnacksPickerList'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, ['SnacksPickerListCursorLine'] = { bg = colors.vulgaris.bg3, fmt = 'nocombine' }, ['SnacksPickerPrompt'] = { bg = colors.vulgaris.bg_d, fmt = 'nocombine' }, -- 2.49.1 From 0264be4c7c83986c2f648cd1daf8485838a17a87 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 24 Apr 2025 22:23:06 +0200 Subject: [PATCH 825/894] don't enable words in insert mode --- lua/plugins/snacks.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index ca7d585..f1665a8 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -12,7 +12,10 @@ return { notifier = { enabled = false }, quickfile = { enabled = true }, statuscolumn = { enabled = true }, - words = { enabled = true }, + words = { + enabled = true, + modes = { 'n', 'c' }, + }, indent = { indent = { hl = 'CmpItemKindNull', -- 2.49.1 From 6b5f89632c3effee02da767e10e0f2965ec55ada Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 29 Apr 2025 23:02:55 +0200 Subject: [PATCH 826/894] added dial --- lua/plugins/dial.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/plugins/dial.lua diff --git a/lua/plugins/dial.lua b/lua/plugins/dial.lua new file mode 100644 index 0000000..e51b82b --- /dev/null +++ b/lua/plugins/dial.lua @@ -0,0 +1,23 @@ +return { + 'monaqa/dial.nvim', + keys = { + { '', function() return require('dial.map').inc_normal() end, expr = true, desc = 'Increment' }, + { '', function() return require('dial.map').dec_normal() end, expr = true, desc = 'Decrement' }, + { '', function() return require('dial.map').inc_visual() end, mode = 'v', expr = true, desc = 'Increment' }, + { '', function() return require('dial.map').dec_visual() end, mode = 'v', expr = true, desc = 'Decrement' }, + }, + config = function() + local augends = require('dial.augend') + require('dial.config').augends:register_group({ + -- default augends used when no group name is specified + default = { + augends.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...) + augends.integer.alias.hex, -- nonnegative hex number (0x0, 0x1, 0x2, ...) + augends.date.alias['%Y/%m/%d'], -- date (2027/04/15, etc.) + augends.constant.alias.bool, -- boolean value (true <-> false) + augends.constant.new({ elements = { 'True', 'False' } }), + augends.constant.new({ elements = { 'TRUE', 'FALSE' } }), + }, + }) + end, +} -- 2.49.1 From 5c0100234414c679ee4d6b09038916886ab93cec Mon Sep 17 00:00:00 2001 From: oli Date: Thu, 8 May 2025 22:34:31 +0200 Subject: [PATCH 827/894] Update lua/plugins/lsp.lua --- lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index ab0c78b..bfb752d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -69,7 +69,7 @@ return { local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) vim.api.nvim_create_autocmd('LspAttach', { group = lsp_group, - desc = 'Set buffer‑local keymaps and options after an LSP client attaches', + desc = 'Set buffer-local keymaps and options after an LSP client attaches', callback = function(args) local bufnr = args.buf local client = vim.lsp.get_client_by_id(args.data.client_id) -- 2.49.1 From 412a16b28a216ea8ae0f67ce8a7664e38104ad02 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 11 May 2025 22:51:04 +0200 Subject: [PATCH 828/894] don't enable lsp servers twice --- lua/plugins/lsp.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index bfb752d..09d02d7 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -52,11 +52,6 @@ return { 'taplo', } - require('mason').setup() - require('mason-lspconfig').setup({ - ensure_installed = servers, - }) - local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) @@ -64,7 +59,10 @@ return { capabilities = capabilities, }) - vim.lsp.enable(servers) + require('mason').setup() + require('mason-lspconfig').setup({ + ensure_installed = servers, + }) local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) vim.api.nvim_create_autocmd('LspAttach', { -- 2.49.1 From 49978655ae0c149c59f2f96e67103882bb2e87ea Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 11 May 2025 22:51:12 +0200 Subject: [PATCH 829/894] update plugins --- lazy-lock.json | 72 +++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index a1e70ab..9e011cc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,12 +1,12 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, - "avante.nvim": { "branch": "main", "commit": "1eb0fd82536718b38fcbdac55cde2901f8dbdcff" }, + "avante.nvim": { "branch": "main", "commit": "adae032f5fbc611d59545792d3c5bb1c9ddc3fdb" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, - "cmake-tools.nvim": { "branch": "master", "commit": "a5d5bf0a93bb96085502334a5036fc054ad9cf33" }, + "cmake-tools.nvim": { "branch": "master", "commit": "1ee065c33ca777c0e03cd7c358010202ee70bb88" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, @@ -14,69 +14,69 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "codecompanion.nvim": { "branch": "main", "commit": "071f738ac152690b5518612dfbd17e1249ad819a" }, - "codeium.nvim": { "branch": "main", "commit": "9569c9095a70370849345c861cdb2b06c4cadac7" }, - "conform.nvim": { "branch": "master", "commit": "6632e7d788a85bf8405ea0c812d343fc308b7b8c" }, + "codecompanion.nvim": { "branch": "main", "commit": "d19670a44c35e9ba0674cc7a25ff3b8f22bbf062" }, + "codeium.nvim": { "branch": "main", "commit": "821b570b526dbb05b57aa4ded578b709a704a38a" }, + "conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" }, "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "0b435497295f01e253f3c1777e02f4553da7f59d" }, + "copilot.lua": { "branch": "master", "commit": "2fe34db04570f6c47db0b752ca421a49b7357c03" }, + "dial.nvim": { "branch": "master", "commit": "2c7e2750372918f072a20f3cf754d845e143d7c9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, - "everforest-nvim": { "branch": "main", "commit": "135cc21a45756e688dd1a3cbeb1c80a04b569b46" }, + "everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, - "friendly-snippets": { "branch": "main", "commit": "31f2a2657b6261724313281fe0d8ba6f43f4a4fa" }, - "fzf-lua": { "branch": "main", "commit": "a09296cf7afaf22842b3bff7e5bfdec943a3c29c" }, - "gitsigns.nvim": { "branch": "main", "commit": "d600d3922c1d001422689319a8f915136bb64e1e" }, - "grug-far.nvim": { "branch": "main", "commit": "d6c682af0033b4fbb3645a997e3b4a9189ed1ed6" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fzf-lua": { "branch": "main", "commit": "b45881a2043d96506ba628f3bc65a4594b179c4e" }, + "gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" }, + "grug-far.nvim": { "branch": "main", "commit": "78c8d27c6f3300bfa92bb535236732d8e9bcb614" }, "gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, - "gruvbox.nvim": { "branch": "main", "commit": "a933d8666dad9363dc6908ae72cfc832299c2f59" }, + "gruvbox.nvim": { "branch": "main", "commit": "cc202a7c5e5ffca06f92a04073275dec371cbfe3" }, "img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" }, - "iron.nvim": { "branch": "master", "commit": "93b3b97cf4313613fba5e91055deaf091cd78483" }, - "kanagawa.nvim": { "branch": "master", "commit": "cc3b68b08e6a0cb6e6bf9944932940091e49bb83" }, + "iron.nvim": { "branch": "master", "commit": "c005b01b779f1b6c038e11248db403bb3df6a7f3" }, + "kanagawa.nvim": { "branch": "master", "commit": "4de88d695634a8776c687af8e7436cfa074aa0c0" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" }, + "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "62f821a14e20f3f2ee358cd44d0b3d299a508e72" }, + "mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" }, "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, - "monokai-pro.nvim": { "branch": "master", "commit": "872f774303f79416000e8049630052f4124d9534" }, - "neogen": { "branch": "main", "commit": "05d754004da8c89115b291f2a23ca530a8cac8fd" }, - "neogit": { "branch": "master", "commit": "97f83f1dc51dee41e08e3c7a8adf00e1083e3178" }, - "neotest": { "branch": "master", "commit": "747775fc22dfeb6102bdde6559ccb5126dac0ff8" }, + "monokai-pro.nvim": { "branch": "master", "commit": "31bad737610ec211de086d373c73025f39de93cb" }, + "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, + "neogit": { "branch": "master", "commit": "a58ab1befb5608b8ff36a2286360df8263791c1c" }, + "neotest": { "branch": "master", "commit": "2d9011396c43fa1d40221e6b6c3be5eb001427a9" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, + "nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, - "nvim-dap-ui": { "branch": "master", "commit": "881a69e25bd6658864fab47450025490b74be878" }, + "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, - "nvim-lint": { "branch": "master", "commit": "3615c26c4922ae5f7366f0c1943a0e7cece04325" }, - "nvim-lspconfig": { "branch": "master", "commit": "cb5680882ed1f18e67429516e45b810de3d148b8" }, - "nvim-navic": { "branch": "master", "commit": "39231352aec0d1e09cebbffdd9dc20a5dc691ffe" }, + "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, + "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" }, + "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, - "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, - "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, + "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" }, + "nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" }, + "oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" }, "overseer.nvim": { "branch": "master", "commit": "72c68aab0358c92f451168b704c411c4a3e3410e" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "ed4299e21e6ffc5db022cea608f44f8d26aba2cc" }, - "render-markdown.nvim": { "branch": "main", "commit": "a2c2493c21cf61e5554ee8bc83da75bd695921da" }, - "rustaceanvim": { "branch": "master", "commit": "3f327d15a3c1ed48b1e1087e16873a28a39768c2" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" }, + "render-markdown.nvim": { "branch": "main", "commit": "935c2c70c296d87ed1bcce9ce667c239c9c982b5" }, + "rustaceanvim": { "branch": "master", "commit": "cb532f57c1ed2463c66df683468eb3994e554002" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, - "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" }, "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } } -- 2.49.1 From a71d0c02f693ea7b698d7820e4d46d3819ae4970 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:43:13 +0200 Subject: [PATCH 830/894] lazy load avante --- lua/plugins/avante.lua | 59 +++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 63c7f26..7663aec 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -1,10 +1,8 @@ return { 'yetone/avante.nvim', - event = 'VeryLazy', - lazy = false, version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes. opts = { - debug = true, + debug = false, provider = 'gemini', auto_suggestions_provider = 'openai', -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot openai = { @@ -26,37 +24,34 @@ return { 'stevearc/dressing.nvim', 'nvim-lua/plenary.nvim', 'MunifTanjim/nui.nvim', - --- The below dependencies are optional, - -- 'echasnovski/mini.pick', -- for file_selector provider mini.pick - -- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope - -- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions - 'ibhagwan/fzf-lua', -- for file_selector provider fzf 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons - -- 'zbirenbaum/copilot.lua', -- for providers='copilot' + 'zbirenbaum/copilot.lua', -- for providers='copilot' { - -- support for image pasting - 'HakonHarnes/img-clip.nvim', - event = 'VeryLazy', - opts = { - -- recommended settings - default = { - embed_image_as_base64 = false, - prompt_for_file_name = false, - drag_and_drop = { - insert_mode = true, - }, - -- required for Windows users - use_absolute_path = true, - }, - }, + 'MeanderingProgrammer/render-markdown.nvim', + }, + }, + cmd = { + 'AvanteAsk', + 'AvanteBuild', + 'AvanteChat', + 'AvanteChatNew', + 'AvanteHistory', + 'AvanteClear', + 'AvanteEdit', + 'AvanteFocus', + 'AvanteRefresh', + 'AvanteStop', + 'AvanteSwitchProvider', + 'AvanteShowRepoMap', + 'AvanteToggle', + 'AvanteModels', + 'AvanteSwitchSelectorProvider', + }, + keys = { + { + 'aa', + 'AvanteAsk', + desc = 'Avante Ask', }, - -- { - -- -- Make sure to set this up properly if you have lazy=true - -- 'MeanderingProgrammer/render-markdown.nvim', - -- opts = { - -- file_types = { 'markdown', 'Avante' }, - -- }, - -- ft = { 'markdown', 'Avante' }, - -- }, }, } -- 2.49.1 From 7b67983b6908a55c4f761256abc638524a49bdb2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:43:37 +0200 Subject: [PATCH 831/894] lazy load flash --- lua/plugins/flash.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 4695298..66aea50 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -1,6 +1,5 @@ return { 'folke/flash.nvim', - event = 'VeryLazy', opts = { modes = { search = { -- 2.49.1 From 9d9e6455449893338a45ec2392a5085b950c6414 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:43:47 +0200 Subject: [PATCH 832/894] avante options for render markdown --- lua/plugins/render-markdown.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 8d260e5..098263f 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -5,5 +5,7 @@ return { ---@type render.md.UserConfig opts = { completions = { blink = { enabled = true } }, + file_types = { 'markdown', 'Avante' }, }, + ft = { 'markdown', 'Avante' }, } -- 2.49.1 From 3d032689fae46eec7fb7564993aaf1b2358bd45e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:49:56 +0200 Subject: [PATCH 833/894] don't check lsp server with mason --- lua/plugins/lsp.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 09d02d7..064a69f 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -59,10 +59,7 @@ return { capabilities = capabilities, }) - require('mason').setup() - require('mason-lspconfig').setup({ - ensure_installed = servers, - }) + vim.lsp.enable(servers) local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true }) vim.api.nvim_create_autocmd('LspAttach', { -- 2.49.1 From 5dd002497db6e4746f0dc602f19b3f6c104e05a1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:50:05 +0200 Subject: [PATCH 834/894] nvim lint only for cpp files --- lua/plugins/nvim-lint.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/nvim-lint.lua b/lua/plugins/nvim-lint.lua index 99f2353..eb788b7 100644 --- a/lua/plugins/nvim-lint.lua +++ b/lua/plugins/nvim-lint.lua @@ -16,4 +16,7 @@ return { end, }) end, + ft = { + 'cpp', + }, } -- 2.49.1 From 389645576aa3f54001e3ae3a81065ef56b4ad90f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:55:47 +0200 Subject: [PATCH 835/894] more lazy loading --- lua/plugins/codecompanion.lua | 6 ++++++ lua/plugins/codium.lua | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 lua/plugins/codium.lua diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index 9509e10..d580f57 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -26,4 +26,10 @@ return { -- }, }) end, + cmd = { + 'CodeCompanion', + 'CodeCompanionChat', + 'CodeCompanionCmd', + 'CodeCompanionActions ', + }, } diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua deleted file mode 100644 index 06476cf..0000000 --- a/lua/plugins/codium.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - 'Exafunction/codeium.nvim', - requires = { - 'nvim-lua/plenary.nvim', - }, - config = function() require('codeium').setup({}) end, - enabled = vim.fn.hostname() == 'perryLinux64', -} -- 2.49.1 From 2c3a45e455b18074e7050238fb222d87d364a3ed Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 12 May 2025 23:59:03 +0200 Subject: [PATCH 836/894] mason tuning --- lua/plugins/mason.lua | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 4bd91b6..73800e6 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -14,30 +14,11 @@ return { }) require('mason-lspconfig').setup({ automatic_installation = false, - ensure_installed = { - 'clangd', - 'basedpyright', - -- 'neocmake', - 'efm', - 'lua_ls', - 'jsonls', - 'markdown_oxide', - }, }) require('mason-tool-installer').setup({ -- a list of all tools you want to ensure are installed upon -- start - ensure_installed = { - 'black', - 'flake8', - 'isort', - 'prettier', - 'stylua', - 'gersemi', - 'cmakelang', - 'ruff', - }, }) end, } -- 2.49.1 From 45c65797046e056c1b693c005437c9338cf2beea Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 21 May 2025 21:55:38 +0200 Subject: [PATCH 837/894] changed gemini model --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 7663aec..daf23bb 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -14,7 +14,7 @@ return { }, gemini = { api_key_name = 'GEMINI_API_KEY', - model = 'gemini-2.5-pro-exp-03-25', + model = 'gemini-2.5-flash-preview-04-17', }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` -- 2.49.1 From 8fd8136ef4d20371277ea11720a1f500579995e3 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 May 2025 22:23:50 +0200 Subject: [PATCH 838/894] added goose --- lua/plugins/goose.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lua/plugins/goose.lua diff --git a/lua/plugins/goose.lua b/lua/plugins/goose.lua new file mode 100644 index 0000000..e6be2c3 --- /dev/null +++ b/lua/plugins/goose.lua @@ -0,0 +1,18 @@ +return { + 'azorng/goose.nvim', + config = function() + require('goose').setup({ + keymap = { + window = { + submit = '', + }, + }, + }) + end, + dependencies = { + 'nvim-lua/plenary.nvim', + { + 'MeanderingProgrammer/render-markdown.nvim', + }, + }, +} -- 2.49.1 From 4191a22ba447324343e36a1d0fa5ec97bd2c13d0 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 May 2025 22:24:27 +0200 Subject: [PATCH 839/894] disable avante --- lua/plugins/avante.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index daf23bb..84551cd 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -54,4 +54,5 @@ return { desc = 'Avante Ask', }, }, + enabled = false, } -- 2.49.1 From a8afb476388931b7282f6b68221f011dd955f033 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 May 2025 22:42:21 +0200 Subject: [PATCH 840/894] changed goose keymaps --- lua/plugins/goose.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/plugins/goose.lua b/lua/plugins/goose.lua index e6be2c3..44698f6 100644 --- a/lua/plugins/goose.lua +++ b/lua/plugins/goose.lua @@ -3,6 +3,25 @@ return { config = function() require('goose').setup({ keymap = { + global = { + toggle = 'xg', -- Open goose. Close if opened + open_input = 'xx', -- Opens and focuses on input window on insert mode + open_input_new_session = 'xX', -- Opens and focuses on input window on insert mode. Creates a new session + open_output = 'xo', -- Opens and focuses on output window + toggle_focus = 'xt', -- Toggle focus between goose and last window + close = 'xq', -- Close UI windows + toggle_fullscreen = 'xf', -- Toggle between normal and fullscreen mode + select_session = 'xs', -- Select and load a goose session + goose_mode_chat = 'xmc', -- Set goose mode to `chat`. (Tool calling disabled. No editor context besides selections) + goose_mode_auto = 'xma', -- Set goose mode to `auto`. (Default mode with full agent capabilities) + configure_provider = 'xp', -- Quick provider and model switch from predefined list + diff_open = 'xd', -- Opens a diff tab of a modified file since the last goose prompt + diff_next = 'x]', -- Navigate to next file diff + diff_prev = 'x[', -- Navigate to previous file diff + diff_close = 'xc', -- Close diff view tab and return to normal editing + diff_revert_all = 'xra', -- Revert all file changes since the last goose prompt + diff_revert_this = 'xrt', -- Revert current file changes since the last goose prompt + }, window = { submit = '', }, -- 2.49.1 From 04ebc12b2ec90cb683e193b9e97d1959bf7ec919 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 23 May 2025 22:42:45 +0200 Subject: [PATCH 841/894] deleted trouble --- lua/plugins/trouble.lua | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 lua/plugins/trouble.lua diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua deleted file mode 100644 index 4200a5b..0000000 --- a/lua/plugins/trouble.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - 'folke/trouble.nvim', - opts = {}, -- for default options, refer to the configuration section for custom setup. - cmd = 'Trouble', - keys = { - { - 'xx', - 'Trouble diagnostics toggle', - desc = 'Diagnostics (Trouble)', - }, - { - 'xX', - 'Trouble diagnostics toggle filter.buf=0', - desc = 'Buffer Diagnostics (Trouble)', - }, - { - 'cl', - 'Trouble lsp toggle focus=false win.position=right', - desc = 'LSP Definitions / references / ... (Trouble)', - }, - { - 'xL', - 'Trouble loclist toggle', - desc = 'Location List (Trouble)', - }, - { - 'xQ', - 'Trouble qflist toggle', - desc = 'Quickfix List (Trouble)', - }, - }, -} -- 2.49.1 From 3f05e242370c9e63a6e9449dd0ffa56eb0416d5f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jun 2025 20:38:14 +0200 Subject: [PATCH 842/894] update kanagawa theme --- lua/themes/kanagawa.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/themes/kanagawa.lua b/lua/themes/kanagawa.lua index 9948a3b..2cc01f9 100644 --- a/lua/themes/kanagawa.lua +++ b/lua/themes/kanagawa.lua @@ -22,6 +22,8 @@ return { return { ['@lsp.mod.readonly'] = { bold = true }, ['@lsp.mod.static'] = { italic = true }, + ['LspReferenceRead'] = { bg = colors.palette.lotusGreen, fg = colors.palette.dragonBlack0 }, + ['LspReferenceWrite'] = { bg = colors.palette.lotusRed, fg = colors.palette.fujiWhite }, } end, theme = 'wave', -- Load "wave" theme when 'background' option is not set @@ -31,8 +33,6 @@ return { light = 'lotus', }, }) - - vim.cmd('colorscheme kanagawa') end, enabled = true, } -- 2.49.1 From 9b4a1f350bc6eaceb78b75d4b4764755e0b5d4ad Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jun 2025 21:14:53 +0200 Subject: [PATCH 843/894] change theme --- lua/config/options.lua | 4 ---- lua/plugins/lualine.lua | 8 +------- lua/plugins/snacks.lua | 1 - lua/themes/bamboo.lua | 4 ++-- lua/themes/kanagawa.lua | 5 +++-- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 106e615..254844b 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -147,7 +147,3 @@ vim.diagnostic.config({ update_in_insert = false, -- Don't update diagnostics in insert mode severity_sort = true, -- Sort diagnostics by severity }) - --- Window border for floating windows - -require('bamboo').load() diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index d5711ff..5bb3171 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -6,7 +6,6 @@ return { }, config = function() vim.opt.laststatus = 3 - local colors = require('bamboo.palette') require('lualine').setup({ options = { theme = 'auto', @@ -30,18 +29,15 @@ return { lualine_c = { { 'getcwd', - color = { fg = colors.vulgaris.orange, gui = 'bold' }, }, { 'filename', path = 1, file_status = true, - color = { fg = colors.vulgaris.light_blue, gui = 'bold' }, }, { function() return require('nvim-navic').get_location() end, cond = function() return package.loaded['nvim-navic'] and require('nvim-navic').is_available() end, - color = { fg = colors.vulgaris.blue }, }, }, lualine_y = { @@ -66,7 +62,6 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - color = { fg = '#000000', bg = '#ff9966', gui = 'bold' }, }, }, lualine_b = { @@ -95,7 +90,6 @@ return { path = 0, file_status = true, separator = { left = '', right = '' }, - color = { fg = '#000000', bg = '#8fb573' }, }, }, lualine_b = { @@ -117,7 +111,7 @@ return { mode = 2, tabs_color = { -- Same values as the general color option can be used here. - active = { bg = 'orange', fg = 'black' }, + active = { bg = 'yellow', fg = 'black' }, inactive = { bg = 'grey' }, }, }, diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index f1665a8..fdaf7d9 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -18,7 +18,6 @@ return { }, indent = { indent = { - hl = 'CmpItemKindNull', only_scope = false, only_current = false, }, diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 9494fa7..88ba1f7 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -1,7 +1,7 @@ return { 'ribru17/bamboo.nvim', lazy = true, - priority = 1000, + -- priority = 1000, config = function() local colors = require('bamboo.palette') require('bamboo').setup({ @@ -78,5 +78,5 @@ return { }) require('bamboo').load() end, - enabled = true, + enabled = false, } diff --git a/lua/themes/kanagawa.lua b/lua/themes/kanagawa.lua index 2cc01f9..10ba21b 100644 --- a/lua/themes/kanagawa.lua +++ b/lua/themes/kanagawa.lua @@ -1,6 +1,6 @@ return { 'rebelot/kanagawa.nvim', - lazy = true, + lazy = false, config = function() require('kanagawa').setup({ compile = false, -- enable compiling the colorscheme @@ -23,7 +23,7 @@ return { ['@lsp.mod.readonly'] = { bold = true }, ['@lsp.mod.static'] = { italic = true }, ['LspReferenceRead'] = { bg = colors.palette.lotusGreen, fg = colors.palette.dragonBlack0 }, - ['LspReferenceWrite'] = { bg = colors.palette.lotusRed, fg = colors.palette.fujiWhite }, + ['LspReferenceWrite'] = { bg = colors.palette.samuraiRed, fg = colors.palette.dragonBlack0 }, } end, theme = 'wave', -- Load "wave" theme when 'background' option is not set @@ -33,6 +33,7 @@ return { light = 'lotus', }, }) + vim.cmd('colorscheme kanagawa') end, enabled = true, } -- 2.49.1 From ce4d61699a8866b24c6bd7f4f8a5c294563ff41b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jun 2025 22:57:40 +0200 Subject: [PATCH 844/894] theme fixes --- lua/plugins/incline.lua | 30 +++++++++++++++++++++++ lua/plugins/lualine.lua | 54 +++-------------------------------------- lua/themes/kanagawa.lua | 5 ++-- 3 files changed, 37 insertions(+), 52 deletions(-) create mode 100644 lua/plugins/incline.lua diff --git a/lua/plugins/incline.lua b/lua/plugins/incline.lua new file mode 100644 index 0000000..bb51c56 --- /dev/null +++ b/lua/plugins/incline.lua @@ -0,0 +1,30 @@ +return { + 'b0o/incline.nvim', + config = function() + local helpers = require('incline.helpers') + local devicons = require('nvim-web-devicons') + require('incline').setup({ + window = { + padding = 0, + margin = { horizontal = 0 }, + }, + render = function(props) + local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t') + if filename == '' then + filename = '[No Name]' + end + local ft_icon, ft_color = devicons.get_icon_color(filename) + local modified = vim.bo[props.buf].modified + return { + ft_icon and { ' ', ft_icon, ' ', guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or '', + ' ', + { filename, gui = modified and 'bold,italic' or 'bold' }, + ' ', + guibg = '#44406e', + } + end, + }) + end, + -- Optional: Lazy load Incline + event = 'VeryLazy', +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 5bb3171..0ff9aeb 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -5,7 +5,6 @@ return { 'Isrothy/lualine-diagnostic-message', }, config = function() - vim.opt.laststatus = 3 require('lualine').setup({ options = { theme = 'auto', @@ -14,6 +13,7 @@ return { winbar = { 'dap-repl', 'dapui_console' }, }, section_separators = { left = '', right = '' }, + component_separators = { left = '', right = '' }, }, globalstatus = true, extensions = { 'oil', 'toggleterm' }, @@ -55,53 +55,6 @@ return { }, }, }, - winbar = { - lualine_a = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - }, - }, - lualine_b = { - { - 'filesize', - }, - { - 'diagnostic-message', - icons = { - error = ' ', - warn = ' ', - info = ' ', - hint = ' ', - }, - }, - }, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - inactive_winbar = { - lualine_a = { - { - 'filename', - path = 0, - file_status = true, - separator = { left = '', right = '' }, - }, - }, - lualine_b = { - { - 'filesize', - }, - }, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, tabline = { lualine_a = {}, lualine_b = {}, @@ -111,8 +64,8 @@ return { mode = 2, tabs_color = { -- Same values as the general color option can be used here. - active = { bg = 'yellow', fg = 'black' }, - inactive = { bg = 'grey' }, + active = { bg = 'orange', fg = 'black' }, + inactive = { bg = 'grey', fg = 'black' }, }, }, }, @@ -122,4 +75,5 @@ return { }, }) end, + enabled = true, } diff --git a/lua/themes/kanagawa.lua b/lua/themes/kanagawa.lua index 10ba21b..ff6715a 100644 --- a/lua/themes/kanagawa.lua +++ b/lua/themes/kanagawa.lua @@ -1,6 +1,7 @@ return { 'rebelot/kanagawa.nvim', lazy = false, + priority = 1000, config = function() require('kanagawa').setup({ compile = false, -- enable compiling the colorscheme @@ -11,7 +12,7 @@ return { statementStyle = { bold = true }, typeStyle = {}, transparent = false, -- do not set background color - dimInactive = true, -- dim inactive window `:h hl-NormalNC` + dimInactive = false, -- dim inactive window `:h hl-NormalNC` terminalColors = true, -- define vim.g.terminal_color_{0,17} colors = { -- add/modify theme and palette colors @@ -33,7 +34,7 @@ return { light = 'lotus', }, }) - vim.cmd('colorscheme kanagawa') + require('kanagawa').load('wave') end, enabled = true, } -- 2.49.1 From 8c7abef74539cbd4686f69b907966b584100d4df Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jun 2025 23:00:41 +0200 Subject: [PATCH 845/894] enabled some snack animations --- lua/plugins/snacks.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index fdaf7d9..afb71af 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -23,13 +23,13 @@ return { }, enabled = true, animate = { - enabled = false, + enabled = true, }, scope = { - enabled = false, + enabled = true, }, chunk = { - enabled = false, + enabled = true, hl = 'Debug', }, }, -- 2.49.1 From 342d6ceb716db93170f20e54e6e62792d6bfb4db Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 15 May 2025 18:59:51 +0000 Subject: [PATCH 846/894] avante and cc for render markdown --- lua/plugins/render-markdown.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 098263f..cc9791a 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -5,7 +5,7 @@ return { ---@type render.md.UserConfig opts = { completions = { blink = { enabled = true } }, - file_types = { 'markdown', 'Avante' }, + ft = { 'markdown', 'codecompanion', 'Avante' }, }, ft = { 'markdown', 'Avante' }, } -- 2.49.1 From a1f6780715d96eb94fb90d9831d120be999ad229 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 9 Jul 2025 22:06:17 +0200 Subject: [PATCH 847/894] search within visual selection --- lua/my_keymappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index c27e516..e89a443 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -67,6 +67,8 @@ vim.keymap.set('v', 'v', function() end end, { noremap = true, silent = true }) +vim.keymap.set('x', '/', '/\\%V') --search within visual selection + vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {}) vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {}) -- 2.49.1 From ab21a47e90f18d4daf0341ee71baaad91f5a099e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 9 Jul 2025 22:26:47 +0200 Subject: [PATCH 848/894] dont use mason lspconfig --- lua/plugins/lsp.lua | 1 - lua/plugins/mason.lua | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 064a69f..43f7679 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -34,7 +34,6 @@ return { 'neovim/nvim-lspconfig', dependencies = { 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', 'SmiteshP/nvim-navic', }, lazy = false, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 73800e6..ed9e360 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -1,7 +1,6 @@ return { 'williamboman/mason.nvim', dependencies = { - 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', }, build = ':MasonUpdate', @@ -12,9 +11,6 @@ return { border = 'rounded', }, }) - require('mason-lspconfig').setup({ - automatic_installation = false, - }) require('mason-tool-installer').setup({ -- a list of all tools you want to ensure are installed upon -- 2.49.1 From 486acb071d8dd9f3dcb93d0d04d07ccb6954d78f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Aug 2025 21:40:39 +0200 Subject: [PATCH 849/894] added diagflow --- lua/plugins/diagflow.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/plugins/diagflow.lua diff --git a/lua/plugins/diagflow.lua b/lua/plugins/diagflow.lua new file mode 100644 index 0000000..23deb34 --- /dev/null +++ b/lua/plugins/diagflow.lua @@ -0,0 +1,9 @@ +return { + 'dgagn/diagflow.nvim', + -- event = 'LspAttach', This is what I use personnally and it works great + opts = { + scope = 'line', + show_sign = false, + show_borders = true, + }, +} -- 2.49.1 From 8d0c1afbeda6c8c43598e3c1bb1d978e4bbeb27e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Aug 2025 21:40:45 +0200 Subject: [PATCH 850/894] set scrolloff to 10 --- lua/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 254844b..a642026 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -29,7 +29,7 @@ opt.wrap = true -- When on, lines longer than the width of the window will wrap opt.list = true opt.hidden = true opt.winborder = 'none' -opt.scrolloff = 4 +opt.scrolloff = 10 opt.shiftround = true opt.relativenumber = false opt.splitbelow = true -- 2.49.1 From 3c9d3af9f2469c814bedb4ea5d3a3b99bccfdfb4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Aug 2025 23:50:12 +0200 Subject: [PATCH 851/894] try blink again --- lua/plugins/blink.lua | 247 +++++++++--------------------------------- lua/plugins/cmp.lua | 2 +- lua/plugins/lsp.lua | 4 +- 3 files changed, 52 insertions(+), 201 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 333cdf7..680337a 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -1,235 +1,86 @@ return { 'saghen/blink.cmp', - lazy = false, -- lazy loading handled internally -- optional: provides snippets for the snippet source dependencies = { - 'rafamadriz/friendly-snippets', - 'giuxtaposition/blink-cmp-copilot', - { - 'fang2hou/blink-copilot', - opts = { - max_completions = 1, -- Global default for max completions - max_attempts = 2, -- Global default for max attempts - -- `kind` is not set, so the default value is "Copilot" - }, - }, - 'dmitmel/cmp-cmdline-history', - 'onsails/lspkind.nvim', - 'folke/lazydev.nvim', - 'L3MON4D3/LuaSnip', { 'saghen/blink.compat', - -- use the latest release, via version = '*', if you also use the latest release for blink.cmp - version = '*', - -- lazy.nvim will automatically load the plugin when it's required by blink.cmp + -- use v2.* for blink.cmp v1.* + version = '2.*', lazy = true, - -- make sure to set opts so that lazy.nvim calls blink.compat's setup opts = {}, }, - 'rcarriga/cmp-dap', + 'rafamadriz/friendly-snippets', + 'dmitmel/cmp-cmdline-history', }, -- use a release tag to download pre-built binaries - version = '*', - -- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust - -- build = 'cargo build --release', - -- If you use nix, you can build from source using latest nightly rust with: - -- build = 'nix run .#build-plugin', + version = '1.*', + ---@module 'blink.cmp' + ---@type blink.cmp.Config opts = { - -- 'default' for mappings similar to built-in completion - -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate) - -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept - -- see the "default configuration" section below for full documentation on how to define - -- your own keymap. + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) + -- 'super-tab' for mappings similar to vscode (tab to accept) + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) keymap = { preset = 'enter' }, appearance = { - -- Sets the fallback highlight groups to nvim-cmp's highlight groups - -- Useful for when your theme doesn't support blink.cmp - -- will be removed in a future release - use_nvim_cmp_as_default = true, - -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' - -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono', }, - enabled = function() return (vim.bo.buftype ~= 'prompt' and vim.b.completion ~= false) or require('cmp_dap').is_dap_buffer() end, - -- default list of enabled providers defined so that you can extend it - -- elsewhere in your config, without redefining it, via `opts_extend` - sources = { - default = { 'copilot', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'codeium' }, - - per_filetype = { - ['dap-repl'] = { - 'copilot', - 'dap', - 'snippets', - 'path', - 'buffer', + -- (Default) Only show the documentation popup when manually triggered + completion = { + documentation = { auto_show = true }, + list = { + selection = { + preselect = false, + auto_insert = false, }, }, + }, + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, providers = { - copilot = { - name = 'copilot', - module = 'blink-copilot', - score_offset = 100, - async = true, - opts = { - -- Local options override global ones - -- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot" - max_completions = 3, -- Override global max_completions - }, - }, - lazydev = { - name = 'LazyDev', - module = 'lazydev.integrations.blink', - -- make lazydev completions top priority (see `:h blink.cmp`) - score_offset = 100, - }, - codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 - name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp - module = 'blink.compat.source', - async = true, + lsp = { + fallbacks = {}, }, cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', - score_offset = -50, - }, - dap = { - name = 'dap', - module = 'blink.compat.source', - async = false, - enabled = function() return require('cmp_dap').is_dap_buffer() end, - }, - buffer = { - name = 'Buffer', - module = 'blink.cmp.sources.buffer', - opts = { - -- default to all visible buffers - get_bufnrs = function() - return vim - .iter(vim.api.nvim_list_wins()) - :map(function(win) return vim.api.nvim_win_get_buf(win) end) - :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) - :totable() - end, - }, + score_offset = -3, }, }, }, - cmdline = { - sources = function() - local type = vim.fn.getcmdtype() - -- Search forward and backward - if type == '/' or type == '?' then - return { 'buffer' } - end - -- Commands - if type == ':' or type == '@' then - return { 'cmdline', 'buffer', 'cmdline_history' } - end - return {} - end, - completion = { - trigger = { - show_on_blocked_trigger_characters = {}, - show_on_x_blocked_trigger_characters = nil, -- Inherits from top level `completion.trigger.show_on_blocked_trigger_characters` config when not set - }, - list = { - selection = { - auto_insert = false, - preselect = false, - }, - }, - menu = { - auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set - }, - }, - keymap = { - [''] = { 'select_next', 'fallback' }, - [''] = { 'select_prev', 'fallback' }, - [''] = { 'accept', 'fallback' }, - [''] = { 'cancel' }, - }, - }, - - completion = { - list = { - selection = { - auto_insert = false, - preselect = false, - }, - }, - accept = { - dot_repeat = false, - }, - menu = { - max_height = 25, - draw = { - padding = 1, - gap = 1, - -- treesitter = { 'lsp' }, - components = { - kind_icon = { - ellipsis = false, - text = function(ctx) - local lspkind = require('lspkind') - local icon = ctx.kind_icon - if ctx.source_name == 'cmdline_history' then - icon = require('nvim-web-devicons').get_icon('log') - elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then - local dev_icon, _ = require('nvim-web-devicons').get_icon(ctx.label) - if dev_icon then - icon = dev_icon - end - else - icon = lspkind.symbolic(ctx.kind, { - mode = 'symbol', - }) - end - - return icon .. ctx.icon_gap - end, - - -- Optionally, use the highlight groups from nvim-web-devicons - -- You can also add the same function for `kind.highlight` if you want to - -- keep the highlight groups in sync with the icons. - highlight = function(ctx) - local hl = ctx.kind_hl - if ctx.source_name == 'cmdline_history' then - _, hl = require('nvim-web-devicons').get_icon('log') - elseif ctx.source_name == 'cmdline' then - _, hl = require('nvim-web-devicons').get_icon('cc') - elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then - local dev_icon, dev_hl = require('nvim-web-devicons').get_icon(ctx.label) - if dev_icon then - hl = dev_hl - end - end - return hl - end, - }, - }, - }, - }, - documentation = { - auto_show = true, - auto_show_delay_ms = 500, - treesitter_highlighting = true, - }, - }, - - -- experimental signature help support - signature = { enabled = true }, snippets = { preset = 'luasnip', }, + signature = { + enabled = true, + }, + cmdline = { + keymap = { preset = 'inherit' }, + completion = { + menu = { auto_show = true }, + list = { + selection = { + preselect = false, + auto_insert = false, + }, + }, + }, + sources = { 'buffer', 'cmdline', 'cmdline_history' }, + }, + + fuzzy = { implementation = 'prefer_rust_with_warning' }, }, - -- allows extending the providers array elsewhere in your config - -- without having to redefine it - enabled = false, + opts_extend = { 'sources.default' }, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 0231af4..6bee5d5 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -147,5 +147,5 @@ return { matching = { disallow_symbol_nonprefix_matching = false }, }) end, - enabled = true, + enabled = false, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 43f7679..57c0a77 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -52,8 +52,8 @@ return { } local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) vim.lsp.config('*', { capabilities = capabilities, }) -- 2.49.1 From a8272fe28dc7f2acd2d7427de79cab5bfb7c0a71 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Aug 2025 23:50:19 +0200 Subject: [PATCH 852/894] update plugin --- lazy-lock.json | 90 ++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 50 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 9e011cc..54ea8d8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,82 +1,72 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "astrotheme": { "branch": "main", "commit": "f12dcf64b1f9a05839c3ac2146f550f43bae9dab" }, + "LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" }, + "astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" }, "avante.nvim": { "branch": "main", "commit": "adae032f5fbc611d59545792d3c5bb1c9ddc3fdb" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, - "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, - "cmake-tools.nvim": { "branch": "master", "commit": "1ee065c33ca777c0e03cd7c358010202ee70bb88" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, + "cmake-tools.nvim": { "branch": "master", "commit": "17244215b1a96e4b2a83a16abd6719197f270f96" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, - "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "codecompanion.nvim": { "branch": "main", "commit": "d19670a44c35e9ba0674cc7a25ff3b8f22bbf062" }, - "codeium.nvim": { "branch": "main", "commit": "821b570b526dbb05b57aa4ded578b709a704a38a" }, - "conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "2fe34db04570f6c47db0b752ca421a49b7357c03" }, - "dial.nvim": { "branch": "master", "commit": "2c7e2750372918f072a20f3cf754d845e143d7c9" }, + "codecompanion.nvim": { "branch": "main", "commit": "19d665a9b13c0b05652c359c4302465b8b2543be" }, + "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, + "copilot.lua": { "branch": "master", "commit": "0f2fd3829dd27d682e46c244cf48d9715726f612" }, + "diagflow.nvim": { "branch": "main", "commit": "b13321b517ff64bf42eeac2214085d3c76d83a0d" }, + "dial.nvim": { "branch": "master", "commit": "78bd73aaf2b9c8f80715a878feaf56f7ffa8b6ff" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "fzf-lua": { "branch": "main", "commit": "b45881a2043d96506ba628f3bc65a4594b179c4e" }, - "gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" }, - "grug-far.nvim": { "branch": "main", "commit": "78c8d27c6f3300bfa92bb535236732d8e9bcb614" }, + "gitsigns.nvim": { "branch": "main", "commit": "736f51d2bb684c06f39a2032f064d7244f549981" }, + "goose.nvim": { "branch": "main", "commit": "ada7651562bbcd0601d08896741cf7b4862178a8" }, + "grug-far.nvim": { "branch": "main", "commit": "385d1949dc21d0c39e7a74b4f4a25da18817bc86" }, "gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, - "gruvbox.nvim": { "branch": "main", "commit": "cc202a7c5e5ffca06f92a04073275dec371cbfe3" }, - "img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" }, + "gruvbox.nvim": { "branch": "main", "commit": "58a2cda2e953a99e2f87c12b7fb4602da4e0709c" }, + "incline.nvim": { "branch": "main", "commit": "0fd2d5a27504dba7fdc507a53275f22c081fe640" }, "iron.nvim": { "branch": "master", "commit": "c005b01b779f1b6c038e11248db403bb3df6a7f3" }, - "kanagawa.nvim": { "branch": "master", "commit": "4de88d695634a8776c687af8e7436cfa074aa0c0" }, + "kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, + "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "62f821a14e20f3f2ee358cd44d0b3d299a508e72" }, - "mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, - "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, - "mini.sessions": { "branch": "main", "commit": "71c9ae596664ac110560d27eb928fc24e22bc53d" }, - "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, - "monokai-pro.nvim": { "branch": "master", "commit": "31bad737610ec211de086d373c73025f39de93cb" }, + "mini.ai": { "branch": "main", "commit": "1cd4f021a05c29acd4ab511c0981da14217daf38" }, + "mini.sessions": { "branch": "main", "commit": "dd7fe484dfcbf270a788e9291545df509cdb9691" }, + "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, + "monokai-pro.nvim": { "branch": "master", "commit": "1ac671f6da720cba967d28d25c2f16b8b4e18808" }, "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, - "neogit": { "branch": "master", "commit": "a58ab1befb5608b8ff36a2286360df8263791c1c" }, - "neotest": { "branch": "master", "commit": "2d9011396c43fa1d40221e6b6c3be5eb001427a9" }, - "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, - "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, + "neogit": { "branch": "master", "commit": "b8d840ed988ec3751ea2d9c9a66f635c3439564a" }, + "neotest": { "branch": "master", "commit": "3c81345c28cd639fcc02843ed3653be462f47024" }, + "neotest-python": { "branch": "master", "commit": "ed9b4d794b89044cc32e5476e637936331473c6e" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" }, - "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, - "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, - "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, + "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, + "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, + "nvim-dap-repl-highlights": { "branch": "master", "commit": "4f4cdb9ccd567512fd4f602e411b8f7ab5f69002" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, - "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, - "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" }, + "nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" }, + "nvim-lspconfig": { "branch": "master", "commit": "9141be4c1332afc83bdf1b0278dbb030f75ff8e3" }, "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" }, - "nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" }, - "oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" }, - "overseer.nvim": { "branch": "master", "commit": "72c68aab0358c92f451168b704c411c4a3e3410e" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" }, - "render-markdown.nvim": { "branch": "main", "commit": "935c2c70c296d87ed1bcce9ce667c239c9c982b5" }, - "rustaceanvim": { "branch": "master", "commit": "cb532f57c1ed2463c66df683468eb3994e554002" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" }, + "oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" }, + "overseer.nvim": { "branch": "master", "commit": "fe7b2f9ba263e150ab36474dfc810217b8cf7400" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, + "render-markdown.nvim": { "branch": "main", "commit": "3d84dbc1f80a2a02e560ddbd5ab29f99f88bbeda" }, + "rustaceanvim": { "branch": "master", "commit": "eb606eb3785f6c6e31ef675c32b706694b76923b" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, - "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } } -- 2.49.1 From 80597dc757eb8d07fed35d66222a3f3f190c0ee7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 7 Aug 2025 23:56:59 +0200 Subject: [PATCH 853/894] added copilot to blink --- lazy-lock.json | 1 + lua/plugins/blink.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 54ea8d8..2ed5302 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,6 +5,7 @@ "astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" }, "avante.nvim": { "branch": "main", "commit": "adae032f5fbc611d59545792d3c5bb1c9ddc3fdb" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, + "blink-copilot": { "branch": "main", "commit": "41e91a659bd9b8cba9ba2ea68a69b52ba5a9ebd8" }, "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, "cmake-tools.nvim": { "branch": "master", "commit": "17244215b1a96e4b2a83a16abd6719197f270f96" }, diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 680337a..f206896 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -11,6 +11,7 @@ return { }, 'rafamadriz/friendly-snippets', 'dmitmel/cmp-cmdline-history', + 'fang2hou/blink-copilot', }, -- use a release tag to download pre-built binaries @@ -47,7 +48,7 @@ return { }, sources = { - default = { 'lsp', 'path', 'snippets', 'buffer' }, + default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot' }, providers = { lsp = { fallbacks = {}, @@ -57,6 +58,12 @@ return { module = 'blink.compat.source', score_offset = -3, }, + copilot = { + name = 'copilot', + module = 'blink-copilot', + score_offset = 100, + async = true, + }, }, }, -- 2.49.1 From 897c759a3524f1a3286cf65e71cb1c4ad49e3503 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 8 Aug 2025 00:24:05 +0200 Subject: [PATCH 854/894] added minuet --- lazy-lock.json | 1 + lua/plugins/blink.lua | 12 +++++++++++- lua/plugins/minuet-ai.lua | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/minuet-ai.lua diff --git a/lazy-lock.json b/lazy-lock.json index 2ed5302..fd450ce 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -41,6 +41,7 @@ "mini.ai": { "branch": "main", "commit": "1cd4f021a05c29acd4ab511c0981da14217daf38" }, "mini.sessions": { "branch": "main", "commit": "dd7fe484dfcbf270a788e9291545df509cdb9691" }, "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, + "minuet-ai.nvim": { "branch": "main", "commit": "d8e2aef4d7c3178d28c0073829cd1845588e8e40" }, "monokai-pro.nvim": { "branch": "master", "commit": "1ac671f6da720cba967d28d25c2f16b8b4e18808" }, "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, "neogit": { "branch": "master", "commit": "b8d840ed988ec3751ea2d9c9a66f635c3439564a" }, diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index f206896..c5b6e91 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -45,10 +45,11 @@ return { auto_insert = false, }, }, + trigger = { prefetch_on_insert = false }, }, sources = { - default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot' }, + default = { 'lsp', 'path', 'snippets', 'buffer', 'minuet' }, providers = { lsp = { fallbacks = {}, @@ -64,6 +65,15 @@ return { score_offset = 100, async = true, }, + minuet = { + name = 'minuet', + module = 'minuet.blink', + async = true, + -- Should match minuet.config.request_timeout * 1000, + -- since minuet.config.request_timeout is in seconds + timeout_ms = 3000, + score_offset = 50, -- Gives minuet higher priority among suggestions + }, }, }, diff --git a/lua/plugins/minuet-ai.lua b/lua/plugins/minuet-ai.lua new file mode 100644 index 0000000..4fb8559 --- /dev/null +++ b/lua/plugins/minuet-ai.lua @@ -0,0 +1,34 @@ +return { + 'milanglacier/minuet-ai.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + }, + opts = { + provider = 'gemini', + provider_options = { + gemini = { + model = 'gemini-2.5-flash', + optional = { + generationConfig = { + maxOutputTokens = 256, + -- When using `gemini-2.5-flash`, it is recommended to entirely + -- disable thinking for faster completion retrieval. + thinkingConfig = { + thinkingBudget = 0, + }, + }, + safetySettings = { + { + -- HARM_CATEGORY_HATE_SPEECH, + -- HARM_CATEGORY_HARASSMENT + -- HARM_CATEGORY_SEXUALLY_EXPLICIT + category = 'HARM_CATEGORY_DANGEROUS_CONTENT', + -- BLOCK_NONE + threshold = 'BLOCK_ONLY_HIGH', + }, + }, + }, + }, + }, + }, +} -- 2.49.1 From 48ca24b6d4628382113d8515a25d1b03bede237f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 8 Aug 2025 13:53:57 +0200 Subject: [PATCH 855/894] added command history to snacks --- lua/plugins/snacks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index afb71af..eadcf5d 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -103,8 +103,8 @@ return { -- { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, -- { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, -- { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, - -- { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, - -- { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + { 'sc', function() Snacks.picker.command_history() end, desc = 'Command History' }, + { 'sC', function() Snacks.picker.commands() end, desc = 'Commands' }, { 'v', function() Snacks.picker.diagnostics() end, desc = 'Diagnostics' }, { 'V', function() Snacks.picker.diagnostics_buffer() end, desc = 'Buffer Diagnostics' }, { 'sh', function() Snacks.picker.help() end, desc = 'Help Pages' }, -- 2.49.1 From cc47be27564b217e02f1b45eea7748accc6cd84f Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 28 Aug 2025 22:42:23 +0200 Subject: [PATCH 856/894] set diffview options --- lua/config/options.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/config/options.lua b/lua/config/options.lua index a642026..27b49d1 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -114,6 +114,12 @@ opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' opt.foldexpr = 'nvim_treesitter#foldexpr()' +if vim.fn.has('nvim-0.12') == 1 then + vim.o.diffopt = 'internal,filler,closeoff,inline:simple,linematch:40' +elseif vim.fn.has('nvim-0.11') == 1 then + vim.o.diffopt = 'internal,filler,closeoff,linematch:40' +end + vim.diagnostic.config({ signs = { text = { -- 2.49.1 From 32c6e60560f302f7ba22ce4c3a3489136ebcaab4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 5 Sep 2025 12:11:06 +0200 Subject: [PATCH 857/894] back to cmp --- lua/plugins/blink.lua | 1 + lua/plugins/cmp.lua | 2 +- lua/plugins/lsp.lua | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index c5b6e91..ac7b593 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -100,4 +100,5 @@ return { fuzzy = { implementation = 'prefer_rust_with_warning' }, }, opts_extend = { 'sources.default' }, + enabled = false, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 6bee5d5..0231af4 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -147,5 +147,5 @@ return { matching = { disallow_symbol_nonprefix_matching = false }, }) end, - enabled = false, + enabled = true, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 57c0a77..43f7679 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -52,8 +52,8 @@ return { } local capabilities = vim.lsp.protocol.make_client_capabilities() - -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) vim.lsp.config('*', { capabilities = capabilities, }) -- 2.49.1 From f6b62e9adff3d7b13b49bc79269ec4ed967c9b95 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 5 Sep 2025 12:11:16 +0200 Subject: [PATCH 858/894] use pyrefly instead of basedbypright --- lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 43f7679..b74f7ad 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -39,7 +39,7 @@ return { lazy = false, config = function() local servers = { - 'basedpyright', + 'pyrefly', 'ruff', 'clangd', 'lua_ls', -- 2.49.1 From f32a32ce0bc0d6d75a7deaec9df090cde0e7676a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 5 Sep 2025 12:11:29 +0200 Subject: [PATCH 859/894] new key for workspace symbols --- lua/plugins/snacks.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index eadcf5d..a93cded 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -128,5 +128,6 @@ return { { 'e', function() Snacks.picker.lsp_type_definitions() end, desc = 'Goto T[y]pe Definition' }, { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, + { '', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, }, } -- 2.49.1 From 658800498c50dc2781c4fe5998294cd3d1b59a98 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 5 Sep 2025 12:11:35 +0200 Subject: [PATCH 860/894] update plugins --- lazy-lock.json | 62 +++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index fd450ce..1a68278 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,71 +1,77 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" }, + "LuaSnip": { "branch": "master", "commit": "21f74f7ba8c49f95f9d7c8293b147c2901dd2d3a" }, "astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" }, "avante.nvim": { "branch": "main", "commit": "adae032f5fbc611d59545792d3c5bb1c9ddc3fdb" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, - "blink-copilot": { "branch": "main", "commit": "41e91a659bd9b8cba9ba2ea68a69b52ba5a9ebd8" }, "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, - "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, - "cmake-tools.nvim": { "branch": "master", "commit": "17244215b1a96e4b2a83a16abd6719197f270f96" }, + "cmake-tools.nvim": { "branch": "master", "commit": "88e07c6bff838a5bda2f461e9c1122b79ff0829f" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, - "codecompanion.nvim": { "branch": "main", "commit": "19d665a9b13c0b05652c359c4302465b8b2543be" }, - "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, - "copilot.lua": { "branch": "master", "commit": "0f2fd3829dd27d682e46c244cf48d9715726f612" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "codecompanion.nvim": { "branch": "main", "commit": "019be206a96cf6de12ea71f02a9e1b847a2debbb" }, + "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, + "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, + "copilot.lua": { "branch": "master", "commit": "81d289a8ce5d4ee1dea9b1c8ee4ac376b2e27a5f" }, "diagflow.nvim": { "branch": "main", "commit": "b13321b517ff64bf42eeac2214085d3c76d83a0d" }, - "dial.nvim": { "branch": "master", "commit": "78bd73aaf2b9c8f80715a878feaf56f7ffa8b6ff" }, + "dial.nvim": { "branch": "master", "commit": "f0404ec1f83a03f2c3457e60087c6331d1cbb83f" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, - "everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" }, + "everforest-nvim": { "branch": "main", "commit": "8db2bd8af38ed7b1bd12baa9a28858ff92e839bf" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "736f51d2bb684c06f39a2032f064d7244f549981" }, - "goose.nvim": { "branch": "main", "commit": "ada7651562bbcd0601d08896741cf7b4862178a8" }, - "grug-far.nvim": { "branch": "main", "commit": "385d1949dc21d0c39e7a74b4f4a25da18817bc86" }, + "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "goose.nvim": { "branch": "main", "commit": "e5f7c8590c4d9873390149a14da7d468ddf6feec" }, + "grug-far.nvim": { "branch": "main", "commit": "c5b629399c0f2e436c00df381e44852a13b7313a" }, "gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, - "gruvbox.nvim": { "branch": "main", "commit": "58a2cda2e953a99e2f87c12b7fb4602da4e0709c" }, + "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "incline.nvim": { "branch": "main", "commit": "0fd2d5a27504dba7fdc507a53275f22c081fe640" }, - "iron.nvim": { "branch": "master", "commit": "c005b01b779f1b6c038e11248db403bb3df6a7f3" }, + "iron.nvim": { "branch": "master", "commit": "bd5891ca8e6a3d23043aa6bdde2d65489bd0cc82" }, "kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, - "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, + "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" }, - "mini.ai": { "branch": "main", "commit": "1cd4f021a05c29acd4ab511c0981da14217daf38" }, + "mini.ai": { "branch": "main", "commit": "45a26d032d8703f280c69c2ed9fb4e1bfc8f24f9" }, "mini.sessions": { "branch": "main", "commit": "dd7fe484dfcbf270a788e9291545df509cdb9691" }, "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, - "minuet-ai.nvim": { "branch": "main", "commit": "d8e2aef4d7c3178d28c0073829cd1845588e8e40" }, + "minuet-ai.nvim": { "branch": "main", "commit": "2083b86ea01cb18dc9e7cb7a68f932ea06e999e8" }, "monokai-pro.nvim": { "branch": "master", "commit": "1ac671f6da720cba967d28d25c2f16b8b4e18808" }, "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, - "neogit": { "branch": "master", "commit": "b8d840ed988ec3751ea2d9c9a66f635c3439564a" }, - "neotest": { "branch": "master", "commit": "3c81345c28cd639fcc02843ed3653be462f47024" }, + "neogit": { "branch": "master", "commit": "4046f747739cf7e7b9aada447f3edc59c947b111" }, + "neotest": { "branch": "master", "commit": "35a59c1f59dbb954d92b74ab64a966a668cea495" }, "neotest-python": { "branch": "master", "commit": "ed9b4d794b89044cc32e5476e637936331473c6e" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, - "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, + "nvim-dap": { "branch": "master", "commit": "7891b01beedc37cef4eaf2e92563bd0a5b6e9c58" }, + "nvim-dap-python": { "branch": "master", "commit": "030385d03363988370adaa5cf21fa465daddb088" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "4f4cdb9ccd567512fd4f602e411b8f7ab5f69002" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, - "nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" }, - "nvim-lspconfig": { "branch": "master", "commit": "9141be4c1332afc83bdf1b0278dbb030f75ff8e3" }, + "nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" }, + "nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" }, + "nvim-lspconfig": { "branch": "master", "commit": "3e89e4973d784e1c966517e528b3a30395403fa7" }, "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" }, - "oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" }, + "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, + "oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" }, "overseer.nvim": { "branch": "master", "commit": "fe7b2f9ba263e150ab36474dfc810217b8cf7400" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, - "render-markdown.nvim": { "branch": "main", "commit": "3d84dbc1f80a2a02e560ddbd5ab29f99f88bbeda" }, - "rustaceanvim": { "branch": "master", "commit": "eb606eb3785f6c6e31ef675c32b706694b76923b" }, + "render-markdown.nvim": { "branch": "main", "commit": "e76eb2e4262f0f0a1a7bd7a454dd7d44f1299afd" }, + "rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, -- 2.49.1 From d209a0fb4a39c53a198c4121ce561e79d4c6431a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 5 Sep 2025 12:28:34 +0200 Subject: [PATCH 861/894] replaced diagflow with tiny-inline-diagnostics --- lazy-lock.json | 1 + lua/plugins/diagflow.lua | 9 --------- lua/plugins/tiny-inline-diagnostics.lua | 11 +++++++++++ 3 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 lua/plugins/diagflow.lua create mode 100644 lua/plugins/tiny-inline-diagnostics.lua diff --git a/lazy-lock.json b/lazy-lock.json index 1a68278..12c3798 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -73,6 +73,7 @@ "render-markdown.nvim": { "branch": "main", "commit": "e76eb2e4262f0f0a1a7bd7a454dd7d44f1299afd" }, "rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, diff --git a/lua/plugins/diagflow.lua b/lua/plugins/diagflow.lua deleted file mode 100644 index 23deb34..0000000 --- a/lua/plugins/diagflow.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'dgagn/diagflow.nvim', - -- event = 'LspAttach', This is what I use personnally and it works great - opts = { - scope = 'line', - show_sign = false, - show_borders = true, - }, -} diff --git a/lua/plugins/tiny-inline-diagnostics.lua b/lua/plugins/tiny-inline-diagnostics.lua new file mode 100644 index 0000000..74cc870 --- /dev/null +++ b/lua/plugins/tiny-inline-diagnostics.lua @@ -0,0 +1,11 @@ +return { + 'rachartier/tiny-inline-diagnostic.nvim', + event = 'VeryLazy', + priority = 1000, + config = function() + require('tiny-inline-diagnostic').setup({ + preset = 'powerline', + }) + vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text + end, +} -- 2.49.1 From 4b30405afb84223a7abfb49a0ff94cd8ae57c8d9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 10 Sep 2025 08:16:16 +0000 Subject: [PATCH 862/894] added pyrefly config --- after/lsp/pyrefly.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 after/lsp/pyrefly.lua diff --git a/after/lsp/pyrefly.lua b/after/lsp/pyrefly.lua new file mode 100644 index 0000000..5a13663 --- /dev/null +++ b/after/lsp/pyrefly.lua @@ -0,0 +1,7 @@ +return { + settings = { + pyrefly = { + displayTypeErrors = 'force-on', + }, + }, +} -- 2.49.1 From 9fa945939d5db0c21a44361b0c745535ef681d02 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 17 Sep 2025 21:03:43 +0200 Subject: [PATCH 863/894] switch to treesitter main --- lazy-lock.json | 45 +++++++++++++++++++------------------- lua/plugins/treesitter.lua | 25 +++------------------ 2 files changed, 25 insertions(+), 45 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 12c3798..55babb6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,8 +1,8 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LuaSnip": { "branch": "master", "commit": "21f74f7ba8c49f95f9d7c8293b147c2901dd2d3a" }, - "astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" }, + "LuaSnip": { "branch": "master", "commit": "b3104910bb5ebf40492aadffae18f2528fa757d9" }, + "astrotheme": { "branch": "main", "commit": "4a2af93815e4e6adfe69c836e46047a9451de858" }, "avante.nvim": { "branch": "main", "commit": "adae032f5fbc611d59545792d3c5bb1c9ddc3fdb" }, "bamboo.nvim": { "branch": "master", "commit": "97124a0b81f886abc0d666ebec512b92425d67b6" }, "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, @@ -14,28 +14,27 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "codecompanion.nvim": { "branch": "main", "commit": "019be206a96cf6de12ea71f02a9e1b847a2debbb" }, + "codecompanion.nvim": { "branch": "main", "commit": "4d174f5b20af95805e9d710f845aca6db15b3309" }, "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "81d289a8ce5d4ee1dea9b1c8ee4ac376b2e27a5f" }, - "diagflow.nvim": { "branch": "main", "commit": "b13321b517ff64bf42eeac2214085d3c76d83a0d" }, + "copilot.lua": { "branch": "master", "commit": "f7732213e41995439171f35bdd2bf1c809f8e8e7" }, "dial.nvim": { "branch": "master", "commit": "f0404ec1f83a03f2c3457e60087c6331d1cbb83f" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, - "everforest-nvim": { "branch": "main", "commit": "8db2bd8af38ed7b1bd12baa9a28858ff92e839bf" }, - "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "everforest-nvim": { "branch": "main", "commit": "d2936185a6d266def29fd7b523d296384580ef08" }, + "flash.nvim": { "branch": "main", "commit": "b68bda044d68e4026c4e1ec6df3c5afd7eb8e341" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, "goose.nvim": { "branch": "main", "commit": "e5f7c8590c4d9873390149a14da7d468ddf6feec" }, - "grug-far.nvim": { "branch": "main", "commit": "c5b629399c0f2e436c00df381e44852a13b7313a" }, + "grug-far.nvim": { "branch": "main", "commit": "50d9ee2b5a19634670441948e7e4afaa042f1059" }, "gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" }, "gruvbox-flat.nvim": { "branch": "master", "commit": "1dc35c81da30d297f82d438ff362cf1b01d36782" }, "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "incline.nvim": { "branch": "main", "commit": "0fd2d5a27504dba7fdc507a53275f22c081fe640" }, - "iron.nvim": { "branch": "master", "commit": "bd5891ca8e6a3d23043aa6bdde2d65489bd0cc82" }, + "iron.nvim": { "branch": "master", "commit": "551a11b40d74fea1ca24d22e27d22692f5123f0c" }, "kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine-diagnostic-message": { "branch": "master", "commit": "e8244c4d1f088e21bb05021f164ed903093b168b" }, "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, @@ -50,29 +49,29 @@ "minuet-ai.nvim": { "branch": "main", "commit": "2083b86ea01cb18dc9e7cb7a68f932ea06e999e8" }, "monokai-pro.nvim": { "branch": "master", "commit": "1ac671f6da720cba967d28d25c2f16b8b4e18808" }, "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, - "neogit": { "branch": "master", "commit": "4046f747739cf7e7b9aada447f3edc59c947b111" }, - "neotest": { "branch": "master", "commit": "35a59c1f59dbb954d92b74ab64a966a668cea495" }, + "neogit": { "branch": "master", "commit": "ceaf88a9f9607b736d572781490872e28a112aed" }, + "neotest": { "branch": "master", "commit": "2cf3544fb55cdd428a9a1b7154aea9c9823426e8" }, "neotest-python": { "branch": "master", "commit": "ed9b4d794b89044cc32e5476e637936331473c6e" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-dap": { "branch": "master", "commit": "7891b01beedc37cef4eaf2e92563bd0a5b6e9c58" }, - "nvim-dap-python": { "branch": "master", "commit": "030385d03363988370adaa5cf21fa465daddb088" }, + "nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" }, + "nvim-dap-python": { "branch": "master", "commit": "bfe572e4458e0ac876b9539a1e9f301c72db8ea0" }, "nvim-dap-repl-highlights": { "branch": "master", "commit": "4f4cdb9ccd567512fd4f602e411b8f7ab5f69002" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" }, - "nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" }, - "nvim-lspconfig": { "branch": "master", "commit": "3e89e4973d784e1c966517e528b3a30395403fa7" }, + "nvim-highlight-colors": { "branch": "main", "commit": "e0c4a58ec8c3ca7c92d3ee4eb3bc1dd0f7be317e" }, + "nvim-lint": { "branch": "master", "commit": "0864f81c681e15d9bdc1156fe3a17bd07db5a3ed" }, + "nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" }, "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-rooter.lua": { "branch": "main", "commit": "7689d05e8ab95acb4b24785253d913c0aae18be9" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter": { "branch": "main", "commit": "1c760c1888f5e7474d1ae222f0638cb3b731629b" }, "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, "oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" }, "overseer.nvim": { "branch": "master", "commit": "fe7b2f9ba263e150ab36474dfc810217b8cf7400" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, - "render-markdown.nvim": { "branch": "main", "commit": "e76eb2e4262f0f0a1a7bd7a454dd7d44f1299afd" }, - "rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" }, - "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "687ef75fdbd497eabc9eea92b52e7b4d403b3319" }, + "render-markdown.nvim": { "branch": "main", "commit": "5f437a26a8a8b964eff683dd6f68bc2a0d38c5db" }, + "rustaceanvim": { "branch": "master", "commit": "370b85298e5afdfd8b5d3da0c60c04e3873499a4" }, + "snacks.nvim": { "branch": "main", "commit": "d67a47739dfc652cfcf66c59e929c704a854b37a" }, "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 52892d5..1c72204 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,30 +1,11 @@ return { 'nvim-treesitter/nvim-treesitter', - version = false, + lazy = false, + branch = 'main', build = ':TSUpdate', config = function() require('nvim-treesitter.install').compilers = { 'clang' } - require('nvim-treesitter.configs').setup({ - ensure_installed = '', - modules = {}, - sync_install = true, - auto_install = true, - ignore_install = {}, - highlight = { - enable = true, - additional_vim_regex_highlighting = { 'markdown' }, - }, - 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 - -- colors = {}, -- table of hex strings - -- termcolors = {} -- table of colour name strings - }, - indent = { - enable = false, -- maybe buggy - }, - }) + require('nvim-treesitter').setup({}) vim.treesitter.language.register('groovy', 'java') require('nvim-treesitter.install').prefer_git = false end, -- 2.49.1 From 49eeed691f5cf4244a3eaa5b974ce999ab30cfed Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 24 Sep 2025 09:47:36 +0000 Subject: [PATCH 864/894] added copilotchat --- lua/plugins/copilotChat.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/plugins/copilotChat.lua diff --git a/lua/plugins/copilotChat.lua b/lua/plugins/copilotChat.lua new file mode 100644 index 0000000..cee96f1 --- /dev/null +++ b/lua/plugins/copilotChat.lua @@ -0,0 +1,37 @@ +return { + { + 'CopilotC-Nvim/CopilotChat.nvim', + dependencies = { + { 'nvim-lua/plenary.nvim', branch = 'master' }, + }, + build = 'make tiktoken', + opts = { + -- See Configuration section for options + }, + cmd = { + 'CopilotChat', + 'CopilotChatOpen', + 'CopilotChatClose', + 'CopilotChatToggle', + 'CopilotChatStop', + 'CopilotChatReset', + 'CopilotChatSave', + 'CopilotChatLoad', + 'CopilotChatPrompts', + 'CopilotChatModels', + 'CopilotChat', + }, + keys = { + { 'xx', 'CopilotChatToggle', desc = 'Copilot Chat' }, + { 'xC', 'CopilotChatOpen', desc = 'Copilot Chat Open' }, + { 'xX', 'CopilotChatClose', desc = 'Copilot Chat Close' }, + { 'xt', 'CopilotChatToggle', desc = 'Copilot Chat Toggle' }, + { 'xs', 'CopilotChatStop', desc = 'Copilot Chat Stop' }, + { 'xX', 'CopilotChatReset', desc = 'Copilot Chat Reset' }, + { 'xw', 'CopilotChatSave', desc = 'Copilot Chat Save' }, + { 'xl', 'CopilotChatLoad', desc = 'Copilot Chat Load' }, + { 'cp', 'CopilotChatPrompts', desc = 'Copilot Chat Prompts' }, + { 'cm', 'CopilotChatModels', desc = 'Copilot Chat Models' }, + }, + }, +} -- 2.49.1 From b0d609d189717654875dd13e759a4db3363b9047 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Sep 2025 21:48:05 +0200 Subject: [PATCH 865/894] Replace oil with fyler --- lazy-lock.json | 1 + lua/plugins/fyler.lua | 19 +++++++++++++++++++ lua/plugins/oil.lua | 36 ------------------------------------ 3 files changed, 20 insertions(+), 36 deletions(-) create mode 100644 lua/plugins/fyler.lua delete mode 100644 lua/plugins/oil.lua diff --git a/lazy-lock.json b/lazy-lock.json index 55babb6..c23c2e5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -24,6 +24,7 @@ "everforest-nvim": { "branch": "main", "commit": "d2936185a6d266def29fd7b523d296384580ef08" }, "flash.nvim": { "branch": "main", "commit": "b68bda044d68e4026c4e1ec6df3c5afd7eb8e341" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fyler.nvim": { "branch": "stable", "commit": "f54a4bcb26e0632c0d9663cf6c9ba64fedf462bb" }, "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, "goose.nvim": { "branch": "main", "commit": "e5f7c8590c4d9873390149a14da7d468ddf6feec" }, "grug-far.nvim": { "branch": "main", "commit": "50d9ee2b5a19634670441948e7e4afaa042f1059" }, diff --git a/lua/plugins/fyler.lua b/lua/plugins/fyler.lua new file mode 100644 index 0000000..ef3f73c --- /dev/null +++ b/lua/plugins/fyler.lua @@ -0,0 +1,19 @@ +return { + 'A7Lavinraj/fyler.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + branch = 'stable', + opts = { + default_explorer = true, + icon_provider = 'nvim_web_devicons', + mappings = { + ['C-d'] = 'SelectVSplit', + ['C-s'] = 'SelectSplit', + }, + }, + keys = { + { '-', function() require('fyler').open() end, desc = 'Open Fyler' }, + }, + cmd = { 'Fyler' }, +} diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua deleted file mode 100644 index 069908f..0000000 --- a/lua/plugins/oil.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - 'stevearc/oil.nvim', - opts = { - delete_to_trash = true, - default_file_explorer = true, - skip_confirm_for_simple_edits = true, - view_options = { - -- Show files and directories that start with "." - show_hidden = true, - }, - keymaps = { - ['g?'] = 'actions.show_help', - [''] = 'actions.select', - [''] = 'actions.select_vsplit', - [''] = 'actions.select_split', - [''] = 'actions.select_tab', - [''] = 'actions.preview', - [''] = 'actions.close', - [''] = 'actions.refresh', - [''] = 'actions.parent', - ['_'] = 'actions.open_cwd', - ['`'] = 'actions.cd', - ['~'] = 'actions.tcd', - ['g.'] = 'actions.toggle_hidden', - }, - }, - lazy = false, - dependencies = { 'nvim-tree/nvim-web-devicons' }, - keys = { - { - '-', - function() require('oil').open() end, - desc = 'Open oil', - }, - }, -} -- 2.49.1 From 1f35aa39baef44c207d2b41d6db45b68c7ef1888 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 Sep 2025 20:07:43 +0000 Subject: [PATCH 866/894] added sidekick --- lua/plugins/lsp.lua | 3 ++- lua/plugins/sidekick.lua | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/sidekick.lua diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index b74f7ad..bd208e6 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -39,7 +39,8 @@ return { lazy = false, config = function() local servers = { - 'pyrefly', + 'copilot', + 'basedpyright', 'ruff', 'clangd', 'lua_ls', diff --git a/lua/plugins/sidekick.lua b/lua/plugins/sidekick.lua new file mode 100644 index 0000000..df5251d --- /dev/null +++ b/lua/plugins/sidekick.lua @@ -0,0 +1,55 @@ +return { + 'folke/sidekick.nvim', + opts = { + -- add any options here + cli = { + mux = { + backend = 'copilot', + enabled = true, + }, + }, + }, + keys = { + { + '', + function() + -- if there is a next edit, jump to it, otherwise apply it if any + if not require('sidekick').nes_jump_or_apply() then + return '' -- fallback to normal tab + end + end, + expr = true, + desc = 'Goto/Apply Next Edit Suggestion', + }, + { + '', + function() require('sidekick.cli').focus() end, + mode = { 'n', 'x', 'i', 't' }, + desc = 'Sidekick Switch Focus', + }, + { + 'aa', + function() require('sidekick.cli').toggle({ focus = true }) end, + desc = 'Sidekick Toggle CLI', + mode = { 'n', 'v' }, + }, + { + 'ac', + function() require('sidekick.cli').toggle({ name = 'copilot', focus = true }) end, + desc = 'Sidekick Claude Toggle', + mode = { 'n', 'v' }, + }, + { + 'ag', + function() require('sidekick.cli').toggle({ name = 'grok', focus = true }) end, + desc = 'Sidekick Grok Toggle', + mode = { 'n', 'v' }, + }, + { + 'ap', + function() require('sidekick.cli').select_prompt() end, + desc = 'Sidekick Ask Prompt', + mode = { 'n', 'v' }, + }, + }, +} -- 2.49.1 From 623de5e510e8d72a2f79d972cbdc2fadc45fd17d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 28 Sep 2025 21:55:51 +0200 Subject: [PATCH 867/894] key desc or neogit --- lua/plugins/neogit.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index a01d599..c6e13aa 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -18,6 +18,7 @@ return { { 't', function() require('neogit').open() end, + desc = 'Open Neogit', }, }, cmd = { 'Neogit ' }, -- 2.49.1 From decdde1cb2a33f868c3c16c4b6f47418299485b7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 10 Oct 2025 13:44:46 +0200 Subject: [PATCH 868/894] grep in cwd --- lua/plugins/snacks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index a93cded..49b9027 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -73,7 +73,7 @@ return { -- Top Pickers & Explorer { '', function() Snacks.picker.smart() end, desc = 'Smart Find Files' }, { 'b', function() Snacks.picker.buffers() end, desc = 'Buffers' }, - { 'l', function() Snacks.picker.grep() end, desc = 'Grep' }, + { 'l', function() Snacks.picker.grep({ cwd = vim.fn.getcwd() }) end, desc = 'Grep' }, { ':', function() Snacks.picker.command_history() end, desc = 'Command History' }, { 'n', function() Snacks.picker.notifications() end, desc = 'Notification History' }, { 'e', function() Snacks.explorer() end, desc = 'File Explorer' }, -- 2.49.1 From 769cbc67a65591274dfc542743c9cd0c095cc1c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 10 Oct 2025 13:51:45 +0200 Subject: [PATCH 869/894] open lazygit in cwd --- lua/plugins/snacks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 49b9027..c128062 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -65,7 +65,7 @@ return { }, }, keys = { - { 'g', function() Snacks.lazygit() end, desc = 'Lazygit' }, + { 'g', function() Snacks.lazygit({ cwd = vim.fn.getcwd() }) end, desc = 'Lazygit' }, { 'gf', function() Snacks.lazygit.log_file() end, desc = 'Lazygit Current File History' }, { 'gl', function() Snacks.lazygit.log() end, desc = 'Lazygit Log (cwd)' }, { 'm', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n' } }, -- 2.49.1 From f0f93b6b0a644baac90c66bfeeb00640c02d4f2e Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 10 Oct 2025 14:48:03 +0200 Subject: [PATCH 870/894] add tex lsp and formatter --- lua/plugins/conform.lua | 1 + lua/plugins/lsp.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 76c16d8..4ccca45 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -14,6 +14,7 @@ return { markdown = { 'prettier' }, json = { 'fixjson' }, toml = { 'taplo' }, + tex = { 'latexindent' }, }, }, keys = { diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index bd208e6..10b6214 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -39,6 +39,7 @@ return { lazy = false, config = function() local servers = { + 'texlab', 'copilot', 'basedpyright', 'ruff', -- 2.49.1 From 15dbea6333f35302b059b3dcd5657863402b55f7 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Oct 2025 12:32:55 +0000 Subject: [PATCH 871/894] disable folding --- lua/config/options.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 27b49d1..78dcac5 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -109,10 +109,10 @@ opt.background = 'dark' opt.shortmess:append('sI') -- Treesitter based folding -opt.foldlevel = 20 -opt.foldmethod = 'expr' -opt.foldexpr = 'nvim_treesitter#foldexpr()' -opt.foldexpr = 'nvim_treesitter#foldexpr()' +-- opt.foldlevel = 20 +-- opt.foldmethod = 'expr' +-- opt.foldexpr = 'nvim_treesitter#foldexpr()' +-- opt.foldexpr = 'nvim_treesitter#foldexpr()' if vim.fn.has('nvim-0.12') == 1 then vim.o.diffopt = 'internal,filler,closeoff,inline:simple,linematch:40' -- 2.49.1 From c76f91bbc68ac3b5760f116ba566b6ba6500a782 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Oct 2025 21:43:25 +0200 Subject: [PATCH 872/894] added texpresso --- lua/plugins/texpresso.lua | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lua/plugins/texpresso.lua diff --git a/lua/plugins/texpresso.lua b/lua/plugins/texpresso.lua new file mode 100644 index 0000000..b4778c6 --- /dev/null +++ b/lua/plugins/texpresso.lua @@ -0,0 +1,3 @@ +return { + 'let-def/texpresso.vim', +} -- 2.49.1 From fa47da424aa36ce38d902d079fe9f9b56e4b1dd4 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Oct 2025 21:45:22 +0200 Subject: [PATCH 873/894] removed cmake tools and mini surround --- lua/plugins/cmake-tools.lua | 35 ----------------------------------- lua/plugins/mini-surround.lua | 20 -------------------- 2 files changed, 55 deletions(-) delete mode 100644 lua/plugins/cmake-tools.lua delete mode 100644 lua/plugins/mini-surround.lua diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua deleted file mode 100644 index c7d9061..0000000 --- a/lua/plugins/cmake-tools.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - 'Civitasv/cmake-tools.nvim', - opts = { - cmake_command = 'cmake', - cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, - cmake_show_console = 'always', - cmake_build_directory = 'build_nvim', - cmake_dap_configuration = { name = 'cpp', type = 'codelldb', request = 'launch' }, -- dap configuration, optional - }, - cmd = { - 'CMakeGenerate', - 'CMakeBuild', - 'CMakeRun', - 'CMakeDebug', - 'CMakeSelectBuildType', - 'CMakeSelectBuildTarget', - 'CMakeSelectLaunchTarget', - 'CMakeSelectKit', - 'CMakeSelectConfigurePreset', - 'CMakeSelectBuildPreset', - 'CMakeSelectLaunchTarget', - 'CMakeOpen', - 'CMakeClose', - 'CMakeInstall', - 'CMakeClean', - 'CMakeStop', - }, - keys = { - { - '', - function() require('cmake-tools').debug({}) end, - desc = 'Run and debug target from cmake', - }, - }, -} diff --git a/lua/plugins/mini-surround.lua b/lua/plugins/mini-surround.lua deleted file mode 100644 index d8700ba..0000000 --- a/lua/plugins/mini-surround.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - 'echasnovski/mini.surround', - version = '*', - config = function() - require('mini.surround').setup({ - mappings = { - add = 'aa', -- Add surrounding in Normal and Visual modes - delete = 'ad', -- Delete surrounding - find = 'af', -- Find surrounding (to the right) - find_left = 'aF', -- Find surrounding (to the left) - highlight = 'ah', -- Highlight surrounding - replace = 'ar', -- Replace surrounding - update_n_lines = 'an', -- Update `n_lines` - - suffix_last = 'l', -- Suffix to search with "prev" method - suffix_next = 'n', -- Suffix to search with "next" method - }, - }) - end, -} -- 2.49.1 From 50fac61ef62a34f4d778fd653db2608cbc15a7b9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 13 Oct 2025 21:55:36 +0200 Subject: [PATCH 874/894] fyler don't confirm simple operations --- lua/plugins/fyler.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/fyler.lua b/lua/plugins/fyler.lua index ef3f73c..eff3366 100644 --- a/lua/plugins/fyler.lua +++ b/lua/plugins/fyler.lua @@ -7,6 +7,7 @@ return { opts = { default_explorer = true, icon_provider = 'nvim_web_devicons', + confirm_simple = true, mappings = { ['C-d'] = 'SelectVSplit', ['C-s'] = 'SelectSplit', -- 2.49.1 From 4bc27abd8e9f90767b73560cc3443805072eb154 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 14 Oct 2025 23:03:53 +0200 Subject: [PATCH 875/894] fixed pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8d6083f..2116895 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ venv = "venv" venvPath = './' reportOptionalMemberAccess = 'warning' reportGeneralTypeIssues = 'warning' -analyzeUnannotatedFunctions = 'false' +analyzeUnannotatedFunctions = false executionEnvironments = [ { root = "./" } ] -- 2.49.1 From dc071ea841ba4e14fce88eb7aa3c26c6bf334c5c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 28 Oct 2025 21:03:29 +0100 Subject: [PATCH 876/894] switch to blink again --- lua/plugins/blink.lua | 2 +- lua/plugins/cmp.lua | 2 +- lua/plugins/lsp.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index ac7b593..7edf7e1 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -100,5 +100,5 @@ return { fuzzy = { implementation = 'prefer_rust_with_warning' }, }, opts_extend = { 'sources.default' }, - enabled = false, + enabled = true, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 0231af4..6bee5d5 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -147,5 +147,5 @@ return { matching = { disallow_symbol_nonprefix_matching = false }, }) end, - enabled = true, + enabled = false, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 10b6214..445d5ee 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -54,8 +54,8 @@ return { } local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -- capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) + -- capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + capabilities = require('blink.cmp').get_lsp_capabilities(capabilities) vim.lsp.config('*', { capabilities = capabilities, }) -- 2.49.1 From 238f748478f0d5c6afd8ddfcdc91061b7b27e833 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 3 Nov 2025 20:32:38 +0100 Subject: [PATCH 877/894] added keys for snacks gh --- lua/plugins/snacks.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index c128062..bf5ddf7 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -129,5 +129,9 @@ return { { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, { '', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, + { 'gi', function() Snacks.picker.gh_issue() end, desc = 'GitHub Issues (open)' }, + { 'gI', function() Snacks.picker.gh_issue({ state = 'all' }) end, desc = 'GitHub Issues (all)' }, + { 'gp', function() Snacks.picker.gh_pr() end, desc = 'GitHub Pull Requests (open)' }, + { 'gP', function() Snacks.picker.gh_pr({ state = 'all' }) end, desc = 'GitHub Pull Requests (all)' }, }, } -- 2.49.1 From 02f6469412f065f8cdeebe7226d4b8b5b87750bb Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 5 Nov 2025 11:38:18 +0000 Subject: [PATCH 878/894] added tiny-glimmer --- lua/plugins/tiny-glimmer.lua | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lua/plugins/tiny-glimmer.lua diff --git a/lua/plugins/tiny-glimmer.lua b/lua/plugins/tiny-glimmer.lua new file mode 100644 index 0000000..f237d26 --- /dev/null +++ b/lua/plugins/tiny-glimmer.lua @@ -0,0 +1,58 @@ +return { + 'rachartier/tiny-glimmer.nvim', + event = 'VeryLazy', + priority = 10, -- Low priority to catch other plugins' keybindings + config = function() + require('tiny-glimmer').setup({ + overwrite = { + yank = { + enabled = true, + default_animation = 'fade', + }, + search = { + enabled = true, + }, + undo = { + enabled = true, + default_animation = { + name = 'fade', + settings = { + from_color = '@comment.warning', + max_duration = 500, + min_duration = 500, + }, + }, + }, + redo = { + enabled = true, + default_animation = { + name = 'fade', + settings = { + from_color = '@comment.warning', + max_duration = 500, + min_duration = 500, + }, + }, + redo_mapping = '', + }, + }, + animations = { + fade = { + from_color = '@comment.warning', -- Start color (highlight group or hex) + }, + reverse_fade = { + from_color = '@comment.warning', -- Start color (highlight group or hex) + }, + pulse = { + from_color = '@comment.warning', -- Start color (highlight group or hex) + }, + bounce = { + from_color = '@comment.warning', -- Start color (highlight group or hex) + }, + left_to_right = { + from_color = '@comment.warning', -- Start color (highlight group or hex) + }, + }, + }) + end, +} -- 2.49.1 From 82ebe3294947f9e45c4d51f3d9d97e13e132c3e9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Nov 2025 06:58:02 +0000 Subject: [PATCH 879/894] node version upgrade --- lua/plugins/copilot.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index d65085a..c006cde 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -17,6 +17,7 @@ return { cpp = true, ['.'] = false, }, + copilot_node_command = vim.fn.expand('$HOME') .. '/.nvm/versions/node/v22.12.0/bin/node', suggestion = { enabled = false, auto_trigger = false }, panel = { enabled = false }, }) -- 2.49.1 From dc3d86405d9328426513c9c1f182dd0a6c9adcb9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Wed, 26 Nov 2025 21:04:16 +0100 Subject: [PATCH 880/894] only activate minuet blink provider if key is set --- lua/plugins/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 7edf7e1..6a96210 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -73,6 +73,7 @@ return { -- since minuet.config.request_timeout is in seconds timeout_ms = 3000, score_offset = 50, -- Gives minuet higher priority among suggestions + enabled = vim.env.GEMINI_API_KEY ~= nil, }, }, }, -- 2.49.1 From 470de9dfa7bd490872eb43e897a840caa2dc5a2c Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 30 Nov 2025 12:04:01 +0100 Subject: [PATCH 881/894] only use the node cmd if it exists --- lua/plugins/copilot.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index c006cde..d23d150 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -3,6 +3,11 @@ return { cmd = 'Copilot', event = 'InsertEnter', config = function() + local node_cmd = nil + local docker_node = vim.fn.expand('$HOME') .. '/.nvm/versions/node/v22.12.0/bin/node' + if vim.fn.executable(docker_node) == 1 then + node_cmd = docker_node + end require('copilot').setup({ filetypes = { yaml = false, @@ -17,7 +22,7 @@ return { cpp = true, ['.'] = false, }, - copilot_node_command = vim.fn.expand('$HOME') .. '/.nvm/versions/node/v22.12.0/bin/node', + copilot_node_command = node_cmd, suggestion = { enabled = false, auto_trigger = false }, panel = { enabled = false }, }) -- 2.49.1 From 85ddba6a4e6690d3db1dd281cd3f021a21894e73 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 6 Dec 2025 14:38:52 +0100 Subject: [PATCH 882/894] yamlfmt file type --- lua/my_autocommands.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 30b6efc..a88af67 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -22,6 +22,7 @@ vim.filetype.add({ ['doskey'] = 'dosini', ['.clangd'] = 'yaml', ['.clang-tidy'] = 'yaml', + ['.yamlfmt'] = 'yaml', }, }) -- 2.49.1 From eb1ccd9f446c55784a36d10fd6327cc185e771ee Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 7 Dec 2025 00:03:45 +0100 Subject: [PATCH 883/894] fixed fyler config --- lua/plugins/witch-line.lua | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 lua/plugins/witch-line.lua diff --git a/lua/plugins/witch-line.lua b/lua/plugins/witch-line.lua new file mode 100644 index 0000000..ed98ac4 --- /dev/null +++ b/lua/plugins/witch-line.lua @@ -0,0 +1,48 @@ +return { + 'sontungexpt/witch-line', + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + lazy = false, -- Almost component is lazy load by default. So you can set lazy to false + opts = { + components = { + 'mode', + 'file.name', + 'file.modified', + 'file.icon', + 'file.size', + -- { + -- id = 'component_id', -- Unique identifier + -- padding = { left = 1, right = 1 }, -- Padding around the component + -- static = { some_key = 'some_value' }, -- Static metadata + -- timing = false, -- No timing updates + -- style = { fg = '#ffffff', bg = '#000000', bold = true }, -- Style override + -- min_screen_width = 80, -- Hide if screen width < 80 + -- hidden = function() -- Hide condition + -- return vim.bo.buftype == 'nofile' + -- end, + -- left_style = { fg = '#ff0000' }, -- Left style override + -- update = function(self, ctx, static, session_id) -- Main content generator + -- return vim.fn.expand('%:t') + -- end, + -- ref = { -- References to other components + -- events = { 'file.name' }, + -- style = 'file.name', + -- static = 'file.name', + -- }, + -- }, + 'git.branch', + 'git.added', + 'git.removed', + 'git.modified', + -- 'copilot', + 'diagnostic.error', + 'diagnostic.warn', + 'diagnostic.info', + '%=', + 'encoding', + 'cursor.pos', + }, + }, + enabled = false, +} -- 2.49.1 From bf226cdaca0da94b72da34e43c971b3a5b1c1f9b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 7 Dec 2025 00:04:19 +0100 Subject: [PATCH 884/894] Revert "fixed fyler config" This reverts commit 97fd01dca9a951e14a858009cabbc6551d4734a2. --- lua/plugins/witch-line.lua | 48 -------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 lua/plugins/witch-line.lua diff --git a/lua/plugins/witch-line.lua b/lua/plugins/witch-line.lua deleted file mode 100644 index ed98ac4..0000000 --- a/lua/plugins/witch-line.lua +++ /dev/null @@ -1,48 +0,0 @@ -return { - 'sontungexpt/witch-line', - dependencies = { - 'nvim-tree/nvim-web-devicons', - }, - lazy = false, -- Almost component is lazy load by default. So you can set lazy to false - opts = { - components = { - 'mode', - 'file.name', - 'file.modified', - 'file.icon', - 'file.size', - -- { - -- id = 'component_id', -- Unique identifier - -- padding = { left = 1, right = 1 }, -- Padding around the component - -- static = { some_key = 'some_value' }, -- Static metadata - -- timing = false, -- No timing updates - -- style = { fg = '#ffffff', bg = '#000000', bold = true }, -- Style override - -- min_screen_width = 80, -- Hide if screen width < 80 - -- hidden = function() -- Hide condition - -- return vim.bo.buftype == 'nofile' - -- end, - -- left_style = { fg = '#ff0000' }, -- Left style override - -- update = function(self, ctx, static, session_id) -- Main content generator - -- return vim.fn.expand('%:t') - -- end, - -- ref = { -- References to other components - -- events = { 'file.name' }, - -- style = 'file.name', - -- static = 'file.name', - -- }, - -- }, - 'git.branch', - 'git.added', - 'git.removed', - 'git.modified', - -- 'copilot', - 'diagnostic.error', - 'diagnostic.warn', - 'diagnostic.info', - '%=', - 'encoding', - 'cursor.pos', - }, - }, - enabled = false, -} -- 2.49.1 From b177ef0d5d845f4c5657f1f84ae67b5997ed3690 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 7 Dec 2025 00:04:29 +0100 Subject: [PATCH 885/894] fixed fyler config --- lua/plugins/fyler.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/plugins/fyler.lua b/lua/plugins/fyler.lua index eff3366..bd8647d 100644 --- a/lua/plugins/fyler.lua +++ b/lua/plugins/fyler.lua @@ -5,13 +5,17 @@ return { }, branch = 'stable', opts = { - default_explorer = true, - icon_provider = 'nvim_web_devicons', - confirm_simple = true, - mappings = { - ['C-d'] = 'SelectVSplit', - ['C-s'] = 'SelectSplit', + views = { + default_explorer = true, + confirm_simple = true, }, + integrations = { + icon = 'nvim_web_devicons', -- default + }, + -- mappings = { + -- ['C-d'] = 'SelectVSplit', + -- ['C-s'] = 'SelectSplit', + -- }, }, keys = { { '-', function() require('fyler').open() end, desc = 'Open Fyler' }, -- 2.49.1 From 0e06c0447b1e81f15c6e6e41cf792d2b5730a173 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 7 Dec 2025 00:04:42 +0100 Subject: [PATCH 886/894] format autocommands --- lua/my_autocommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index a88af67..107b2c7 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -13,7 +13,7 @@ vim.filetype.add({ manifest = 'xml', simcfg = 'xml', simcon = 'xml', - simudex = 'xml' + simudex = 'xml', }, filename = { ['JenkinsFile'] = 'groovy', -- 2.49.1 From 8fa8b6c804e7986202632b9856d11680faea97ea Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 7 Dec 2025 21:38:30 +0100 Subject: [PATCH 887/894] replaced md preview with live preview --- lua/plugins/live-preview.lua | 6 ++++++ lua/plugins/markdown-preview.lua | 17 ----------------- 2 files changed, 6 insertions(+), 17 deletions(-) create mode 100644 lua/plugins/live-preview.lua delete mode 100644 lua/plugins/markdown-preview.lua diff --git a/lua/plugins/live-preview.lua b/lua/plugins/live-preview.lua new file mode 100644 index 0000000..43619e0 --- /dev/null +++ b/lua/plugins/live-preview.lua @@ -0,0 +1,6 @@ +return { + 'brianhuster/live-preview.nvim', + dependencies = { + 'folke/snacks.nvim', + }, +} diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua deleted file mode 100644 index 5ef3da6..0000000 --- a/lua/plugins/markdown-preview.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - 'iamcco/markdown-preview.nvim', - cmd = { - 'MarkdownPreviewToggle', - 'MarkdownPreview', - 'MarkdownPreviewStop', - }, - branch = 'master', - ft = { 'markdown' }, - build = function() vim.fn['mkdp#util#install']() end, - init = function() - vim.g.mkdp_auto_close = 0 - vim.g.mkdp_auto_start = 0 - vim.g.mkdp_combine_preview = 1 - vim.g.mkdp_combine_preview_auto_refresh = 1 - end, -} -- 2.49.1 From fd6d0019f1cb5b5ee244f1a3e389f3ba4fd986ec Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 6 Dec 2025 14:59:56 +0100 Subject: [PATCH 888/894] removed yanky --- lua/plugins/yanky.lua | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 lua/plugins/yanky.lua diff --git a/lua/plugins/yanky.lua b/lua/plugins/yanky.lua deleted file mode 100644 index 7a307ac..0000000 --- a/lua/plugins/yanky.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - 'gbprod/yanky.nvim', - config = function() - require('yanky').setup({ - ring = { - history_length = 100, - storage = 'shada', - sync_with_numbered_registers = true, - cancel_event = 'update', - ignore_registers = { '_' }, - update_register_on_cycle = false, - }, - system_clipboard = { - sync_with_ring = false, - }, - }) - vim.keymap.set({ 'n', 'x' }, 'p', '(YankyPutAfter)') - vim.keymap.set({ 'n', 'x' }, 'P', '(YankyPutBefore)') - vim.keymap.set({ 'n', 'x' }, 'gp', '(YankyGPutAfter)') - vim.keymap.set({ 'n', 'x' }, 'gP', '(YankyGPutBefore)') - - vim.keymap.set('n', '', '(YankyPreviousEntry)') - vim.keymap.set('n', '', '(YankyNextEntry)') - end, -} -- 2.49.1 From c201b75596af1b83bca7b4533a9d0772a702cb01 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:24:03 +0000 Subject: [PATCH 889/894] new visual selection highlight --- lua/my_keymappings.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index e89a443..fcfb498 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -46,8 +46,25 @@ end -- Highlight word under cursor vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlight word under cursor' }) -vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, desc = 'Highlight visual' }) +vim.keymap.set('x', "'", function() + -- 1. Yank current visual selection into the 'v' register + vim.cmd('noau normal! "vy"') + local text = vim.fn.getreg('v') + -- 2. Escape special characters (\ and /) for search + text = vim.fn.escape(text, '\\/') + + -- 3. Replace actual newlines with the string "\n" + text = string.gsub(text, '\n', '\\n') + + -- 4. Set the search register with \V (very nomagic) for literal search + vim.fn.setreg('/', '\\V' .. text) + + -- 5. Turn on highlight search + vim.opt.hlsearch = true + + -- Optional: Print feedback +end, { desc = 'Search for selected text (multiline supported)' }) -- Close Buffer -- vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) -- 2.49.1 From c850515257c32d377a56419c63235c2f99708970 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:26:37 +0000 Subject: [PATCH 890/894] disable yank highlight for glimmer --- lua/my_autocommands.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 107b2c7..01d29e8 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -1,11 +1,6 @@ local api = vim.api -- Highlight on yank -local yankGrp = api.nvim_create_augroup('YankHighlight', { clear = true }) -api.nvim_create_autocmd('TextYankPost', { - command = 'silent! lua vim.highlight.on_yank()', - group = yankGrp, -}) vim.filetype.add({ extension = { -- 2.49.1 From d672fa31eb263a7d0f736152a67bd1761ac8929b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:26:59 +0000 Subject: [PATCH 891/894] use ty instead ob basepyright --- lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 445d5ee..d368e3d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -41,7 +41,7 @@ return { local servers = { 'texlab', 'copilot', - 'basedpyright', + 'ty', 'ruff', 'clangd', 'lua_ls', -- 2.49.1 From f603d8af2ef5fecd9b8b40786f7484e933012934 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:27:12 +0000 Subject: [PATCH 892/894] some dap fixes --- lua/plugins/dap.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 48007cb..084eae8 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -63,11 +63,10 @@ return { dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end dap.listeners.before.event_exited.dapui_config = function() dapui.close() end - local path = require('mason-registry').get_package('debugpy'):get_install_path() - if vim.loop.os_uname().sysname:find('Windows') then - require('dap-python').setup(path .. 'dap-python' .. 'python') + if vim.fn.system('uname'):find('Windows') then + require('dap-python').setup('python') else - require('dap-python').setup(path .. '/venv/bin/python') + require('dap-python').setup('/venv/bin/python') end -- CPP @@ -75,7 +74,7 @@ return { type = 'server', port = '${port}', executable = { - command = require('mason-core.path').bin_prefix('codelldb'), + command = 'codelldb', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: @@ -92,7 +91,7 @@ return { dap.adapters.lldb = { type = 'executable', command = function() - if vim.loop.os_uname().sysname == 'Linux' then + if vim.fn.system('uname') == 'Linux' then return 'lldb-vscode' else return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe' -- 2.49.1 From 1588df9e394823487ca3cb13b096a7d07ce0f28d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:27:47 +0000 Subject: [PATCH 893/894] ty config --- after/lsp/ty.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 after/lsp/ty.lua diff --git a/after/lsp/ty.lua b/after/lsp/ty.lua new file mode 100644 index 0000000..e30de6e --- /dev/null +++ b/after/lsp/ty.lua @@ -0,0 +1,9 @@ +return { + settings = { + ty = { + experimental = { + rename = true, + }, + }, + }, +} -- 2.49.1 From 2948f0b423d76916179a4dcda296daaf156979b1 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 20:40:13 +0100 Subject: [PATCH 894/894] more filetypes --- lua/my_autocommands.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index 01d29e8..d83b92b 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -9,6 +9,9 @@ vim.filetype.add({ simcfg = 'xml', simcon = 'xml', simudex = 'xml', + rasi = 'rasi', + rofi = 'rasi', + wofi = 'rasi', }, filename = { ['JenkinsFile'] = 'groovy', @@ -18,6 +21,11 @@ vim.filetype.add({ ['.clangd'] = 'yaml', ['.clang-tidy'] = 'yaml', ['.yamlfmt'] = 'yaml', + ['.*/waybar/config'] = 'jsonc', + ['.*/mako/config'] = 'dosini', + ['.*/kitty/.+%.conf'] = 'kitty', + ['.*/hypr/.+%.conf'] = 'hyprlang', + ['%.env%.[%w_.-]+'] = 'sh', }, }) -- 2.49.1