From 1e080e9be0ce2e82b5bfdbd857a2aff9fa0485f2 Mon Sep 17 00:00:00 2001 From: Tomas Pustelnik <10606260+Pustelto@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:19:21 +0200 Subject: [PATCH] [vim]: refactor config to lua and lazy --- config/new-config-nvim/colors/my-material.vim | 670 ------------------ config/new-config-nvim/lazy-lock.json | 50 -- config/nvim/TODO | 31 - .../colors/moonrakers-old.vim} | 0 config/nvim/colors/moonrakers.vim | 468 ------------ config/nvim/ftdetect/njk.vim | 1 - config/{new-config-nvim => nvim}/init.lua | 0 config/nvim/init.vim | 40 -- config/nvim/lazy-lock.json | 56 ++ .../lua/autocommands.lua | 0 .../lua/custom-commands.lua | 0 .../{new-config-nvim => nvim}/lua/keymaps.lua | 0 .../lua/lazy-bootstrap.lua | 0 .../lua/lazy-plugins.lua | 27 + config/nvim/lua/lsp/lsp-installer.lua | 17 - .../{new-config-nvim => nvim}/lua/options.lua | 0 .../lua/plugins/cmp.lua | 0 config/nvim/lua/plugins/colorizer.lua | 6 + .../lua/plugins/colorscheme.lua | 16 +- .../lua/plugins/comments.lua | 0 .../lua/plugins/copilot.lua | 0 .../lua/plugins/ctrlxa.lua | 0 .../lua/plugins/debugging.lua | 14 +- .../lua/plugins/formatting.lua | 9 - .../lua/plugins/fugitive.lua | 0 .../lua/plugins/gitsigns.lua | 0 .../lua/plugins/indentline.lua | 2 +- config/nvim/lua/plugins/lazygit.lua | 19 + .../lua/plugins/linting.lua | 4 +- .../lua/plugins/lsp.lua | 43 +- .../lua/plugins/lualine.lua | 0 .../lua/plugins/mason.lua | 2 +- .../lua/plugins/nvim-tree.lua | 0 config/nvim/lua/plugins/nx.lua | 18 + .../lua/plugins/oil.lua | 0 .../lua/plugins/telescope.lua | 0 .../lua/plugins/todo-comments.lua | 0 .../lua/plugins/treesitter.lua | 47 +- .../lua/plugins/which-key.lua | 60 +- .../lua/snippets/init.lua | 0 config/nvim/lua/user/_alpha.lua | 41 -- config/nvim/lua/user/_autocommands.lua | 37 - config/nvim/lua/user/autopairs.lua | 33 - config/nvim/lua/user/cmp.lua | 131 ---- config/nvim/lua/user/colorizer.lua | 6 - config/nvim/lua/user/colorscheme.lua | 56 -- config/nvim/lua/user/comment.lua | 44 -- config/nvim/lua/user/copilot.lua | 17 - config/nvim/lua/user/ctrlxa.lua | 16 - config/nvim/lua/user/dap.lua | 52 -- config/nvim/lua/user/doge.lua | 4 - config/nvim/lua/user/emmet.lua | 4 - config/nvim/lua/user/gitsigns.lua | 48 -- config/nvim/lua/user/impatient.lua | 6 - config/nvim/lua/user/indentline.lua | 49 -- config/nvim/lua/user/keymaps.lua | 77 -- config/nvim/lua/user/lsp/configs.lua | 52 -- config/nvim/lua/user/lsp/handlers.lua | 115 --- config/nvim/lua/user/lsp/init.lua | 8 - config/nvim/lua/user/lsp/null-ls.lua | 44 -- config/nvim/lua/user/lsp/settings/jsonls.lua | 135 ---- config/nvim/lua/user/lsp/settings/lua_ls.lua | 25 - .../lua/user/lsp/settings/rust_analyzer.lua | 5 - .../lua/user/lsp/settings/sumneko_lua.lua | 16 - config/nvim/lua/user/lualine.lua | 95 --- config/nvim/lua/user/neotest.lua | 48 -- config/nvim/lua/user/nvim-tree.lua | 98 --- config/nvim/lua/user/options.lua | 74 -- config/nvim/lua/user/plugins.lua | 174 ----- config/nvim/lua/user/project.lua | 50 -- config/nvim/lua/user/snippets/init.lua | 170 ----- config/nvim/lua/user/telescope.lua | 139 ---- config/nvim/lua/user/treesitter.lua | 106 --- config/nvim/lua/user/whichkey.lua | 206 ------ config/nvim/plugin/packer_compiled.lua | 344 --------- 75 files changed, 244 insertions(+), 3881 deletions(-) delete mode 100644 config/new-config-nvim/colors/my-material.vim delete mode 100644 config/new-config-nvim/lazy-lock.json delete mode 100644 config/nvim/TODO rename config/{new-config-nvim/colors/moonrakers.vim => nvim/colors/moonrakers-old.vim} (100%) delete mode 100644 config/nvim/colors/moonrakers.vim delete mode 100644 config/nvim/ftdetect/njk.vim rename config/{new-config-nvim => nvim}/init.lua (100%) delete mode 100644 config/nvim/init.vim create mode 100644 config/nvim/lazy-lock.json rename config/{new-config-nvim => nvim}/lua/autocommands.lua (100%) rename config/{new-config-nvim => nvim}/lua/custom-commands.lua (100%) rename config/{new-config-nvim => nvim}/lua/keymaps.lua (100%) rename config/{new-config-nvim => nvim}/lua/lazy-bootstrap.lua (100%) rename config/{new-config-nvim => nvim}/lua/lazy-plugins.lua (83%) delete mode 100644 config/nvim/lua/lsp/lsp-installer.lua rename config/{new-config-nvim => nvim}/lua/options.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/cmp.lua (100%) create mode 100644 config/nvim/lua/plugins/colorizer.lua rename config/{new-config-nvim => nvim}/lua/plugins/colorscheme.lua (73%) rename config/{new-config-nvim => nvim}/lua/plugins/comments.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/copilot.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/ctrlxa.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/debugging.lua (93%) rename config/{new-config-nvim => nvim}/lua/plugins/formatting.lua (80%) rename config/{new-config-nvim => nvim}/lua/plugins/fugitive.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/gitsigns.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/indentline.lua (98%) create mode 100644 config/nvim/lua/plugins/lazygit.lua rename config/{new-config-nvim => nvim}/lua/plugins/linting.lua (96%) rename config/{new-config-nvim => nvim}/lua/plugins/lsp.lua (91%) rename config/{new-config-nvim => nvim}/lua/plugins/lualine.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/mason.lua (98%) rename config/{new-config-nvim => nvim}/lua/plugins/nvim-tree.lua (100%) create mode 100644 config/nvim/lua/plugins/nx.lua rename config/{new-config-nvim => nvim}/lua/plugins/oil.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/telescope.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/todo-comments.lua (100%) rename config/{new-config-nvim => nvim}/lua/plugins/treesitter.lua (81%) rename config/{new-config-nvim => nvim}/lua/plugins/which-key.lua (75%) rename config/{new-config-nvim => nvim}/lua/snippets/init.lua (100%) delete mode 100644 config/nvim/lua/user/_alpha.lua delete mode 100644 config/nvim/lua/user/_autocommands.lua delete mode 100644 config/nvim/lua/user/autopairs.lua delete mode 100644 config/nvim/lua/user/cmp.lua delete mode 100644 config/nvim/lua/user/colorizer.lua delete mode 100644 config/nvim/lua/user/colorscheme.lua delete mode 100644 config/nvim/lua/user/comment.lua delete mode 100644 config/nvim/lua/user/copilot.lua delete mode 100644 config/nvim/lua/user/ctrlxa.lua delete mode 100644 config/nvim/lua/user/dap.lua delete mode 100644 config/nvim/lua/user/doge.lua delete mode 100644 config/nvim/lua/user/emmet.lua delete mode 100644 config/nvim/lua/user/gitsigns.lua delete mode 100644 config/nvim/lua/user/impatient.lua delete mode 100644 config/nvim/lua/user/indentline.lua delete mode 100644 config/nvim/lua/user/keymaps.lua delete mode 100644 config/nvim/lua/user/lsp/configs.lua delete mode 100644 config/nvim/lua/user/lsp/handlers.lua delete mode 100644 config/nvim/lua/user/lsp/init.lua delete mode 100644 config/nvim/lua/user/lsp/null-ls.lua delete mode 100644 config/nvim/lua/user/lsp/settings/jsonls.lua delete mode 100644 config/nvim/lua/user/lsp/settings/lua_ls.lua delete mode 100644 config/nvim/lua/user/lsp/settings/rust_analyzer.lua delete mode 100644 config/nvim/lua/user/lsp/settings/sumneko_lua.lua delete mode 100644 config/nvim/lua/user/lualine.lua delete mode 100644 config/nvim/lua/user/neotest.lua delete mode 100644 config/nvim/lua/user/nvim-tree.lua delete mode 100644 config/nvim/lua/user/options.lua delete mode 100644 config/nvim/lua/user/plugins.lua delete mode 100644 config/nvim/lua/user/project.lua delete mode 100644 config/nvim/lua/user/snippets/init.lua delete mode 100644 config/nvim/lua/user/telescope.lua delete mode 100644 config/nvim/lua/user/treesitter.lua delete mode 100644 config/nvim/lua/user/whichkey.lua delete mode 100644 config/nvim/plugin/packer_compiled.lua diff --git a/config/new-config-nvim/colors/my-material.vim b/config/new-config-nvim/colors/my-material.vim deleted file mode 100644 index e5afbcc..0000000 --- a/config/new-config-nvim/colors/my-material.vim +++ /dev/null @@ -1,670 +0,0 @@ -" Vim Color File -" Name: my-material.vim -" Maintainer: https://github.com/kaicataldo/material.vim -" License: The MIT License (MIT) - -" === Configuration === - -" Clear any other set colors -highlight clear - -if exists('syntax_on') - syntax reset -endif - -let g:colors_name = 'material' -let g:material_theme_style = get(g:, 'material_theme_style', 'default') -let g:material_terminal_italics = get(g:, 'material_terminal_italics', 0) - -" For backwards compatibility -if (g:material_theme_style == 'dark') - let g:material_theme_style = 'darker' -endif - -" === Functions === - -function! s:SetHighlight(group, fg, bg, attr) - let l:attr = a:attr - - if !g:material_terminal_italics && l:attr == 'italic' - let l:attr = '' - endif - - if empty(l:attr) - let l:attr = 'none' - endif - - if !empty(a:fg) - exec 'hi ' . a:group . ' guifg=' . a:fg.gui . ' ctermfg=' . a:fg.cterm - endif - - if !empty(a:bg) - exec 'hi ' . a:group . ' guibg=' . a:bg.gui . ' ctermbg=' . a:bg.cterm - endif - - if !empty(l:attr) - exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr - endif -endfun - -" === Color Definitions === - -" Default colors -set background=dark -let s:bg = { 'gui': '#263238', 'cterm': 'none' } -let s:fg = { 'gui': '#eeffff', 'cterm': 231 } -let s:invisibles = { 'gui': '#65738e', 'cterm': 66 } -let s:comments = { 'gui': '#5A7887', 'cterm': 145 } -let s:caret = { 'gui': '#ffcc00', 'cterm': 220 } -let s:selection = { 'gui': '#2c3b41', 'cterm': 239 } -let s:guides = { 'gui': '#37474f', 'cterm': 17 } -let s:line_numbers = { 'gui': '#546F7D', 'cterm': 145 } -let s:line_highlight = { 'gui': '#1a2327', 'cterm': 235 } -let s:white = { 'gui': '#ffffff', 'cterm': 231 } -let s:black = { 'gui': '#000000', 'cterm': 232 } -let s:red = { 'gui': '#f77c91', 'cterm': 203 } -let s:orange = { 'gui': '#f78c6c', 'cterm': 209 } -let s:yellow = { 'gui': '#ffcb6b', 'cterm': 11 } -let s:green = { 'gui': '#c3e88d', 'cterm': 2 } " 186 –– almost perfect match -let s:cyan = { 'gui': '#73d0e2', 'cterm': 117 } -let s:blue = { 'gui': '#82aaff', 'cterm': 111 } -let s:paleblue = { 'gui': '#b2ccd6', 'cterm': 152 } -let s:purple = { 'gui': '#c792ea', 'cterm': 176 } -let s:brown = { 'gui': '#c17e70', 'cterm': 137 } -let s:pink = { 'gui': '#f07178', 'cterm': 204 } -let s:violet = { 'gui': '#bb80b3', 'cterm': 139 } - -" Theme-specific color overrides -if g:material_theme_style == 'palenight' || g:material_theme_style == 'palenight-community' - let s:bg = { 'gui': '#292d3e', 'cterm': 'none' } - let s:fg = { 'gui': '#a6accd', 'cterm': 146 } - let s:invisibles = { 'gui': '#4e5579', 'cterm': 60 } - let s:comments = { 'gui': '#676e95', 'cterm': 60 } - let s:selection = { 'gui': '#343b51', 'cterm': 60 } - let s:guides = { 'gui': '#4e5579', 'cterm': 60 } - let s:line_numbers = { 'gui': '#3a3f58', 'cterm': 60 } - let s:line_highlight = { 'gui': '#1c1f2b', 'cterm': 234 } -elseif g:material_theme_style == 'darker' || g:material_theme_style == 'darker-community' - let s:bg = { 'gui': '#212121', 'cterm': 'none' } - let s:fg = { 'gui': '#eeffff', 'cterm': 231 } - let s:invisibles = { 'gui': '#65737e', 'cterm': 66 } - let s:comments = { 'gui': '#545454', 'cterm': 59 } - let s:selection = { 'gui': '#2c2c2c', 'cterm': 237 } - let s:guides = { 'gui': '#424242', 'cterm': 0 } - let s:line_numbers = { 'gui': '#424242', 'cterm': 0 } - let s:line_highlight = { 'gui': '#171717', 'cterm': 0 } -elseif g:material_theme_style == 'ocean' || g:material_theme_style == 'ocean-community' - let s:bg = { 'gui': '#0f111a', 'cterm': 'none' } - let s:fg = { 'gui': '#8f93a2', 'cterm': 103 } - let s:invisibles = { 'gui': '#80869e', 'cterm': 103 } - let s:comments = { 'gui': '#464b5d', 'cterm': 60 } - let s:selection = { 'gui': '#1f2233', 'cterm': 60 } - let s:guides = { 'gui': '#3b3f51', 'cterm': 17 } - let s:line_numbers = { 'gui': '#3b3f51', 'cterm': 60 } - let s:line_highlight = { 'gui': '#0a0c12', 'cterm': 0 } -elseif g:material_theme_style == 'lighter' || g:material_theme_style == 'lighter-community' - set background=light - let s:bg = { 'gui': '#fafafa', 'cterm': 'none' } - let s:fg = { 'gui': '#90a4ae', 'cterm': 109 } - let s:invisibles = { 'gui': '#e7eaec', 'cterm': 189 } - let s:comments = { 'gui': '#90a4ae', 'cterm': 109 } - let s:caret = { 'gui': '#272727', 'cterm': 0 } - let s:selection = { 'gui': '#ebf4f3', 'cterm': 254 } - let s:guides = { 'gui': '#b0bec5', 'cterm': 146 } - let s:line_numbers = { 'gui': '#cfd8dc', 'cterm': 188 } - let s:line_highlight = { 'gui': '#ecf0f1', 'cterm': 253 } - let s:white = { 'gui': '#ffffff', 'cterm': 231 } - let s:black = { 'gui': '#000000', 'cterm': 0 } - let s:red = { 'gui': '#e53935', 'cterm': 160 } - let s:orange = { 'gui': '#f76d47', 'cterm': 202 } - let s:yellow = { 'gui': '#ffb62c', 'cterm': 214 } - let s:green = { 'gui': '#91b859', 'cterm': 107 } - let s:cyan = { 'gui': '#39adb5', 'cterm': 37 } - let s:blue = { 'gui': '#6182b8', 'cterm': 67 } - let s:paleblue = { 'gui': '#8796b0', 'cterm': 103 } - let s:purple = { 'gui': '#7c4dff', 'cterm': 99 } - let s:brown = { 'gui': '#c17e70', 'cterm': 137 } - let s:pink = { 'gui': '#ff5370', 'cterm': 203 } - let s:violet = { 'gui': '#945eb8', 'cterm': 97 } -endif - -" Defined globally so that the Airline theme has access -let g:material_colorscheme_map = {} -let g:material_colorscheme_map.bg = s:bg -let g:material_colorscheme_map.fg = s:fg -let g:material_colorscheme_map.invisibles = s:invisibles -let g:material_colorscheme_map.comments = s:comments -let g:material_colorscheme_map.caret = s:caret -let g:material_colorscheme_map.selection = s:selection -let g:material_colorscheme_map.guides = s:guides -let g:material_colorscheme_map.line_numbers = s:line_numbers -let g:material_colorscheme_map.line_highlight = s:line_highlight -let g:material_colorscheme_map.white = s:white -let g:material_colorscheme_map.black = s:black -let g:material_colorscheme_map.red = s:red -let g:material_colorscheme_map.orange = s:orange -let g:material_colorscheme_map.yellow = s:yellow -let g:material_colorscheme_map.green = s:green -let g:material_colorscheme_map.cyan = s:cyan -let g:material_colorscheme_map.blue = s:blue -let g:material_colorscheme_map.paleblue = s:paleblue -let g:material_colorscheme_map.purple = s:purple -let g:material_colorscheme_map.brown = s:brown -let g:material_colorscheme_map.pink = s:pink -let g:material_colorscheme_map.violet = s:violet - -" === Highlights === - -" Vim Editor -call s:SetHighlight('ColorColumn', '', s:guides, '') -call s:SetHighlight('Cursor', s:bg, s:caret, '') -call s:SetHighlight('CursorColumn', '', s:line_highlight, '') -call s:SetHighlight('CursorLine', '', s:line_highlight, '') -call s:SetHighlight('CursorLineNr', s:comments, '', '') -call s:SetHighlight('Directory', s:blue, '', '') -call s:SetHighlight('DiffAdd', s:green, s:bg, '') -call s:SetHighlight('DiffDelete', s:red, s:bg, '') -call s:SetHighlight('DiffChange', s:yellow, s:bg, '') -call s:SetHighlight('DiffText', s:orange, s:bg, '') -call s:SetHighlight('ErrorMsg', s:bg, s:red, 'bold') -call s:SetHighlight('FoldColumn', s:line_numbers, s:bg, '') -call s:SetHighlight('Folded', s:brown, s:bg, 'bold') -call s:SetHighlight('LineNr', s:line_numbers, '', '') -call s:SetHighlight('MatchParen', s:caret, s:bg, 'bold') -call s:SetHighlight('ModeMsg', s:green, '', '') -call s:SetHighlight('MoreMsg', s:green, '', '') -call s:SetHighlight('NonText', s:comments, '', '') -call s:SetHighlight('Normal', s:fg, s:bg, '') -call s:SetHighlight('Pmenu', s:fg, s:selection, '') -call s:SetHighlight('PmenuSel', s:bg, s:cyan, '') -call s:SetHighlight('PmenuSbar', '', s:selection, '') -call s:SetHighlight('PmenuThumb', '', s:comments, '') -call s:SetHighlight('Question', s:blue, '', '') -call s:SetHighlight('IncSearch', s:white, s:comments, 'none') -call s:SetHighlight('Search', s:white, s:comments, 'none') -call s:SetHighlight('SignColumn', s:fg, s:bg, '') -call s:SetHighlight('SpecialKey', s:comments, '', '') -call s:SetHighlight('SpellCap', s:blue, '', 'undercurl') -call s:SetHighlight('SpellBad', s:red, '', 'undercurl') -call s:SetHighlight('StatusLine', s:fg, s:selection, '') -call s:SetHighlight('StatusLineNC', s:comments, s:selection, '') -call s:SetHighlight('StatusLineTerm', s:bg, s:green, '') -call s:SetHighlight('StatusLineTermNC', s:bg, s:green, '') -call s:SetHighlight('TabLine', s:fg, s:line_numbers, '') -call s:SetHighlight('TabLineFill', s:fg, s:selection, '') -call s:SetHighlight('TabLineSel', s:bg, s:cyan, '') -call s:SetHighlight('Title', s:green, '', '') -call s:SetHighlight('VertSplit', s:comments, '', '') -call s:SetHighlight('Visual', s:fg, s:guides, '') -call s:SetHighlight('WarningMsg', s:red, '', '') -call s:SetHighlight('WildMenu', s:bg, s:cyan, '') -call s:SetHighlight('WinBar', s:paleblue, '', '') - -" Syntax -call s:SetHighlight('Comment', s:comments, '', 'italic') -call s:SetHighlight('Conceal', s:brown, s:bg, '') -call s:SetHighlight('Constant', s:orange, '', '') -call s:SetHighlight('String', s:green, '', '') -call s:SetHighlight('Character', s:green, '', '') -call s:SetHighlight('Identifier', s:red, '', '') -call s:SetHighlight('Function', s:blue, '', '') -call s:SetHighlight('Statement', s:purple, '', '') -call s:SetHighlight('Operator', s:cyan, '', '') -call s:SetHighlight('PreProc', s:cyan, '', '') -call s:SetHighlight('Include', s:blue, '', '') -call s:SetHighlight('Define', s:purple, '', '') -call s:SetHighlight('Macro', s:purple, '', '') -call s:SetHighlight('Type', s:yellow, '', '') -call s:SetHighlight('Structure', s:cyan, '', '') -call s:SetHighlight('Special', s:violet, '', '') -call s:SetHighlight('Underlined', s:blue, '', '') -call s:SetHighlight('Error', s:bg, s:red, '') -call s:SetHighlight('Todo', s:orange, s:bg, 'italic') - -" Legacy groups for official git.vim and diff.vim syntax -hi! link diffFile DiffAdd -hi! link diffNewFile DiffDelete -hi! link diffAdded DiffAdd -hi! link diffChanged DiffChange -hi! link diffLine DiffChange -hi! link diffRemoved DiffDelete - -" Git Commit Messages -call s:SetHighlight('gitcommitHeader', s:purple, '', '') -call s:SetHighlight('gitcommitUnmerged', s:green, '', '') -call s:SetHighlight('gitcommitSelectedFile', s:green, '', '') -call s:SetHighlight('gitcommitDiscardedFile', s:red, '', '') -call s:SetHighlight('gitcommitUnmergedFile', s:yellow, '', '') -call s:SetHighlight('gitcommitSelectedType', s:green, '', '') -call s:SetHighlight('gitcommitSummary', s:blue, '', '') -call s:SetHighlight('gitcommitDiscardedType', s:red, '', '') -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitUntracked gitcommitComment -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitSelected gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile - -" Javascript -call s:SetHighlight('javaScriptBraces', s:fg, '', '') -call s:SetHighlight('javaScriptNull', s:orange, '', '') -call s:SetHighlight('javaScriptIdentifier', s:purple, '', '') -call s:SetHighlight('javaScriptNumber', s:orange, '', '') -call s:SetHighlight('javaScriptRequire', s:cyan, '', '') -call s:SetHighlight('javaScriptReserved', s:purple, '', '') - -" pangloss/vim-javascript -if g:material_theme_style !~ '-community$' - call s:SetHighlight('jsArrowFunction', s:purple, '', '') - call s:SetHighlight('jsAsyncKeyword', s:purple, '', '') - call s:SetHighlight('jsBooleanTrue', s:orange, '', '') - call s:SetHighlight('jsBooleanFalse', s:orange, '', '') - call s:SetHighlight('jsBrackets', s:pink, '', '') - call s:SetHighlight('jsCatch', s:cyan, '', 'italic') - call s:SetHighlight('jsClassBraces', s:cyan, '', '') - call s:SetHighlight('jsClassDefinition', s:yellow, '', '') - call s:SetHighlight('jsClassFuncName', s:pink, '', '') - call s:SetHighlight('jsClassProperty', s:pink, '', '') - call s:SetHighlight('jsClassKeyword', s:purple, '', '') - call s:SetHighlight('jsConditional', s:cyan, '', 'italic') - call s:SetHighlight('jsDocParam', s:green, '', '') - call s:SetHighlight('jsDocTags', s:cyan, '', '') - call s:SetHighlight('jsDot', s:cyan, '', '') - call s:SetHighlight('jsException', s:cyan, '', 'italic') - call s:SetHighlight('jsExceptions', s:yellow, '', '') - call s:SetHighlight('jsExport', s:cyan, '', 'italic') - call s:SetHighlight('jsExportDefault', s:cyan, '', 'italic') - call s:SetHighlight('jsExtendsKeyword', s:purple, '', '') - call s:SetHighlight('jsFinally', s:cyan, '', 'italic') - call s:SetHighlight('jsFinallyBraces', s:cyan, '', '') - call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '') - call s:SetHighlight('jsForAwait', s:cyan, '', 'italic') - call s:SetHighlight('jsFrom', s:cyan, '', 'italic') - call s:SetHighlight('jsFuncBraces', s:cyan, '', '') - call s:SetHighlight('jsFuncCall', s:blue, '', '') - call s:SetHighlight('jsFuncParens', s:cyan, '', '') - call s:SetHighlight('jsFunction', s:purple, '', '') - call s:SetHighlight('jsFunctionKey', s:pink, '', '') - call s:SetHighlight('jsGlobalObjects', s:yellow, '', '') - call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '') - call s:SetHighlight('jsIfElseBraces', s:cyan, '', '') - call s:SetHighlight('jsImport', s:cyan, '', 'italic') - call s:SetHighlight('jsModuleAs', s:cyan, '', 'italic') - call s:SetHighlight('jsModuleBraces', s:cyan, '', '') - call s:SetHighlight('jsNull', s:cyan, '', '') - call s:SetHighlight('jsNoise', s:cyan, '', '') - call s:SetHighlight('jsObjectBraces', s:cyan, '', '') - call s:SetHighlight('jsObjectColon', s:cyan, '', '') - call s:SetHighlight('jsObjectKey', s:pink, '', '') - call s:SetHighlight('jsObjectSeparator', s:cyan, '', '') - call s:SetHighlight('jsParens', s:pink, '', '') - call s:SetHighlight('jsRepeat', s:cyan, '', 'italic') - call s:SetHighlight('jsReturn', s:cyan, '', 'italic') - call s:SetHighlight('jsStorageClass', s:purple, '', '') - call s:SetHighlight('jsTemplateBraces', s:cyan, '', '') - call s:SetHighlight('jsTemplateExpression', s:fg, '', '') - call s:SetHighlight('jsTemplateString', s:green, '', '') - call s:SetHighlight('jsThis', s:cyan, '', 'italic') - call s:SetHighlight('jsTry', s:cyan, '', 'italic') - call s:SetHighlight('jsTryCatchBraces', s:cyan, '', '') - call s:SetHighlight('jsUndefined', s:cyan, '', '') -else - call s:SetHighlight('jsArrowFunction', s:purple, '', '') - call s:SetHighlight('jsAsyncKeyword', s:purple, '', '') - call s:SetHighlight('jsExtendsKeyword', s:purple, '', '') - call s:SetHighlight('jsClassKeyword', s:purple, '', '') - call s:SetHighlight('jsDocParam', s:green, '', '') - call s:SetHighlight('jsDocTags', s:cyan, '', '') - call s:SetHighlight('jsForAwait', s:purple, '', '') - call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '') - call s:SetHighlight('jsFrom', s:purple, '', '') - call s:SetHighlight('jsImport', s:purple, '', '') - call s:SetHighlight('jsExport', s:purple, '', '') - call s:SetHighlight('jsExportDefault', s:purple, '', '') - call s:SetHighlight('jsFuncCall', s:blue, '', '') - call s:SetHighlight('jsFunction', s:purple, '', '') - call s:SetHighlight('jsGlobalObjects', s:yellow, '', '') - call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '') - call s:SetHighlight('jsModuleAs', s:purple, '', '') - call s:SetHighlight('jsNull', s:orange, '', '') - call s:SetHighlight('jsStorageClass', s:purple, '', '') - call s:SetHighlight('jsTemplateBraces', s:red, '', '') - call s:SetHighlight('jsTemplateExpression', s:red, '', '') - call s:SetHighlight('jsThis', s:red, '', '') - call s:SetHighlight('jsUndefined', s:orange, '', '') -endif - -" MaxMEllon/vim-jsx-pretty -call s:SetHighlight('jsxTag', s:cyan, '', '') -call s:SetHighlight('jsxTagName', s:pink, '', '') -call s:SetHighlight('jsxComponentName', s:yellow, '', '') -call s:SetHighlight('jsxCloseTag', s:cyan, '', '') -call s:SetHighlight('jsxEscapeJs', s:fg, '', '') -call s:SetHighlight('jsxCloseString', s:cyan, '', '') -call s:SetHighlight('jsxAttrib', s:purple, '', 'italic') -call s:SetHighlight('jsxString', s:green, '', '') -call s:SetHighlight('jsxEqual', s:purple, '', '') -call s:SetHighlight('jsxDot', s:cyan, '', '') -call s:SetHighlight('jsxSpreadOperator', s:purple, '', '') -call s:SetHighlight('jsxBraces', s:cyan, '', '') -call s:SetHighlight('jsxNamespace', s:cyan, '', '') - -" JSON -call s:SetHighlight('jsonBraces', s:fg, '', '') - -" CSS -call s:SetHighlight('cssAttrComma', s:fg, '', '') -call s:SetHighlight('cssPseudoClassId', s:yellow, '', '') -call s:SetHighlight('cssBraces', s:fg, '', '') -call s:SetHighlight('cssClassName', s:yellow, '', '') -call s:SetHighlight('cssClassNameDot', s:yellow, '', '') -call s:SetHighlight('cssFunctionName', s:blue, '', '') -call s:SetHighlight('cssImportant', s:cyan, '', '') -call s:SetHighlight('cssIncludeKeyword', s:purple, '', '') -call s:SetHighlight('cssTagName', s:red, '', '') -call s:SetHighlight('cssMediaType', s:orange, '', '') -call s:SetHighlight('cssProp', s:fg, '', '') -call s:SetHighlight('cssSelectorOp', s:cyan, '', '') -call s:SetHighlight('cssSelectorOp2', s:cyan, '', '') - -" Sass -call s:SetHighlight('sassAmpersand', s:red, '', '') -call s:SetHighlight('sassClassChar', s:yellow, '', '') -call s:SetHighlight('sassMixinName', s:blue, '', '') -call s:SetHighlight('sassVariable', s:purple, '', '') - -" Less -call s:SetHighlight('lessAmpersand', s:red, '', '') -call s:SetHighlight('lessClassChar', s:yellow, '', '') -call s:SetHighlight('lessCssAttribute', s:fg, '', '') -call s:SetHighlight('lessFunction', s:blue, '', '') -call s:SetHighlight('lessVariable', s:purple, '', '') - -" HTML -call s:SetHighlight('htmlTagName', s:pink, '', '') -call s:SetHighlight('htmlEndTag', s:cyan, '', '') -call s:SetHighlight('htmlTag', s:cyan, '', '') -call s:SetHighlight('htmlSpecialTagName', s:yellow, '', '') -call s:SetHighlight('htmlArg', s:purple, '', 'italic') -call s:SetHighlight('htmlTitle', s:fg, '', '') -call s:SetHighlight('htmlLink', s:fg, '', '') -"" Consistency with plasticboy/vim-markdown -call s:SetHighlight('htmlBold', s:pink, '', 'bold') -call s:SetHighlight('htmlH1', s:yellow, '', '') -call s:SetHighlight('htmlH2', s:yellow, '', '') -call s:SetHighlight('htmlH3', s:yellow, '', '') -call s:SetHighlight('htmlH4', s:yellow, '', '') -call s:SetHighlight('htmlH5', s:yellow, '', '') -call s:SetHighlight('htmlH6', s:yellow, '', '') -call s:SetHighlight('htmlItalic', s:pink, '', 'italic') - -" XML -call s:SetHighlight('xmlAttrib', s:purple, '', 'italic') -call s:SetHighlight('xmlEndTag', s:cyan, '', '') -call s:SetHighlight('xmlTag', s:cyan, '', '') -call s:SetHighlight('xmlTagName', s:pink, '', '') - -" Golang -call s:SetHighlight('goFunctionCall', s:blue, '', '') -call s:SetHighlight('goReceiverType', s:green, '', '') -call s:SetHighlight('goParamName', s:orange, '', '') -call s:SetHighlight('goParamType', s:green, '', '') -call s:SetHighlight('goTypeDecl', s:purple, '', '') -call s:SetHighlight('goTypeName', s:yellow, '', '') -call s:SetHighlight('goBuiltins', s:red, '', '') -call s:SetHighlight('goType', s:purple, '', '') -call s:SetHighlight('goSignedInts', s:purple, '', '') -call s:SetHighlight('goUnsignedInts', s:purple, '', '') -call s:SetHighlight('goFloats', s:purple, '', '') -call s:SetHighlight('goComplexes', s:purple, '', '') - -" Ruby -call s:SetHighlight('rubyInterpolation', s:cyan, '', '') -call s:SetHighlight('rubyInterpolationDelimiter', s:violet, '', '') -call s:SetHighlight('rubyRegexp', s:cyan, '', '') -call s:SetHighlight('rubyRegexpDelimiter', s:violet, '', '') -call s:SetHighlight('rubyStringDelimiter', s:green, '', '') - -" Rust -call s:SetHighlight('CocRustTypeHint', s:invisibles, '', '') -call s:SetHighlight('CocRustChainingHint', s:invisibles, '', '') - -" TeX -call s:SetHighlight('texBeginEndName', s:blue, '', '') -call s:SetHighlight('texMathMatcher', s:blue, '', '') -call s:SetHighlight('texCite', s:green, '', '') -call s:SetHighlight('texRefZone', s:green, '', '') -call s:SetHighlight('texInputFile', s:green, '', '') -call s:SetHighlight('texMath', s:orange, '', '') -call s:SetHighlight('texMathOper', s:yellow, '', '') - -" Markdown -call s:SetHighlight('strong_emphasis', s:pink, '', 'bold') -call s:SetHighlight('emphasis', s:pink, '', 'italic') - -if g:material_theme_style !~ '-community$' - call s:SetHighlight('markdownBold', s:pink, '', 'bold') - call s:SetHighlight('markdownBoldDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownCode', s:paleblue, '', '') - call s:SetHighlight('markdownCodeDelimiter', s:green, '', '') - call s:SetHighlight('markdownHeadingDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownH1', s:yellow, '', '') - call s:SetHighlight('markdownH2', s:yellow, '', '') - call s:SetHighlight('markdownH3', s:yellow, '', '') - call s:SetHighlight('markdownH4', s:yellow, '', '') - call s:SetHighlight('markdownH5', s:yellow, '', '') - call s:SetHighlight('markdownH6', s:yellow, '', '') - call s:SetHighlight('markdownItalic', s:pink, '', 'italic') - call s:SetHighlight('markdownItalicDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownLinkDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownLinkText', s:green, '', '') - call s:SetHighlight('markdownLinkTextDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownListMarker', s:cyan, '', '') - call s:SetHighlight('markdownUrl', s:pink, '', 'underline') - call s:SetHighlight('markdownUrlTitleDelimiter', s:green, '', '') -else - call s:SetHighlight('markdownBold', s:yellow, '', 'bold') - call s:SetHighlight('markdownCode', s:cyan, '', '') - call s:SetHighlight('markdownCodeBlock', s:cyan, '', '') - call s:SetHighlight('markdownCodeDelimiter', s:cyan, '', '') - call s:SetHighlight('markdownHeadingDelimiter', s:green, '', '') - call s:SetHighlight('markdownHeadingRule', s:comments, '', '') - call s:SetHighlight('markdownId', s:purple, '', '') - call s:SetHighlight('markdownItalic', s:blue, '', 'italic') - call s:SetHighlight('markdownListMarker', s:orange, '', '') - call s:SetHighlight('markdownOrderedListMarker', s:orange, '', '') - call s:SetHighlight('markdownRule', s:comments, '', '') - call s:SetHighlight('markdownUrl', s:purple, '', '') - call s:SetHighlight('markdownUrlTitleDelimiter', s:yellow, '', '') -endif - -" plasticboy/vim-markdown -if g:material_theme_style !~ '-community$' - call s:SetHighlight('mkdBold', s:cyan, '', '') - call s:SetHighlight('mkdCodeStart', s:green, '', '') - call s:SetHighlight('mkdCodeDelimiter', s:cyan, '', '') - call s:SetHighlight('mkdDelimiter', s:cyan, '', '') - call s:SetHighlight('mkdHeading', s:cyan, '', '') - call s:SetHighlight('mkdItalic', s:cyan, '', '') - call s:SetHighlight('mkdLink', s:green, '', '') - call s:SetHighlight('mkdListItem', s:cyan, '', '') - call s:SetHighlight('mkdURL', s:pink, '', 'underline') -endif - -" vimwiki/vimwiki -if g:material_theme_style !~ '-community$' - call s:SetHighlight('VimwikiBold', s:pink, '', 'bold') - call s:SetHighlight('VimwikiBoldChar', s:cyan, '', 'bold') - call s:SetHighlight('VimwikiDelText', s:pink, '', 'strikethrough') - call s:SetHighlight('VimwikiDelTextChar', s:cyan, '', '') - call s:SetHighlight('VimwikiCode', s:green, '', '') - call s:SetHighlight('VimwikiCodeChar', s:cyan, '', '') - call s:SetHighlight('VimwikiHeader1', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader2', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader3', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader4', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader5', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader6', s:yellow, '', '') - call s:SetHighlight('VimwikiHeaderChar', s:cyan, '', '') - call s:SetHighlight('VimwikiImage', s:cyan, '', '') - call s:SetHighlight('VimwikiItalic', s:pink, '', 'italic') - call s:SetHighlight('VimwikiItalicChar', s:cyan, '', '') - call s:SetHighlight('VimwikiLink', s:green, '', 'underline') - call s:SetHighlight('VimwikiListTodo', s:cyan, '', '') - call s:SetHighlight('VimwikiPre', s:green, '', '') - call s:SetHighlight('VimwikiWebLink1', s:green, '', 'underline') -endif - -" vim-gitgutter -call s:SetHighlight('GitGutterAdd', s:green, '', '') -call s:SetHighlight('GitGutterChange', s:yellow, '', '') -call s:SetHighlight('GitGutterChangeDelete', s:orange, '', '') -call s:SetHighlight('GitGutterDelete', s:red, '', '') - -" vim-signify -hi link SignifySignAdd GitGutterAdd -hi link SignifySignChange GitGutterChange -hi link SignifySignDelete GitGutterDelete - -" vim-better-whitespace -call s:SetHighlight('ExtraWhitespace', '', s:red, '') - -" NERDTree -if has('nvim') - call s:SetHighlight('NERDTreeFile', s:fg, '', '') -endif - -" coc.nvim -call s:SetHighlight('CocMarkdownLink', s:purple, '', '') -call s:SetHighlight('CocErrorSign', s:red, '', '') -call s:SetHighlight('CocWarningSign', s:orange, '', '') -call s:SetHighlight('CocHintSign', s:yellow, '', '') -call s:SetHighlight('CocInfoSign', s:green, '', '') - -" Neovim terminal colors -if has('nvim') - let g:terminal_color_background = s:bg.gui - let g:terminal_color_foreground = s:fg.gui - let g:terminal_color_0 = s:comments.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:white.gui - let g:terminal_color_8 = g:terminal_color_0 - let g:terminal_color_9 = g:terminal_color_1 - let g:terminal_color_10 = g:terminal_color_2 - let g:terminal_color_11 = g:terminal_color_3 - let g:terminal_color_12 = g:terminal_color_4 - let g:terminal_color_13 = g:terminal_color_5 - let g:terminal_color_14 = g:terminal_color_6 - let g:terminal_color_15 = g:terminal_color_7 -endif - -" Tree-sitter -call s:SetHighlight('TSAttribute', s:yellow, '', '') -call s:SetHighlight('TSBoolean', s:pink, '', '') -call s:SetHighlight('TSConditional', s:cyan, '', 'italic') -call s:SetHighlight('TSConstructor', s:yellow, '', '') -call s:SetHighlight('TSConstBuiltin', s:cyan, '', '') -call s:SetHighlight('TSException', s:cyan, '', 'italic') -call s:SetHighlight('TSField', s:white, '', '') -call s:SetHighlight('TSFunction', s:blue, '', '') -call s:SetHighlight('TSFuncBuiltin', s:blue, '', '') -call s:SetHighlight('TSInclude', s:cyan, '', 'italic') -call s:SetHighlight('TSKeyword', s:purple, '', '') -call s:SetHighlight('TSKeywordOperator', s:cyan, '', 'italic') -call s:SetHighlight('TSKeywordFunction', s:purple, '', '') -call s:SetHighlight('TSKeywordReturn', s:cyan, '', 'italic') -call s:SetHighlight('TSMethod', s:blue, '', '') -call s:SetHighlight('TSOperator', s:cyan, '', '') -call s:SetHighlight('TSParameter', s:fg, '', '') -call s:SetHighlight('TSProperty', s:fg, '', '') -call s:SetHighlight('TSPunctBracket', s:cyan, '', '') -call s:SetHighlight('TSPunctDelimiter', s:cyan, '', '') -call s:SetHighlight('TSRepeat', s:cyan, '', 'italic') -call s:SetHighlight('TSTag', s:pink, '', '') -call s:SetHighlight('TSTagDelimiter', s:cyan, '', '') -call s:SetHighlight('TSTagAttribute', s:purple, '', '') -call s:SetHighlight('TSType', s:yellow, '', '') -call s:SetHighlight('TSVariable', s:fg, '', '') -call s:SetHighlight('TSVariableBuiltin', s:fg, '', '') - -" Treesitter - new syntax -if has('nvim') && (version >= 800) - call s:SetHighlight("@boolean", s:orange, '', '') - call s:SetHighlight("@conditional", s:cyan, '', '') - call s:SetHighlight("@constant", s:fg, '', '') - call s:SetHighlight("@constructor", s:yellow, '', '') - call s:SetHighlight("@keyword", s:cyan, '', '') - call s:SetHighlight("@keyword.operator", s:cyan, '', '') - call s:SetHighlight('@include', s:cyan, '', 'italic') - call s:SetHighlight("@label", s:pink, '', '') - call s:SetHighlight("@operator", s:purple, '', '') - call s:SetHighlight("@parameter", s:fg, '', '') - call s:SetHighlight("@property", s:fg, '', '') - call s:SetHighlight("@punctuation.bracket", s:cyan, '', '') - call s:SetHighlight("@punctuation.delimiter", s:cyan, '', '') - call s:SetHighlight("@punctuation.special", s:cyan, '', '') - call s:SetHighlight("@symbol", s:orange, '', '') - call s:SetHighlight("@tag", s:pink, '', '') - call s:SetHighlight("@tag.attribute", s:purple, '', '') - call s:SetHighlight("@tag.delimiter", s:cyan, '', '') - call s:SetHighlight("@type", s:yellow, '', '') - call s:SetHighlight("@variable", s:fg, '', '') - call s:SetHighlight("@variable.builtin", s:red, '', '') - call s:SetHighlight("@identifier", s:purple, '', '') - - "Markup group - call s:SetHighlight("@markup.heading", s:green, '', '') - call s:SetHighlight("@markup.list", s:cyan, '', '') - call s:SetHighlight("@markup.raw", s:paleblue, '', '') - call s:SetHighlight("@markup.link", s:cyan, '', '') - call s:SetHighlight("@markup.link.label", s:green, '', '') - call s:SetHighlight("@markup.link.url", s:blue, '', '') - call s:SetHighlight("@markup.strong", s:blue, '', '') - " Markdown - call s:SetHighlight("@markup.heading.1.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.2.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.3.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.4.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.5.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.6.marker.markdown", s:red, '', '') - call s:SetHighlight("@markup.heading.1.markdown", s:green, '', '') - call s:SetHighlight("@markup.heading.2.markdown", s:green, '', '') - call s:SetHighlight("@markup.heading.3.markdown", s:green, '', '') - call s:SetHighlight("@markup.heading.4.markdown", s:green, '', '') - call s:SetHighlight("@markup.heading.5.markdown", s:green, '', '') - call s:SetHighlight("@markup.heading.6.markdown", s:green, '', '') - call s:SetHighlight("@markup.list.markdown", s:cyan, '', '') - call s:SetHighlight("@markup.raw", s:paleblue, '', '') - call s:SetHighlight("@markup.link.markdown_inline", s:cyan, '', '') - call s:SetHighlight("@markup.link.label.markdown_inline", s:yellow, '', '') - call s:SetHighlight("@markup.link.url.markdown_inline", s:paleblue, '', '') - call s:SetHighlight("@markup.strong.markdown_inline", s:pink, '', '') - call s:SetHighlight("@markup.italic.markdown_inline", s:pink, '', 'italic') -endif - -" Diagnostics -call s:SetHighlight("DiagnosticUnnecessary",s:paleblue, "","") - -" Illuminate highlight -call s:SetHighlight("IlluminatedWordText", "", s:guides, "") -call s:SetHighlight("IlluminatedWordRead", "", s:guides, "") -call s:SetHighlight("IlluminatedWordWrite", "", s:guides, "") - -" mini.indentscope -call s:SetHighlight("MiniIndentscopeSymbol", s:paleblue, "", "") - -" DevIcons -" let s:react = { 'gui': '#20c2e3', 'cterm': 45 } -call s:SetHighlight("DevIconTs", s:cyan, "", "") -call s:SetHighlight("DevIconSpecTs", s:cyan, "", "") -call s:SetHighlight("DevIconTestTs", s:cyan, "", "") -call s:SetHighlight("DevIconTsx", s:cyan, "", "") -call s:SetHighlight("DevIconJavaScriptcyan", s:cyan, "", "") -call s:SetHighlight("DevIconTypeScriptcyan", s:cyan, "", "") -call s:SetHighlight("DevIconJsx", s:cyan, "", "") diff --git a/config/new-config-nvim/lazy-lock.json b/config/new-config-nvim/lazy-lock.json deleted file mode 100644 index 4c3a9f0..0000000 --- a/config/new-config-nvim/lazy-lock.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, - "copilot-lualine": { "branch": "main", "commit": "4cca52f4d4d6c7439c51227d8054e346ef5ff0e0" }, - "copilot.vim": { "branch": "release", "commit": "25f73977033c597d530c7ab0e211d99b60927d2d" }, - "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "gitsigns.nvim": { "branch": "main", "commit": "f4928ba14eb6c667786ac7d69927f6aee6719f1e" }, - "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, - "lazy.nvim": { "branch": "main", "commit": "c02268ac6e6aab92249d020d75efc588bd9d24fa" }, - "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "58bc9119ca273c0ce5a66fad1927ef0f617bd81b" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.indentscope": { "branch": "main", "commit": "1222393d9c5e8d92b913ccab6701a7164b21781c" }, - "nvim-autopairs": { "branch": "master", "commit": "e38c5d837e755ce186ae51d2c48e1b387c4425c6" }, - "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, - "nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" }, - "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, - "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, - "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "fa6c2a64100c6f692bbec29bbbc8ec2663c9e869" }, - "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-tree.lua": { "branch": "master", "commit": "4e396b26244444c911b73e9f2f40ae0115351fd1" }, - "nvim-treesitter": { "branch": "master", "commit": "9d252d00210ed8d43197ef048daa94e6dc821bd6" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, - "nvim-web-devicons": { "branch": "master", "commit": "e612de3d3a41a6b7be47f51e956dddabcbf419d9" }, - "oil.nvim": { "branch": "master", "commit": "71c972fbd218723a3c15afcb70421f67340f5a6d" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "schemastore.nvim": { "branch": "main", "commit": "4abc1ab13ad5031049864cba0bfaec06a908e7e5" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, - "telescope-live-grep-args.nvim": { "branch": "master", "commit": "8ad632f793fd437865f99af5684f78300dac93fb" }, - "telescope.nvim": { "branch": "master", "commit": "79552ef8488cb492e0f9d2bf3b4e808f57515e35" }, - "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, - "tokyonight.nvim": { "branch": "main", "commit": "6c30395146c246055ac3cea32d39d6b9876a1dcc" }, - "ts-error-translator.nvim": { "branch": "main", "commit": "11ae55b28bde02663b5f983f59b0e3fd9c4e845b" }, - "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, - "vim-CtrlXA": { "branch": "master", "commit": "084d00284f532eab511a771f21a184d2024a9e46" }, - "vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" }, - "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vscode-js-debug": { "branch": "main", "commit": "6e34748cc8987e36a5033899ef1c8225a4b4f99a" }, - "which-key.nvim": { "branch": "main", "commit": "c1b062ae95c3ca3e6eb87c075da991523605d79b" } -} diff --git a/config/nvim/TODO b/config/nvim/TODO deleted file mode 100644 index a7f8a14..0000000 --- a/config/nvim/TODO +++ /dev/null @@ -1,31 +0,0 @@ --[x] lsp - -[x] better keybinding maybe, navigation between widows - -[x] formating - try to havea look at some ready made distros (lunarvim, astrovim or whatever) - -[x] format on save - -[ ] show errors on the line - -[x] organize imports - -[x] auto imports - -[x] search symbols (file) - -[~] search symbols (workspase/project) --[x] telescoep - - define keybindings for quick open of the most used - - find files - - buffers - - projects --[x] projects - save and define projects to switch between --[x] remap c-k in LSP to avoid conflict with splits navigation --[x] icons --[x] vim-tree --[x] status line - file name with path, don't need full git diff info --[ ] alpha --[ ] tweak theme --[ ] navigation - -[ ] marks - -[ ] windows - -[ ] buffers - -[ ] tabs - -[ ] jump to closing/opening bracket --[ ] whichkey --[x] show entire path in statusbar/anme --[ ] other utils - diff --git a/config/new-config-nvim/colors/moonrakers.vim b/config/nvim/colors/moonrakers-old.vim similarity index 100% rename from config/new-config-nvim/colors/moonrakers.vim rename to config/nvim/colors/moonrakers-old.vim diff --git a/config/nvim/colors/moonrakers.vim b/config/nvim/colors/moonrakers.vim deleted file mode 100644 index f71b6b9..0000000 --- a/config/nvim/colors/moonrakers.vim +++ /dev/null @@ -1,468 +0,0 @@ - - -" Vim Color File -" Name: material.vim -" Maintainer: https://github.com/kaicataldo/material.vim -" License: The MIT License (MIT) - -" === Configuration === - -" Clear any other set colors -highlight clear - -if exists('syntax_on') - syntax reset -endif - -let g:colors_name = 'moonrakers' - -" === Functions === - -function! s:SetHighlight(group, fg, bg, attr) - let l:attr = a:attr - - if l:attr == 'italic' - let l:attr = '' - endif - - if empty(l:attr) - let l:attr = 'none' - endif - - if !empty(a:fg) - exec 'hi ' . a:group . ' guifg=' . a:fg.gui . ' ctermfg=' . a:fg.cterm - endif - - if !empty(a:bg) - exec 'hi ' . a:group . ' guibg=' . a:bg.gui . ' ctermbg=' . a:bg.cterm - endif - - if !empty(l:attr) - exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr - endif -endfun - -" === Color Definitions === - -" Default colors -set background=dark - -" let s:bg = { 'gui': '#263238', 'cterm': 'none' } -let s:bg = { 'gui': '#25343C', 'cterm': 'none' } -let s:fg = { 'gui': '#EFEFFF', 'cterm': 231 } -let s:invisibles = { 'gui': '#5B7386', 'cterm': 66 } -let s:caret = { 'gui': '#F7CE45', 'cterm': 220 } -let s:comments = { 'gui': '#7E90A4', 'cterm': 145 } -let s:selection = { 'gui': '#31434B', 'cterm': 239 } -let s:guides = { 'gui': '#5B7386', 'cterm': 17 } -let s:line_numbers = { 'gui': '#5B7386', 'cterm': 145 } -let s:line_highlight = { 'gui': '#232E34', 'cterm': 235 } -let s:white = { 'gui': '#ffffff', 'cterm': 231 } -let s:black = { 'gui': '#000000', 'cterm': 232 } -let s:red = { 'gui': '#F7454B', 'cterm': 203 } -let s:orange = { 'gui': '#F1891E', 'cterm': 209 } -let s:yellow = { 'gui': '#FFD95C', 'cterm': 11 } -let s:green = { 'gui': '#C0E076', 'cterm': 2 } -let s:cyan = { 'gui': '#8ECBD3', 'cterm': 117 } -let s:blue = { 'gui': '#82aaff', 'cterm': 111 } -let s:purple = { 'gui': '#C292BD', 'cterm': 176 } -let s:brown = { 'gui': '#00FF00', 'cterm': 137 }"* -let s:pink = { 'gui': '#DA737A', 'cterm': 204 }"* -let s:violet = { 'gui': '#DA737A', 'cterm': 139 } - - -" === Highlights === -" -" Vim Editor -call s:SetHighlight('ColorColumn', '', s:invisibles, '') -call s:SetHighlight('Cursor', s:bg, s:caret, '') -call s:SetHighlight('CursorColumn', '', s:line_highlight, '') -call s:SetHighlight('CursorLine', '', s:line_highlight, '') -call s:SetHighlight('CursorLineNr', s:comments, '', '') -call s:SetHighlight('Directory', s:blue, '', '') -call s:SetHighlight('DiffAdd', s:green, s:bg, '') -call s:SetHighlight('DiffDelete', s:red, s:bg, '') -call s:SetHighlight('DiffChange', s:yellow, s:bg, '') -call s:SetHighlight('DiffText', s:orange, s:bg, '') -call s:SetHighlight('ErrorMsg', s:bg, s:red, 'bold') -call s:SetHighlight('FoldColumn', s:line_numbers, s:bg, '') -call s:SetHighlight('Folded', s:brown, s:bg, 'bold') -call s:SetHighlight('LineNr', s:line_numbers, '', '') -call s:SetHighlight('MatchParen', s:caret, s:bg, 'bold') -call s:SetHighlight('ModeMsg', s:green, '', '') -call s:SetHighlight('MoreMsg', s:green, '', '') -call s:SetHighlight('NonText', s:comments, '', '') -call s:SetHighlight('Normal', s:fg, s:bg, '') -call s:SetHighlight('Pmenu', s:fg, s:selection, '') -call s:SetHighlight('PmenuSel', s:bg, s:cyan, '') -call s:SetHighlight('PmenuSbar', '', s:selection, '') -call s:SetHighlight('PmenuThumb', '', s:comments, '') -call s:SetHighlight('Question', s:blue, '', '') -call s:SetHighlight('IncSearch', s:white, s:comments, 'none') -call s:SetHighlight('Search', s:white, s:comments, 'none') -call s:SetHighlight('SignColumn', s:fg, s:bg, '') -call s:SetHighlight('SpecialKey', s:comments, '', '') -call s:SetHighlight('SpellCap', s:blue, '', 'undercurl') -call s:SetHighlight('SpellBad', s:red, '', 'undercurl') -call s:SetHighlight('StatusLine', s:fg, s:selection, '') -call s:SetHighlight('StatusLineNC', s:comments, s:selection, '') -call s:SetHighlight('StatusLineTerm', s:bg, s:green, '') -call s:SetHighlight('StatusLineTermNC', s:bg, s:green, '') -call s:SetHighlight('TabLine', s:fg, s:line_numbers, '') -call s:SetHighlight('TabLineFill', s:fg, s:selection, '') -call s:SetHighlight('TabLineSel', s:bg, s:cyan, '') -call s:SetHighlight('Title', s:green, '', '') -call s:SetHighlight('VertSplit', s:comments, '', '') -call s:SetHighlight('Visual', s:fg, s:selection, '') -call s:SetHighlight('WarningMsg', s:red, '', '') -call s:SetHighlight('WildMenu', s:bg, s:cyan, '') -" -" " Syntax -call s:SetHighlight('Comment', s:comments, '', 'italic') -call s:SetHighlight('Conceal', s:brown, s:bg, '') -call s:SetHighlight('Constant', s:orange, '', '') -call s:SetHighlight('String', s:green, '', '') -call s:SetHighlight('Character', s:green, '', '') -call s:SetHighlight('Identifier', s:red, '', '') -call s:SetHighlight('Function', s:blue, '', '') -call s:SetHighlight('Statement', s:purple, '', '') -call s:SetHighlight('Operator', s:cyan, '', '') -call s:SetHighlight('PreProc', s:cyan, '', '') -call s:SetHighlight('Include', s:blue, '', '') -call s:SetHighlight('Define', s:purple, '', '') -call s:SetHighlight('Macro', s:purple, '', '') -call s:SetHighlight('Type', s:yellow, '', '') -call s:SetHighlight('Structure', s:cyan, '', '') -call s:SetHighlight('Special', s:violet, '', '') -call s:SetHighlight('Underlined', s:blue, '', '') -call s:SetHighlight('Error', s:bg, s:red, '') -call s:SetHighlight('Todo', s:orange, s:bg, 'italic') -" -" " Legacy groups for official git.vim and diff.vim syntax -hi! link diffFile DiffAdd -hi! link diffNewFile DiffDelete -hi! link diffAdded DiffAdd -hi! link diffChanged DiffChange -hi! link diffLine DiffChange -hi! link diffRemoved DiffDelete -" -" " Git Commit Messages -call s:SetHighlight('gitcommitHeader', s:purple, '', '') -call s:SetHighlight('gitcommitUnmerged', s:green, '', '') -call s:SetHighlight('gitcommitSelectedFile', s:green, '', '') -call s:SetHighlight('gitcommitDiscardedFile', s:red, '', '') -call s:SetHighlight('gitcommitUnmergedFile', s:yellow, '', '') -call s:SetHighlight('gitcommitSelectedType', s:green, '', '') -call s:SetHighlight('gitcommitSummary', s:blue, '', '') -call s:SetHighlight('gitcommitDiscardedType', s:red, '', '') -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitUntracked gitcommitComment -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitSelected gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile -" -" " Javascript -call s:SetHighlight('javaScriptBraces', s:fg, '', '') -call s:SetHighlight('javaScriptNull', s:orange, '', '') -call s:SetHighlight('javaScriptIdentifier', s:purple, '', '') -call s:SetHighlight('javaScriptNumber', s:orange, '', '') -call s:SetHighlight('javaScriptRequire', s:cyan, '', '') -call s:SetHighlight('javaScriptReserved', s:purple, '', '') -" -" Tree-sitter -call s:SetHighlight('TSAttribute', s:orange, '', '') -call s:SetHighlight('TSBoolean', s:pink, '', '') -call s:SetHighlight('TSConditional', s:blue, '', 'italic') -call s:SetHighlight('TSConstructor', s:yellow, '', '') -call s:SetHighlight('TSConstBuiltin', s:blue, '', '') -call s:SetHighlight('TSException', s:blue, '', 'italic') -call s:SetHighlight('TSField', s:white, '', '') -call s:SetHighlight('TSFunction', s:blue, '', '') -call s:SetHighlight('TSFuncBuiltin', s:blue, '', '') -call s:SetHighlight('TSInclude', s:blue, '', 'italic') -call s:SetHighlight('TSKeyword', s:purple, '', '') -call s:SetHighlight('TSKeywordOperator', s:cyan, '', 'italic') -call s:SetHighlight('TSKeywordFunction', s:purple, '', '') -call s:SetHighlight('TSKeywordReturn', s:blue, '', 'italic') -call s:SetHighlight('TSMethod', s:blue, '', '') -call s:SetHighlight('TSOperator', s:cyan, '', '') -call s:SetHighlight('TSParameter', s:fg, '', '') -call s:SetHighlight('TSProperty', s:fg, '', '') -call s:SetHighlight('TSPunctBracket', s:cyan, '', '') -call s:SetHighlight('TSPunctDelimiter', s:cyan, '', '') -call s:SetHighlight('TSRepeat', s:cyan, '', 'italic') -call s:SetHighlight('TSTag', s:pink, '', '') -call s:SetHighlight('TSTagDelimiter', s:cyan, '', '') -call s:SetHighlight('TSTagAttribute', s:purple, '', '') -call s:SetHighlight('TSType', s:yellow, '', '') -call s:SetHighlight('TSVariable', s:fg, '', '') -call s:SetHighlight('TSVariableBuiltin', s:fg, '', '') -" -" " vim-gitgutter -call s:SetHighlight('GitGutterAdd', s:green, '', '') -call s:SetHighlight('GitGutterChange', s:yellow, '', '') -call s:SetHighlight('GitGutterChangeDelete', s:orange, '', '') -call s:SetHighlight('GitGutterDelete', s:red, '', '') -" -" " lukas-reineke/indent-blankline -call s:SetHighlight('IndentBlanklineIndent1', s:line_numbers, '', '') -call s:SetHighlight('IndentBlanklineContextChar', s:cyan, '', '') -" -" " pangloss/vim-javascript -" call s:SetHighlight('jsArrowFunction', s:purple, '', '') -" call s:SetHighlight('jsAsyncKeyword', s:purple, '', '') -" call s:SetHighlight('jsBooleanTrue', s:orange, '', '') -" call s:SetHighlight('jsBooleanFalse', s:orange, '', '') -" call s:SetHighlight('jsBrackets', s:pink, '', '') -" call s:SetHighlight('jsCatch', s:cyan, '', 'italic') -" call s:SetHighlight('jsClassBraces', s:cyan, '', '') -" call s:SetHighlight('jsClassDefinition', s:yellow, '', '') -" call s:SetHighlight('jsClassFuncName', s:pink, '', '') -" call s:SetHighlight('jsClassProperty', s:pink, '', '') -" call s:SetHighlight('jsClassKeyword', s:purple, '', '') -" call s:SetHighlight('jsConditional', s:cyan, '', 'italic') -" call s:SetHighlight('jsDocParam', s:green, '', '') -" call s:SetHighlight('jsDocTags', s:cyan, '', '') -" call s:SetHighlight('jsDot', s:cyan, '', '') -" call s:SetHighlight('jsException', s:cyan, '', 'italic') -" call s:SetHighlight('jsExceptions', s:yellow, '', '') -" call s:SetHighlight('jsExport', s:cyan, '', 'italic') -" call s:SetHighlight('jsExportDefault', s:cyan, '', 'italic') -" call s:SetHighlight('jsExtendsKeyword', s:purple, '', '') -" call s:SetHighlight('jsFinally', s:cyan, '', 'italic') -" call s:SetHighlight('jsFinallyBraces', s:cyan, '', '') -" call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '') -" call s:SetHighlight('jsForAwait', s:cyan, '', 'italic') -" call s:SetHighlight('jsFrom', s:cyan, '', 'italic') -" call s:SetHighlight('jsFuncBraces', s:cyan, '', '') -" call s:SetHighlight('jsFuncCall', s:blue, '', '') -" call s:SetHighlight('jsFuncParens', s:cyan, '', '') -" call s:SetHighlight('jsFunction', s:purple, '', '') -" call s:SetHighlight('jsFunctionKey', s:pink, '', '') -" call s:SetHighlight('jsGlobalObjects', s:yellow, '', '') -" call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '') -" call s:SetHighlight('jsIfElseBraces', s:cyan, '', '') -" call s:SetHighlight('jsImport', s:cyan, '', 'italic') -" call s:SetHighlight('jsModuleAs', s:cyan, '', 'italic') -" call s:SetHighlight('jsModuleBraces', s:cyan, '', '') -" call s:SetHighlight('jsNull', s:cyan, '', '') -" call s:SetHighlight('jsNoise', s:cyan, '', '') -" call s:SetHighlight('jsObjectBraces', s:cyan, '', '') -" call s:SetHighlight('jsObjectColon', s:cyan, '', '') -" call s:SetHighlight('jsObjectKey', s:pink, '', '') -" call s:SetHighlight('jsObjectSeparator', s:cyan, '', '') -" call s:SetHighlight('jsParens', s:pink, '', '') -" call s:SetHighlight('jsRepeat', s:cyan, '', 'italic') -" call s:SetHighlight('jsReturn', s:cyan, '', 'italic') -" call s:SetHighlight('jsStorageClass', s:purple, '', '') -" call s:SetHighlight('jsTemplateBraces', s:cyan, '', '') -" call s:SetHighlight('jsTemplateExpression', s:fg, '', '') -" call s:SetHighlight('jsTemplateString', s:green, '', '') -" call s:SetHighlight('jsThis', s:cyan, '', 'italic') -" call s:SetHighlight('jsTry', s:cyan, '', 'italic') -" call s:SetHighlight('jsTryCatchBraces', s:cyan, '', '') -" call s:SetHighlight('jsUndefined', s:cyan, '', '') -" -" " MaxMEllon/vim-jsx-pretty -" call s:SetHighlight('jsxTag', s:cyan, '', '') -" call s:SetHighlight('jsxTagName', s:pink, '', '') -" call s:SetHighlight('jsxComponentName', s:yellow, '', '') -" call s:SetHighlight('jsxCloseTag', s:cyan, '', '') -" call s:SetHighlight('jsxEscapeJs', s:fg, '', '') -" call s:SetHighlight('jsxCloseString', s:cyan, '', '') -" call s:SetHighlight('jsxAttrib', s:purple, '', 'italic') -" call s:SetHighlight('jsxString', s:green, '', '') -" call s:SetHighlight('jsxEqual', s:purple, '', '') -" call s:SetHighlight('jsxDot', s:cyan, '', '') -" call s:SetHighlight('jsxSpreadOperator', s:purple, '', '') -" call s:SetHighlight('jsxBraces', s:cyan, '', '') -" call s:SetHighlight('jsxNamespace', s:cyan, '', '') -" -" " JSON -" call s:SetHighlight('jsonBraces', s:fg, '', '') -" -" " CSS -" call s:SetHighlight('cssAttrComma', s:fg, '', '') -" call s:SetHighlight('cssPseudoClassId', s:yellow, '', '') -" call s:SetHighlight('cssBraces', s:fg, '', '') -" call s:SetHighlight('cssClassName', s:yellow, '', '') -" call s:SetHighlight('cssClassNameDot', s:yellow, '', '') -" call s:SetHighlight('cssFunctionName', s:blue, '', '') -" call s:SetHighlight('cssImportant', s:cyan, '', '') -" call s:SetHighlight('cssIncludeKeyword', s:purple, '', '') -" call s:SetHighlight('cssTagName', s:red, '', '') -" call s:SetHighlight('cssMediaType', s:orange, '', '') -" call s:SetHighlight('cssProp', s:fg, '', '') -" call s:SetHighlight('cssSelectorOp', s:cyan, '', '') -" call s:SetHighlight('cssSelectorOp2', s:cyan, '', '') -" -" " Sass -" call s:SetHighlight('sassAmpersand', s:red, '', '') -" call s:SetHighlight('sassClassChar', s:yellow, '', '') -" call s:SetHighlight('sassMixinName', s:blue, '', '') -" call s:SetHighlight('sassVariable', s:purple, '', '') -" -" " Less -" call s:SetHighlight('lessAmpersand', s:red, '', '') -" call s:SetHighlight('lessClassChar', s:yellow, '', '') -" call s:SetHighlight('lessCssAttribute', s:fg, '', '') -" call s:SetHighlight('lessFunction', s:blue, '', '') -" call s:SetHighlight('lessVariable', s:purple, '', '') -" -" " HTML -" call s:SetHighlight('htmlTagName', s:pink, '', '') -" call s:SetHighlight('htmlEndTag', s:cyan, '', '') -" call s:SetHighlight('htmlTag', s:cyan, '', '') -" call s:SetHighlight('htmlSpecialTagName', s:yellow, '', '') -" call s:SetHighlight('htmlArg', s:purple, '', 'italic') -" call s:SetHighlight('htmlTitle', s:fg, '', '') -" call s:SetHighlight('htmlLink', s:fg, '', '') -" "" Consistency with plasticboy/vim-markdown -" call s:SetHighlight('htmlBold', s:pink, '', 'bold') -" call s:SetHighlight('htmlH1', s:yellow, '', '') -" call s:SetHighlight('htmlH2', s:yellow, '', '') -" call s:SetHighlight('htmlH3', s:yellow, '', '') -" call s:SetHighlight('htmlH4', s:yellow, '', '') -" call s:SetHighlight('htmlH5', s:yellow, '', '') -" call s:SetHighlight('htmlH6', s:yellow, '', '') -" call s:SetHighlight('htmlItalic', s:pink, '', 'italic') -" -" " XML -" call s:SetHighlight('xmlAttrib', s:purple, '', 'italic') -" call s:SetHighlight('xmlEndTag', s:cyan, '', '') -" call s:SetHighlight('xmlTag', s:cyan, '', '') -" call s:SetHighlight('xmlTagName', s:pink, '', '') -" -" " Golang -" call s:SetHighlight('goFunctionCall', s:blue, '', '') -" call s:SetHighlight('goReceiverType', s:green, '', '') -" call s:SetHighlight('goParamName', s:orange, '', '') -" call s:SetHighlight('goParamType', s:green, '', '') -" call s:SetHighlight('goTypeDecl', s:purple, '', '') -" call s:SetHighlight('goTypeName', s:yellow, '', '') -" call s:SetHighlight('goBuiltins', s:red, '', '') -" call s:SetHighlight('goType', s:purple, '', '') -" call s:SetHighlight('goSignedInts', s:purple, '', '') -" call s:SetHighlight('goUnsignedInts', s:purple, '', '') -" call s:SetHighlight('goFloats', s:purple, '', '') -" call s:SetHighlight('goComplexes', s:purple, '', '') -" -" " Ruby -" call s:SetHighlight('rubyInterpolation', s:cyan, '', '') -" call s:SetHighlight('rubyInterpolationDelimiter', s:violet, '', '') -" call s:SetHighlight('rubyRegexp', s:cyan, '', '') -" call s:SetHighlight('rubyRegexpDelimiter', s:violet, '', '') -" call s:SetHighlight('rubyStringDelimiter', s:green, '', '') -" -" " Rust -" call s:SetHighlight('CocRustTypeHint', s:invisibles, '', '') -" call s:SetHighlight('CocRustChainingHint', s:invisibles, '', '') -" -" " TeX -" call s:SetHighlight('texBeginEndName', s:blue, '', '') -" call s:SetHighlight('texMathMatcher', s:blue, '', '') -" call s:SetHighlight('texCite', s:green, '', '') -" call s:SetHighlight('texRefZone', s:green, '', '') -" call s:SetHighlight('texInputFile', s:green, '', '') -" call s:SetHighlight('texMath', s:orange, '', '') -" call s:SetHighlight('texMathOper', s:yellow, '', '') -" -" " Markdown -" call s:SetHighlight('markdownBold', s:pink, '', 'bold') -" call s:SetHighlight('markdownBoldDelimiter', s:cyan, '', '') -" call s:SetHighlight('markdownCode', s:blue, '', '') -" call s:SetHighlight('markdownCodeDelimiter', s:green, '', '') -" call s:SetHighlight('markdownHeadingDelimiter', s:cyan, '', '') -" call s:SetHighlight('markdownH1', s:yellow, '', '') -" call s:SetHighlight('markdownH2', s:yellow, '', '') -" call s:SetHighlight('markdownH3', s:yellow, '', '') -" call s:SetHighlight('markdownH4', s:yellow, '', '') -" call s:SetHighlight('markdownH5', s:yellow, '', '') -" call s:SetHighlight('markdownH6', s:yellow, '', '') -" call s:SetHighlight('markdownItalic', s:pink, '', 'italic') -" call s:SetHighlight('markdownItalicDelimiter', s:cyan, '', '') -" call s:SetHighlight('markdownLinkDelimiter', s:cyan, '', '') -" call s:SetHighlight('markdownLinkText', s:green, '', '') -" call s:SetHighlight('markdownLinkTextDelimiter', s:cyan, '', '') -" call s:SetHighlight('markdownListMarker', s:cyan, '', '') -" call s:SetHighlight('markdownUrl', s:pink, '', 'underline') -" call s:SetHighlight('markdownUrlTitleDelimiter', s:green, '', '') -" -" " plasticboy/vim-markdown -" call s:SetHighlight('mkdBold', s:cyan, '', '') -" call s:SetHighlight('mkdCodeStart', s:green, '', '') -" call s:SetHighlight('mkdCodeDelimiter', s:cyan, '', '') -" call s:SetHighlight('mkdDelimiter', s:cyan, '', '') -" call s:SetHighlight('mkdHeading', s:cyan, '', '') -" call s:SetHighlight('mkdItalic', s:cyan, '', '') -" call s:SetHighlight('mkdLink', s:green, '', '') -" call s:SetHighlight('mkdListItem', s:cyan, '', '') -" call s:SetHighlight('mkdURL', s:pink, '', 'underline') -" -" " vimwiki/vimwiki - call s:SetHighlight('VimwikiBold', s:pink, '', 'bold') - call s:SetHighlight('VimwikiBoldChar', s:cyan, '', 'bold') - call s:SetHighlight('VimwikiDelText', s:pink, '', 'strikethrough') - call s:SetHighlight('VimwikiDelTextChar', s:cyan, '', '') - call s:SetHighlight('VimwikiCode', s:green, '', '') - call s:SetHighlight('VimwikiCodeChar', s:cyan, '', '') - call s:SetHighlight('VimwikiHeader1', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader2', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader3', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader4', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader5', s:yellow, '', '') - call s:SetHighlight('VimwikiHeader6', s:yellow, '', '') - call s:SetHighlight('VimwikiHeaderChar', s:cyan, '', '') - call s:SetHighlight('VimwikiImage', s:cyan, '', '') - call s:SetHighlight('VimwikiItalic', s:pink, '', 'italic') - call s:SetHighlight('VimwikiItalicChar', s:cyan, '', '') - call s:SetHighlight('VimwikiLink', s:green, '', 'underline') - call s:SetHighlight('VimwikiListTodo', s:cyan, '', '') - call s:SetHighlight('VimwikiPre', s:green, '', '') - call s:SetHighlight('VimwikiWebLink1', s:green, '', 'underline') -" -" " vim-signify -" hi link SignifySignAdd GitGutterAdd -" hi link SignifySignChange GitGutterChange -" hi link SignifySignDelete GitGutterDelete -" -" " vim-better-whitespace -" call s:SetHighlight('ExtraWhitespace', '', s:red, '') -" -" " NERDTree -if has('nvim') - call s:SetHighlight('NERDTreeFile', s:fg, '', '') -endif -" -" " coc.nvim -" call s:SetHighlight('CocMarkdownLink', s:purple, '', '') -" call s:SetHighlight('CocErrorSign', s:red, '', '') -" call s:SetHighlight('CocWarningSign', s:orange, '', '') -" call s:SetHighlight('CocHintSign', s:yellow, '', '') -" call s:SetHighlight('CocInfoSign', s:green, '', '') -" -" " Neovim terminal colors -if has('nvim') - let g:terminal_color_background = s:bg.gui - let g:terminal_color_foreground = s:fg.gui - let g:terminal_color_0 = s:comments.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:white.gui - let g:terminal_color_8 = g:terminal_color_0 - let g:terminal_color_9 = g:terminal_color_1 - let g:terminal_color_10 = g:terminal_color_2 - let g:terminal_color_11 = g:terminal_color_3 - let g:terminal_color_12 = g:terminal_color_4 - let g:terminal_color_13 = g:terminal_color_5 - let g:terminal_color_14 = g:terminal_color_6 - let g:terminal_color_15 = g:terminal_color_7 -endif - - diff --git a/config/nvim/ftdetect/njk.vim b/config/nvim/ftdetect/njk.vim deleted file mode 100644 index 1a3d89a..0000000 --- a/config/nvim/ftdetect/njk.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.njk setfiletype html diff --git a/config/new-config-nvim/init.lua b/config/nvim/init.lua similarity index 100% rename from config/new-config-nvim/init.lua rename to config/nvim/init.lua diff --git a/config/nvim/init.vim b/config/nvim/init.vim deleted file mode 100644 index 282600c..0000000 --- a/config/nvim/init.vim +++ /dev/null @@ -1,40 +0,0 @@ -scriptencoding utf-8 - -" Config taken from https://github.com/LunarVim/Neovim-from-scratch -lua << EOF --- Basics -require "user.options" -require "user.colorscheme" -require "user.keymaps" -require "user.plugins" -require "user.treesitter" - --- Autocompletions -require "user.cmp" - --- Language server -require "user.lsp" - --- Github Copilot -require "user.copilot" - --- Utility plugins -require "user.autopairs" -require "user.comment" -require "user.gitsigns" -require "user.telescope" -require "user.project" -require "user.nvim-tree" -require "user.lualine" -require "user.impatient" -require "user.indentline" -require "user.emmet" -require "user.ctrlxa" -require "user.colorizer" --- require "user.alpha" -require "user.whichkey" --- require "user.autocommands" -require "user.dap" -require "user.neotest" -require "user.doge" -EOF diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json new file mode 100644 index 0000000..369e710 --- /dev/null +++ b/config/nvim/lazy-lock.json @@ -0,0 +1,56 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, + "copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" }, + "copilot.vim": { "branch": "release", "commit": "782461159655b259cff10ecff05efa761e3d4764" }, + "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, + "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, + "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lazygit.nvim": { "branch": "main", "commit": "2432b447483f42ff2e18b2d392cb2bb27e495c08" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" }, + "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, + "nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" }, + "nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" }, + "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, + "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" }, + "nvim-lspconfig": { "branch": "master", "commit": "dd329912c8d446240584a2dbcd3802af3a19105a" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-tree.lua": { "branch": "master", "commit": "8405ecfbd6bb08a94ffc9c68fef211eea56e8a3b" }, + "nvim-treesitter": { "branch": "master", "commit": "621f5901f0b3e762cc4c5ed0f9246cf1495193ad" }, + "nvim-treesitter-context": { "branch": "master", "commit": "3d5390c49e3f8fe457b376df2a49aa39d75b7911" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, + "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, + "nx.nvim": { "branch": "main", "commit": "f8a3a21b3d540889401a40d1f2803083794c0372" }, + "oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "schemastore.nvim": { "branch": "main", "commit": "efa0466f9f7971256ad5da010832180fc7d8996b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" }, + "telescope.nvim": { "branch": "master", "commit": "b324469959908c1c7434eb65d80e87895e6828f7" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" }, + "ts-error-translator.nvim": { "branch": "main", "commit": "11ae55b28bde02663b5f983f59b0e3fd9c4e845b" }, + "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, + "vim-CtrlXA": { "branch": "master", "commit": "084d00284f532eab511a771f21a184d2024a9e46" }, + "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }, + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vscode-js-debug": { "branch": "main", "commit": "6e34748cc8987e36a5033899ef1c8225a4b4f99a" }, + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } +} diff --git a/config/new-config-nvim/lua/autocommands.lua b/config/nvim/lua/autocommands.lua similarity index 100% rename from config/new-config-nvim/lua/autocommands.lua rename to config/nvim/lua/autocommands.lua diff --git a/config/new-config-nvim/lua/custom-commands.lua b/config/nvim/lua/custom-commands.lua similarity index 100% rename from config/new-config-nvim/lua/custom-commands.lua rename to config/nvim/lua/custom-commands.lua diff --git a/config/new-config-nvim/lua/keymaps.lua b/config/nvim/lua/keymaps.lua similarity index 100% rename from config/new-config-nvim/lua/keymaps.lua rename to config/nvim/lua/keymaps.lua diff --git a/config/new-config-nvim/lua/lazy-bootstrap.lua b/config/nvim/lua/lazy-bootstrap.lua similarity index 100% rename from config/new-config-nvim/lua/lazy-bootstrap.lua rename to config/nvim/lua/lazy-bootstrap.lua diff --git a/config/new-config-nvim/lua/lazy-plugins.lua b/config/nvim/lua/lazy-plugins.lua similarity index 83% rename from config/new-config-nvim/lua/lazy-plugins.lua rename to config/nvim/lua/lazy-plugins.lua index b790d2f..8a60d75 100644 --- a/config/new-config-nvim/lua/lazy-plugins.lua +++ b/config/nvim/lua/lazy-plugins.lua @@ -13,17 +13,41 @@ require("lazy").setup({ -- library used by other plugins { "nvim-lua/plenary.nvim", lazy = true }, + -- better types when editing config files in lua + { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + { path = "luvit-meta/library", words = { "vim%.uv" } }, + plugins = { "nvim-dap-ui", "nvim-treesitter", "plenary.nvim", "telescope.nvim" }, + }, + }, + }, -- Colorschemes + -- { "marko-cerovac/material.nvim", lazy = true }, + -- { + -- dir = "~/Documents/WebDev/moonrakers-theme", + -- name = "moonrakers", + -- -- lazy = true, + -- priority = 1000, + -- opts = {}, + -- config = function() + -- vim.cmd.colorscheme("moonrakers") + -- end, + -- }, require("plugins/colorscheme"), -- Utility plugins "tpope/vim-surround", -- auto surround for brackets and quotes + "tpope/vim-repeat", { "windwp/nvim-autopairs", opts = {} }, -- automatically add closing brackets and quotes require("plugins/ctrlxa"), require("plugins/which-key"), require("plugins/oil"), require("plugins/treesitter"), + require("plugins/colorizer"), -- UI related plugins require("plugins/indentline"), -- show indent lines and highlight curent indent level @@ -38,6 +62,7 @@ require("lazy").setup({ -- Git related plugins require("plugins/gitsigns"), + require("plugins/lazygit"), require("plugins/fugitive"), -- LSP related plugins for IDE like capabilities @@ -49,7 +74,9 @@ require("lazy").setup({ -- better TS errors { "dmmulroy/ts-error-translator.nvim", opts = {} }, + -- Other plugins require("plugins/copilot"), + require("plugins/nx"), -- notify -- Dashboard diff --git a/config/nvim/lua/lsp/lsp-installer.lua b/config/nvim/lua/lsp/lsp-installer.lua deleted file mode 100644 index bd3496e..0000000 --- a/config/nvim/lua/lsp/lsp-installer.lua +++ /dev/null @@ -1,17 +0,0 @@ -local lsp_installer = require("nvim-lsp-installer") - --- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished --- or if the server is already installed). -lsp_installer.on_server_ready(function(server) - local opts = {} - - -- (optional) Customize the options passed to the server - -- if server.name == "tsserver" then - -- opts.root_dir = function() ... end - -- end - - -- This setup() function will take the provided server configuration and decorate it with the necessary properties - -- before passing it onwards to lspconfig. - -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md - server:setup(opts) -end) diff --git a/config/new-config-nvim/lua/options.lua b/config/nvim/lua/options.lua similarity index 100% rename from config/new-config-nvim/lua/options.lua rename to config/nvim/lua/options.lua diff --git a/config/new-config-nvim/lua/plugins/cmp.lua b/config/nvim/lua/plugins/cmp.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/cmp.lua rename to config/nvim/lua/plugins/cmp.lua diff --git a/config/nvim/lua/plugins/colorizer.lua b/config/nvim/lua/plugins/colorizer.lua new file mode 100644 index 0000000..540452e --- /dev/null +++ b/config/nvim/lua/plugins/colorizer.lua @@ -0,0 +1,6 @@ +return { + { + "norcalli/nvim-colorizer.lua", + opts = {}, + }, +} diff --git a/config/new-config-nvim/lua/plugins/colorscheme.lua b/config/nvim/lua/plugins/colorscheme.lua similarity index 73% rename from config/new-config-nvim/lua/plugins/colorscheme.lua rename to config/nvim/lua/plugins/colorscheme.lua index 4fabae1..2825274 100644 --- a/config/new-config-nvim/lua/plugins/colorscheme.lua +++ b/config/nvim/lua/plugins/colorscheme.lua @@ -7,19 +7,23 @@ return { "folke/tokyonight.nvim", priority = 1000, -- Make sure to load this before all the other start plugins. init = function() - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. + -- # Tokyonight vim.cmd.colorscheme("tokyonight-storm") - -- vim.cmd.colorscheme("zellner") - - -- You can configure highlights by doing something like: vim.cmd.hi("Comment gui=none") vim.api.nvim_set_hl( 0, "DiagnosticDeprecated", { strikethrough = true, fg = "#a0a0a0", cterm = { strikethrough = true } } ) + -- + -- # Material + -- vim.cmd.colorscheme("material") + -- + -- # Zellner - light for projector + -- vim.cmd.colorscheme("zellner") + + -- Custom color scheme + -- vim.cmd.colorscheme("moonrakers") end, }, } diff --git a/config/new-config-nvim/lua/plugins/comments.lua b/config/nvim/lua/plugins/comments.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/comments.lua rename to config/nvim/lua/plugins/comments.lua diff --git a/config/new-config-nvim/lua/plugins/copilot.lua b/config/nvim/lua/plugins/copilot.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/copilot.lua rename to config/nvim/lua/plugins/copilot.lua diff --git a/config/new-config-nvim/lua/plugins/ctrlxa.lua b/config/nvim/lua/plugins/ctrlxa.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/ctrlxa.lua rename to config/nvim/lua/plugins/ctrlxa.lua diff --git a/config/new-config-nvim/lua/plugins/debugging.lua b/config/nvim/lua/plugins/debugging.lua similarity index 93% rename from config/new-config-nvim/lua/plugins/debugging.lua rename to config/nvim/lua/plugins/debugging.lua index 7043dc6..cdd26d5 100644 --- a/config/new-config-nvim/lua/plugins/debugging.lua +++ b/config/nvim/lua/plugins/debugging.lua @@ -80,6 +80,18 @@ return { console = "integratedTerminal", internalConsoleOptions = "neverOpen", }, + { + type = "pwa-chrome", + name = "Launch Chrome to debug React on port 3000", + request = "launch", + url = "http://localhost:8023", + sourceMaps = true, + protocol = "inspector", + port = 9222, + webRoot = "${workspaceFolder}/src", + -- skip files from vite's hmr + skipFiles = { "**/node_modules/**/*", "**/@vite/*", "**/src/client/*", "**/src/*" }, + }, { type = "pwa-chrome", name = "Launch Chrome to debug React on port 3000", @@ -163,7 +175,7 @@ return { end require("dapui").setup() - require("nvim-dap-virtual-text").setup() + require("nvim-dap-virtual-text").setup({}) local dap, dapui = require("dap"), require("dapui") dap.listeners.after.event_initialized["dapui_config"] = function() diff --git a/config/new-config-nvim/lua/plugins/formatting.lua b/config/nvim/lua/plugins/formatting.lua similarity index 80% rename from config/new-config-nvim/lua/plugins/formatting.lua rename to config/nvim/lua/plugins/formatting.lua index 7980497..4550568 100644 --- a/config/new-config-nvim/lua/plugins/formatting.lua +++ b/config/nvim/lua/plugins/formatting.lua @@ -33,15 +33,6 @@ return { notify_on_error = false, notify_no_formatters = true, }) - - -- TODO: change keybinding - vim.keymap.set({ "n", "v" }, "mp", function() - conform.format({ - lsp_fallback = true, - async = false, - timeout_ms = 500, - }) - end, { desc = "Format file or range (in visual mode)" }) end, }, } diff --git a/config/new-config-nvim/lua/plugins/fugitive.lua b/config/nvim/lua/plugins/fugitive.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/fugitive.lua rename to config/nvim/lua/plugins/fugitive.lua diff --git a/config/new-config-nvim/lua/plugins/gitsigns.lua b/config/nvim/lua/plugins/gitsigns.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/gitsigns.lua rename to config/nvim/lua/plugins/gitsigns.lua diff --git a/config/new-config-nvim/lua/plugins/indentline.lua b/config/nvim/lua/plugins/indentline.lua similarity index 98% rename from config/new-config-nvim/lua/plugins/indentline.lua rename to config/nvim/lua/plugins/indentline.lua index ed82ab9..214a480 100644 --- a/config/new-config-nvim/lua/plugins/indentline.lua +++ b/config/nvim/lua/plugins/indentline.lua @@ -38,7 +38,7 @@ return { return 0 end, }, - symbol = "▏", + symbol = "│", options = { try_as_border = true }, }, init = function() diff --git a/config/nvim/lua/plugins/lazygit.lua b/config/nvim/lua/plugins/lazygit.lua new file mode 100644 index 0000000..a0488cf --- /dev/null +++ b/config/nvim/lua/plugins/lazygit.lua @@ -0,0 +1,19 @@ +return { + { + "kdheepak/lazygit.nvim", + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + vim.g.lazygit_floating_window_scaling_factor = 0.95 -- scaling factor for floating window + end, + }, +} diff --git a/config/new-config-nvim/lua/plugins/linting.lua b/config/nvim/lua/plugins/linting.lua similarity index 96% rename from config/new-config-nvim/lua/plugins/linting.lua rename to config/nvim/lua/plugins/linting.lua index 33df72b..9a7167c 100644 --- a/config/new-config-nvim/lua/plugins/linting.lua +++ b/config/nvim/lua/plugins/linting.lua @@ -65,9 +65,9 @@ return { end, }) - vim.keymap.set("n", "l", function() + vim.keymap.set("n", "bl", function() lint.try_lint(nil, { ignore_errors = true }) - end, { desc = "Trigger linting for current file" }) + end, { desc = "[L]int current buffer" }) end, }, } diff --git a/config/new-config-nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua similarity index 91% rename from config/new-config-nvim/lua/plugins/lsp.lua rename to config/nvim/lua/plugins/lsp.lua index 30f313e..9dbadb9 100644 --- a/config/new-config-nvim/lua/plugins/lsp.lua +++ b/config/nvim/lua/plugins/lsp.lua @@ -50,6 +50,15 @@ return { { name = "DiagnosticSignInfo", text = "", priority = 40 }, } + local virtual_text = { + spacing = 2, + source = "if_many", + -- this will set set the prefix to a function that returns the diagnostics icon based on the severity + -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported + -- prefix = "icons", + severity = vim.diagnostic.severity.ERROR, + } + for _, sign in ipairs(signs) do vim.fn.sign_define( sign.name, @@ -61,14 +70,7 @@ return { underline = true, update_in_insert = false, severity_sort = true, - virtual_text = { - spacing = 2, - source = "if_many", - -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported - -- prefix = "icons", - severity = vim.diagnostic.severity.ERROR, - }, + virtual_text = virtual_text, float = { focusable = true, style = "minimal", @@ -106,16 +108,12 @@ return { -- the definition of its *type*, not where it was *defined*. map("D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition") - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - map("ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols") - -- Fuzzy find all the symbols in your current workspace. -- Similar to document symbols, except searches over your entire project. map( - "ws", + "ps", require("telescope.builtin").lsp_dynamic_workspace_symbols, - "[W]orkspace [S]ymbols" + "Works[P]ace [S]ymbols" ) -- Rename the variable under your cursor. @@ -134,10 +132,6 @@ return { -- For example, in C this would take you to the header. map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") - -- taken from Josean-dev: - -- https://github.com/josean-dev/dev-environment-files/blob/main/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua - map("dd", "Telescope diagnostics bufnr=0", "Show buffer diagnostics") -- show diagnostics for file - map("ld", vim.diagnostic.open_float, "Show line diagnostics") -- show diagnostics for line map("[d", vim.diagnostic.goto_prev, "Go to previous diagnostic") -- jump to previous diagnostic in buffer @@ -187,10 +181,19 @@ return { -- -- This may be unwanted, since they displace some of your code if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then - map("th", function() + map("wl", function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end, "[T]oggle Inlay [H]ints") end + + map("wx", function() + local current_state = vim.diagnostic.config().virtual_text + if current_state then + vim.diagnostic.config({ virtual_text = not current_state }) + else + vim.diagnostic.config({ virtual_text = virtual_text }) + end + end, "Toggle Virtual Te[X]t") end, }) @@ -209,7 +212,7 @@ return { capabilities = capabilities, }) end, - ["tsserver"] = function() + ["ts_ls"] = function() -- configure typescript language server require("typescript").setup({ disable_commands = false, -- prevent the plugin from creating Vim commands diff --git a/config/new-config-nvim/lua/plugins/lualine.lua b/config/nvim/lua/plugins/lualine.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/lualine.lua rename to config/nvim/lua/plugins/lualine.lua diff --git a/config/new-config-nvim/lua/plugins/mason.lua b/config/nvim/lua/plugins/mason.lua similarity index 98% rename from config/new-config-nvim/lua/plugins/mason.lua rename to config/nvim/lua/plugins/mason.lua index 53ed471..748b26e 100644 --- a/config/new-config-nvim/lua/plugins/mason.lua +++ b/config/nvim/lua/plugins/mason.lua @@ -34,7 +34,7 @@ return { mason_lspconfig.setup({ -- list of servers for mason to install ensure_installed = { - "tsserver", + "ts_ls", "html", "cssls", "tailwindcss", diff --git a/config/new-config-nvim/lua/plugins/nvim-tree.lua b/config/nvim/lua/plugins/nvim-tree.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/nvim-tree.lua rename to config/nvim/lua/plugins/nvim-tree.lua diff --git a/config/nvim/lua/plugins/nx.lua b/config/nvim/lua/plugins/nx.lua new file mode 100644 index 0000000..c0aaf0d --- /dev/null +++ b/config/nvim/lua/plugins/nx.lua @@ -0,0 +1,18 @@ +return { + { + "Equilibris/nx.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + }, + + opts = { + -- See below for config options + nx_cmd_root = "pnpm nx", + }, + + -- Plugin will load when you use these keys + keys = { + { "x", "Telescope Nx actions", desc = "Nx actions" }, + }, + }, +} diff --git a/config/new-config-nvim/lua/plugins/oil.lua b/config/nvim/lua/plugins/oil.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/oil.lua rename to config/nvim/lua/plugins/oil.lua diff --git a/config/new-config-nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/telescope.lua rename to config/nvim/lua/plugins/telescope.lua diff --git a/config/new-config-nvim/lua/plugins/todo-comments.lua b/config/nvim/lua/plugins/todo-comments.lua similarity index 100% rename from config/new-config-nvim/lua/plugins/todo-comments.lua rename to config/nvim/lua/plugins/todo-comments.lua diff --git a/config/new-config-nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua similarity index 81% rename from config/new-config-nvim/lua/plugins/treesitter.lua rename to config/nvim/lua/plugins/treesitter.lua index ebb5f37..3d3a09e 100644 --- a/config/new-config-nvim/lua/plugins/treesitter.lua +++ b/config/nvim/lua/plugins/treesitter.lua @@ -41,6 +41,15 @@ return { additional_vim_regex_highlighting = { "ruby" }, }, indent = { enable = true, disable = { "ruby" } }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, }, config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` @@ -155,23 +164,23 @@ return { require("nvim-treesitter.configs").setup(opts) end, }, - -- { - -- "nvim-treesitter/nvim-treesitter-context", - -- config = function() - -- require("treesitter-context").setup({ - -- enable = false, -- Enable this plugin (Can be enabled/disabled later via commands) - -- max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - -- min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - -- line_numbers = true, - -- multiline_threshold = 5, -- Maximum number of lines to show for a single context - -- trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - -- mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' - -- -- Separator between context and content. Should be a single character string, like '-'. - -- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - -- separator = nil, - -- zindex = 20, -- The Z-index of the context window - -- on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching - -- }) - -- end, - -- }, + { + "nvim-treesitter/nvim-treesitter-context", + config = function() + require("treesitter-context").setup({ + enable = false, -- Enable this plugin (Can be enabled/disabled later via commands) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + line_numbers = true, + multiline_threshold = 5, -- Maximum number of lines to show for a single context + trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + mode = "topline", -- Line used to calculate context. Choices: 'cursor', 'topline' + -- Separator between context and content. Should be a single character string, like '-'. + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + separator = nil, + zindex = 20, -- The Z-index of the context window + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching + }) + end, + }, } diff --git a/config/new-config-nvim/lua/plugins/which-key.lua b/config/nvim/lua/plugins/which-key.lua similarity index 75% rename from config/new-config-nvim/lua/plugins/which-key.lua rename to config/nvim/lua/plugins/which-key.lua index 7029ab8..05541dc 100644 --- a/config/new-config-nvim/lua/plugins/which-key.lua +++ b/config/nvim/lua/plugins/which-key.lua @@ -74,6 +74,7 @@ return { -- -- GIT GROUP { "g", group = "[G]it" }, + { "gs", "LazyGit", desc = "LazyGit" }, { "gA", "lua require 'gitsigns'.stage_buffer()", desc = "Stage file" }, { "gR", "lua require 'gitsigns'.reset_buffer()", desc = "Reset Buffer" }, { "ga", "lua require 'gitsigns'.stage_hunk()", desc = "Stage Hunk" }, @@ -88,7 +89,6 @@ return { }, { "gp", "lua require 'gitsigns'.preview_hunk()", desc = "Preview hunk" }, { "gr", "lua require 'gitsigns'.reset_hunk()", desc = "Reset Hunk" }, - { "gs", "vert G", desc = "Git status..." }, { "gu", "lua require 'gitsigns'.undo_stage_hunk()", desc = "Undo Stage Hunk" }, -- -- SEACH GROUP @@ -119,33 +119,53 @@ return { -- -- TOGGLE SETTINGS GROUP { "w", group = "Toggle" }, - { "wf", "FormatToggle", desc = "Toggle file formatting" }, - { "wt", "TSContextToggle", desc = "Toggle tree-sitter scope con[T]ext" }, + { "wf", "FormatToggle", desc = "Toggle File Formatting on Save" }, + { "wt", "TSContextToggle", desc = "Toggle Treesitter scope con[T]ext" }, + -- { "wl", "", desc = "Toggle inlay hints", }, -- Defined in lsp.lua + -- { "wx", "", desc = "Toggle diagnostic virtual text", }, -- Defined in lsp.lua + { + "wd", + function() + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) + end, + desc = "Toggle [D]iagnostics", + }, + { + "wg", + function() + require("gitsigns").toggle_signs() + end, + desc = "Toggle [G]it Signs", + }, + { "wc", "ColorizerToggle", desc = "Toggle color preview" }, + -- { "wd", "TSContextToggle", desc = "Toggle presentation mode" }, }, -- -- BUFFER SETTINGS GROUP - -- { "b", group = "Toggle" }, - -- { "bd", "FormatToggle", desc = "Show document diagnostincs" }, - -- { "wt", "TSContextToggle", desc = "Show document symbols" }, + { "b", group = "Buffer/Document" }, + { "bs", require("telescope.builtin").lsp_document_symbols, desc = "[D]ocument [S]ymbols" }, -- Fuzzy find all the symbols in your current document. Symbols are things like variables, functions, types, etc. + { "bd", "Telescope diagnostics bufnr=0", desc = "[B]uffer [D]iagnostics" }, + { + "bf", + function() + require("conform").format({ + lsp_fallback = true, + async = false, + timeout_ms = 500, + }) + end, + desc = "[B]uffer [F]ormat (or range in V)", + }, + -- { "bl", "Telescope diagnostics bufnr=0", desc = "[B]uffer [L]int" }, -- -- DEBUGGING GROUP { "d", group = "[D]ebugging" }, { "db", "lua require'dap'.toggle_breakpoint()", desc = "Toggle breakpoint" }, { "dc", "lua require'dap'.continue()", desc = "Continue" }, - { "do", "lua require'dap'.step_over()", desc = "Step over" }, - { "di", "lua require'dap'.step_into()", desc = "Step into" }, - { "dt", "lua require'dap'.step_out()", desc = "Step out" }, - -- - -- q = { - -- "lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))", - -- "Set breakpoint with condition", - -- }, - -- l = { - -- "lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))", - -- "Set log message breakpoint", - -- }, - -- p = { "lua require'dap'.repl.open()", "REPL open" }, - -- r = { "lua require'dap'.run_last()", "Run last" }, + { "C-8", "lua require'dap'.step_over()", group = "[D]ebugging", desc = "Step over" }, + { "C-9", "lua require'dap'.step_into()", group = "[D]ebugging", desc = "Step into" }, + { "C-7", "lua require'dap'.step_out()", group = "[D]ebugging", desc = "Step out" }, + { "dt", "lua require'dap'.terminate()", desc = "Terminate" }, }, opts) end, }, diff --git a/config/new-config-nvim/lua/snippets/init.lua b/config/nvim/lua/snippets/init.lua similarity index 100% rename from config/new-config-nvim/lua/snippets/init.lua rename to config/nvim/lua/snippets/init.lua diff --git a/config/nvim/lua/user/_alpha.lua b/config/nvim/lua/user/_alpha.lua deleted file mode 100644 index 36d61a4..0000000 --- a/config/nvim/lua/user/_alpha.lua +++ /dev/null @@ -1,41 +0,0 @@ -local status_ok, alpha = pcall(require, "alpha") -if not status_ok then - return -end - -local dashboard = require("alpha.themes.dashboard") -dashboard.section.header.val = { - [[ __ ]], - [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], - [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], - [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], - [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], - [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], -} -dashboard.section.buttons.val = { - dashboard.button("p", " Find project", ":Telescope projects "), - dashboard.button("f", " Find file", ":Telescope find_files "), - dashboard.button("e", " New file", ":ene startinsert "), - dashboard.button("r", " Recently used files", ":Telescope oldfiles "), - dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua "), - dashboard.button("q", " Quit Neovim", ":qa"), -} - -local function footer() - -- NOTE: requires the fortune-mod package to work - -- local handle = io.popen("fortune") - -- local fortune = handle:read("*a") - -- handle:close() - -- return fortune - return "chrisatmachine.com" -end - -dashboard.section.footer.val = footer() - -dashboard.section.footer.opts.hl = "Type" -dashboard.section.header.opts.hl = "Include" -dashboard.section.buttons.opts.hl = "Keyword" - -dashboard.opts.opts.noautocmd = true --- vim.cmd([[autocmd User AlphaReady echo 'ready']]) -alpha.setup(dashboard.opts) diff --git a/config/nvim/lua/user/_autocommands.lua b/config/nvim/lua/user/_autocommands.lua deleted file mode 100644 index c438738..0000000 --- a/config/nvim/lua/user/_autocommands.lua +++ /dev/null @@ -1,37 +0,0 @@ -vim.cmd [[ - augroup _general_settings - autocmd! - autocmd FileType qf,help,man,lspinfo nnoremap q :close - autocmd TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Visual', timeout = 200}) - autocmd BufWinEnter * :set formatoptions-=cro - autocmd FileType qf set nobuflisted - augroup end - - augroup _git - autocmd! - autocmd FileType gitcommit setlocal wrap - autocmd FileType gitcommit setlocal spell - augroup end - - augroup _markdown - autocmd! - autocmd FileType markdown setlocal wrap - autocmd FileType markdown setlocal spell - augroup end - - augroup _auto_resize - autocmd! - autocmd VimResized * tabdo wincmd = - augroup end - - augroup _alpha - autocmd! - autocmd User AlphaReady set showtabline=0 | autocmd BufUnload set showtabline=2 - augroup end -]] - --- Autoformat --- augroup _lsp --- autocmd! --- autocmd BufWritePre * lua vim.lsp.buf.formatting() --- augroup end diff --git a/config/nvim/lua/user/autopairs.lua b/config/nvim/lua/user/autopairs.lua deleted file mode 100644 index 577e571..0000000 --- a/config/nvim/lua/user/autopairs.lua +++ /dev/null @@ -1,33 +0,0 @@ --- Setup nvim-cmp. -local status_ok, npairs = pcall(require, "nvim-autopairs") -if not status_ok then - return -end - -npairs.setup { - check_ts = true, - ts_config = { - lua = { "string", "source" }, - javascript = { "string", "template_string" }, - java = false, - }, - disable_filetype = { "TelescopePrompt", "spectre_panel" }, - fast_wrap = { - map = "", - chars = { "{", "[", "(", '"', "'" }, - pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), - offset = 0, -- Offset from pattern match - end_key = "$", - keys = "qwertyuiopzxcvbnmasdfghjkl", - check_comma = true, - highlight = "PmenuSel", - highlight_grey = "LineNr", - }, -} - -local cmp_autopairs = require "nvim-autopairs.completion.cmp" -local cmp_status_ok, cmp = pcall(require, "cmp") -if not cmp_status_ok then - return -end -cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) diff --git a/config/nvim/lua/user/cmp.lua b/config/nvim/lua/user/cmp.lua deleted file mode 100644 index 6c34d60..0000000 --- a/config/nvim/lua/user/cmp.lua +++ /dev/null @@ -1,131 +0,0 @@ -local cmp_status_ok, cmp = pcall(require, "cmp") -if not cmp_status_ok then - return -end - -local snip_status_ok, luasnip = pcall(require, "luasnip") -if not snip_status_ok then - return -end - -require("luasnip/loaders/from_vscode").lazy_load() - -local check_backspace = function() - local col = vim.fn.col(".") - 1 - return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") -end - --- Mostly icons for LSP -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 = "﫳", - -- TypeParameter = "", -} --- find more here: https://www.nerdfonts.com/cheat-sheet - -cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [""] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - -- Accept currently selected item. If none selected, `select` first item. - -- Set `select` to `false` to only confirm explicitly selected items. - [""] = cmp.mapping.confirm({ select = false }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif check_backspace() then - fallback() - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { - "i", - "s", - }), - }, - formatting = { - fields = { "abbr", "kind", "menu" }, - format = function(entry, vim_item) - -- Kind icons - vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind) - -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind - vim_item.menu = ({ - nvim_lsp = "[LSP]", - nvim_lua = "[VIM]", - luasnip = "[Snippet]", - buffer = "[Buffer]", - path = "[Path]", - })[entry.source.name] - return vim_item - end, - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "path" }, - }, - confirm_opts = { - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }, - -- documentation = { - -- border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, - -- }, - experimental = { - ghost_text = false, - native_menu = false, - }, -}) diff --git a/config/nvim/lua/user/colorizer.lua b/config/nvim/lua/user/colorizer.lua deleted file mode 100644 index ba8fcc5..0000000 --- a/config/nvim/lua/user/colorizer.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, colorizer = pcall(require, "colorizer") -if not status_ok then - return -end - -colorizer.setup() diff --git a/config/nvim/lua/user/colorscheme.lua b/config/nvim/lua/user/colorscheme.lua deleted file mode 100644 index 918e57c..0000000 --- a/config/nvim/lua/user/colorscheme.lua +++ /dev/null @@ -1,56 +0,0 @@ -vim.cmd([[ -try - " colorscheme material - colorscheme my-material - " colorscheme moonrakers -catch /^Vim\%((\a\+)\)\=:E185/ - colorscheme default - set background=dark -endtry -]]) - --- LSP Semantic Token Groups -local links = { - ["@lsp.type.boolean"] = "@boolean", - ["@lsp.type.builtinType"] = "@type.builtin", - ["@lsp.type.comment"] = "@comment", - ["@lsp.type.enum"] = "@type", - ["@lsp.type.enumMember"] = "@constant", - ["@lsp.type.escapeSequence"] = "@string.escape", - ["@lsp.type.formatSpecifier"] = "@punctuation.special", - ["@lsp.type.interface"] = "@type", -- modified by me - ["@lsp.type.keyword"] = "@keyword", - ["@lsp.type.namespace"] = "@namespace", - ["@lsp.type.number"] = "@number", - ["@lsp.type.class"] = "@symbol", - ["@lsp.type.operator"] = "@operator", - ["@lsp.type.parameter"] = "@parameter", - ["@lsp.type.property"] = "@property", - ["@lsp.type.selfKeyword"] = "@variable.builtin", - ["@lsp.type.string.rust"] = "@string", - ["@lsp.type.typeAlias"] = "@type.definition", - ["@lsp.type.variable"] = "@variable", -- use treesitter styles for regular variables - - ["@variable.tsx"] = "@variable", -- use treesitter styles for regular variables - ["@type.tsx"] = "@type", -- use treesitter styles for regular variables - ["@lsp.typemod.class.defaultLibrary"] = "@type.builtin", - ["@lsp.typemod.enum.defaultLibrary"] = "@type.builtin", - ["@lsp.typemod.enumMember.defaultLibrary"] = "@constant.builtin", - ["@lsp.typemod.function.defaultLibrary"] = "@function.builtin", - ["@lsp.typemod.keyword.async"] = "@keyword.coroutine", - ["@lsp.typemod.macro.defaultLibrary"] = "@function.builtin", - ["@lsp.typemod.method.defaultLibrary"] = "@function.builtin", - ["@lsp.typemod.operator.injected"] = "@operator", - ["@lsp.typemod.string.injected"] = "@string", - ["@lsp.typemod.type.defaultLibrary"] = "@constant", -- modified by me - ["@lsp.typemod.variable"] = "@type", - ["@lsp.typemod.variable.defaultLibrary"] = "@variable.builtin", - ["@lsp.typemod.variable.injected"] = "@variable", - ["@lsp.typemod.variable.declaration"] = "@type", - ["@lsp.typemod.variable.typescriptreact"] = "@variable", - ["@lsp.typemod.variable.readonly.typescriptreact"] = "@variable", -} - -for newgroup, oldgroup in pairs(links) do - vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) -end diff --git a/config/nvim/lua/user/comment.lua b/config/nvim/lua/user/comment.lua deleted file mode 100644 index e83777f..0000000 --- a/config/nvim/lua/user/comment.lua +++ /dev/null @@ -1,44 +0,0 @@ -local status_ok, comment = pcall(require, "Comment") -if not status_ok then - return -end - -local commentstring_ok, commentstring = pcall(require, "ts_context_commentstring") -if not commentstring_ok then - return -end - -comment.setup({ - toggler = { - ---Line-comment toggle keymap - line = "gcc", - ---Block-comment toggle keymap - block = "gCc", - }, - opleader = { - ---Line-comment keymap - line = "gc", - ---Block-comment keymap - block = "gC", - }, - pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), - --[[ pre_hook = function(ctx) ]] - --[[ local U = require "Comment.utils" ]] - --[[]] - --[[ local location = nil ]] - --[[ if ctx.ctype == U.ctype.block then ]] - --[[ location = require("ts_context_commentstring.utils").get_cursor_location() ]] - --[[ elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then ]] - --[[ location = require("ts_context_commentstring.utils").get_visual_start_location() ]] - --[[ end ]] - --[[]] - --[[ return require("ts_context_commentstring.internal").calculate_commentstring { ]] - --[[ key = ctx.ctype == U.ctype.line and "__default" or "__multiline", ]] - --[[ location = location, ]] - --[[ } ]] - --[[ end, ]] -}) - -commentstring.setup({ - enable_autocmd = false, -}) diff --git a/config/nvim/lua/user/copilot.lua b/config/nvim/lua/user/copilot.lua deleted file mode 100644 index e40185b..0000000 --- a/config/nvim/lua/user/copilot.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Remap tab to Ctrl-N for accepting Copilot suggestions -vim.keymap.set("i", "", 'copilot#Accept("")', { - expr = true, - replace_keycodes = false, -}) -vim.g.copilot_no_tab_map = true -vim.g.copilot_workspace_folders = { "~/Ataccama/one-metadata-frontend" } --- disable copilot by default --- vim.g.copilot_filetypes = { ["*"] = false } - --- Map Alt-O to request Copilot completions -vim.keymap.set("i", "", "(copilot-dismiss)") -vim.keymap.set("i", "", "(copilot-suggest)") -vim.keymap.set("i", "", "(copilot-next)") -vim.keymap.set("i", "", "(copilot-previous)") -vim.keymap.set("i", "", "(copilot-accept-word)") -vim.keymap.set("i", "", "(copilot-accept-line)") diff --git a/config/nvim/lua/user/ctrlxa.lua b/config/nvim/lua/user/ctrlxa.lua deleted file mode 100644 index 531005d..0000000 --- a/config/nvim/lua/user/ctrlxa.lua +++ /dev/null @@ -1,16 +0,0 @@ -vim.g.CtrlXA_Toggles = { - { "true", "false" }, - { "True", "False" }, - { "TRUE", "FALSE" }, - { "yes", "no" }, - { "Yes", "No" }, - { "YES", "NO" }, - { "on", "off" }, - { "On", "Off" }, - { "ON", "OFF" }, - { "set", "unset" }, - { "||", "&&" }, - { "!==", "===" }, - { "undefined", "null" }, - { "const", "let" }, -} diff --git a/config/nvim/lua/user/dap.lua b/config/nvim/lua/user/dap.lua deleted file mode 100644 index 047416c..0000000 --- a/config/nvim/lua/user/dap.lua +++ /dev/null @@ -1,52 +0,0 @@ -local status_ok, dap = pcall(require, "dap") -if not status_ok then - return -end - -local virtual_text_status_ok, dap_virtual_text = pcall(require, "dap-virtual-text") -if not virtual_text_status_ok then - return -end - -local dap_ui_status_ok, dapui = pcall(require, "dapui") -if not dap_ui_status_ok then - return -end - -dap.adapters.lldb = { - type = "executable", - command = "/usr/bin/lldb-vscode", -- adjust as needed - name = "lldb", -} - -local lldb = { - name = "Launch lldb", - type = "lldb", -- matches the adapter - request = "launch", -- could also attach to a currently running process - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end, - cwd = "${workspaceFolder}", - stopOnEntry = false, - args = {}, - runInTerminal = false, -} - -dap.configurations.rust = { - lldb, -- different debuggers or more configurations can be used here -} - -dap_virtual_text.setup() - -dapui.setup() - --- Automatically open dap UI when starting debugging -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 diff --git a/config/nvim/lua/user/doge.lua b/config/nvim/lua/user/doge.lua deleted file mode 100644 index 8b55d2c..0000000 --- a/config/nvim/lua/user/doge.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.g.doge_javascript_settings = { - destructuring_props = 1, - omit_redundant_param_types = 1, -} diff --git a/config/nvim/lua/user/emmet.lua b/config/nvim/lua/user/emmet.lua deleted file mode 100644 index e4d42f0..0000000 --- a/config/nvim/lua/user/emmet.lua +++ /dev/null @@ -1,4 +0,0 @@ -local status_ok, emmet = pcall(require, "emmet-vim") -if not status_ok then - return -end diff --git a/config/nvim/lua/user/gitsigns.lua b/config/nvim/lua/user/gitsigns.lua deleted file mode 100644 index eb4cfed..0000000 --- a/config/nvim/lua/user/gitsigns.lua +++ /dev/null @@ -1,48 +0,0 @@ -local status_ok, gitsigns = pcall(require, "gitsigns") -if not status_ok then - return -end - -gitsigns.setup { - signs = { - add = { hl = "GitSignsAdd", text = "+", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - change = { hl = "GitSignsChange", text = "~", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - delete = { hl = "GitSignsDelete", text = "-", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - topdelete = { hl = "GitSignsDelete", text = "^^", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - interval = 1000, - follow_files = true, - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter_opts = { - relative_time = false, - }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = "single", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, - yadm = { - enable = false, - }, -} diff --git a/config/nvim/lua/user/impatient.lua b/config/nvim/lua/user/impatient.lua deleted file mode 100644 index 84419e0..0000000 --- a/config/nvim/lua/user/impatient.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, impatient = pcall(require, "impatient") -if not status_ok then - return -end - -impatient.enable_profile() diff --git a/config/nvim/lua/user/indentline.lua b/config/nvim/lua/user/indentline.lua deleted file mode 100644 index 6e18f86..0000000 --- a/config/nvim/lua/user/indentline.lua +++ /dev/null @@ -1,49 +0,0 @@ -local status_ok, indent_blankline = pcall(require, "ibl") -if not status_ok then - return -end - -indent_blankline.setup({ - exclude = { - filetypes = { - "lspinfo", - "packer", - "checkhealth", - "help", - "man", - "gitcommit", - "TelescopePrompt", - "TelescopeResults", - "", - "NvimTree", - }, - }, - indent = { - char = "▏", - }, -}) - -local indentscope_ok, indentscope = pcall(require, "mini.indentscope") -if not indentscope_ok then - return -end - -indentscope.setup({ - draw = { - animation = indentscope.gen_animation.none(), - }, - symbol = "▏", -}) - --- How to disable mini.indentscope for some buffer types --- https://github.com/echasnovski/mini.nvim/blob/75477368c63e3dee65b2a39e6050391ef521f0b8/doc/mini.txt#L143-L184 --- Disable mini.indentscope for some buffer types -vim.cmd([[ - autocmd Filetype NvimTree lua vim.b.minicursorword_disable = true - autocmd Filetype help lua vim.b.minicursorword_disable = true - autocmd Filetype lspinfo lua vim.b.minicursorword_disable = true - autocmd Filetype packer lua vim.b.minicursorword_disable = true - autocmd Filetype checkhealth lua vim.b.minicursorword_disable = true - autocmd Filetype TelescopePrompt lua vim.b.minicursorword_disable = true - autocmd Filetype TelescopeResults lua vim.b.minicursorword_disable = true -]]) diff --git a/config/nvim/lua/user/keymaps.lua b/config/nvim/lua/user/keymaps.lua deleted file mode 100644 index 0f399b6..0000000 --- a/config/nvim/lua/user/keymaps.lua +++ /dev/null @@ -1,77 +0,0 @@ -local opts = { noremap = true, silent = true } --- local term_opts = { silent = true } - --- Shorten function name -local keymap = vim.api.nvim_set_keymap - ---Remap space as leader key -keymap("", "", "", opts) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - --- Modes --- normal_mode = "n", --- insert_mode = "i", --- visual_mode = "v", --- visual_block_mode = "x", --- term_mode = "t", --- command_mode = "c", - --- Normal -- --- Better window navigation -keymap("n", "", "h", opts) -keymap("n", "", "j", opts) -keymap("n", "", "k", opts) -keymap("n", "", "l", opts) - -vim.keymap.set("n", "hl", "nohlsearch", opts) -vim.keymap.set("n", "v", "NvimTreeToggle", opts) - --- Paste without overwritting register -keymap("v", "p", '"_dP', opts) -keymap("v", "p", '"_dP', opts) --- Delete without overwritting register -keymap("v", "d", '"_d', opts) - --- Better buffers navigation: --- Close buffer without closing split -keymap("n", "", "bp|bd #", opts) -keymap("n", "", "b#", opts) - --- Resize with arrows --- keymap("n", "", ":resize -2", opts) --- keymap("n", "", ":resize +2", opts) --- keymap("n", "", ":vertical resize -2", opts) --- keymap("n", "", ":vertical resize +2", opts) - --- Navigate buffers -keymap("n", "", ":bnext", opts) -keymap("n", "", ":bprevious", opts) - --- Move text up and down -keymap("n", "", ":m .+1==gi", opts) -keymap("n", "", ":m .-2==gi", opts) - --- Insert -- --- Press jk fast to enter -keymap("i", "jk", "", opts) -keymap("i", "jj", "", opts) - --- Visual -- --- Stay in indent mode -keymap("v", "<", "", ">gv", opts) - --- Move text up and down -keymap("v", "", ":m .+1==", opts) -keymap("v", "", ":m .-2==", opts) - --- Visual Block -- --- Move text up and down -keymap("x", "J", ":move '>+1gv-gv", opts) -keymap("x", "K", ":move '<-2gv-gv", opts) -keymap("x", "", ":move '>+1gv-gv", opts) -keymap("x", "", ":move '<-2gv-gv", opts) - --- Null-ls -keymap("n", "ft", "ToggleFormatters", opts) diff --git a/config/nvim/lua/user/lsp/configs.lua b/config/nvim/lua/user/lsp/configs.lua deleted file mode 100644 index b34e45e..0000000 --- a/config/nvim/lua/user/lsp/configs.lua +++ /dev/null @@ -1,52 +0,0 @@ -local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer") -if not status_ok then - return -end - -local lspconfig = require("lspconfig") - -local servers = { - "jsonls", - "lua_ls", - "tsserver", - "vimls", - "cssls", - "bashls", - "graphql", - "html", - "yamlls", - "emmet_ls", - "dockerls", - "rust_analyzer", - "tailwindcss", -} - -lsp_installer.setup({ - ensure_installed = servers, -}) - -for _, server in pairs(servers) do - local opts = { - on_attach = require("user.lsp.handlers").on_attach, - capabilities = require("user.lsp.handlers").capabilities, - } - local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server) - if has_custom_opts then - opts = vim.tbl_deep_extend("force", server_custom_opts, opts) - end - if server == "tsserver" then - require("typescript").setup({ - server = { - on_attach = opts.on_attach, - capabilities = opts.capabilities, - root_dir = function(fname) - return require("lspconfig.util").root_pattern(".git/")(fname) - or require("lspconfig.util").root_pattern("tsconfig.json")(fname) - or require("lspconfig.util").root_pattern("package.json", "jsconfig.json")(fname) - end, - }, - }) - else - lspconfig[server].setup(opts) - end -end diff --git a/config/nvim/lua/user/lsp/handlers.lua b/config/nvim/lua/user/lsp/handlers.lua deleted file mode 100644 index 8e0a092..0000000 --- a/config/nvim/lua/user/lsp/handlers.lua +++ /dev/null @@ -1,115 +0,0 @@ -local M = {} - -M.setup = function() - local signs = { - { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, - } - - for _, sign in ipairs(signs) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) - end - - local config = { - -- disable virtual text - virtual_text = false, - -- show signs - signs = { - active = signs, - }, - update_in_insert = true, - underline = true, - severity_sort = true, - document_highlight = true, - float = { - focusable = false, - style = "minimal", - border = "single", - source = "always", - header = "", - prefix = function(diagnostic) - local diag_to_format = { - [vim.diagnostic.severity.ERROR] = { "Error", "LspDiagnosticsDefaultError" }, - [vim.diagnostic.severity.WARN] = { "Warning", "LspDiagnosticsDefaultWarning" }, - [vim.diagnostic.severity.INFO] = { "Info", "LspDiagnosticsDefaultInfo" }, - [vim.diagnostic.severity.HINT] = { "Hint", "LspDiagnosticsDefaultHint" }, - } - local res = diag_to_format[diagnostic.severity] - return string.format("(%s) ", res[1]), res[2] - end, - }, - } - - vim.diagnostic.config(config) - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", - }) - - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - }) -end - -local function lsp_keymaps(bufnr) - local opts = { silent = true } - vim.keymap.set("n", "q", "lua vim.diagnostic.open_float()", opts) - -- vim.keymap.set("n", "q", "lua vim.diagnostic.setloclist()", opts) - vim.keymap.set("n", "]d", 'lua vim.diagnostic.goto_next({ border = "rounded" })', opts) - vim.keymap.set("n", "[d", 'lua vim.diagnostic.goto_prev({ border = "rounded" })', opts) - - local bufopts = { silent = true, buffer = bufnr } - vim.keymap.set("n", "gD", "lua vim.lsp.buf.declaration()", bufopts) - vim.keymap.set("n", "gd", "lua vim.lsp.buf.definition()", bufopts) - vim.keymap.set("n", "gI", "lua vim.lsp.buf.implementation()", bufopts) - vim.keymap.set("n", "gu", "lua vim.lsp.buf.references()", bufopts) - vim.keymap.set("n", "gh", "lua vim.lsp.buf.hover()", bufopts) - vim.keymap.set("n", "sg", "lua vim.lsp.buf.signature_help()", bufopts) - vim.keymap.set("n", "re", "lua vim.lsp.buf.rename()", bufopts) - -- vim.keymap.set("n", "r", "lua vim.lsp.buf.document_symbol()", bufopts) - -- vim.keymap.set("n", "w", "lua vim.lsp.buf.workspace_symbol()", bufopts) - vim.keymap.set("n", "ca", "lua vim.lsp.buf.code_action()", bufopts) - vim.keymap.set("n", "gm", "TypescriptAddMissingImports", bufopts) - vim.keymap.set("n", "p", function() - require("typescript").actions.addMissingImports({ sync = true }) - require("typescript").actions.removeUnused({ sync = true }) - require("typescript").actions.organizeImports({ sync = true }) - -- vim.lsp.buf.formatting_sync() - end, { silent = true, desc = "Organize imports" }) - -- vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] -end - -M.on_attach = function(client, bufnr) - if client.name == "tsserver" then - client.server_capabilities.document_formatting = false - end - if client.name == "sumneko_lua" then - client.server_capabilities.document_formatting = false - end - if client.name == "remark_ls" then - client.server_capabilities.document_formatting = false - end - if client.name == "jsonls" then - client.server_capabilities.document_formatting = false - end - - lsp_keymaps(bufnr) -end - -local capabilities = vim.lsp.protocol.make_client_capabilities() - -local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") -if not status_ok then - return -end - -M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities) - -local fidget_ok, fidget = pcall(require, "fidget") -if fidget_ok then - fidget.setup() -end - -return M diff --git a/config/nvim/lua/user/lsp/init.lua b/config/nvim/lua/user/lsp/init.lua deleted file mode 100644 index 98f9f11..0000000 --- a/config/nvim/lua/user/lsp/init.lua +++ /dev/null @@ -1,8 +0,0 @@ -local status_ok, _ = pcall(require, "lspconfig") -if not status_ok then - return -end - -require("user.lsp.configs") -require("user.lsp.handlers").setup() -require("user.lsp.null-ls") diff --git a/config/nvim/lua/user/lsp/null-ls.lua b/config/nvim/lua/user/lsp/null-ls.lua deleted file mode 100644 index 5759a8d..0000000 --- a/config/nvim/lua/user/lsp/null-ls.lua +++ /dev/null @@ -1,44 +0,0 @@ -local null_ls_status_ok, null_ls = pcall(require, "null-ls") -if not null_ls_status_ok then - return -end - -local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) - -vim.g.null_ls_formatters_enabled = true - -null_ls.setup({ - debug = false, - diagnostics_format = "#{m} [#{c}]", - sources = { - null_ls.builtins.formatting.prettier.with({ prefer_local = "node_modules/.bin" }), - null_ls.builtins.formatting.eslint_d.with({ prefer_local = "node_modules/.bin" }), - null_ls.builtins.diagnostics.eslint_d.with({ prefer_local = "node_modules/.bin" }), - null_ls.builtins.code_actions.eslint_d.with({ prefer_local = "node_modules/.bin" }), - -- null_ls.builtins.formatting.eslint_d.with({ prefer_local = "node_modules/.bin" }), - null_ls.builtins.formatting.stylua, - null_ls.builtins.formatting.rustfmt, - -- null_ls.builtins.diagnostics.eslint.with({ prefer_local = "node_modules/.bin", }), - -- null_ls.builtins.code_actions.eslint.with({ prefer_local = "node_modules/.bin" }), - }, - - on_attach = function(client, bufnr) - if client.supports_method("textDocument/formatting") and vim.g.null_ls_formatters_enabled then - vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) - vim.api.nvim_create_autocmd("BufWritePre", { - group = augroup, - buffer = bufnr, - callback = function() - vim.lsp.buf.format({ bufnr = bufnr }) - end, - }) - end - end, -}) - -local toggle_formatters = function() - null_ls.toggle({ methods = null_ls.methods.FORMATTING }) - vim.g.null_ls_formatters_enabled = not vim.g.null_ls_formatters_enabled -end - -vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {}) diff --git a/config/nvim/lua/user/lsp/settings/jsonls.lua b/config/nvim/lua/user/lsp/settings/jsonls.lua deleted file mode 100644 index 1eca21c..0000000 --- a/config/nvim/lua/user/lsp/settings/jsonls.lua +++ /dev/null @@ -1,135 +0,0 @@ -local schemas = { - { - description = "TypeScript compiler configuration file", - fileMatch = { - "tsconfig.json", - "tsconfig.*.json", - }, - url = "https://json.schemastore.org/tsconfig.json", - }, - { - description = "Lerna config", - fileMatch = { "lerna.json" }, - url = "https://json.schemastore.org/lerna.json", - }, - { - description = "Babel configuration", - fileMatch = { - ".babelrc.json", - ".babelrc", - "babel.config.json", - }, - url = "https://json.schemastore.org/babelrc.json", - }, - { - description = "ESLint config", - fileMatch = { - ".eslintrc.json", - ".eslintrc", - }, - url = "https://json.schemastore.org/eslintrc.json", - }, - { - description = "Prettier config", - fileMatch = { - ".prettierrc", - ".prettierrc.json", - "prettier.config.json", - }, - url = "https://json.schemastore.org/prettierrc", - }, - { - description = "Vercel Now config", - fileMatch = { "now.json" }, - url = "https://json.schemastore.org/now", - }, - { - description = "Stylelint config", - fileMatch = { - ".stylelintrc", - ".stylelintrc.json", - "stylelint.config.json", - }, - url = "https://json.schemastore.org/stylelintrc", - }, - { - description = "A JSON schema for the ASP.NET LaunchSettings.json files", - fileMatch = { "launchsettings.json" }, - url = "https://json.schemastore.org/launchsettings.json", - }, - { - description = "Json schema for properties json file for a GitHub Workflow template", - fileMatch = { - ".github/workflow-templates/**.properties.json", - }, - url = "https://json.schemastore.org/github-workflow-template-properties.json", - }, - { - description = "golangci-lint configuration file", - fileMatch = { - ".golangci.toml", - ".golangci.json", - }, - url = "https://json.schemastore.org/golangci-lint.json", - }, - { - description = "JSON schema for the JSON Feed format", - fileMatch = { - "feed.json", - }, - url = "https://json.schemastore.org/feed.json", - versions = { - ["1"] = "https://json.schemastore.org/feed-1.json", - ["1.1"] = "https://json.schemastore.org/feed.json", - }, - }, - { - description = "Packer template JSON configuration", - fileMatch = { - "packer.json", - }, - url = "https://json.schemastore.org/packer.json", - }, - { - description = "NPM configuration file", - fileMatch = { - "package.json", - }, - url = "https://json.schemastore.org/package.json", - }, - { - description = "JSON schema for Visual Studio component configuration files", - fileMatch = { - "*.vsconfig", - }, - url = "https://json.schemastore.org/vsconfig.json", - }, -} - --- local function extend(tab1, tab2) --- for _, value in ipairs(tab2) do --- table.insert(tab1, value) --- end --- return tab1 --- end --- --- local extended_schemas = extend(schemas, default_schemas) - -local opts = { - settings = { - json = { - schemas = schemas, - }, - }, - setup = { - commands = { - Format = { - function() - vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 }) - end, - }, - }, - }, -} - -return opts diff --git a/config/nvim/lua/user/lsp/settings/lua_ls.lua b/config/nvim/lua/user/lsp/settings/lua_ls.lua deleted file mode 100644 index 744cef9..0000000 --- a/config/nvim/lua/user/lsp/settings/lua_ls.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - }, - 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), - [vim.fn.stdpath("config") .. "/lua"] = true, - }, - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, -} diff --git a/config/nvim/lua/user/lsp/settings/rust_analyzer.lua b/config/nvim/lua/user/lsp/settings/rust_analyzer.lua deleted file mode 100644 index 94095f3..0000000 --- a/config/nvim/lua/user/lsp/settings/rust_analyzer.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { - "rustup", "run", "stable", "rust-analyzer" - } -} diff --git a/config/nvim/lua/user/lsp/settings/sumneko_lua.lua b/config/nvim/lua/user/lsp/settings/sumneko_lua.lua deleted file mode 100644 index 0ac454a..0000000 --- a/config/nvim/lua/user/lsp/settings/sumneko_lua.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - settings = { - - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.stdpath("config") .. "/lua"] = true, - }, - }, - }, - }, -} diff --git a/config/nvim/lua/user/lualine.lua b/config/nvim/lua/user/lualine.lua deleted file mode 100644 index 94f1c14..0000000 --- a/config/nvim/lua/user/lualine.lua +++ /dev/null @@ -1,95 +0,0 @@ -local status_ok, lualine = pcall(require, "lualine") -if not status_ok then - return -end - -local hide_in_width = function() - return vim.fn.winwidth(0) > 80 -end - -local diagnostics = { - "diagnostics", - sources = { "nvim_diagnostic" }, - sections = { "error", "warn" }, - symbols = { error = " ", warn = " " }, - colored = false, - update_in_insert = false, - always_visible = true, -} - -local filename = { - "filename", - file_status = true, -- Displays file status (readonly status, modified status) - path = 1, -- 0: Just the filename - -- 1: Relative path - -- 2: Absolute path - -- 3: Absolute path, with tilde as the home directory - - shorting_target = 40, -- Shortens path to leave 40 spaces in the window - -- for other components. (terrible name, any suggestions?) - symbols = { - modified = "[+]", -- Text to show when the file is modified. - readonly = "[-]", -- Text to show when the file is non-modifiable or readonly. - unnamed = "[No Name]", -- Text to show for unnamed buffers. - }, -} - -local mode = { - "mode", - fmt = function(str) - return "-- " .. str .. " --" - end, -} - -local filetype = { - "filetype", - icons_enabled = true, - icon = nil, -} - -local branch = { - "branch", - icons_enabled = true, - icon = "", -} - -local location = { - "location", - padding = { left = 0, right = 1 }, -} - --- cool function for progress - -local spaces = function() - return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") -end - -lualine.setup({ - options = { - icons_enabled = false, - theme = "auto", - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" }, - always_divide_middle = true, - }, - sections = { - lualine_a = { mode }, - lualine_b = { branch }, - lualine_c = { diagnostics, filename }, - -- lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_x = { spaces, "encoding", "fileformat", location }, - lualine_y = {}, - lualine_z = { filetype }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {}, - lualine_x = { "location" }, - lualine_y = {}, - lualine_z = {}, - }, - tabline = {}, - extensions = {}, -}) diff --git a/config/nvim/lua/user/neotest.lua b/config/nvim/lua/user/neotest.lua deleted file mode 100644 index 86e7f0e..0000000 --- a/config/nvim/lua/user/neotest.lua +++ /dev/null @@ -1,48 +0,0 @@ -local status_ok, neotest = pcall(require, "neotest") -if not status_ok then - return -end - -neotest.setup({ - status = { - enabled = true, - signs = true, - }, - output = { - open_on_run = false, - }, - quickfix = { - enabled = false, - }, - adapters = { - require("neotest-jest")({ - jestCommand = "pnpm jest", - jestConfigFile = function() - local file = vim.fn.expand("%:p") - if string.find(file, "/libs/") or string.find(file, "/apps/") then - return string.match(file, "(.-/[^/]+/)src") .. "jest.config.ts" - end - - return vim.fn.getcwd() .. "/jest.config.ts" - end, - env = { CI = true }, - cwd = function(path) - return vim.fn.getcwd() - end, - }), - }, -}) - -vim.diagnostic.config({ - virtual_text = { - source = false, - format = function(diagnostic) - local index = string.find(diagnostic.message, "at Object") - if index ~= nil then - return string.sub(diagnostic.message, 1, index - 1) - end - return diagnostic.message - end, - }, - signs = false, -}, vim.api.nvim_create_namespace("neotest")) diff --git a/config/nvim/lua/user/nvim-tree.lua b/config/nvim/lua/user/nvim-tree.lua deleted file mode 100644 index 85ac06e..0000000 --- a/config/nvim/lua/user/nvim-tree.lua +++ /dev/null @@ -1,98 +0,0 @@ -local status_ok, nvim_tree = pcall(require, "nvim-tree") -if not status_ok then - return -end - -local api_status_ok, api = pcall(require, "nvim-tree.api") -if not api_status_ok then - return -end - -local function my_on_attach(bufnr) - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } - end - - -- default mappings - api.config.mappings.default_on_attach(bufnr) - - -- custom mappings - vim.keymap.set("n", "", api.tree.change_root_to_parent, opts("Up")) - vim.keymap.set("n", "?", api.tree.toggle_help, opts("Help")) - vim.keymap.set("n", "l", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close")) -end - -nvim_tree.setup({ - renderer = { - root_folder_label = false, - }, - on_attach = my_on_attach, - sync_root_with_cwd = true, - respect_buf_cwd = true, - disable_netrw = true, - hijack_netrw = true, - actions = { - open_file = { - window_picker = { - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", "alpha" }, - buftype = { "nofile", "terminal", "help" }, - }, - }, - }, - }, - open_on_tab = false, - hijack_cursor = false, - update_cwd = true, - diagnostics = { - enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - update_focused_file = { - enable = true, - update_cwd = true, - update_root = true, - ignore_list = {}, - }, - system_open = { - cmd = nil, - args = {}, - }, - filters = { - dotfiles = false, - custom = {}, - }, - git = { - enable = true, - ignore = true, - timeout = 500, - }, - view = { - width = 50, - side = "left", - -- mappings = { - -- custom_only = false, - -- list = { - -- { key = { "l", "", "o" }, cb = tree_cb("edit") }, - -- { key = "h", cb = tree_cb("close_node") }, - -- { key = "v", cb = tree_cb("vsplit") }, - -- }, - -- }, - number = false, - relativenumber = false, - }, - trash = { - cmd = "trash", - require_confirm = true, - }, -}) - -api.events.subscribe(api.events.Event.FileCreated, function(file) - vim.cmd("edit " .. file.fname) -end) diff --git a/config/nvim/lua/user/options.lua b/config/nvim/lua/user/options.lua deleted file mode 100644 index abb386f..0000000 --- a/config/nvim/lua/user/options.lua +++ /dev/null @@ -1,74 +0,0 @@ -local numWidth = 6 - -local options = { - termguicolors = true, -- set term gui colors (most terminals support this) - number = true, -- set numbered lines - relativenumber = true, -- set relative numbered lines - encoding = "utf-8", - fileencoding = "utf-8", -- the encoding written to a file - inccommand = "split", - backup = false, -- creates a backup file - swapfile = false, - clipboard = "unnamedplus", -- allows neovim to access the system clipboard - showmatch = true, - hlsearch = true, -- highlight all matches on previous search pattern - incsearch = true, - ignorecase = true, -- ignore case in search patterns - shiftwidth = 2, -- the number of spaces inserted for each indentation - tabstop = 2, -- insert 2 spaces for a tab - numberwidth = numWidth, - signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time - smartindent = true, - smartcase = true, - smarttab = true, - ruler = true, - re = 0, -- regexp engine, 0 - standard VIM, 1 - PCRE (Perl) - undofile = true, - -- textwidth = 120, - -- columns = 100, - colorcolumn = "", - -- wrap = true, - linebreak = true, - cursorline = true, -- highlight the current line - -- splitbelow = false, -- force all horizontal splits to go below current window - -- splitright = false, -- force all vertical splits to go to the right of current window - expandtab = true, -- convert tabs to spaces - scrolloff = 8, -- is one of my fav - updatetime = 600, -- faster completion (4000ms default) - winbar = " %f %m", --show file name and path at the top of buffer together with modify mark, spaces at the front are here to align it with the gutter - mouse = "a", -- enable mouse support - foldmethod = "syntax", -- config for automatic folds - foldlevelstart = 99, -- start with all folds open - foldcolumn = "auto", -- show fold column - showmode = false, -- don't show mode -} - -for k, v in pairs(options) do - vim.opt[k] = v -end - -vim.opt.formatoptions = { - t = true, - c = true, - r = true, - o = true, - q = true, - n = true, - l = true, - j = true, -} - -vim.cmd("filetype plugin on") -vim.cmd("syntax enable") --- In git commitmessage force cursor onto a new line after 72 chars --- Color 73rd column in order to know where is the type limit --- Also color 51st column -vim.cmd([[ - autocmd FileType gitcommit set textwidth=72 - set colorcolumn=+1 - autocmd FileType gitcommit set colorcolumn+=51 -]]) - --- Disable netrw (becuase of NvimTree) -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 diff --git a/config/nvim/lua/user/plugins.lua b/config/nvim/lua/user/plugins.lua deleted file mode 100644 index e11f2fb..0000000 --- a/config/nvim/lua/user/plugins.lua +++ /dev/null @@ -1,174 +0,0 @@ -local fn = vim.fn - --- Automatically install packer -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, - }) - print("Installing packer close and reopen Neovim...") - vim.cmd([[packadd packer.nvim]]) -end - --- Autocommand that reloads neovim whenever you save the plugins.lua file -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost plugins.lua source | PackerSync - augroup end -]]) - --- Use a protected call so we don't error out on first use -local status_ok, packer = pcall(require, "packer") -if not status_ok then - return -end - --- Have packer use a popup window -packer.init({ - display = { - open_fn = function() - return require("packer.util").float({ border = "rounded" }) - end, - }, -}) - --- Install your plugins here -return packer.startup(function(use) - -- Plugins manager - use("wbthomason/packer.nvim") -- Have packer manage itself - - -- Useful stuff (mostly consume by other plugins) - use("nvim-lua/popup.nvim") -- An implementation of the Popup API from vim in Neovim - use("nvim-lua/plenary.nvim") -- Useful lua functions used ny lots of plugins - use("lewis6991/impatient.nvim") - - -- Utility plugins - use("tpope/vim-surround") - use("tpope/vim-repeat") - use("windwp/nvim-autopairs") - use("RRethy/vim-illuminate") -- LSP backed highlighting of symbols under cursor - use("kyazdani42/nvim-web-devicons") -- devicons - - -- Better comments - use("numToStr/Comment.nvim") -- Easily comment stuff - use("JoosepAlviste/nvim-ts-context-commentstring") - use({ - "folke/todo-comments.nvim", - requires = "nvim-lua/plenary.nvim", - config = function() - require("todo-comments").setup({ - signs = false, - colors = { - error = { "#F7454B" }, - warning = { "#ffcb6b" }, - info = { "#89ddff" }, - }, - highlight = { - keyword = "bg", - after = "fg", -- "fg" or "bg" or empty - }, - }) - end, - }) - - use("github/copilot.vim") - - use("kyazdani42/nvim-tree.lua") - use("nvim-lualine/lualine.nvim") - use("ahmedkhalf/project.nvim") - use("lukas-reineke/indent-blankline.nvim") - use("echasnovski/mini.indentscope") - use("mattn/emmet-vim") - use("Konfekt/vim-CtrlXA") - -- use "goolord/alpha-nvim" - use("folke/which-key.nvim") - use("norcalli/nvim-colorizer.lua") - - -- Colorschemes - -- use("marko-cerovac/material.nvim") - -- use("kaicataldo/material.vim") - -- use("hzchirs/vim-material") - - -- cmp plugins - use("hrsh7th/nvim-cmp") -- The completion plugin - use("hrsh7th/cmp-buffer") -- buffer completions - use("hrsh7th/cmp-path") -- path completions - use("hrsh7th/cmp-cmdline") -- cmdline completions - use("saadparwaiz1/cmp_luasnip") -- snippet completions - use("hrsh7th/cmp-nvim-lsp") - use("hrsh7th/cmp-nvim-lua") - - -- Snippets - use({ - "L3MON4D3/LuaSnip", - config = function() - require("user.snippets") - end, - }) - - -- LSP - use("neovim/nvim-lspconfig") -- enable LSP - use("williamboman/nvim-lsp-installer") -- simple to use language server installer - -- FIXME: plugin no longer maintained - use("jose-elias-alvarez/null-ls.nvim") -- for formatters and linters - -- FIXME: plugin no longer maintained - https://github.com/pmizio/typescript-tools.nvim seems like possible alternative - use("jose-elias-alvarez/typescript.nvim") - use({ "j-hui/fidget.nvim", tag = "legacy" }) -- UI for status of LSP server - - -- Rust - use("rust-lang/rust.vim") - - -- Telescope - use("nvim-telescope/telescope.nvim") - use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) - - -- Treesitter - use({ - "nvim-treesitter/nvim-treesitter", - run = ":TSUpdate", - }) - use("nvim-treesitter/nvim-treesitter-textobjects") - - -- Generate JSDocs and friends - use({ - "kkoomen/vim-doge", - run = ":call doge#install()", - }) - - -- Git - use("lewis6991/gitsigns.nvim") - use("tpope/vim-fugitive") - - -- Debugging - use("mfussenegger/nvim-dap") - use("theHamsta/nvim-dap-virtual-text") - use({ - "rcarriga/nvim-dap-ui", - requires = { - "mfussenegger/nvim-dap", - }, - }) - - -- Testings - use({ - "nvim-neotest/neotest", - requires = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - -- Test adapters - "guivazcabral/neotest-jest", - }, - }) - - -- Automatically set up your configuration after cloning packer.nvim - -- Put this at the end after all plugins - if PACKER_BOOTSTRAP then - require("packer").sync() - end -end) diff --git a/config/nvim/lua/user/project.lua b/config/nvim/lua/user/project.lua deleted file mode 100644 index 20d657d..0000000 --- a/config/nvim/lua/user/project.lua +++ /dev/null @@ -1,50 +0,0 @@ -local status_ok, project = pcall(require, "project_nvim") -if not status_ok then - return -end - -project.setup({ - ---@usage set to false to disable project.nvim. - --- This is on by default since it's currently the expected behavior. - active = true, - - on_config_done = nil, - - ---@usage set to true to disable setting the current-woriking directory - --- Manual mode doesn't automatically change your root directory, so you have - --- the option to manually do so using `:ProjectRoot` command. - manual_mode = true, - - ---@usage Methods of detecting the root directory - --- Allowed values: **"lsp"** uses the native neovim lsp - --- **"pattern"** uses vim-rooter like glob pattern matching. Here - --- order matters: if one is not detected, the other is used as fallback. You - --- can also delete or rearangne the detection methods. - -- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project - detection_methods = { "pattern" }, - - ---@usage patterns used to detect root dir, when **"pattern"** is in detection_methods - patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", ">WebDev", ">Ataccama", "!=~" }, - exclude_dirs = { "fugitive:///", ".git//" }, - - ---@ Show hidden files in telescope when searching for files in a project - show_hidden = true, - - ---@usage When set to false, you will get a message when project.nvim changes your directory. - -- When set to false, you will get a message when project.nvim changes your directory. - silent_chdir = false, - - ---@usage list of lsp client names to ignore when using **lsp** detection. eg: { "efm", ... } - ignore_lsp = {}, - - ---@type string - ---@usage path to store the project history for use in telescope - datapath = vim.fn.stdpath("data"), -}) - -local tele_status_ok, telescope = pcall(require, "telescope") -if not tele_status_ok then - return -end - -telescope.load_extension("projects") diff --git a/config/nvim/lua/user/snippets/init.lua b/config/nvim/lua/user/snippets/init.lua deleted file mode 100644 index 1a1c8f0..0000000 --- a/config/nvim/lua/user/snippets/init.lua +++ /dev/null @@ -1,170 +0,0 @@ -local ls = require("luasnip") -local fmt = require("luasnip.extras.fmt").fmt -local rep = require("luasnip.extras").rep - --- some shorthands... -local snip = ls.snippet -local node = ls.snippet_node -local text = ls.text_node -local insert = ls.insert_node -local func = ls.function_node -local choice = ls.choice_node -local dynamicn = ls.dynamic_node - -ls.config.set_config({ - history = true, - -- treesitter-hl has 100, use something higher (default is 200). - ext_base_prio = 200, - -- minimal increase in priority. - ext_prio_increase = 1, - enable_autosnippets = false, - store_selection_keys = "", -}) - --- Use Js snippets in react and TypeScript as well -ls.filetype_extend("javascriptreact", { "javascript" }) -ls.filetype_extend("typescript", { "javascript" }) -ls.filetype_extend("typescriptreact", { "typescript", "javascriptreact", "javascript" }) - -local filename = function() - return { vim.fn.expand("%:r") } -end - -ls.add_snippets(nil, { - markdown = { - -- Select link, press C-s, enter link to receive snippet - snip({ - trig = "link", - namr = "markdown_link", - dscr = "Create markdown link [txt](url)", - }, { - text("["), - insert(1), - text("]("), - func(function(_, snip) - return snip.env.TM_SELECTED_TEXT[1] or {} - end, {}), - text(")"), - insert(0), - }), - snip({ - trig = "italic", - namr = "markdown_italic", - dscr = "Make selected text italic", - }, { - text("*"), - func(function(_, snip) - return snip.env.TM_SELECTED_TEXT[1] or {} - end, {}), - text("*"), - }), - snip({ - trig = "bold", - namr = "markdown_bold", - dscr = "Make selected text bold", - }, { - text("**"), - func(function(_, snip) - return snip.env.TM_SELECTED_TEXT[1] or {} - end, {}), - text("**"), - }), - }, - javascript = { - snip({ - trig = "efn", - namr = "export function", - }, { - text("export function "), - insert(1, filename()), - text("("), - insert(2), - text(") {"), - insert(0), - text("}"), - }), - snip({ - trig = "log", - namr = "console.log", - }, { - text("console.log("), - insert(1), - text(")"), - }), - snip({ - trig = "/**", - namr = "JSDoc comment", - }, { - text({ "/**", " * " }), - insert(1), - text({ "", " */" }), - }), - snip({ trig = "setTimeout", name = "setTimeout" }, { - text("setTimeout(() => {"), - text({ "", "\t" }), - insert(1, "// Callback code"), - text({ "", "}," }), - insert(2, "delay"), - text(");"), - insert(0), - }), - snip({ trig = "jit", name = "Jest it block" }, { - text("it((${1}) => {"), - insert(2, "\t${2:// Test code}"), - text("});"), - insert(0), - }), - snip({ trig = "jdesc", name = "Jest describe block" }, { - text("describe((${1}) => {"), - insert(2, "\t${2:// Test code}"), - text("});"), - insert(0), - }), - }, - javascriptreact = { - snip({ trig = "uss", namr = "useState" }, { - text("const ["), - insert(1, "state"), - text(", "), - func(function(args) - -- Get the value of the first insert point - local state = args[1][1] - local transformedState = "set" - -- Transform the state value to generate the second insert point - .. state:gsub("^%l", string.upper) - return transformedState - end, { 1 }), - text("] = useState("), - insert(2, "defaultValue"), - text(")"), - }), - snip({ trig = "usf", namr = "useEffect" }, { - text({ "useEffect(() => {", "" }), - insert(1, "\t// Add your code here"), - text({ "", "}, [" }), - insert(2), - text("])"), - insert(0), - }), - snip({ trig = "usc", namr = "useCallback" }, { - text({ "useCallback(() => {", "" }), - insert(1, "\t// Add your code here"), - text({ "", "}, [" }), - insert(2), - text("])"), - insert(0), - }), - }, - typescript = { - snip({ trig = "intf", namr = "interface" }, { - text("interface "), - insert(1), - text(" {"), - insert(2), - text("}"), - }), - snip({ trig = "@tsi", namr = "ts-ignore" }, { - text("//@ts-ignore"), - }), - }, -}) diff --git a/config/nvim/lua/user/telescope.lua b/config/nvim/lua/user/telescope.lua deleted file mode 100644 index 2bc8adb..0000000 --- a/config/nvim/lua/user/telescope.lua +++ /dev/null @@ -1,139 +0,0 @@ -local status_ok, telescope = pcall(require, "telescope") -if not status_ok then - return -end - -local actions = require("telescope.actions") -local putils = require("telescope.previewers.utils") - -telescope.setup({ - defaults = { - prompt_prefix = "> ", - selection_caret = "> ", - initial_mode = "insert", - path_display = { truncate = 3 }, - -- file_ignore_patterns = { "node_modules", ".git", ".DS_Store", "dist", "yarn.lock", "_build", "coverage" }, - --[[ theme = "dropdown", ]] - layout_strategy = "vertical", - layout_config = { - vertical = { - height = 0.9, - preview_cutoff = 20, - prompt_position = "bottom", - width = 0.8, - }, - center = { - height = 0.7, - width = 0.7, - }, - }, - cache_picker = { - num_pickers = 10, - }, - preview = { - filesize_limit = 2, - -- 1) Do not show previewer for certain files - -- filetype_hook = function(filepath, bufnr, opts) - -- -- you could analogously check opts.ft for filetypes - -- local excluded = vim.tbl_filter(function(ending) - -- return filepath:match(ending) - -- end, { - -- ".*%.graphql$", - -- "" - -- }) - -- if not vim.tbl_isempty(excluded) then - -- putils.set_preview_message( - -- bufnr, - -- opts.winid, - -- string.format("Preview disabled for %s files!", excluded[1]:sub(5, -1)) - -- ) - -- return false - -- end - -- return true - -- end, - }, - mappings = { - i = { - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - - [""] = actions.close, - - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - - [""] = actions.select_default, - [""] = actions.select_horizontal, - [""] = actions.select_vertical, - [""] = actions.select_tab, - - [""] = actions.preview_scrolling_up, - [""] = actions.preview_scrolling_down, - - [""] = actions.results_scrolling_up, - [""] = actions.results_scrolling_down, - - [""] = actions.toggle_selection + actions.move_selection_worse, - [""] = actions.toggle_selection + actions.move_selection_better, - [""] = actions.send_to_qflist + actions.open_qflist, - [""] = actions.send_selected_to_qflist + actions.open_qflist, - [""] = actions.complete_tag, - [""] = actions.which_key, -- keys from pressing - }, - - n = { - [""] = actions.close, - [""] = actions.close, - [""] = actions.select_default, - [""] = actions.select_horizontal, - [""] = actions.select_vertical, - [""] = actions.select_tab, - - [""] = actions.toggle_selection + actions.move_selection_worse, - [""] = actions.toggle_selection + actions.move_selection_better, - [""] = actions.send_to_qflist + actions.open_qflist, - [""] = actions.send_selected_to_qflist + actions.open_qflist, - - ["j"] = actions.move_selection_next, - ["k"] = actions.move_selection_previous, - ["H"] = actions.move_to_top, - ["M"] = actions.move_to_middle, - ["L"] = actions.move_to_bottom, - - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - ["gg"] = actions.move_to_top, - ["G"] = actions.move_to_bottom, - - [""] = actions.preview_scrolling_up, - [""] = actions.preview_scrolling_down, - - [""] = actions.results_scrolling_up, - [""] = actions.results_scrolling_down, - - ["?"] = actions.which_key, - }, - }, - }, - pickers = { - find_files = { - previewer = true, - find_command = { "fd", "--type", "f", "-H" }, - }, - git_files = {}, - }, - --[[ extensions = { ]] - --[[ fzf = { ]] - --[[ fuzzy = true, -- false will only do exact matching ]] - --[[ override_generic_sorter = true, -- override the generic sorter ]] - --[[ override_file_sorter = true, -- override the file sorter ]] - --[[ case_mode = "ignore_case", -- or "ignore_case" or "respect_case" ]] - --[[ -- the default case_mode is "smart_case" ]] - --[[ }, ]] - --[[ }, ]] -}) - -telescope.load_extension("fzf") diff --git a/config/nvim/lua/user/treesitter.lua b/config/nvim/lua/user/treesitter.lua deleted file mode 100644 index cdc49a6..0000000 --- a/config/nvim/lua/user/treesitter.lua +++ /dev/null @@ -1,106 +0,0 @@ -local status_ok, configs = pcall(require, "nvim-treesitter.configs") -if not status_ok then - return -end - -configs.setup({ - -- ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = { - "bash", - "css", - "dockerfile", - "go", - "graphql", - "html", - "http", - "javascript", - "json", - "json5", - "jsonc", - "lua", - "markdown", - "prisma", - "scss", - "toml", - "tsx", - "typescript", - "vim", - "yaml", - }, - sync_install = false, -- install languages synchronously (only applied to `ensure_installed`) - auto_install = true, - ignore_install = { "" }, -- List of parsers to ignore installing - autopairs = { - enable = true, - }, - highlight = { - enable = true, -- false will disable the whole extension - disable = { "" }, -- list of language that will be disabled - additional_vim_regex_highlighting = false, - }, - indent = { enable = true, disable = { "yaml" } }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, - textobjects = { - select = { - enable = true, - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - -- you can optionally set descriptions to the mappings (used in the desc parameter of nvim_buf_set_keymap - ["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" }, - }, - -- You can choose the select mode (default is charwise 'v') - selection_modes = { - ["@parameter.outer"] = "v", -- charwise - ["@function.outer"] = "V", -- linewise - ["@class.outer"] = "", -- blockwise - }, - -- If you set this to `true` (default is `false`) then any textobject is - -- extended to include preceding xor succeeding whitespace. Succeeding - -- whitespace has priority in order to act similarly to eg the built-in - -- `ap`. - include_surrounding_whitespace = true, - }, - swap = { - enable = true, - swap_next = { - ["a"] = "@parameter.inner", - }, - swap_previous = { - ["A"] = "@parameter.inner", - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", - }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", - }, - }, - }, -}) diff --git a/config/nvim/lua/user/whichkey.lua b/config/nvim/lua/user/whichkey.lua deleted file mode 100644 index 2bb9d81..0000000 --- a/config/nvim/lua/user/whichkey.lua +++ /dev/null @@ -1,206 +0,0 @@ -local status_ok, which_key = pcall(require, "which-key") -if not status_ok then - return -end - -local setup = { - plugins = { - marks = true, -- shows a list of your marks on ' and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - spelling = { - enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions - suggestions = 20, -- how many suggestions should be shown in the list? - }, - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - presets = { - operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion - motions = true, -- adds help for motions - text_objects = true, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true, -- bindings for prefixed with g - }, - }, - -- add operators that will trigger motion and text object completion - -- to enable all native operators, set the preset / operators plugin above - -- operators = { gc = "Comments" }, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it's label - group = "+", -- symbol prepended to a group - }, - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup - }, - window = { - border = "none", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] - winblend = 0, - }, - layout = { - height = { min = 5, max = 25 }, -- min and max height of the columns - width = { min = 30, max = 50 }, -- min and max width of the columns - spacing = 10, -- spacing between columns - align = "left", -- align columns left, center or right - }, - ignore_missing = true, -- enable this to hide mappings for which you didn't specify a label - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate - show_help = true, -- show help message on the command line when the popup is visible - triggers = "auto", -- automatically setup triggers - -- triggers = {""} -- or specify a list manually - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - -- this is mostly relevant for key maps that start with a native binding - -- most people should not need to change this - i = { "j", "k" }, - v = { "j", "k" }, - }, -} - -local opts = { - mode = "n", -- NORMAL mode - prefix = "", - buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - silent = true, -- use `silent` when creating keymaps - noremap = true, -- use `noremap` when creating keymaps - nowait = true, -- use `nowait` when creating keymaps -} - -local mappings = { - -- ["c"] = { "Bdelete!", "Close Buffer" }, - -- ["h"] = { "nohlsearch", "No Highlight" }, - -- ["f"] = { - -- "lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})", - -- "Find files", - -- }, - -- ["F"] = { "Telescope live_grep theme=ivy", "Find Text" }, - -- ["P"] = { "lua require('telescope').extensions.projects.projects()", "Projects" }, - -- - -- p = { - -- name = "Packer", - -- c = { "PackerCompile", "Compile" }, - -- i = { "PackerInstall", "Install" }, - -- s = { "PackerSync", "Sync" }, - -- S = { "PackerStatus", "Status" }, - -- u = { "PackerUpdate", "Update" }, - -- }, - -- - -- l = { - -- name = "LSP", - -- a = { "lua vim.lsp.buf.code_action()", "Code Action" }, - -- d = { - -- "Telescope lsp_document_diagnostics", - -- "Document Diagnostics", - -- }, - -- w = { - -- "Telescope lsp_workspace_diagnostics", - -- "Workspace Diagnostics", - -- }, - -- f = { "lua vim.lsp.buf.formatting()", "Format" }, - -- i = { "LspInfo", "Info" }, - -- I = { "LspInstallInfo", "Installer Info" }, - -- j = { - -- "lua vim.lsp.diagnostic.goto_next()", - -- "Next Diagnostic", - -- }, - -- k = { - -- "lua vim.lsp.diagnostic.goto_prev()", - -- "Prev Diagnostic", - -- }, - -- l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, - -- q = { "lua vim.lsp.diagnostic.set_loclist()", "Quickfix" }, - -- r = { "lua vim.lsp.buf.rename()", "Rename" }, - -- s = { "Telescope lsp_document_symbols", "Document Symbols" }, - -- S = { - -- "Telescope lsp_dynamic_workspace_symbols", - -- "Workspace Symbols", - -- }, - -- }, - -- s = { - -- name = "Search", - -- c = { "Telescope colorscheme", "Colorscheme" }, - -- h = { "Telescope help_tags", "Find Help" }, - -- M = { "Telescope man_pages", "Man Pages" }, - -- r = { "Telescope oldfiles", "Open Recent File" }, - -- R = { "Telescope registers", "Registers" }, - -- k = { "Telescope keymaps", "Keymaps" }, - -- C = { "Telescope commands", "Commands" }, - -- }, - -- - -- - -- - -- - -- - - g = { - name = "Git", - b = { "lua require 'gitsigns'.blame_line()", "Blame" }, - l = { "lua require 'gitsigns'.toggle_current_line_blame()", "Toggle line git blame" }, - j = { "lua require 'gitsigns'.next_hunk()", "Go to next hunk" }, - k = { "lua require 'gitsigns'.prev_hunk()", "Go to prev hunk" }, - p = { "lua require 'gitsigns'.preview_hunk()", "Preview hunk" }, - r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, - R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, - a = { "lua require 'gitsigns'.stage_hunk()", "Stage Hunk" }, - A = { "lua require 'gitsigns'.stage_buffer()", "Stage file" }, - u = { - "lua require 'gitsigns'.undo_stage_hunk()", - "Undo Stage Hunk", - }, - s = { "Telescope git_status", "Git status..." }, - ["co"] = { "Telescope git_branches", "Checkout branch" }, - ["cc"] = { "Telescope git_commits", "Checkout commit" }, - d = { - "Gitsigns diffthis HEAD", - "Diff", - }, - }, - - t = { - name = "Tests", - r = { "lua require('neotest').run.run()", "Run nearest test" }, - d = { "lua require('neotest').run.run({strategy = 'dap'})", "Debug test" }, - f = { "lua require('neotest').run.run(vim.fn.expand('%'))", "Run all tests in file" }, - s = { "lua require('neotest').summary.toggle()", "Toggle test summary" }, - o = { "lua require('neotest').output.open({enter = true})", "Open test output" }, - w = { "lua require('neotest').watch.toggle(vim.fn.expand('%'))", "Watch file" }, - ["[e"] = { "lua require('neotest').jump.prev({ status = 'failed' })", "Jump to prev failed" }, - ["]e"] = { "lua require('neotest').jump.next({ status = 'failed' })", "Jump to next failed" }, - }, - - d = { - name = "Debugging", - c = { "lua require'dap'.continue()", "Continue" }, - o = { "lua require'dap'.step_over()", "Step over" }, - i = { "lua require'dap'.step_into()", "Step into" }, - t = { "lua require'dap'.step_out()", "Step out" }, - b = { "lua require'dap'.toggle_breakpoint()", "Toggle breakpoint" }, - q = { - "lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))", - "Set breakpoint with condition", - }, - l = { - "lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))", - "Set log message breakpoint", - }, - p = { "lua require'dap'.repl.open()", "REPL open" }, - r = { "lua require'dap'.run_last()", "Run last" }, - }, -} - -local legacy_opts = { noremap = true, silent = true } -vim.keymap.set("n", "f", ":Telescope git_files", legacy_opts) -vim.keymap.set("n", "z", ":Telescope find_files", legacy_opts) -vim.keymap.set("n", "u", ":Telescope buffers", legacy_opts) --- vim.keymap.set("n", "u", ":Telescope projects", legacy_opts) -vim.keymap.set("n", "e", ":Telescope live_grep", legacy_opts) -vim.keymap.set("n", "n", ":Telescope diagnostics", legacy_opts) --- vim.keymap.set("n", "d", ":Telescope lsp_document_symbols", legacy_opts) - -which_key.setup(setup) -which_key.register(mappings, opts) diff --git a/config/nvim/plugin/packer_compiled.lua b/config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index 5469946..0000000 --- a/config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,344 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - -_G._packer = _G._packer or {} -_G._packer.inside_compile = true - -local time -local profile_info -local should_profile = false -if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end -else - time = function(chunk, start) end -end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - if threshold then - table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') - end - - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/Users/Tomas.Pustelnik/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?.lua;/Users/Tomas.Pustelnik/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?/init.lua;/Users/Tomas.Pustelnik/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?.lua;/Users/Tomas.Pustelnik/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/Users/Tomas.Pustelnik/.cache/nvim/packer_hererocks/2.1.1700008891/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - ["Comment.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/Comment.nvim", - url = "https://github.com/numToStr/Comment.nvim" - }, - LuaSnip = { - config = { "\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18user.snippets\frequire\0" }, - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip" - }, - ["cmp-buffer"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-cmdline"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp-cmdline", - url = "https://github.com/hrsh7th/cmp-cmdline" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-lua"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", - url = "https://github.com/hrsh7th/cmp-nvim-lua" - }, - ["cmp-path"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - cmp_luasnip = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - ["copilot.vim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/copilot.vim", - url = "https://github.com/github/copilot.vim" - }, - ["emmet-vim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/emmet-vim", - url = "https://github.com/mattn/emmet-vim" - }, - ["fidget.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/fidget.nvim", - url = "https://github.com/j-hui/fidget.nvim" - }, - ["gitsigns.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", - url = "https://github.com/lewis6991/gitsigns.nvim" - }, - ["impatient.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/impatient.nvim", - url = "https://github.com/lewis6991/impatient.nvim" - }, - ["indent-blankline.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", - url = "https://github.com/lukas-reineke/indent-blankline.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - ["mini.indentscope"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/mini.indentscope", - url = "https://github.com/echasnovski/mini.indentscope" - }, - neotest = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/neotest", - url = "https://github.com/nvim-neotest/neotest" - }, - ["neotest-jest"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/neotest-jest", - url = "https://github.com/guivazcabral/neotest-jest" - }, - ["null-ls.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/null-ls.nvim", - url = "https://github.com/jose-elias-alvarez/null-ls.nvim" - }, - ["nvim-autopairs"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-autopairs", - url = "https://github.com/windwp/nvim-autopairs" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-colorizer.lua"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", - url = "https://github.com/norcalli/nvim-colorizer.lua" - }, - ["nvim-dap"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-dap", - url = "https://github.com/mfussenegger/nvim-dap" - }, - ["nvim-dap-ui"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", - url = "https://github.com/rcarriga/nvim-dap-ui" - }, - ["nvim-dap-virtual-text"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text", - url = "https://github.com/theHamsta/nvim-dap-virtual-text" - }, - ["nvim-lsp-installer"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", - url = "https://github.com/williamboman/nvim-lsp-installer" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-tree.lua"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", - url = "https://github.com/kyazdani42/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-treesitter-textobjects"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects", - url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" - }, - ["nvim-ts-context-commentstring"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring", - url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/popup.nvim", - url = "https://github.com/nvim-lua/popup.nvim" - }, - ["project.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/project.nvim", - url = "https://github.com/ahmedkhalf/project.nvim" - }, - ["rust.vim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/rust.vim", - url = "https://github.com/rust-lang/rust.vim" - }, - ["telescope-fzf-native.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["todo-comments.nvim"] = { - config = { "\27LJ\2\n\1\0\0\5\0\14\0\0176\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\5\0005\4\4\0=\4\6\0035\4\a\0=\4\b\0035\4\t\0=\4\n\3=\3\v\0025\3\f\0=\3\r\2B\0\2\1K\0\1\0\14highlight\1\0\2\nafter\afg\fkeyword\abg\vcolors\tinfo\1\2\0\0\f#89ddff\fwarning\1\2\0\0\f#ffcb6b\nerror\1\0\0\1\2\0\0\f#F7454B\1\0\1\nsigns\1\nsetup\18todo-comments\frequire\0" }, - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/todo-comments.nvim", - url = "https://github.com/folke/todo-comments.nvim" - }, - ["typescript.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/typescript.nvim", - url = "https://github.com/jose-elias-alvarez/typescript.nvim" - }, - ["vim-CtrlXA"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-CtrlXA", - url = "https://github.com/Konfekt/vim-CtrlXA" - }, - ["vim-doge"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-doge", - url = "https://github.com/kkoomen/vim-doge" - }, - ["vim-fugitive"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-fugitive", - url = "https://github.com/tpope/vim-fugitive" - }, - ["vim-illuminate"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-illuminate", - url = "https://github.com/RRethy/vim-illuminate" - }, - ["vim-repeat"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-repeat", - url = "https://github.com/tpope/vim-repeat" - }, - ["vim-surround"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/vim-surround", - url = "https://github.com/tpope/vim-surround" - }, - ["which-key.nvim"] = { - loaded = true, - path = "/Users/Tomas.Pustelnik/.local/share/nvim/site/pack/packer/start/which-key.nvim", - url = "https://github.com/folke/which-key.nvim" - } -} - -time([[Defining packer_plugins]], false) --- Config for: LuaSnip -time([[Config for LuaSnip]], true) -try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18user.snippets\frequire\0", "config", "LuaSnip") -time([[Config for LuaSnip]], false) --- Config for: todo-comments.nvim -time([[Config for todo-comments.nvim]], true) -try_loadstring("\27LJ\2\n\1\0\0\5\0\14\0\0176\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\5\0005\4\4\0=\4\6\0035\4\a\0=\4\b\0035\4\t\0=\4\n\3=\3\v\0025\3\f\0=\3\r\2B\0\2\1K\0\1\0\14highlight\1\0\2\nafter\afg\fkeyword\abg\vcolors\tinfo\1\2\0\0\f#89ddff\fwarning\1\2\0\0\f#ffcb6b\nerror\1\0\0\1\2\0\0\f#F7454B\1\0\1\nsigns\1\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim") -time([[Config for todo-comments.nvim]], false) - -_G._packer.inside_compile = false -if _G._packer.needs_bufread == true then - vim.cmd("doautocmd BufRead") -end -_G._packer.needs_bufread = false - -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end