diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cb205e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +plugin diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..3473a02 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2022 Jeremy Chen + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 357a6cd..7cc00ea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,45 @@ # ModuleVim -A NeoVim configuration +A NeoVim configuration with original LSP support([lspconfig](https://github.com/neovim/nvim-lspconfig)) and some +fashion plugins + +## snippets +gruvybox theme +![gruvybox](./ScreenCut/gruvbox.PNG) +github theme +![github](./ScreenCut/github-theme.PNG) +which-key +![which-key](./ScreenCut/which-key.PNG) +transparent style +![transparent](./ScreenCut/transparent.PNG) + +## features +- key hint.(support by [which-key]() ) +- easily change colorscheme(`SPC-t-c`) +- lazy load + + +## plugin table + +| function | plugin | +|--------------- | --------------- | +| statusline | galaxyline | +| tabline | barbar | +| file tree | nvim-tree | +| tags | vista | +| welcome page | dashboard-nvim | +| fuzzy finder | telescope | +| terminal support | nvim-toggleterm | + + +## support languages +For now, ModuleVim supports some common used languages, you can also add +language by `:LspInstall $language` + +## use + +copy modulevim dictionary into your config path and then + +``` +ln -s modulevim ~/.config/nvim +``` +have fun diff --git a/ScreenCut/github-theme.PNG b/ScreenCut/github-theme.PNG new file mode 100644 index 0000000..34c087c Binary files /dev/null and b/ScreenCut/github-theme.PNG differ diff --git a/ScreenCut/gruvbox.PNG b/ScreenCut/gruvbox.PNG new file mode 100644 index 0000000..1ffff64 Binary files /dev/null and b/ScreenCut/gruvbox.PNG differ diff --git a/ScreenCut/transparent.PNG b/ScreenCut/transparent.PNG new file mode 100644 index 0000000..581bccc Binary files /dev/null and b/ScreenCut/transparent.PNG differ diff --git a/ScreenCut/which-key.PNG b/ScreenCut/which-key.PNG new file mode 100644 index 0000000..ea11545 Binary files /dev/null and b/ScreenCut/which-key.PNG differ diff --git a/init.lua b/init.lua index 9a655a1..e357dc6 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,3 @@ -- start ModuleVim and install plugin packer require("core") +require("gui") diff --git a/lua/core/config/accelerated-jk.lua b/lua/core/config/accelerated-jk.lua index 73b334a..c985ea8 100644 --- a/lua/core/config/accelerated-jk.lua +++ b/lua/core/config/accelerated-jk.lua @@ -1,2 +1,2 @@ -vim.api.nvim_set_keymap("n","j","(accelerated_jk_gj)",{silent=true}) -vim.api.nvim_set_keymap("n","k","(accelerated_jk_gk)",{silent=true}) +vim.api.nvim_set_keymap("n", "j", "(accelerated_jk_gj)", {silent = true}) +vim.api.nvim_set_keymap("n", "k", "(accelerated_jk_gk)", {silent = true}) diff --git a/lua/core/config/barbar.lua b/lua/core/config/barbar.lua index 6926341..29a31ee 100644 --- a/lua/core/config/barbar.lua +++ b/lua/core/config/barbar.lua @@ -1,16 +1,33 @@ -vim.api.nvim_set_keymap("n","\\,",":BufferPrevious",{silent=true}) -vim.api.nvim_set_keymap("n","\\.",":BufferNext",{silent=true}) -vim.api.nvim_set_keymap("n","\\1",":BufferGoto 1",{silent=true}) -vim.api.nvim_set_keymap("n","\\2",":BufferGoto 2",{silent=true}) -vim.api.nvim_set_keymap("n","\\3",":BufferGoto 3",{silent=true}) -vim.api.nvim_set_keymap("n","\\4",":BufferGoto 4",{silent=true}) -vim.api.nvim_set_keymap("n","\\5",":BufferGoto 5",{silent=true}) -vim.api.nvim_set_keymap("n","\\6",":BufferGoto 6",{silent=true}) -vim.api.nvim_set_keymap("n","\\7",":BufferGoto 7",{silent=true}) -vim.api.nvim_set_keymap("n","\\8",":BufferGoto 8",{silent=true}) -vim.api.nvim_set_keymap("n","\\9",":BufferGoto 9",{silent=true}) -vim.api.nvim_set_keymap("n","\\0",":BufferLast",{silent=true}) -vim.api.nvim_set_keymap("n","\\c",":BufferClose",{silent=true}) -vim.api.nvim_set_keymap("n","\\s",":BufferPick",{silent=true}) -vim.api.nvim_set_keymap("n","\\b",":BufferOrderByLanguage",{silent=true}) -vim.api.nvim_set_keymap("n","\\d",":BufferOrderByDirectory",{silent=true}) +vim.api.nvim_set_keymap("n", "\\,", ":BufferPrevious", {silent = true}) +vim.api.nvim_set_keymap("n", "\\.", ":BufferNext", {silent = true}) +vim.api.nvim_set_keymap("n", "\\1", ":BufferGoto 1", {silent = true}) +vim.api.nvim_set_keymap("n", "\\2", ":BufferGoto 2", {silent = true}) +vim.api.nvim_set_keymap("n", "\\3", ":BufferGoto 3", {silent = true}) +vim.api.nvim_set_keymap("n", "\\4", ":BufferGoto 4", {silent = true}) +vim.api.nvim_set_keymap("n", "\\5", ":BufferGoto 5", {silent = true}) +vim.api.nvim_set_keymap("n", "\\6", ":BufferGoto 6", {silent = true}) +vim.api.nvim_set_keymap("n", "\\7", ":BufferGoto 7", {silent = true}) +vim.api.nvim_set_keymap("n", "\\8", ":BufferGoto 8", {silent = true}) +vim.api.nvim_set_keymap("n", "\\9", ":BufferGoto 9", {silent = true}) +vim.api.nvim_set_keymap("n", "\\0", ":BufferLast", {silent = true}) +vim.api.nvim_set_keymap("n", "\\c", ":BufferClose", {silent = true}) +vim.api.nvim_set_keymap("n", "\\s", ":BufferPick", {silent = true}) +vim.api.nvim_set_keymap("n", "\\e", ":enew", {silent = true}) +vim.api.nvim_set_keymap( + "n", + "\\C", + ":BufferCloseAllButCurrent", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "\\b", + ":BufferOrderByLanguage", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "\\d", + ":BufferOrderByDirectory", + {silent = true} +) diff --git a/lua/core/config/basic-configuration.lua b/lua/core/config/basic-configuration.lua index 2e8d34b..2bc3028 100644 --- a/lua/core/config/basic-configuration.lua +++ b/lua/core/config/basic-configuration.lua @@ -1,123 +1,139 @@ -- basic configuration like some original vim options -- -- --------------key mapping------------------ -vim.api.nvim_set_keymap("n","",":wincmd w",{silent = true}) -vim.api.nvim_set_keymap("i","jk","",{silent=true}) -vim.api.nvim_set_keymap("n","",":w!",{noremap=true}) -vim.api.nvim_set_keymap("i","",":w!",{noremap=true}) +vim.api.nvim_set_keymap("n", "", ":wincmd w", {silent = true}) +vim.api.nvim_set_keymap("i", "jk", "", {silent = true}) +vim.api.nvim_set_keymap("n", "", ":w!", {noremap = true}) +vim.api.nvim_set_keymap("i", "", ":w!", {noremap = true}) vim.cmd([[ nnoremap :resize -2 nnoremap :resize +2 nnoremap :vertical resize -2 nnoremap :vertical resize +2 ]]) + -- --------------configuration------------------ +local sh = "bash" + +-- HINT: this will lag the nvim-tree, uncomment it when upstream fix it +--[[ if vim.fn.executable('fish') == 1 then + sh = "fish" +end ]] global_local = { - termguicolors = true, - mouse = "nv", - errorbells = true, - visualbell = true, - hidden = true, - fileformats = "unix,mac,dos", - magic = true, - virtualedit = "block", - encoding = "utf-8", - viewoptions = "folds,cursor,curdir,slash,unix", - sessionoptions = "curdir,help,tabpages,winsize", - clipboard = "unnamedplus", - wildignorecase = true, - wildignore = ".git,.hg,.svn,*.pyc,*.o,*.out,*.jpg,*.jpeg,*.png,*.gif,*.zip,**/tmp/**,*.DS_Store,**/node_modules/**,**/bower_modules/**", - backup = false, - writebackup = false, - swapfile = false, - history = 2000, - shada = "!,'300,<50,@100,s10,h", - backupskip = "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*,/private/var/*,.vault.vim", - smarttab = true, - shiftround = true, - timeout = true, - ttimeout = true, - timeoutlen = 500, - ttimeoutlen = 10, - updatetime = 100, - redrawtime = 1500, - ignorecase = true, - smartcase = true, - infercase = true, - incsearch = true, - wrapscan = true, - complete = ".,w,b,k", - inccommand = "nosplit", - grepformat = "%f:%l:%c:%m", - grepprg = "rg --hidden --vimgrep --smart-case --", - breakat = [[\ \ ;:,!?]], - startofline = false, - whichwrap = "h,l,<,>,[,],~", - splitbelow = true, - splitright = true, - switchbuf = "useopen", - backspace = "indent,eol,start", - diffopt = "filler,iwhite,internal,algorithm:patience", - completeopt = "menu,menuone,noselect", - jumpoptions = "stack", - showmode = false, - shortmess = "aoOTIcF", - scrolloff = 5, - sidescrolloff = 5, - foldlevelstart = 99, - ruler = false, - list = true, - showtabline = 2, - winwidth = 30, - winminwidth = 10, - pumheight = 15, - helpheight = 12, - previewheight = 12, - showcmd = false, - cmdheight = 2, - cmdwinheight = 5, - equalalways = false, - laststatus = 2, - display = "lastline", - showbreak = "↳ ", - listchars = "tab:»·,nbsp:+,trail:·,extends:→,precedes:←", - pumblend = 10, - winblend = 10, - spell = true, - spelllang = "en_us,cjk", - } - buffer={ - autoread = true, - undofile = true, - synmaxcol = 2500, - formatoptions = "1jcroql", - textwidth = 80, - expandtab = true, - autoindent = true, - tabstop = 4, - shiftwidth = 4, - softtabstop = -1, - breakindentopt = "shift:2,min:20", - wrap = false, - linebreak = true, - cursorcolumn = true, - cursorline = true, - number = true, - relativenumber = true, - foldenable = true, - signcolumn = "yes", - conceallevel = 2, - concealcursor = "niv" - } - for name, value in pairs(global_local) do - vim.o[name] = value - end + termguicolors = true, + mouse = "nv", + errorbells = true, + visualbell = true, + hidden = true, + fileformats = "unix,mac,dos", + magic = true, + virtualedit = "block", + encoding = "utf-8", + viewoptions = "folds,cursor,curdir,slash,unix", + sessionoptions = "curdir,help,tabpages,winsize", + + -- clipboard = "unnamedplus", + -- HINT: neovim not support system clipboard + wildignorecase = true, + wildignore = ".git,.hg,.svn,*.pyc,*.o,*.out,*.jpg,*.jpeg,*.png,*.gif,*.zip,**/tmp/**,*.DS_Store,**/node_modules/**,**/bower_modules/**", + backup = false, + writebackup = false, + guifont = "SauceCodePro Nerd Font", + swapfile = false, + history = 2000, + shada = "!,'300,<50,@100,s10,h", + backupskip = "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*,/private/var/*,.vault.vim", + smarttab = true, + shiftround = true, + timeout = true, + ttimeout = true, + timeoutlen = 500, + ttimeoutlen = 10, + updatetime = 100, + redrawtime = 1500, + ignorecase = true, + smartcase = true, + infercase = true, + incsearch = true, + wrapscan = true, + complete = ".,w,b,k", + inccommand = "nosplit", + grepformat = "%f:%l:%c:%m", + grepprg = "rg --hidden --vimgrep --smart-case --", + breakat = [[\ \ ;:,!?]], + startofline = false, + whichwrap = "h,l,<,>,[,],~", + splitbelow = true, + splitright = true, + switchbuf = "useopen", + backspace = "indent,eol,start", + diffopt = "filler,iwhite,internal,algorithm:patience", + completeopt = "menu,menuone,noselect", + jumpoptions = "stack", + showmode = false, + shortmess = "aoOTIcF", + scrolloff = 5, + sidescrolloff = 5, + foldlevelstart = 99, + ruler = false, + list = true, + showtabline = 2, + winwidth = 30, + winminwidth = 10, + pumheight = 15, + helpheight = 12, + previewheight = 12, + showcmd = false, + cmdheight = 2, + cmdwinheight = 5, + equalalways = false, + laststatus = 2, + display = "lastline", + showbreak = "↳ ", + listchars = "tab:»·,nbsp:+,trail:·,extends:→,precedes:←", + pumblend = 10, + winblend = 10, + spell = true, + spelllang = "en_us,cjk", + + -- optimize startup time + shell = sh, + shadafile = "", + lazyredraw = true +} +buffer = { + autoread = true, + undofile = true, + synmaxcol = 2500, + formatoptions = "1jcroql", + textwidth = 80, + expandtab = true, + autoindent = true, + tabstop = 4, + shiftwidth = 4, + softtabstop = -1, + breakindentopt = "shift:2,min:20", + wrap = false, + linebreak = true, + cursorcolumn = true, + cursorline = true, + number = true, + relativenumber = true, + foldenable = true, + signcolumn = "yes", + conceallevel = 2, + concealcursor = "niv" +} +for name, value in pairs(global_local) do + vim.o[name] = value +end - for name, value in pairs(buffer) do - if value == true or value == false then - vim.api.nvim_command("set " .. name) - else - vim.api.nvim_command("set " .. name .. "=" .. value) - end - end +for name, value in pairs(buffer) do + if value == true or value == false then + vim.api.nvim_command("set " .. name) + else + vim.api.nvim_command("set " .. name .. "=" .. value) + end +end +vim.cmd("hi SpellBad cterm=underline gui=undercurl guisp=None") diff --git a/lua/core/config/dashboard-vim.lua b/lua/core/config/dashboard-vim.lua index 110519c..a09b754 100644 --- a/lua/core/config/dashboard-vim.lua +++ b/lua/core/config/dashboard-vim.lua @@ -1,41 +1,32 @@ -vim.api.nvim_set_keymap("n","aa",":Dashboard",{silent=true}) - - - - +vim.api.nvim_set_keymap("n", "aa", ":Dashboard", {silent = true}) ----------------------------------------------------------------------------- - - - vim.g.dashboard_disable_at_vimenter = 0 vim.g.dashboard_footer_icon = "" vim.g.dashboard_default_executive = "telescope" vim.g.dashboard_preview_file_width = 80 vim.g.dashboard_custom_header = { - - ' ╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭╮╱╱╭╮ ', - ' ╰╮╭╮┣╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╰╮╭╯┃ ', - ' ╱┃┃┃┣╋━━┳━┳━━┳╮╭┳╮╱╭╮╰╮┃┃╭╋╮╭╮ ', - ' ╱┃┃┃┣┫┃━┫╭┫┃━┫╰╯┃┃╱┃┃╱┃╰╯┣┫╰╯┃ ', - ' ╭╯╰╯┃┃┃━┫┃┃┃━┫┃┃┃╰━╯┃╱╰╮╭┫┃┃┃┃ ', - ' ╰━━━┫┣━━┻╯╰━━┻┻┻┻━╮╭╯╱╱╰╯╰┻┻┻╯ ', - ' ╱╱╱╭╯┃╱╱╱╱╱╱╱╱╱╱╭━╯┃ ', - ' ╱╱╱╰━╯╱╱╱╱╱╱╱╱╱╱╰━━╯ ' + ' ╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭╮╱╱╭╮ ', + ' ╰╮╭╮┣╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╰╮╭╯┃ ', + ' ╱┃┃┃┣╋━━┳━┳━━┳╮╭┳╮╱╭╮╰╮┃┃╭╋╮╭╮ ', + ' ╱┃┃┃┣┫┃━┫╭┫┃━┫╰╯┃┃╱┃┃╱┃╰╯┣┫╰╯┃ ', + ' ╭╯╰╯┃┃┃━┫┃┃┃━┫┃┃┃╰━╯┃╱╰╮╭┫┃┃┃┃ ', + ' ╰━━━┫┣━━┻╯╰━━┻┻┻┻━╮╭╯╱╱╰╯╰┻┻┻╯ ', + ' ╱╱╱╭╯┃╱╱╱╱╱╱╱╱╱╱╭━╯┃ ', + ' ╱╱╱╰━╯╱╱╱╱╱╱╱╱╱╱╰━━╯ ' } vim.g.dashboard_custom_section = { - new_file = { - description = {" New File "}, - command = "DashboardNewFile" - }, - find_history = { - description = {" Recently opened files "}, - command = "DashboardFindHistory" - }, - find_file = { - description = {" Find File "}, - command = "DashboardFindFile" - } - + new_file = { + description = {" New File "}, + command = "DashboardNewFile" + }, + find_history = { + description = {" Recently opened files "}, + command = "lua require('telescope.builtin').oldfiles()" + }, + find_file = { + description = {" Find File "}, + command = "lua require('telescope.builtin').find_files()" + } } diff --git a/lua/core/config/galaxyline.lua b/lua/core/config/galaxyline.lua index 9bfd972..6072fc4 100644 --- a/lua/core/config/galaxyline.lua +++ b/lua/core/config/galaxyline.lua @@ -1,231 +1,259 @@ - local gl = require("galaxyline") local gls = gl.section +require 'nvim-navic'.setup() -gl.short_line_list = {"NvimTree","Vista","toggleterm"} +gl.short_line_list = { + "NvimTree", + "vista_kind", + "toggleterm", + "vista_markdown", + "vista" +} local colors = { - bg = "#1e222a", - line_bg = "#1e222a", - fg = "#D8DEE9", - green = "#BBE67E", - orange = "#FF8800", - red = "#DF8890", - lightbg = "#282c34", - nord = "#81A1C1", - greenYel = "#EBCB8B" + bg = "#1e222a", + line_bg = "#1e222a", + fg = "#D8DEE9", + green = "#BBE67E", + orange = "#FF8800", + red = "#DF8890", + lightbg = "#282c34", + nord = "#81A1C1", + greenYel = "#EBCB8B" } gls.left[1] = { - leftRounded = { - provider = function() - return "" - end, - highlight = {colors.nord, colors.bg} - } + leftRounded = { + provider = function() + return "" + end, + highlight = {colors.nord, colors.bg} + } } gls.left[2] = { - statusIcon = { - provider = function() - return "  " - end, - highlight = {colors.bg, colors.nord}, - separator = " ", - separator_highlight = {colors.lightbg, colors.lightbg} - } + statusIcon = { + provider = function() + return "  " + end, + highlight = {colors.bg, colors.nord}, + separator = " ", + separator_highlight = {colors.lightbg, colors.lightbg} + } } gls.left[3] = { - FileIcon = { - provider = "FileIcon", - condition = buffer_not_empty, - highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.lightbg} - } + FileIcon = { + provider = "FileIcon", + condition = buffer_not_empty, + highlight = { + require("galaxyline.providers.fileinfo").get_file_icon_color, + colors.lightbg + } + } } gls.left[4] = { - FileName = { - provider = {"FileName", "FileSize"}, - condition = buffer_not_empty, - highlight = {colors.fg, colors.lightbg} - } + FileName = { + provider = {"FileName", "FileSize"}, + condition = buffer_not_empty, + highlight = {colors.fg, colors.lightbg} + } } gls.left[5] = { - teech = { - provider = function() - return "" - end, - separator = " ", - highlight = {colors.lightbg, colors.bg} - } + nvimNavic = { + provider = function() + return require('nvim-navic').get_location() + end, + condition = function() + return require('nvim-navic').is_available() + end + } } -local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 40 then - return true - end - return false -end - gls.left[6] = { - DiffAdd = { - provider = "DiffAdd", - condition = checkwidth, - icon = "  ", - highlight = {colors.greenYel, colors.line_bg} - } + teech = { + provider = function() + return "" + end, + separator = " ", + highlight = {colors.lightbg, colors.bg} + } } +local checkwidth = function() + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 40 then + return true + end + return false +end + gls.left[7] = { - DiffModified = { - provider = "DiffModified", - condition = checkwidth, - icon = " ", - highlight = {colors.orange, colors.line_bg} - } + DiffAdd = { + provider = "DiffAdd", + condition = checkwidth, + icon = "  ", + highlight = {colors.greenYel, colors.line_bg} + } } gls.left[8] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = " ", - highlight = {colors.red, colors.line_bg} - } + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = " ", + highlight = {colors.orange, colors.line_bg} + } } gls.left[9] = { - LeftEnd = { - provider = function() - return " " - end, - separator = " ", - separator_highlight = {colors.line_bg, colors.line_bg}, - highlight = {colors.line_bg, colors.line_bg} - } + DiffRemove = { + provider = "DiffRemove", + condition = checkwidth, + icon = " ", + highlight = {colors.red, colors.line_bg} + } } gls.left[10] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = {colors.red, colors.bg} - } + LeftEnd = { + provider = function() + return " " + end, + separator = " ", + separator_highlight = {colors.line_bg, colors.line_bg}, + highlight = {colors.line_bg, colors.line_bg} + } } gls.left[11] = { - Space = { - provider = function() - return " " - end, - highlight = {colors.line_bg, colors.line_bg} - } + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.red, colors.bg} + } } gls.left[12] = { - DiagnosticWarn = { - provider = "DiagnosticWarn", - icon = "  ", - highlight = {colors.red, colors.bg} - } + Space = { + provider = function() + return " " + end, + highlight = {colors.line_bg, colors.line_bg} + } +} + +gls.left[13] = { + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = {colors.red, colors.bg} + } } gls.right[1] = { - encode = { - provider = 'FileEncode', - icon = "  ", - highlight = {colors.fg, colors.line_bg} - } + encode = { + provider = 'FileEncode', + icon = "  ", + highlight = {colors.fg, colors.line_bg} + } } gls.right[2] = { - lineColumnNumber = { - provider = 'LineColumn', - icon = " ", - highlight = {colors.fg, colors.line_bg} - } + lineColumnNumber = { + provider = 'LineColumn', + icon = " ", + highlight = {colors.fg, colors.line_bg} + } } gls.right[3] = { - ShowLspClient = { - provider = function() - if require('galaxyline.provider_lsp').get_lsp_client()=='No Active Lsp' then - return "  " - end - return "  " - end, - condition = function() - local tbl = {["dashboard"] = true, [""] = true} - if tbl[vim.bo.filetype] then - return false - end - return true - end, - highlight = {function() if require('galaxyline.provider_lsp').get_lsp_client()=='No Active Lsp' then return colors.red else return colors.green end end, colors.line_bg} - } + ShowLspClient = { + provider = function() + if require('galaxyline.providers.lsp').get_lsp_client() == 'No Active Lsp' then + return "  " + end + return "  " + end, + condition = function() + local tbl = {["dashboard"] = true, [""] = true} + if tbl[vim.bo.filetype] then + return false + end + return true + end, + highlight = { + function() + if require('galaxyline.providers.lsp').get_lsp_client() == 'No Active Lsp' then + return colors.red + else + return colors.green + end + end, + colors.line_bg + } + } } gls.right[4] = { - Space = { - provider = function() - return " " - end, - highlight = {colors.line_bg, colors.line_bg} - } + Space = { + provider = function() + return " " + end, + highlight = {colors.line_bg, colors.line_bg} + } } - gls.right[5] = { - GitBranch = { - provider = "GitBranch", - condition = require("galaxyline.provider_vcs").check_git_workspace, - icon = "  ", - highlight = {colors.green, colors.line_bg} - } + GitBranch = { + provider = "GitBranch", + condition = require("galaxyline.providers.vcs").check_git_workspace, + icon = "  ", + highlight = {colors.green, colors.line_bg} + } } gls.right[6] = { - right_LeftRounded = { - provider = function() - return "" - end, - separator = " ", - separator_highlight = {colors.bg, colors.bg}, - highlight = {colors.red, colors.bg} - } + right_LeftRounded = { + provider = function() + return "" + end, + separator = " ", + separator_highlight = {colors.bg, colors.bg}, + highlight = {colors.red, colors.bg} + } } gls.right[7] = { - ViMode = { - provider = function() - local alias = { - n = "NORMAL", - i = "INSERT", - c = "COMMAND", - V = "VISUAL", - [""] = "VISUAL", - v = "VISUAL", - R = "REPLACE" - } - return alias[vim.fn.mode()] - end, - highlight = {colors.bg, colors.red} - } + ViMode = { + provider = function() + local alias = { + n = "NORMAL", + i = "INSERT", + c = "COMMAND", + V = "VISUAL", + [""] = "VISUAL", + v = "VISUAL", + R = "REPLACE" + } + return alias[vim.fn.mode()] + end, + highlight = {colors.bg, colors.red} + } } gls.right[8] = { - PerCent = { - provider = "LinePercent", - separator = " ", - separator_highlight = {colors.red, colors.red}, - highlight = {colors.bg, colors.fg} - } + PerCent = { + provider = "LinePercent", + separator = " ", + separator_highlight = {colors.red, colors.red}, + highlight = {colors.bg, colors.fg} + } } gls.right[9] = { - rightRounded = { - provider = function() - return "" - end, - highlight = {colors.fg, colors.bg} - } + rightRounded = { + provider = function() + return "" + end, + highlight = {colors.fg, colors.bg} + } } diff --git a/lua/core/config/nvim-toggleterm.lua b/lua/core/config/nvim-toggleterm.lua index ce8305c..70a7ce5 100644 --- a/lua/core/config/nvim-toggleterm.lua +++ b/lua/core/config/nvim-toggleterm.lua @@ -1,33 +1,49 @@ -require("toggleterm").setup{ - -- size can be a number or function which is passed the current terminal - size = function(term) - if term.direction == "horizontal" then - return 15 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end, - open_mapping = [[]], - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_filetypes = {}, - shade_terminals = true, - shading_factor = '1', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light - start_in_insert = true, - persist_size = true, - direction = 'horizontal', - close_on_exit = true, -- close the terminal window when the process exits - shell = vim.o.shell, -- change the default shell - -- This field is only relevant if direction is set to 'float' - float_opts = { - -- The border key is *almost* the same as 'nvim_win_open' - -- see :h nvim_win_open for details on borders however - -- the 'curved' border is a custom border type - -- not natively supported but implemented in this plugin. - border = 'single' , - winblend = 3, - highlights = { - border = "Normal", - background = "Normal", - } - } +require("toggleterm").setup { + -- size can be a number or function which is passed the current terminal + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[]], + hide_numbers = true, + + -- hide the number column in toggleterm buffers + shade_filetypes = {}, + shade_terminals = true, + shading_factor = '1', + + -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light + start_in_insert = true, + persist_size = true, + direction = 'horizontal', + close_on_exit = true, + + -- close the terminal window when the process exits + shell = vim.o.shell, + + -- change the default shell + -- This field is only relevant if direction is set to 'float' + float_opts = { + -- The border key is *almost* the same as 'nvim_win_open' + -- see :h nvim_win_open for details on borders however + -- the 'curved' border is a custom border type + -- not natively supported but implemented in this plugin. + border = 'single', + winblend = 3, + highlights = { + border = "Normal", + background = "Normal", + } + } } +function _G.set_terminal_keymaps() + local opts = {noremap = true} + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) +end + +-- if you only want these mappings for toggle term use term://*toggleterm#* instead +vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') diff --git a/lua/core/config/nvim-tree.lua b/lua/core/config/nvim-tree.lua index b14bae1..475fdb0 100644 --- a/lua/core/config/nvim-tree.lua +++ b/lua/core/config/nvim-tree.lua @@ -1,92 +1,87 @@ - local tree_cb = require'nvim-tree.config'.nvim_tree_callback -vim.g.nvim_tree_bindings = { - { key = {"", "o" , "l"}, cb = tree_cb("edit") }, - { key = { ""}, cb = tree_cb("cd") }, - { key = "v", cb = tree_cb("vsplit") }, - { key = "x", cb = tree_cb("split") }, - { key = "t", cb = tree_cb("tabnew") }, - { key = "<", cb = tree_cb("prev_sibling") }, - { key = ">", cb = tree_cb("next_sibling") }, - { key = "P", cb = tree_cb("parent_node") }, - { key = "", cb = tree_cb("close_node") }, - { key = "h", cb = tree_cb("close_node") }, - { key = "", cb = ":wincmd w" }, - { key = "K", cb = tree_cb("first_sibling") }, - { key = "J", cb = tree_cb("last_sibling") }, - { key = "I", cb = tree_cb("toggle_ignored") }, - { key = ".", cb = tree_cb("toggle_dotfiles") }, - { key = "R", cb = tree_cb("refresh") }, - { key = "a", cb = tree_cb("create") }, - { key = "d", cb = tree_cb("remove") }, - { key = "r", cb = tree_cb("rename") }, - { key = "", cb = tree_cb("full_rename") }, - { key = "x", cb = tree_cb("cut") }, - { key = "c", cb = tree_cb("copy") }, - { key = "p", cb = tree_cb("paste") }, - { key = "y", cb = tree_cb("copy_name") }, - { key = "Y", cb = tree_cb("copy_path") }, - { key = "gy", cb = tree_cb("copy_absolute_path") }, - { key = "[c", cb = tree_cb("prev_git_item") }, - { key = "]c", cb = tree_cb("next_git_item") }, - { key = "-", cb = tree_cb("dir_up") }, - { key = "q", cb = tree_cb("close") }, - { key = "?", cb = tree_cb("toggle_help") }, - } - +local list = { + {key = {"", "o", "l"}, action = "edit"}, + {key = {""}, action = "cd"}, + {key = "v", action = "vsplit"}, + {key = "s", action = "split"}, + {key = "t", action = "tabnew"}, + {key = "<", action = "prev_sibling"}, + {key = ">", action = "next_sibling"}, + {key = "P", action = "parent_node"}, + {key = "", action = "close_node"}, + {key = "h", action = "close_node"}, + {key = "", action_cb = ":wincmd w"}, + {key = "K", action = "first_sibling"}, + {key = "J", action = "last_sibling"}, + {key = "I", action = "toggle_ignored"}, + {key = ".", action = "toggle_dotfiles"}, + {key = "R", action = "refresh"}, + {key = "a", action = "create"}, + {key = "d", action = "remove"}, + {key = "r", action = "rename"}, + {key = "", action = "full_rename"}, + {key = "x", action = "cut"}, + {key = "c", action = "copy"}, + {key = "p", action = "paste"}, + {key = "y", action = "copy_name"}, + {key = "Y", action = "copy_path"}, + {key = "gy", action = "copy_absolute_path"}, + {key = "[c", action = "prev_git_item"}, + {key = "]c", action = "next_git_item"}, + {key = "-", action = "dir_up"}, + {key = "q", action = "close"}, + {key = "?", action = "toggle_help"}, +} -------------------------------------------------------------------------------------- vim.api.nvim_set_keymap( - "n", - "", - ":NvimTreeToggle", - { - noremap = true, - silent = true - } + "n", + "", + ":NvimTreeToggle", + {noremap = true, silent = true} ) +require 'nvim-tree'.setup { + -- closes neovim automatically when the tree is the last **WINDOW** in the view + auto_close = true, + view = { + -- width of the window, can be either a number (columns) or a string in `%` + width = 26, + + -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom' + side = 'left', + + -- if true the tree will resize itself after opening a file + auto_resize = false, + mappings = { + -- custom only false will merge the list with the default mappings + -- if true, it will only use your list to set the mappings + custom_only = false, + -- list of mappings to set on the tree manually + list = list + } + } +} local g = vim.g vim.o.termguicolors = true -g.nvim_tree_side = "left" -g.nvim_tree_width = 26 -g.nvim_tree_auto_open = 0 -g.nvim_tree_auto_close = 1 -g.nvim_tree_quit_on_open = 0 -g.nvim_tree_follow = 1 -g.nvim_tree_indent_markers = 1 ---g.nvim_tree_hide_dotfiles = 1 -g.nvim_tree_git_hl = 1 +g.nvim_tree_disable_window_picker = 1 + g.nvim_tree_root_folder_modifier = ":t" -g.nvim_tree_tab_open = 0 -g.nvim_tree_allow_resize = 1 -g.nvim_tree_show_icons = { - git = 1, - folders = 1, - files = 1 -} +g.nvim_tree_show_icons = {git = 1, folders = 1, files = 1} g.nvim_tree_icons = { - default = " ", - symlink = " ", - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★" - }, - folder = { - default = "", - open = "", - symlink = "" - } + default = " ", + symlink = " ", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★" + }, + folder = {default = "", open = "", symlink = ""} } - -local get_lua_cb = function(cb_name) - return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) -end diff --git a/lua/core/config/nvim-treesitter.lua b/lua/core/config/nvim-treesitter.lua index 04860db..fce3bc4 100644 --- a/lua/core/config/nvim-treesitter.lua +++ b/lua/core/config/nvim-treesitter.lua @@ -1,33 +1,49 @@ vim.api.nvim_command("set foldmethod=expr") vim.api.nvim_command("set foldexpr=nvim_treesitter#foldexpr()") - - - ---------------------------------------------------------------- -require 'nvim-treesitter.configs'.setup{ - ensure_installed = "all", - highlight = { - enable = true - }, - indent = { - enable = true - }, - autotag = { - enable = true - }, - rainbow = { - enable = true, - extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean - max_file_lines = 2000, - }, - context_commentstring = { - enable = true - } +require 'nvim-treesitter.configs'.setup { + ensure_installed = { + "c", + "lua", + "rust", + "java", + "go", + "python", + "bash", + "cmake", + "cpp", + "css", + "dockerfile", + "fish", + "gomod", + "html", + "http", + "kotlin", + "make", + "markdown", + "markdown_inline", + "php", + "toml", + "yaml", +-- due to treesitter pr:https://github.com/nvim-treesitter/nvim-treesitter/pull/3297 +-- use html to parse xml +-- "xml", + "vue" + }, + highlight = {enable = true}, + indent = {enable = true}, + autotag = {enable = true}, + rainbow = { + enable = true, + extended_mode = true, + + -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean + max_file_lines = 2000, + }, + context_commentstring = {enable = true} } -vim.cmd' packadd spellsitter.nvim' -require("spellsitter").setup({ - hl = 'SpellBad' -}) +vim.cmd ' packadd spellsitter.nvim' +require("spellsitter").setup({hl = 'SpellBad'}) diff --git a/lua/core/config/packer.lua b/lua/core/config/packer.lua index cf32355..a2bfd90 100644 --- a/lua/core/config/packer.lua +++ b/lua/core/config/packer.lua @@ -1,17 +1,14 @@ -local install_path = vim.fn.stdpath("data").."/site/pack/packer/start/packer.nvim" +local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" -if vim.fn.empty(vim.fn.glob(install_path))>0 -then - vim.fn.system({'git','clone','https://github.com/wbthomason/packer.nvim',install_path}) +if vim.fn.empty(vim.fn.glob(install_path)) > 0 then + vim.fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path}) end -return require('packer').init{ - display = { - open_fn = function() - return require'packer.util'.float{border = "single"} - end - }, - git = { - clone_timeout = 600 - } +return require('packer').init { + display = { + open_fn = function() + return require 'packer.util'.float {border = "single"} + end + }, + git = {clone_timeout = 600} } diff --git a/lua/core/config/telescope.lua b/lua/core/config/telescope.lua index 84af0f7..0927e86 100644 --- a/lua/core/config/telescope.lua +++ b/lua/core/config/telescope.lua @@ -1,4 +1,76 @@ -vim.api.nvim_set_keymap("n","ff",":Telescope find_files",{silent=true}) -vim.api.nvim_set_keymap("n","fg",":Telescope live_grep",{silent=true}) -vim.api.nvim_set_keymap("n","fb",":Telescope buffers",{silent=true}) -vim.api.nvim_set_keymap("n","fh",":Telescope help_tags",{silent=true}) +--HINT: these keymap has already transformed to which-key +vim.api.nvim_set_keymap( + "n", + "ff", + "lua require\'telescope.builtin\'.find_files()", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "fg", + "lua require\'telescope.builtin\'.live_grep()", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "fb", + "lua require\'telescope.builtin\'.buffers()", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "fh", + "lua require\'telescope.builtin\'.help_tags()", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "fs", + "lua require\'telescope.builtin\'.grep_string()", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "sb", + "lua require\'telescope.builtin\'.current_buffer_fuzzy_find()>", + {silent = true} +) +vim.api.nvim_set_keymap( + "n", + "\\p", + "lua require\'telescope.builtin\'.registers()>", + {silent = true} +) +vim.api.nvim_set_keymap( + 'n', + 'gr', + 'Telescope lsp_references', + {noremap = true, silent = true} +) +vim.api.nvim_set_keymap('n', 'gI', 'Telescope lsp_implementations', { + noremap = true, + silent = true +}) +vim.api.nvim_set_keymap('n', 'gc', 'Telescope git_bcommits', { + noremap = true, + silent = true +}) +vim.api.nvim_set_keymap('n', 'gC', 'Telescope git_commits', { + noremap = true, + silent = true +}) +vim.api.nvim_set_keymap('n', 'gB', 'Telescope git_branches', { + noremap = true, + silent = true +}) +vim.api.nvim_set_keymap('n', 'gS', 'Telescope git_status', { + noremap = true, + silent = true +}) +vim.api.nvim_set_keymap('n', 'lq', 'Telescope quickfix', { + noremap = true, + silent = true +}) +require('telescope').setup { + defaults = {mappings = {n = {["q"] = require "telescope.actions".close}}} +} diff --git a/lua/core/config/vim-sayonara.lua b/lua/core/config/vim-sayonara.lua index 5bc01b1..f87a230 100644 --- a/lua/core/config/vim-sayonara.lua +++ b/lua/core/config/vim-sayonara.lua @@ -1 +1 @@ -vim.api.nvim_set_keymap("n","q",":Sayonara",{silent=true}) +vim.api.nvim_set_keymap("n", "q", ":Sayonara", {silent = true}) diff --git a/lua/core/config/vista.lua b/lua/core/config/vista.lua index 471f94b..3df4e32 100644 --- a/lua/core/config/vista.lua +++ b/lua/core/config/vista.lua @@ -1,19 +1,12 @@ -vim.api.nvim_set_keymap('n','',':Vista!!',{silent=true}) - - - - - - - - - - vim.g.vista_disable_statusline = 1 - vim.g.vista_default_executive = "nvim_lsp" - vim.g.vista_echo_cursor_strategy = "scroll" - vim.g.vista_vimwiki_executive = "markdown" - vim.g.vista_highlight_whole_line = 1 - vim.g.vista_executive_for = { - vimwiki = "markdown", - pandoc = "markdown", - } +vim.api.nvim_set_keymap('n', '', ':Vista!!', {silent = true}) + +vim.g.vista_disable_statusline = 1 +vim.g.vista_default_executive = "nvim_lsp" +vim.g.vista_echo_cursor_strategy = "scroll" +vim.g.vista_vimwiki_executive = "markdown" +vim.g.vista_highlight_whole_line = 1 +vim.g.vista_executive_for = { + vimwiki = "markdown", + pandoc = "markdown", +} +vim.cmd([[autocmd bufenter * if winnr("$") == 1 && vista#sidebar#IsOpen() | execute "normal! :q!\" | endif]]) diff --git a/lua/core/init.lua b/lua/core/init.lua index b287363..19840e2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,232 +1,450 @@ -- start ModuleVim and install plugin packer - require('core.config.basic-configuration') require('core.config.packer') local packer = require("packer") local use = packer.use packer.reset() + -----------------------start to loading plugins-------------- -packer.startup( -function(use) - use 'wbthomason/packer.nvim' - -----------NOTE:core layer----------- - use{ --Icon sets for neovim plugins and settings - 'yamatsum/nvim-nonicons', - requires = {'kyazdani42/nvim-web-devicons'} - } - use{ --vim plugin to accelerate up-down moving - 'rhysd/accelerated-jk', - config= function() - require'core.config.accelerated-jk' - end - } - use{ --a minimalist autopairs - 'windwp/nvim-autopairs', - config = function() - require'nvim-autopairs'.setup() - end - } - use{ --extended increment/decrement - 'monaqa/dial.nvim', - config = function() - end - } - use{ --a smooth scrolling neovim plugin written in lua - 'karb94/neoscroll.nvim', - config = function() - require 'neoscroll'.setup() - end - } - use{ --provide a single command that deletes the current buffer - 'mhinz/vim-sayonara', - config = function() - require 'core.config.vim-sayonara' - end - } - use{ --provide a directory root - 'airblade/vim-rooter', - config = function() - vim.g.rooter_silent_chdir = 1 - end - } - --use{ --a surround text object plugin TODO: open this plugin later - --'blackcauldron7/surround.nvim', - --config = function() - --require'surround'.setup() - --end - --} - use{--highly extendable fuzzy finder over lists - 'nvim-telescope/telescope.nvim', - requires = {{'nvim-lua/popup.nvim'},{'nvim-lua/plenary.nvim'}}, - config = function() - require 'core.config.telescope' - end - } - use{ --a minimalist dashboard for neovim - 'glepnir/dashboard-nvim', - config = function() - require 'core.config.dashboard-vim' - end - } - use{ --tabline plugin - 'romgrk/barbar.nvim', - requires = {'kyazdani42/nvim-web-devicons'}, - config = function() - require 'core.config.barbar' - end - } - use{ --light-weight and super fast stataus line plugin - 'glepnir/galaxyline.nvim', - branch = 'main', - requires = {'kyazdani42/nvim-web-devicons'}, - config = function() - require 'core.config.galaxyline' - end - } - use{ --view and search LSP symbols - 'liuchengxu/vista.vim', - config = function() - require 'core.config.vista' - end - } - use{ --file explorer - 'kyazdani42/nvim-tree.lua', - requires = {'kyazdani42/nvim-web-devicons'}, - config = function() - require 'core.config.nvim-tree' - end - } - use{ --terminal intergration - 'akinsho/nvim-toggleterm.lua', - config = function() - require 'core.config.nvim-toggleterm' - end - } - use{ --NVIM Treesitter configurations and abstraction layer - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate', - requires = { - {'nvim-treesitter/nvim-treesitter-textobjects',after = 'nvim-treesitter'}, - {'p00f/nvim-ts-rainbow',after = 'nvim-treesitter'}, - {'lewis6991/spellsitter.nvim',after = 'nvim-treesitter'}, - {'windwp/nvim-ts-autotag',after = 'nvim-treesitter'} - }, - config = function() - require 'core.config.nvim-treesitter' - end - } - - -------------------------------- - ---------NOTE:language layer--------- - use{ --language service protocol client - 'neovim/nvim-lspconfig', - requires = { - {'kabouzeid/nvim-lspinstall',after = 'nvim-lspconfig'}, - {'glepnir/lspsaga.nvim',after = 'nvim-lspconfig'}, - -- TODO: Not need this plugin - -- {'folke/lsp-colors.nvim',after = 'nvim-lspconfig'}, +packer.init({max_jobs = 4}) +packer.startup(function(use) + use 'wbthomason/packer.nvim' + + -----------NOTE:core layer----------- + -- use { + --Icon sets for neovim plugins and settings + -- 'yamatsum/nvim-nonicons', + -- requires = {'kyazdani42/nvim-web-devicons'} + -- } + use { + --vim plugin to accelerate up-down moving + 'rhysd/accelerated-jk', + config = function() + require 'core.config.accelerated-jk' + end + } + use { + --a minimalist autopairs + 'windwp/nvim-autopairs', + config = function() + require 'nvim-autopairs'.setup() + end + } + use { + --extended increment/decrement + 'monaqa/dial.nvim', + config = function() + end + } + + use { + --a smooth scrolling neovim plugin written in lua + 'karb94/neoscroll.nvim', + config = function() + require 'neoscroll'.setup() + end + } + use { + --provide a single command that deletes the current buffer + 'mhinz/vim-sayonara', + config = function() + require 'core.config.vim-sayonara' + end, + event = "BufWinEnter" + } + use { + --provide a directory root + 'airblade/vim-rooter', + config = function() + vim.g.rooter_silent_chdir = 1 + end + } + use { + -- colorful displaying + 'norcalli/nvim-colorizer.lua', + config = function() + require 'colorizer'.setup() + end, + + -- event = "BufWinEnter" + } + + --use{ --a surround text object plugin TODO: open this plugin later + --'blackcauldron7/surround.nvim', + --config = function() + --require'surround'.setup() + --end + --} + use { + --highly extendable fuzzy finder over lists + 'nvim-telescope/telescope.nvim', + requires = { + {'nvim-lua/popup.nvim'}, + {'nvim-lua/plenary.nvim'}, + {'BurntSushi/ripgrep'} + }, + config = function() + require 'core.config.telescope' + end, + event = "BufWinEnter" + } + use { + --a minimalist dashboard for neovim + 'glepnir/dashboard-nvim', + config = function() + require 'core.config.dashboard-vim' + end, + event = "BufWinEnter" + } + use { + --tabline plugin + 'romgrk/barbar.nvim', + requires = {'kyazdani42/nvim-web-devicons'}, + config = function() + require 'core.config.barbar' + end, + event = "BufWinEnter" + } + use { + --light-weight and super fast stataus line plugin + 'NTBBloodbath/galaxyline.nvim', + branch = 'main', + requires = { + {'kyazdani42/nvim-web-devicons'}, + {"SmiteshP/nvim-navic"}, + }, + config = function() + require 'core.config.galaxyline' + end, + event = "BufWinEnter" + } + use { + --view and search LSP symbols + 'liuchengxu/vista.vim', + config = function() + require 'core.config.vista' + end, + event = "BufWinEnter" + } + use { + --file explorer + 'kyazdani42/nvim-tree.lua', + requires = {'kyazdani42/nvim-web-devicons'}, + config = function() + require 'core.config.nvim-tree' + end, + event = "BufWinEnter" + } + use { + --terminal intergration + 'akinsho/nvim-toggleterm.lua', + config = function() + require 'core.config.nvim-toggleterm' + end, + event = "BufWinEnter" + } + use { + --NVIM Treesitter configurations and abstraction layer + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + requires = { + { + 'nvim-treesitter/nvim-treesitter-textobjects', + after = 'nvim-treesitter' + }, + {'p00f/nvim-ts-rainbow', after = 'nvim-treesitter'}, + {'lewis6991/spellsitter.nvim', after = 'nvim-treesitter'}, + {'windwp/nvim-ts-autotag', after = 'nvim-treesitter'}, + { + 'JoosepAlviste/nvim-ts-context-commentstring', + after = 'nvim-treesitter' + } + }, + config = function() + require 'core.config.nvim-treesitter' + end + } + + -------------------------------- + ---------NOTE:language layer--------- + use { + --language service protocol client + 'neovim/nvim-lspconfig', + requires = { + {'williamboman/mason.nvim', after = 'nvim-lspconfig',run = ":MasonUpdate"}, + {'tami5/lspsaga.nvim', after = 'nvim-lspconfig'}, + {'mfussenegger/nvim-jdtls', after = 'nvim-lspconfig'}, + {'p00f/clangd_extensions.nvim', after = 'nvim-lspconfig'}, + {'jose-elias-alvarez/nvim-lsp-ts-utils', after = 'nvim-lspconfig'}, + { + 'JoosepAlviste/nvim-ts-context-commentstring', + after = 'nvim-lspconfig' + }, + {'jose-elias-alvarez/null-ls.nvim', after = 'nvim-lspconfig'}, + {'folke/trouble.nvim', after = 'nvim-lspconfig'}, + }, + config = function() + require 'languages.config.nvim-lspconfig' + end + } + use { + --auto completion + 'hrsh7th/nvim-cmp', + requires = { + {'onsails/lspkind-nvim'}, + { + 'hrsh7th/vim-vsnip', + requires = {'rafamadriz/friendly-snippets'}, + event = "InsertCharPre" + }, + { + 'hrsh7th/vim-vsnip-integ', + after = "vim-vsnip", + }, + { + 'tzachar/cmp-tabnine', + run = "./install.sh", + after = "nvim-cmp", + event = "InsertCharPre" + }, + {'hrsh7th/cmp-nvim-lsp'}, + {'hrsh7th/cmp-buffer', after = "nvim-cmp", event = "InsertCharPre"}, + {'hrsh7th/cmp-path', after = "nvim-cmp", event = "InsertCharPre"}, + { + 'hrsh7th/cmp-nvim-lua', + after = "nvim-cmp", + event = "InsertCharPre" + }, + {'octaltree/cmp-look', after = "nvim-cmp", event = "InsertCharPre"}, + {'hrsh7th/cmp-vsnip', after = "nvim-cmp", event = "InsertCharPre"}, + {'kdheepak/cmp-latex-symbols', after = "nvim-cmp", ft = "tex"}, + {'hrsh7th/cmp-calc', after = "nvim-cmp", event = "InsertCharPre"}, + { + 'ray-x/cmp-treesitter', + after = "nvim-cmp", + event = "InsertCharPre" + }, + {'hrsh7th/cmp-emoji', after = "nvim-cmp", event = "InsertCharPre"}, + {'f3fora/cmp-spell', after = "nvim-cmp", event = "InsertCharPre"}, + { + 'quangnguyen30192/cmp-nvim-tags', + after = "nvim-cmp", + event = "InsertCharPre" + } }, - config = function() - require 'languages.config.nvim-lspconfig' - end - } - use{ --auto completion - 'hrsh7th/nvim-compe', - requires = { - {'hrsh7th/vim-vsnip',requires = { 'rafamadriz/friendly-snippets'}}, - {'hrsh7th/vim-vsnip-integ',after = 'vim-vsnip'}, - {'tzachar/compe-tabnine',run = "./install.sh"} + config = function() + require 'languages.config.nvim-cmp' + end + } + use { + --highlight and search for todo comments + "b3nj5m1n/kommentary", + config = function() + require 'languages.config.kommentary' + end + } + + --[[ use { + --debug plugin + "mfussenegger/nvim-dap", + requires = { + "rcarriga/nvim-dap-ui", + "Pocco81/DAPInstall.nvim", + "theHamsta/nvim-dap-virtual-text" + }, + config = function() + require 'languages.config.nvim-dap' + end, + + -- event = 'BufferRead' + } ]] + + ----------NOTE:style layer----------- + use { + 'projekt0n/github-nvim-theme', + config = function() + vim.api.nvim_set_keymap( + 'n', + 'tc1', + "colorscheme github_dark", + {silent = true} + ) + end, + } + use { + 'sainnhe/gruvbox-material', + config = function() + -- vim.g.gruvbox_material_transparent_background = 1 + vim.g.gruvbox_material_background = 'soft' + vim.g.gruvbox_material_enable_italic = 1 + vim.g.gruvbox_material_disable_italic_comment = 1 + vim.g.gruvbox_material_palette = 'mix' + vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' + vim.cmd("colorscheme gruvbox-material") + vim.api.nvim_set_keymap( + 'n', + 'tc2', + "colorscheme gruvbox-material", + {silent = true} + ) + end, + } + use { + 'sainnhe/everforest', + requires = {"sainnhe/sonokai", "Th3Whit3Wolf/space-nvim"}, + config = function() + vim.g.everforest_diagnostic_virtual_text = 'colored' + vim.api.nvim_set_keymap( + 'n', + 'tc3', + "colorscheme everforest", + {silent = true} + ) + end, + } + use { + 'tjdevries/colorbuddy.vim', + requires = { + { + 'Th3Whit3Wolf/onebuddy', + config = function() + vim.api.nvim_set_keymap( + 'n', + 'tc4', + "lua require'colorbuddy'.colorscheme('onebuddy')", + {silent = true} + ) + end + }, + { + 'tjdevries/gruvbuddy.nvim', + config = function() + vim.api.nvim_set_keymap( + 'n', + 'tc5', + "lua require'colorbuddy'.colorscheme('gruvbuddy')", + {silent = true} + ) + end + }, + { + 'sainnhe/edge', + config = function() + vim.g.edge_diagnostic_virtual_text = 'colored', vim.api.nvim_set_keymap( + 'n', + 'tc6', + "colorscheme edge", + {silent = true} + ) + end + }, + } + } + + -------------------------------- + ----------NOTE:tools layer----------- + -------------------------------- + ----------NOTE:plugins layer--------- + use { + -- displays a popup with possible key bindings of the command you started typing + "folke/which-key.nvim", + config = function() + require 'plugins.config.which-key' + end, + event = "BufWinEnter" + } + use { + --transparent function + 'xiyaowong/nvim-transparent', + config = function() + require 'plugins.config.nvim-transparent' + end, + event = "BufWinEnter" + } + + use { + --add line indent + 'lukas-reineke/indent-blankline.nvim', + config = function() + require 'plugins.config.indent-blankline' + end, + event = "BufWinEnter" + } + use { + --git plugin + 'lewis6991/gitsigns.nvim', + requires = { + 'nvim-lua/plenary.nvim', }, - config = function() - require 'languages.config.nvim-compe' - end - } - use{ --highlight and search for todo comments - "b3nj5m1n/kommentary", - config = function() - require 'languages.config.kommentary' - end - } - --use{ --formatter TODO: Not use now, instead by lsp - --'mhartington/formatter.nvim', - --config = function() - --require'languages.config.formatter' - --end - --} - -------------------------------- - ----------NOTE:style layer----------- - use{ - 'projekt0n/github-nvim-theme', - --config = function() - --require'github-theme'.setup() - --end - } - use{ - 'sainnhe/gruvbox-material', - config = function() - vim.g.gruvbox_material_background = 'medium' - vim.g.gruvbox_material_palette = 'mix' - vim.cmd("colorscheme gruvbox-material") - end - } - use{ - 'sainnhe/everforest', - requires = { - "sainnhe/sonokai", - "Th3Whit3Wolf/space-nvim" - - } - } - -------------------------------- - ----------NOTE:tools layer----------- - -------------------------------- - ----------NOTE:plugins layer--------- - use{ --add line indent - 'lukas-reineke/indent-blankline.nvim', - config = function() - require 'plugins.config.indent-blankline' - end - } - use{ --git plugin - 'lewis6991/gitsigns.nvim', - requires = {'nvim-lua/plenary.nvim', - }, - config = function() - require 'plugins.config.gitsigns' - end - } - use{ --highlight underline with your cursorword - 'itchyny/vim-cursorword', - --config = function() - --require 'plugins.config.' - --end - } - use{ --EasyMotion-like plugin allowing you to jump anywhere - 'phaazon/hop.nvim', - as = 'hop', - config = function() - require 'plugins.config.hop' - end - } - use{ --highlight and search for todo comments - "folke/todo-comments.nvim", - requires = "nvim-lua/plenary.nvim", - config = function() - require 'plugins.config.todo-comments' - end - } - --[[ use{ -- add zen mode TODO: add it later - "folke/zen-mode.nvim", - cmd = "ZenMode", - event = "BufRead", - config = function () - require 'plugins.config.zen-mode' - end - } ]] - -------------------------------- -end -) -require'packer'.install() + config = function() + require 'plugins.config.gitsigns' + end, + event = "BufRead" + } + use { + --highlight underline with your cursorword + 'itchyny/vim-cursorword', + + --config = function() + --require 'plugins.config.' + --end + } + use { + --EasyMotion-like plugin allowing you to jump anywhere + 'phaazon/hop.nvim', + as = 'hop', + config = function() + require 'plugins.config.hop' + end, + event = "BufRead", + } + use { + --highlight and search for todo comments + "folke/todo-comments.nvim", + requires = "nvim-lua/plenary.nvim", + config = function() + require 'plugins.config.todo-comments' + end, + event = "BufRead" + } + use { + --dims your inactive windows, making it easier to see the active window at a glance. + "sunjon/shade.nvim", + config = function() + require 'shade'.setup({ + overlay_opacity = 50, + opacity_step = 1, + }) + end, + event = "BufRead" + } + + use { + -- add zen mode + "folke/zen-mode.nvim", + config = function() + require 'plugins.config.zen-mode' + end + } + use { + --markdown preview plugins + "davidgranstrom/nvim-markdown-preview" + } + + use { + --BookMarks toggling + "MattesGroeger/vim-bookmarks" + } + + use { + --Github Copilot + "github/copilot.vim" + } + -------------------------------- +end) +require 'packer'.install() +vim.cmd("colorscheme gruvbox-material") + ------------------------------------------------------------- diff --git a/lua/gui/init.lua b/lua/gui/init.lua new file mode 100644 index 0000000..5947c42 --- /dev/null +++ b/lua/gui/init.lua @@ -0,0 +1,3 @@ +vim.g.neovide_cursor_trail_size = 0.3 +vim.g.neovide_cursor_animation_length = 0.03 +vim.g.neovide_cursor_vfx_mode = "wireframe" diff --git a/lua/languages/config/formatter.lua b/lua/languages/config/formatter.lua index bdeb2c5..a62cf50 100644 --- a/lua/languages/config/formatter.lua +++ b/lua/languages/config/formatter.lua @@ -1,6 +1,9 @@ -vim.api.nvim_exec([[ +vim.api.nvim_exec( + [[ augroup FormatAutogroup autocmd! autocmd BufWritePost *.js,*.rs,*.lua FormatWrite augroup END -]], true) +]], + true +) diff --git a/lua/languages/config/kommentary.lua b/lua/languages/config/kommentary.lua index e872ee2..1ce378e 100644 --- a/lua/languages/config/kommentary.lua +++ b/lua/languages/config/kommentary.lua @@ -2,12 +2,12 @@ vim.g.kommentary_create_default_mappings = false vim.api.nvim_set_keymap("n", "cl", "kommentary_line_default", {}) vim.api.nvim_set_keymap("n", "cd", "kommentary_motion_default", {}) vim.api.nvim_set_keymap("x", "cv", "kommentary_visual_default", {}) -vim.api.nvim_set_keymap("v", "cv", "kommentary_visual_default", {}) - +vim.api.nvim_set_keymap( + "v", + "cl", + "kommentary_visual_default", + {} +) --------------------------------------------------------------------------------------------- - - - - diff --git a/lua/languages/config/nvim-cmp.lua b/lua/languages/config/nvim-cmp.lua new file mode 100644 index 0000000..fa63150 --- /dev/null +++ b/lua/languages/config/nvim-cmp.lua @@ -0,0 +1,157 @@ +local cmp = require('cmp') +local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub( + col, + col + ):match("%s") == nil +end + +local feedkey = function(key, mode) + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes(key, true, true, true), + mode, + true + ) +end +local tab_complete = function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif vim.fn["vsnip#available"]() == 1 then + feedkey("(vsnip-expand-or-jump)", "") + elseif has_words_before() then + cmp.complete() + else + fallback() + end +end +local s_tab_complete = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif vim.fn["vsnip#jumpable"](-1) == 1 then + feedkey("(vsnip-jump-prev)", "") + else + fallback() + end +end + +cmp.setup { + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end + }, + window = {}, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping(tab_complete, {"i", "s"}), + [""] = cmp.mapping(tab_complete, {"i", "s"}), + [""] = cmp.mapping(s_tab_complete, {"i", "s"}), + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Insert, + select = false + }, + [""] = cmp.mapping(s_tab_complete, {"i", "s"}) + }), + formatting = { + format = function(entry, vim_item) + -- fancy icons and a name of kind + vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. " " .. vim_item.kind + + -- set a name for each source + vim_item.menu = ({ + buffer = "[Buffer]", + nvim_lsp = "[LSP]", + nvim_lua = "[Lua]", + latex_symbols = "[Latex]", + vsnip = "[Snippet]", + path = "[Path]", + look = "[Look]", + cmp_tabnine = "[T9]", + treesitter = "[Treesitter]", + calc = "[Clac]", + emoji = "[Emoji]", + spell = "[Spell]", + tags = "[Tags]" + })[entry.source.name] + return vim_item + end, + }, + sources = cmp.config.sources({ + {name = "nvim_lsp"}, + {name = "vsnip"}, + {name = "buffer"}, + {name = "cmp_tabnine"}, + {name = "path"}, + { + name = "look", + keyword_length = 3, + option = {convert_case = true, loud = true} + }, + {name = "nvim_lua"}, + {name = "treesitter"}, + {name = "calc"}, + {name = "latex_symbols"}, + {name = "emoji"}, + {name = "spell"}, + {name = "tags"}, + + -- path = {kind = "﬜", priority = 10, true}, + -- buffer = {kind = "﬘", priority = 5, true}, + -- calc = {kind = "", priority = 10, true}, + -- vsnip = {kind = "", priority = 9}, + --replace to what sign you prefer + --[[ nvim_lsp = {kind = "", priority = 9, true}, + spell = {kind = "", priority = 4, true}, + tags = {kind = "", priority = 10, true}, + snippets_nvim = {kind = "", priority = 7, true}, + treesitter = {kind = "", priority = 8, true}, + nvim_lua = {kind = "", priority = 9, true}, + tabnine = {priority = 9, true}, + emoji = {kind = "", priority = 9, true} ]] + }) +} + +require('lspkind').init({ + -- enables text annotations + -- + -- default: true + mode = 'symbol_text', + + -- default symbol map + -- can be either 'default' (requires nerd-fonts font) or + -- 'codicons' for codicon preset (requires vscode-codicons font) + -- + -- default: 'default' + preset = 'codicons', + + -- override preset symbols + -- + -- default: {} + symbol_map = { + 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 = "" + }, +}) diff --git a/lua/languages/config/nvim-compe.lua b/lua/languages/config/nvim-compe.lua deleted file mode 100644 index 13067d8..0000000 --- a/lua/languages/config/nvim-compe.lua +++ /dev/null @@ -1,105 +0,0 @@ -vim.o.completeopt = "menuone,noselect" - -require "compe".setup { - enabled = true, - autocomplete = true, - debug = false, - min_length = 1, - preselect = "enable", - throttle_time = 80, - source_timeout = 200, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - documentation = true, - source = { - path = {kind="﬜",priority=10,true}, - buffer = {kind = "﬘",priority=5, true}, - calc = {kind="",priority=10,true}, - vsnip = {kind = "",priority=9}, --replace to what sign you prefer - nvim_lsp = {kind="",priority=9,true}, - spell = {kind="",priority=4,true}, - tags = {kind="",priority=10,true}, - snippets_nvim = {kind="",priority=7,true}, - treesitter = {kind="",priority=8,true}, - nvim_lua = {kind="",priority=9,true}, - tabnine = {priority=9,true}, - emoji = {kind="",priority=9, true} - } -} - -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col(".") - 1 - if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then - return true - else - return false - end -end - --- tab completion - -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn["compe#complete"]() - end -end -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then - return t "(vsnip-jump-prev)" - else - return t "" - end -end - --- mappings - -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) - -function _G.completions() - local npairs = require("nvim-autopairs") - if vim.fn.pumvisible() == 1 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"]("") - end - end - return npairs.check_break_line_char() -end - -vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) - -local g = vim.g - --- speeden up compe -g.loaded_compe_calc = 0 -g.loaded_compe_emoji = 0 - -g.loaded_compe_luasnip = 0 -g.loaded_compe_nvim_lua = 0 - -g.loaded_compe_path = 0 -g.loaded_compe_spell = 0 -g.loaded_compe_tags = 0 -g.loaded_compe_treesitter = 0 - -g.loaded_compe_snippets_nvim = 0 - -g.loaded_compe_ultisnips = 0 -g.loaded_compe_vim_lsc = 0 -g.loaded_compe_vim_lsp = 0 -g.loaded_compe_omni = 0 - diff --git a/lua/languages/config/nvim-dap.lua b/lua/languages/config/nvim-dap.lua new file mode 100644 index 0000000..f386b60 --- /dev/null +++ b/lua/languages/config/nvim-dap.lua @@ -0,0 +1,53 @@ +vim.api.nvim_set_keymap("n", "", "lua require'dap'.continue()", {}) +vim.api.nvim_set_keymap( + "n", + "", + "lua require'dap'.toggle_breakpoint()", + {} +) +vim.api.nvim_set_keymap( + "n", + "", + "lua require'dap'.step_into()", + {} +) +vim.api.nvim_set_keymap( + "n", + "", + "lua require'dap'.step_over()", + {} +) +vim.api.nvim_set_keymap( + "n", + "", + "lua require'dap'.step_out()()", + {} +) + +-------------------------------------------------------------------------------- +local dap_install = require("dap-install") + +dap_install.setup({ + installation_path = vim.fn.stdpath("data") .. "/dapinstall/", + verbosely_call_debuggers = false, +}) +local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers() + +for debugger, _ in pairs(dbg_list) do + if debugger == "go_delve_dbg" then + dap_install.config(debugger, {}) + end +end + +-- ui +require("nvim-dap-virtual-text").setup() +local dap, dapui = require('dap'), require('dapui') +dap.listeners.after.event_initialized['dapui_config'] = function() + dapui.open() +end +dap.listeners.before.event_terminated['dapui_config'] = function() + dapui.close() +end +dap.listeners.before.event_exited['dapui_config'] = function() + dapui.close() +end diff --git a/lua/languages/config/nvim-lspconfig.lua b/lua/languages/config/nvim-lspconfig.lua index e1052e3..e7968d0 100644 --- a/lua/languages/config/nvim-lspconfig.lua +++ b/lua/languages/config/nvim-lspconfig.lua @@ -1,119 +1,309 @@ -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffe - local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - --Enable completion triggered by - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') -buf_set_keymap('n', 'gh', 'lua require\'lspsaga.provider\'.lsp_finder()', { noremap=true, silent=true }) -buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', { noremap=true, silent=true }) -buf_set_keymap('n', 'gd', 'lua require\'lspsaga.provider\'.preview_definition()', { noremap=true, silent=true }) -buf_set_keymap('n', 'K', 'lua require(\'lspsaga.hover\').render_hover_doc()', { noremap=true, silent=true }) -buf_set_keymap('n', '', 'lua require(\'lspsaga.action\').smart_scroll_with_saga(1)', { noremap=true, silent=true }) -buf_set_keymap('n', '', 'lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)', { noremap=true, silent=true }) -buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', { noremap=true, silent=true }) -buf_set_keymap('n', '', 'lua require(\'lspsaga.signaturehelp\').signature_help()', { noremap=true, silent=true }) -buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', { noremap=true, silent=true }) -buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', { noremap=true, silent=true }) -buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', { noremap=true, silent=true }) -buf_set_keymap('n', 'ld', 'lua vim.lsp.buf.type_definition()', { noremap=true, silent=true }) -buf_set_keymap('n', 'lr', 'lua require(\'lspsaga.rename\').rename()', { noremap=true, silent=true }) -buf_set_keymap('n', 'la', 'lua require(\'lspsaga.codeaction\').code_action()', { noremap=true, silent=true }) -buf_set_keymap('v', 'la', 'lua require(\'lspsaga.codeaction\').range_code_action()', { noremap=true, silent=true }) -buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', { noremap=true, silent=true }) -buf_set_keymap('n', '[g', 'lua require\'lspsaga.diagnostic\'.lsp_jump_diagnostic_prev()', { noremap=true, silent=true }) -buf_set_keymap('n', ']g', 'lua require\'lspsaga.diagnostic\'.lsp_jump_diagnostic_next()', { noremap=true, silent=true }) -buf_set_keymap('n', 'll', 'lua require\'lspsaga.diagnostic\'.show_line_diagnostics()', { noremap=true, silent=true }) -buf_set_keymap("n", "bf", "lua vim.lsp.buf.formatting()", { noremap=true, silent=true }) -end - - +local on_attach = function(client, bufnr) + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + --Enable completion triggered by + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + buf_set_keymap( + 'n', + 'gh', + 'lua require\'lspsaga.provider\'.lsp_finder()', + {noremap = true, silent = true} + ) + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', { + noremap = true, + silent = true + }) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', { + noremap = true, + silent = true + }) + buf_set_keymap( + 'n', + 'K', + 'lua require(\'lspsaga.hover\').render_hover_doc()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + '', + 'lua require(\'lspsaga.action\').smart_scroll_with_saga(1)', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + '', + 'lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)', + {noremap = true, silent = true} + ) + buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', { + noremap = true, + silent = true + }) + buf_set_keymap( + 'n', + '', + 'lua require(\'lspsaga.signaturehelp\').signature_help()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'wa', + 'lua vim.lsp.buf.add_workspace_folder()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'wr', + 'lua vim.lsp.buf.remove_workspace_folder()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'wl', + 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'ld', + 'lua require\'lspsaga.provider\'.preview_definition()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + '', + 'lua require(\'lspsaga.action\').smart_scroll_with_saga(1)', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + '', + 'lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'lr', + 'lua require(\'lspsaga.rename\').rename()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'la', + 'lua require(\'lspsaga.codeaction\').code_action()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'v', + 'la', + 'lua require(\'lspsaga.codeaction\').range_code_action()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'gr', + 'Telescope lsp_references', + {noremap = true, silent = true} + ) + buf_set_keymap('n', 'gI', 'Telescope lsp_implementations', { + noremap = true, + silent = true + }) + buf_set_keymap( + 'n', + '[g', + 'lua require\'lspsaga.diagnostic\'.lsp_jump_diagnostic_prev()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + ']g', + 'lua require\'lspsaga.diagnostic\'.lsp_jump_diagnostic_next()', + {noremap = true, silent = true} + ) + buf_set_keymap( + 'n', + 'll', + 'lua require\'lspsaga.diagnostic\'.show_line_diagnostics()', + {noremap = true, silent = true} + ) + buf_set_keymap('n', 'lq', 'TroubleToggle quickfix', { + noremap = true, + silent = true + }) + buf_set_keymap("n", "bf", "lua vim.lsp.buf.formatting()", { + noremap = true, + silent = true + }) +end ----------------------------------------------------------- -local lspservers = { "go", "lua", "cpp", "java", "bash", "css", "html", "json", "python", "rust", "dockerfile", "vim", "vue" } -vim.cmd' packadd nvim-lspinstall' --- NOTE: first, install the servers we need - +local lspservers = { + "go:gopls", + "lua:sumneko_lua", + "cpp:clangd", + "cmake:cmake", + "java:jdtls", + "bash:bashls", + "css:cssls", + "html:html", + "typescript:tsserver", + "json:jsonls", + "python:pyright", + "rust:rust_analyzer", + "docker:dockerls", + "vim:vimls", + "vue:vuels", + "yaml:yamlls", + "xml:lemminx", + "emmet:emmet_ls" +} +-- vim.cmd 'packadd nvim-lsp-installer' -local function contains(tables,value) - for _, values in pairs(tables) do - if values == value then - return true - end -end -return false +local function split(s, delimiter) + local result = {}; + for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do + table.insert(result, match); + end + return result; end +local function contains(tables, value) + for _, values in pairs(tables) do + if values == value then + return true + end + end + return false +end -for _,server in ipairs(lspservers) do - if not contains(require("lspinstall").installed_servers(),server) - then - require("lspinstall").install_server(server) - end +-- NOTE: first, install the servers we need +for _, server in ipairs(lspservers) do + local ac_server = split(server, ':'); + if not require("nvim-lsp-installer.servers").is_server_installed(ac_server[2]) then + require("nvim-lsp-installer").install(ac_server[2]) + end end --- NOTE: then, we should setup the servers -require'lspinstall'.setup() +-- NOTE: then, we should setup the servers -- use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local nvim_lsp = require('lspconfig') -local function setup_servers() -for _, lsp in ipairs(require'lspinstall'.installed_servers()) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - flags = { - debounce_text_changes = 150, - } - } -end -end +local lsp_installer = require("nvim-lsp-installer") +vim.cmd('packadd null-ls.nvim') +require("null-ls").setup({ + sources = { + -- require("null-ls").builtins.formatting.stylua, + require("null-ls").builtins.diagnostics.eslint, + }, +}) +lsp_installer.on_server_ready(function(server) + local opts = { + autostart = true, + on_attach = on_attach, + flags = { + debounce_text_changes = 150, + }, + capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) + } -setup_servers() + -- special language lua + if server.name == "sumneko_lua" then + opts.settings = {Lua = {diagnostics = {globals = {'vim'}}}} + end + -- special language typescript + if server.name == "tsserver" then + if vim.fn.executable('npm') ~= 1 then + print("npm was not found" .. "\n") + else + if vim.fn.executable('eslint_d') ~= 1 then + os.execute('sudo npm install -g eslint_d') + end + if vim.fn.executable('prettier') ~= 1 then + os.execute('sudo npm install -g prettier') + end + end + opts.root_dir = function(fname) + return require 'lspconfig/util'.root_pattern( + "package.json", + "tsconfig.json", + ".git" + )(fname) or vim.loop.cwd() + end + opts.on_attach = require('languages.config.server.typescript.tsserver').setup(on_attach) + end + if server.name == "jdtls" or server.name == 'clangd' then + goto + continue + end -require'lspinstall'.post_install_hook = function () - setup_servers() -- reload installed servers - vim.cmd("bufdo e") -- this triggers the filetype autocmd that starts the server -end + -- Other default languages + server:setup(opts) + vim.cmd("bufdo e")::continue:: +end) +-- special language java +vim.api.nvim_exec( + [[ + augroup jdtls_lsp + au! + au FileType java lua require('languages.config.server.java.nvim-jdtls').setup() + augroup end + ]], + false +) +-- specical language c/cpp +vim.cmd 'packadd clangd_extensions.nvim' +require("clangd_extensions").setup() -- NOTE: finally, setup lsp saga and config -vim.cmd' packadd lspsaga.nvim' +vim.cmd ' packadd lspsaga.nvim' local saga = require 'lspsaga' -saga.init_lsp_saga{ - use_saga_diagnostic_sign = true, - error_sign = '✖️', - warn_sign = '⚠️ ', - hint_sign = '☀️ ', - infor_sign = 'ℹ️', - dianostic_header_icon = '  ', - code_action_icon = ' ' +saga.init_lsp_saga { + use_saga_diagnostic_sign = true, + error_sign = '❌', + warn_sign = '⚠️ ', + hint_sign = '🌵', + infor_sign = 'ℹ️', + diagnostic_header_icon = '🐞', + code_action_icon = '💡' } ------------------------------- --NOTE: define the diagnostic color - -vim.cmd("hi LspDiagnosticsVirtualTextWarning guifg='yellow'") -vim.cmd("hi LspDiagnosticsVirtualTextError guifg='#db4b4b'") -vim.cmd("hi LspDiagnosticsVirtualTextInformation guifg='#0db9d7'") -vim.cmd("hi LspDiagnosticsVirtualTextHint guifg='#10B981'") - - - - +--[[ vim.cmd("hi VirtualTextWarning guifg='yellow'") +vim.cmd("hi VirtualTextError guifg='red'") +vim.cmd("hi VirtualTextInfo guifg='#0db9d7'") +vim.cmd("hi VirtualTextHint guifg=#2c6e4e") +vim.cmd("hi ErrorText cterm=underline gui=undercurl guisp=red") +vim.cmd("hi WarningText cterm=underline gui=undercurl guisp=yellow") +vim.cmd("hi HintText cterm=underline gui=undercurl guisp=#2c6e4e") +vim.cmd("hi InformationText cterm=underline gui=undercurl guisp=#0db9d7") +vim.cmd("hi CursorWord0 ctermbg=239 guibg=#3d3c3b") +vim.cmd("hi SpellBad cterm=underline gui=undercurl guisp=None") ]] --NOTE: define the auto format on save -vim.api.nvim_exec([[ +vim.api.nvim_exec( + [[ augroup FormatAutogroup autocmd! autocmd BufWritePost * lua vim.lsp.buf.formatting() augroup END -]], true) +]], + true +) + diff --git a/lua/languages/config/server/java/nvim-jdtls.lua b/lua/languages/config/server/java/nvim-jdtls.lua new file mode 100644 index 0000000..c48cc18 --- /dev/null +++ b/lua/languages/config/server/java/nvim-jdtls.lua @@ -0,0 +1,236 @@ +local M = {} + +function M.setup() + vim.api.nvim_set_keymap( + 'n', + 'gd', + 'lua vim.lsp.buf.definition()', + {silent = true} + ) + vim.api.nvim_set_keymap( + "i", + "", + ":w! | lua require'jdtls'.organize_imports()", + {noremap = true} + ) + vim.api.nvim_set_keymap( + "n", + "", + ":w! | lua require'jdtls'.organize_imports()", + {noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'gD', + 'lua vim.lsp.buf.declaration()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'K', + 'lua vim.lsp.buf.hover()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'gI', + 'lua require"telescope.builtin".lsp_implementations()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + '', + 'lua vim.lsp.buf.signature_help()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'wa', + 'lua vim.lsp.buf.add_workspace_folder()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'wr', + 'lua vim.lsp.buf.remove_workspace_folder()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'wl', + 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'lr', + 'lua vim.lsp.buf.rename()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'lR', + 'lua require"jdtls".code_action(false, "refactor")', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'la', + 'lua require"telescope.builtin".lsp_code_actions()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'v', + 'la', + 'lua require"jdtls".code_action(true)', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'gr', + 'lua vim.lsp.buf.references()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'll', + 'lua vim.lsp.diagnostic.show_line_diagnostics()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + '[g', + 'lua vim.lsp.diagnostic.goto_prev()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + ']g', + 'lua vim.lsp.diagnostic.goto_next()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'bf', + 'lua vim.lsp.buf.formatting()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'v', + 'bf', + 'lua vim.lsp.buf.formatting()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'lcv', + 'lua require(\'jdtls\').extract_variable()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'v', + 'lcv', + 'lua require(\'jdtls\').extract_variable(true)', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'n', + 'lcc', + 'lua require(\'jdtls\').extract_constant()', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'v', + 'lcc', + 'lua require(\'jdtls\').extract_constant(true)', + {silent = true, noremap = true} + ) + vim.api.nvim_set_keymap( + 'v', + 'lcm', + 'lua lua require(\'jdtls\').extract_method(true)', + {silent = true, noremap = true} + ) + vim.cmd ' packadd which-key.nvim' + require "which-key".register({["lR"] = {name = "refactor"}}) + require "which-key".register({["lc"] = {name = "extract"}}) + require "which-key".register({["lcv"] = {name = "extract_variable"}}) + require "which-key".register({["lcc"] = {name = "extract_constant"}}) + require "which-key".register({["lcm"] = {name = "extract_method"}}) + + vim.cmd([[ + augroup LspFormatting + autocmd! * + autocmd FileType java + \ autocmd BufWritePre lua vim.lsp.buf.formatting_sync() + augroup END + ]]) + + --[[ require('jdtls.ui').pick_one_async = function(items, prompt, label_fn, cb) + local opts = {}; + require 'telescope.pickers'.new(opts, { + prompt_title = prompt, + finder = require 'telescope.finders'.new_table { + results = items, + entry_maker = function(entry) + return { + value = entry, + display = label_fn(entry), + ordinal = label_fn(entry), + } + end, + }, + sorter = require 'telescope.sorters'.get_generic_fuzzy_sorter(), + attach_mappings = function(prompt_bufnr) + require 'telescope.actions'.select_default:replace(function() + local selection = require 'telescope.actions'.get_selected_entry(prompt_bufnr) + require 'telescope.actions'.close(prompt_bufnr) + cb(selection.value) + end) + return true + end, + }):find() + end ]] + local function change_date_path(path, workspace) + local i = 0 + while (path[i] ~= "-data") do + i = i + 1 + end + path[i + 1] = workspace + return path + end + + local root_markers = {'gradlew', 'pom.xml', '.git'} + local root_dir = require('jdtls.setup').find_root(root_markers) + local workspace_folder = os.getenv("HOME") .. "/.local/share/nvim_java_workspace/" .. vim.fn.fnamemodify( + root_dir, + ":p:h:t" + ) + vim.env.WORKSPACE = workspace_folder + local workspace = require "nvim-lsp-installer.path".concat { + workspace_folder, + vim.fn.fnamemodify(vim.loop.cwd() or vim.fn.getcwd(), ":p:h:t") + } + local ok, install_cmd = require 'nvim-lsp-installer.servers'.get_server("jdtls") + if ok then + if not install_cmd:is_installed() then + install_cmd:install() + end + end + local on_attach = function(client, bufnr) + require 'jdtls'.setup_dap() + require 'lsp-status'.register_progress() + end + + local config = { + cmd = change_date_path(install_cmd:get_default_options().cmd, workspace), + root_dir = root_dir, + flags = {allow_incremental_sync = true}, + on_attach = on_attach, + capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) + } + + require('jdtls').start_or_attach(config) +end + +return M diff --git a/lua/languages/config/server/typescript/tsserver.lua b/lua/languages/config/server/typescript/tsserver.lua new file mode 100644 index 0000000..3fc95c1 --- /dev/null +++ b/lua/languages/config/server/typescript/tsserver.lua @@ -0,0 +1,74 @@ +local M = {} + +M.setup = function(on_attach) + return function(client, bufnr) + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + + vim.cmd ' packadd nvim-lsp-ts-utils ' + local ts_utils = require("nvim-lsp-ts-utils") + + -- defaults + ts_utils.setup { + debug = false, + disable_commands = false, + enable_import_on_completion = true, + + -- import all + import_all_timeout = 5000, + + --[[ eslint + eslint_enable_code_actions = true, + eslint_enable_disable_comments = true, + eslint_bin = "eslint_d", + eslint_enable_diagnostics = true, + eslint_opts = {}, + + -- formatting + enable_formatting = true, + formatter = "prettier", + formatter_opts = {}, ]] + + -- update imports on file move + update_imports_on_move = true, + require_confirmation_on_move = true, + watch_dir = nil, + } + + -- required to fix code action ranges and filter diagnostics + ts_utils.setup_client(client) + + -- no default maps, so you may want to define some here + local opts = {silent = true} + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "ls", + ":TSLspOrganize", + opts + ) + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "lR", + ":TSLspRenameFile", + opts + ) + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "li", + ":TSLspImportAll", + opts + ) + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "lq", + ":TSLspFixCurrent", + opts + ) + on_attach(client, bufnr) + end +end +return M diff --git a/lua/languages/init.lua b/lua/languages/init.lua index e69de29..8b13789 100644 --- a/lua/languages/init.lua +++ b/lua/languages/init.lua @@ -0,0 +1 @@ + diff --git a/lua/plugins/config/gitsigns.lua b/lua/plugins/config/gitsigns.lua index d106592..a02083b 100644 --- a/lua/plugins/config/gitsigns.lua +++ b/lua/plugins/config/gitsigns.lua @@ -1,55 +1,36 @@ - --vim.api.nvim_set_keymap('n', 'gb', "GitBlameToggle", {}) - - ------------------------------------------------------------------------------ - - -require'gitsigns'.setup({ - signs = { - add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, - change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - }, - numhl = false, - linehl = false, - keymaps = { - -- Default keymap options - noremap = true, - - ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns.actions\".next_hunk()'"}, - ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns.actions\".prev_hunk()'"}, - - ['n gs'] = 'lua require"gitsigns".stage_hunk()', - ['v gs'] = 'lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})', - ['n gu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n gr'] = 'lua require"gitsigns".reset_hunk()', - ['v gr'] = 'lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})', - ['n gR'] = 'lua require"gitsigns".reset_buffer()', - ['n gp'] = 'lua require"gitsigns".preview_hunk()', - ['n gb'] = 'lua require"gitsigns".blame_line(true)', - - -- Text objects - ['o ih'] = ':lua require"gitsigns.actions".select_hunk()', - ['x ih'] = ':lua require"gitsigns.actions".select_hunk()' - }, - watch_index = { - interval = 1000, - follow_files = true - }, - current_line_blame = false, - current_line_blame_delay = 1000, - current_line_blame_position = 'eol', - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - word_diff = false, - use_decoration_api = true, - use_internal_diff = true -- If luajit is present -} -) +require 'gitsigns'.setup({ + numhl = true, + linehl = true, + keymaps = { + -- Default keymap options + noremap = true, + + ['n g]'] = { + expr = true, + "&diff ? ']c' : 'lua require\"gitsigns.actions\".next_hunk()'" + }, + ['n g['] = { + expr = true, + "&diff ? '[c' : 'lua require\"gitsigns.actions\".prev_hunk()'" + }, + + ['n gs'] = 'lua require"gitsigns".stage_hunk()', + ['v gs'] = 'lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})', + ['n gu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n gr'] = 'lua require"gitsigns".reset_hunk()', + ['v gr'] = 'lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})', + ['n gR'] = 'lua require"gitsigns".reset_buffer()', + ['n gp'] = 'lua require"gitsigns".preview_hunk()', + ['n gb'] = 'lua require"gitsigns".blame_line(true)', + ['n gl'] = 'Gitsigns toggle_current_line_blame', + + -- Text objects + ['o ih'] = ':lua require"gitsigns.actions".select_hunk()', + ['x ih'] = ':lua require"gitsigns.actions".select_hunk()' + }, +}) diff --git a/lua/plugins/config/hop.lua b/lua/plugins/config/hop.lua index 483f4e0..4932295 100644 --- a/lua/plugins/config/hop.lua +++ b/lua/plugins/config/hop.lua @@ -1,15 +1,15 @@ -vim.api.nvim_set_keymap('n', 'jw', "lua require'hop'.hint_words()", {}) -vim.api.nvim_set_keymap('n', 'jl', "lua require'hop'.hint_lines()", {}) - - - - - - - - - - - -require'hop'.setup() +vim.api.nvim_set_keymap( + 'n', + 'jw', + "lua require'hop'.hint_words()", + {} +) +vim.api.nvim_set_keymap( + 'n', + 'jl', + "lua require'hop'.hint_lines()", + {} +) + +require 'hop'.setup() diff --git a/lua/plugins/config/indent-blankline.lua b/lua/plugins/config/indent-blankline.lua index a17c660..906fa7e 100644 --- a/lua/plugins/config/indent-blankline.lua +++ b/lua/plugins/config/indent-blankline.lua @@ -1,2 +1,4 @@ vim.g.indent_blankline_filetype_exclude = [['help','dashboard','NvimTree','vista','sagahover']] vim.g.indent_blankline_use_treesitter = true +vim.api.nvim_set_keymap('n', 'ti', "IndentBlanklineToggle", {}) +vim.g.indent_blankline_enabled = false diff --git a/lua/plugins/config/nvim-transparent.lua b/lua/plugins/config/nvim-transparent.lua new file mode 100644 index 0000000..af6724d --- /dev/null +++ b/lua/plugins/config/nvim-transparent.lua @@ -0,0 +1,20 @@ +vim.api.nvim_set_keymap('n', 'tp', "TransparentToggle", {}) +vim.g.transparent_enabled = 0 +require("transparent").setup({ + -- boolean: enable transparent + extra_groups = { + -- table/string: additional groups that should be clear + -- In particular, when you set it to 'all', that means all avaliable groups + + -- example of akinsho/nvim-bufferline.lua + --[[ "BufferLineTabClose", + "BufferlineBufferSelected", + "BufferLineFill", + "BufferLineBackground", + "BufferLineSeparator", + "BufferLineIndicatorSelected", ]] + }, + exclude_group = {}, + + -- table: groups you don't want to clear +}) diff --git a/lua/plugins/config/todo-comments.lua b/lua/plugins/config/todo-comments.lua index 8416c7f..d38c15a 100644 --- a/lua/plugins/config/todo-comments.lua +++ b/lua/plugins/config/todo-comments.lua @@ -1,58 +1,85 @@ +require("todo-comments").setup { + signs = true, + -- show icons in the signs column + sign_priority = 8, + -- sign priority + -- keywords recognized as todo comments + keywords = { + FIX = { + icon = " ", - require("todo-comments").setup { - signs = true, -- show icons in the signs column - sign_priority = 8, -- sign priority - -- keywords recognized as todo comments - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually - }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - }, - merge_keywords = true, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - before = "", -- "fg" or "bg" or empty - keyword = "wide", -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters) - after = "fg", -- "fg" or "bg" or empty - pattern = [[.*<(KEYWORDS)\s*:]], -- pattern used for highlightng (vim regex) - comments_only = true, -- uses treesitter to match keywords in comments only - max_line_len = 400, -- ignore lines longer than this - exclude = {}, -- list of file types to exclude highlighting - }, - -- list of named colors where we try to extract the guifg from the - -- list of hilight groups or use the hex color if hl not found as a fallback - colors = { - error = { "LspDiagnosticsDefaultError", "ErrorMsg", "#DC2626" }, - warning = { "LspDiagnosticsDefaultWarning", "WarningMsg", "#FBBF24" }, - info = { "LspDiagnosticsDefaultInformation", "#2563EB" }, - hint = { "LspDiagnosticsDefaultHint", "#10B981" }, - default = { "Identifier", "#7C3AED" }, - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - -- regex that will be used to match keywords. - -- don't replace the (KEYWORDS) placeholder - pattern = [[\b(KEYWORDS):]], -- ripgrep regex - -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives - }, - } + -- icon used for the sign, and in search results + color = "error", + + -- can be a hex color, or a named color (see below) + alt = {"FIXME", "BUG", "FIXIT", "ISSUE"}, + + -- a set of other keywords that all map to this FIX keywords + -- signs = false, -- configure signs for some keywords individually + }, + TODO = {icon = " ", color = "info"}, + HACK = {icon = " ", color = "warning"}, + WARN = {icon = " ", color = "warning", alt = {"WARNING", "XXX"}}, + PERF = {icon = " ", alt = {"OPTIM", "PERFORMANCE", "OPTIMIZE"}}, + NOTE = {icon = " ", color = "hint", alt = {"INFO"}}, + }, + merge_keywords = true, + + -- when true, custom keywords will be merged with the defaults + -- highlighting of the line containing the todo comment + -- * before: highlights before the keyword (typically comment characters) + -- * keyword: highlights of the keyword + -- * after: highlights after the keyword (todo text) + highlight = { + before = "", + + -- "fg" or "bg" or empty + keyword = "wide", + + -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters) + after = "fg", + + -- "fg" or "bg" or empty + pattern = [[.*<(KEYWORDS)\s*:]], + + -- pattern used for highlightng (vim regex) + comments_only = true, + + -- uses treesitter to match keywords in comments only + max_line_len = 400, + + -- ignore lines longer than this + exclude = {}, + + -- list of file types to exclude highlighting + }, + + -- list of named colors where we try to extract the guifg from the + -- list of hilight groups or use the hex color if hl not found as a fallback + colors = { + error = {"LspDiagnosticsDefaultError", "ErrorMsg", "#DC2626"}, + warning = {"LspDiagnosticsDefaultWarning", "WarningMsg", "#FBBF24"}, + info = {"LspDiagnosticsDefaultInformation", "#2563EB"}, + hint = {"LspDiagnosticsDefaultHint", "#10B981"}, + default = {"Identifier", "#7C3AED"}, + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + + -- regex that will be used to match keywords. + -- don't replace the (KEYWORDS) placeholder + pattern = [[\b(KEYWORDS):]], + + -- ripgrep regex + -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives + }, +} diff --git a/lua/plugins/config/which-key.lua b/lua/plugins/config/which-key.lua new file mode 100644 index 0000000..fc9bd32 --- /dev/null +++ b/lua/plugins/config/which-key.lua @@ -0,0 +1,198 @@ +require("which-key").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 = false, + + -- enabling this will show WhichKey when pressing z= to select spelling suggestions + suggestions = 20, + + -- how many suggestions should be shown in the list? + }, + + -- the presets plugin, adds help for a bunch of default keybindings in Neovim + -- No actual key bindings are created + presets = { + operators = true, + + -- adds help for operators like d, y, ... and registers them for motion / text object completion + motions = true, + + -- adds help for motions + text_objects = true, + + -- help for text objects triggered after entering an operator + windows = true, + + -- default bindings on + nav = true, + + -- misc bindings to work with windows + z = true, + + -- bindings for folds, spelling and others prefixed with z + g = true, + + -- bindings for prefixed with g + }, + }, + + -- add operators that will trigger motion and text object completion + -- to enable all native operators, set the preset / operators plugin above + operators = {gc = "Comments"}, + key_labels = { + -- override the label used to display some keys. It doesn't effect WK in any other way. + -- For example: + -- [""] = "SPC", + -- [""] = "RET", + -- [""] = "TAB", + }, + icons = { + breadcrumb = "»", + + -- symbol used in the command line area that shows your active key combo + separator = "➜", + + -- symbol used between a key and it's label + group = "+", + + -- symbol prepended to a group + }, + 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] + }, + layout = { + height = {min = 4, max = 25}, + + -- min and max height of the columns + width = {min = 20, max = 50}, + + -- min and max width of the columns + spacing = 3, + + -- spacing between columns + align = "left", + + -- align columns left, center or right + }, + ignore_missing = false, + + -- 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 wk = require("which-key") + +wk.register({ + ["a"] = {name = "Starting"}, + ["b"] = {name = "+buffer"}, + ["c"] = {name = "+comment"}, + ["f"] = {name = "+Find"}, + ["g"] = {name = "+Git"}, + ["s"] = {name = "+Search"}, + ["t"] = {name = "style"}, + ["j"] = {name = "jump"}, + ["l"] = {name = "+Language"}, + ["w"] = {name = "+Workspace"}, + ["\\e"] = {name = "new buffer"}, + ["\\p"] = {name = "register paste"}, + + ---------------------------------- + ["aa"] = {name = "Welcome page"}, + ["bf"] = {name = "format the buffer"}, + + ---------------------------------- + ["cl"] = {name = "comment line"}, + ["cd"] = {name = "comment motion"}, + + ---------------------------------- + ["ff"] = {name = "find file"}, + ["fg"] = {name = "live grep"}, + ["fb"] = {name = "find buffers"}, + ["fh"] = {name = "help tags"}, + ["fs"] = {name = "search cursor string"}, + + ---------------------------------- + ["gb"] = {name = "Git Blame"}, + ["gr"] = {name = "Git reset hunk"}, + ["gR"] = {name = "Git reset buffer"}, + ["gp"] = {name = "Git preview hunk"}, + ["gs"] = {name = "Git stage"}, + ["gu"] = {name = "Git unstage"}, + ["gc"] = {name = "Git buffer commits"}, + ["gC"] = {name = "Git commits"}, + ["gB"] = {name = "Git branchs"}, + ["gS"] = {name = "Git status"}, + ["gl"] = {name = "toggle line blame"}, + ["g["] = {name = "previous hunk"}, + ["g]"] = {name = "next hunk"}, + + ---------------------------------- + ["sb"] = {name = "search in buffer"}, + + ---------------------------------- + ["ti"] = {name = "toggle indent line"}, + ["tp"] = {name = "toggle transparent"}, + ["tc"] = {name = "change theme"}, + ["tc1"] = {name = "change to github style"}, + ["tc2"] = {name = "change to gruvbox-material"}, + ["tc3"] = {name = "change to everforest"}, + ["tc4"] = {name = "change to onebuddy"}, + ["tc5"] = {name = "change to gruvbuddy"}, + ["tc6"] = {name = "change to edge"}, + + ---------------------------------- + ["jw"] = {name = "jump to word"}, + ["jl"] = {name = "jump to line"}, + + ---------------------------------- + ["wa"] = {name = "add worksapce folder"}, + ["wr"] = {name = "remove workspace folder"}, + ["wl"] = {name = "show workspace"}, + + ---------------------------------- + ["la"] = {name = "action"}, + ["ld"] = {name = "preview Definition"}, + ["lr"] = {name = "rename"}, + ["ll"] = {name = "toggle diagnostic"}, + ["lq"] = {name = "quickfix"}, + + ---------------------------------- + ["gd"] = {name = "go to Definition"}, + ["gD"] = {name = "go to Declaration"}, + ["gr"] = {name = "go to Reference"}, + ["gh"] = {name = "show information"}, + ["gI"] = {name = "go to implementation"}, +}) diff --git a/lua/plugins/config/zen-mode.lua b/lua/plugins/config/zen-mode.lua index 38bacd6..445ca47 100644 --- a/lua/plugins/config/zen-mode.lua +++ b/lua/plugins/config/zen-mode.lua @@ -1 +1,4 @@ vim.api.nvim_set_keymap('n', 'z', "ZenMode", {}) +require "zen-mode".setup {} +vim.cmd 'packadd which-key.nvim' +require "which-key".register({["z"] = {name = "ZenMode"}}) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e69de29..8b13789 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -0,0 +1 @@ + diff --git a/lua/style/init.lua b/lua/style/init.lua index e69de29..8b13789 100644 --- a/lua/style/init.lua +++ b/lua/style/init.lua @@ -0,0 +1 @@ + diff --git a/lua/tools/init.lua b/lua/tools/init.lua index e69de29..8b13789 100644 --- a/lua/tools/init.lua +++ b/lua/tools/init.lua @@ -0,0 +1 @@ + diff --git a/luafmt.sh b/luafmt.sh new file mode 100755 index 0000000..b08ee8b --- /dev/null +++ b/luafmt.sh @@ -0,0 +1,33 @@ +#!/bin/bash +function getdir(){ + for file in $1/* + do + if test -d $file + then + if test ! -f $file + then + for luaf in $file/*.lua + do lua luafmt/luafmt.lua --f $luaf [max column hint=80] + done + getdir $file + fi + fi + done +} +if test -d luafmt +then + cd luafmt + echo 'luafmt exists, start to update' + git pull + cd .. +else + cd luafmt + echo 'luafmt does not exist, try to download....' + git clone https://github.com/CurtisFenner/luafmt + if [ $? == 0 ] + then + chmod 755 luafmt + fi +fi + getdir . + rm -rf luafmt diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 250202a..7a91e02 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -9,23 +9,26 @@ vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcall(function() - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end +_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 - else - time = function(chunk, start) 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 @@ -38,14 +41,16 @@ local function save_profiles(threshold) 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 = _G._packer or {} _G._packer.profile_output = results end time([[Luarocks path setup]], true) -local package_path_str = "/home/jermy/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/jermy/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/jermy/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/jermy/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/jermy/.cache/nvim/packer_hererocks/2.0.5/lib/lua/5.1/?.so" +local package_path_str = "/home/jeremychen/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?.lua;/home/jeremychen/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?/init.lua;/home/jeremychen/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?.lua;/home/jeremychen/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/jeremychen/.cache/nvim/packer_hererocks/2.1.1720049189/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 @@ -57,7 +62,7 @@ end time([[Luarocks path setup]], false) time([[try_loadstring definition]], true) local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s)) + 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, {}) @@ -70,313 +75,635 @@ time([[try_loadstring definition]], false) time([[Defining packer_plugins]], true) _G.packer_plugins = { ["accelerated-jk"] = { - config = { "\27LJ\1\2:\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\31core.config.accelerated-jk\frequire\0" }, + config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31core.config.accelerated-jk\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/accelerated-jk" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/accelerated-jk", + url = "https://github.com/rhysd/accelerated-jk" }, ["barbar.nvim"] = { - config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23core.config.barbar\frequire\0" }, + config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23core.config.barbar\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/barbar.nvim", + url = "https://github.com/romgrk/barbar.nvim" + }, + ["clangd_extensions.nvim"] = { + load_after = {}, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/barbar.nvim" + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/clangd_extensions.nvim", + url = "https://github.com/p00f/clangd_extensions.nvim" + }, + ["cmp-buffer"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-calc"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-calc/after/plugin/cmp_calc.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-calc", + url = "https://github.com/hrsh7th/cmp-calc" + }, + ["cmp-emoji"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-emoji/after/plugin/cmp_emoji.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-emoji", + url = "https://github.com/hrsh7th/cmp-emoji" + }, + ["cmp-latex-symbols"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-latex-symbols/after/plugin/cmp_latex.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-latex-symbols", + url = "https://github.com/kdheepak/cmp-latex-symbols" }, - ["compe-tabnine"] = { + ["cmp-look"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-look/after/plugin/cmp_look.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-look", + url = "https://github.com/octaltree/cmp-look" + }, + ["cmp-nvim-lsp"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/compe-tabnine" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, - ["dashboard-nvim"] = { - config = { "\27LJ\1\0029\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\30core.config.dashboard-vim\frequire\0" }, + ["cmp-nvim-lua"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, + ["cmp-nvim-tags"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-nvim-tags/after/plugin/cmp_nvim_tags.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-nvim-tags", + url = "https://github.com/quangnguyen30192/cmp-nvim-tags" + }, + ["cmp-path"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + ["cmp-spell"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-spell/after/plugin/cmp-spell.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-spell", + url = "https://github.com/f3fora/cmp-spell" + }, + ["cmp-tabnine"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-tabnine/after/plugin/cmp-tabnine.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-tabnine", + url = "https://github.com/tzachar/cmp-tabnine" + }, + ["cmp-treesitter"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-treesitter/after/plugin/cmp_treesitter.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-treesitter", + url = "https://github.com/ray-x/cmp-treesitter" + }, + ["cmp-vsnip"] = { + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-vsnip/after/plugin/cmp_vsnip.lua" }, + load_after = {}, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/cmp-vsnip", + url = "https://github.com/hrsh7th/cmp-vsnip" + }, + ["colorbuddy.vim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/dashboard-nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/colorbuddy.vim", + url = "https://github.com/tjdevries/colorbuddy.vim" + }, + ["copilot.vim"] = { + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/copilot.vim", + url = "https://github.com/github/copilot.vim" + }, + ["dashboard-nvim"] = { + config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30core.config.dashboard-vim\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/dashboard-nvim", + url = "https://github.com/glepnir/dashboard-nvim" }, ["dial.nvim"] = { - config = { "\27LJ\1\2\v\0\0\1\0\0\0\1G\0\1\0\0" }, + config = { "\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/dial.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/dial.nvim", + url = "https://github.com/monaqa/dial.nvim" + }, + edge = { + config = { "\27LJ\2\n\1\0\0\b\0\n\0\r6\0\0\0009\0\1\0'\1\3\0006\2\0\0009\2\4\0029\2\5\2'\4\6\0'\5\a\0'\6\b\0005\a\t\0B\2\5\1=\1\2\0K\0\1\0\1\0\1\vsilent\2\30colorscheme edge\15tc6\6n\20nvim_set_keymap\bapi\fcolored!edge_diagnostic_virtual_text\6g\bvim\0" }, + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/edge", + url = "https://github.com/sainnhe/edge" }, everforest = { + config = { "\27LJ\2\n\1\0\0\6\0\n\0\r6\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\0\0009\0\4\0009\0\5\0'\2\6\0'\3\a\0'\4\b\0005\5\t\0B\0\5\1K\0\1\0\1\0\1\vsilent\2$colorscheme everforest\15tc3\6n\20nvim_set_keymap\bapi\fcolored'everforest_diagnostic_virtual_text\6g\bvim\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/everforest" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/everforest", + url = "https://github.com/sainnhe/everforest" }, ["friendly-snippets"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/friendly-snippets" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/friendly-snippets", + url = "https://github.com/rafamadriz/friendly-snippets" }, ["galaxyline.nvim"] = { - config = { "\27LJ\1\0026\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\27core.config.galaxyline\frequire\0" }, - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/galaxyline.nvim" + config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27core.config.galaxyline\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/galaxyline.nvim", + url = "https://github.com/NTBBloodbath/galaxyline.nvim" }, ["github-nvim-theme"] = { + config = { "\27LJ\2\n|\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2%colorscheme github_dark\15tc1\6n\20nvim_set_keymap\bapi\bvim\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/github-nvim-theme" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/github-nvim-theme", + url = "https://github.com/projekt0n/github-nvim-theme" }, ["gitsigns.nvim"] = { - config = { "\27LJ\1\0027\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\28plugins.config.gitsigns\frequire\0" }, - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/gitsigns.nvim" + config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.gitsigns\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim", + url = "https://github.com/lewis6991/gitsigns.nvim" }, ["gruvbox-material"] = { - config = { "\27LJ\1\2\1\0\0\2\0\b\0\r4\0\0\0007\0\1\0%\1\3\0:\1\2\0004\0\0\0007\0\1\0%\1\5\0:\1\4\0004\0\0\0007\0\6\0%\1\a\0>\0\2\1G\0\1\0!colorscheme gruvbox-material\bcmd\bmix\29gruvbox_material_palette\vmedium gruvbox_material_background\6g\bvim\0" }, + config = { "\27LJ\2\n\3\0\0\6\0\18\0!6\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\0\0009\0\1\0)\1\1\0=\1\4\0006\0\0\0009\0\1\0)\1\1\0=\1\5\0006\0\0\0009\0\1\0'\1\a\0=\1\6\0006\0\0\0009\0\1\0'\1\t\0=\1\b\0006\0\0\0009\0\n\0'\2\v\0B\0\2\0016\0\0\0009\0\f\0009\0\r\0'\2\14\0'\3\15\0'\4\16\0005\5\17\0B\0\5\1K\0\1\0\1\0\1\vsilent\2*colorscheme gruvbox-material\15tc2\6n\20nvim_set_keymap\bapi!colorscheme gruvbox-material\bcmd\fcolored-gruvbox_material_diagnostic_virtual_text\bmix\29gruvbox_material_palette,gruvbox_material_disable_italic_comment#gruvbox_material_enable_italic\tsoft gruvbox_material_background\6g\bvim\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/gruvbox-material" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/gruvbox-material", + url = "https://github.com/sainnhe/gruvbox-material" }, - hop = { - config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.config.hop\frequire\0" }, + ["gruvbuddy.nvim"] = { + config = { "\27LJ\2\n\1\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2>lua require'colorbuddy'.colorscheme('gruvbuddy')\15tc5\6n\20nvim_set_keymap\bapi\bvim\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/hop" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/gruvbuddy.nvim", + url = "https://github.com/tjdevries/gruvbuddy.nvim" + }, + hop = { + config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.config.hop\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/hop", + url = "https://github.com/phaazon/hop.nvim" }, ["indent-blankline.nvim"] = { - config = { "\27LJ\1\2?\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0$plugins.config.indent-blankline\frequire\0" }, - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim" + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim/after/plugin/commands.lua" }, + config = { "\27LJ\2\n?\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0$plugins.config.indent-blankline\frequire\0" }, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" }, kommentary = { - config = { "\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 languages.config.kommentary\frequire\0" }, + config = { "\27LJ\2\n;\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0 languages.config.kommentary\frequire\0" }, + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/kommentary", + url = "https://github.com/b3nj5m1n/kommentary" + }, + ["lspkind-nvim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/kommentary" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/lspkind-nvim", + url = "https://github.com/onsails/lspkind-nvim" }, ["lspsaga.nvim"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/lspsaga.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/lspsaga.nvim", + url = "https://github.com/tami5/lspsaga.nvim" + }, + ["mason.nvim"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" }, ["neoscroll.nvim"] = { - config = { "\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14neoscroll\frequire\0" }, + config = { "\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14neoscroll\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/neoscroll.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/neoscroll.nvim", + url = "https://github.com/karb94/neoscroll.nvim" + }, + ["null-ls.nvim"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/null-ls.nvim", + url = "https://github.com/jose-elias-alvarez/null-ls.nvim" }, ["nvim-autopairs"] = { - config = { "\27LJ\1\2<\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, + config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-autopairs" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + url = "https://github.com/windwp/nvim-autopairs" }, - ["nvim-compe"] = { - config = { "\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 languages.config.nvim-compe\frequire\0" }, + ["nvim-cmp"] = { + after = { "cmp-calc", "cmp-treesitter", "cmp-buffer", "cmp-emoji", "cmp-nvim-lua", "cmp-spell", "cmp-look", "cmp-nvim-tags", "cmp-vsnip", "cmp-tabnine", "cmp-latex-symbols", "cmp-path" }, + config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30languages.config.nvim-cmp\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-compe" + only_config = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" }, - ["nvim-lspconfig"] = { - after = { "lspsaga.nvim", "nvim-lspinstall" }, + ["nvim-colorizer.lua"] = { + config = { "\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14colorizer\frequire\0" }, loaded = true, - only_config = true + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", + url = "https://github.com/norcalli/nvim-colorizer.lua" }, - ["nvim-lspinstall"] = { + ["nvim-jdtls"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/nvim-lspinstall" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-jdtls", + url = "https://github.com/mfussenegger/nvim-jdtls" }, - ["nvim-nonicons"] = { + ["nvim-lsp-ts-utils"] = { + load_after = {}, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-nonicons" + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-lsp-ts-utils", + url = "https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils" }, - ["nvim-toggleterm.lua"] = { - config = { "\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 core.config.nvim-toggleterm\frequire\0" }, + ["nvim-lspconfig"] = { + after = { "trouble.nvim", "lspsaga.nvim", "nvim-jdtls", "clangd_extensions.nvim", "nvim-lsp-ts-utils", "null-ls.nvim", "mason.nvim" }, + config = { "\27LJ\2\n?\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0$languages.config.nvim-lspconfig\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-toggleterm.lua" + only_config = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" }, - ["nvim-tree.lua"] = { - config = { "\27LJ\1\0025\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\26core.config.nvim-tree\frequire\0" }, + ["nvim-markdown-preview"] = { + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-markdown-preview", + url = "https://github.com/davidgranstrom/nvim-markdown-preview" + }, + ["nvim-navic"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-navic", + url = "https://github.com/SmiteshP/nvim-navic" + }, + ["nvim-toggleterm.lua"] = { + config = { "\27LJ\2\n;\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0 core.config.nvim-toggleterm\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-toggleterm.lua", + url = "https://github.com/akinsho/nvim-toggleterm.lua" + }, + ["nvim-transparent"] = { + config = { "\27LJ\2\n?\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0$plugins.config.nvim-transparent\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-transparent", + url = "https://github.com/xiyaowong/nvim-transparent" + }, + ["nvim-tree.lua"] = { + config = { "\27LJ\2\n5\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\26core.config.nvim-tree\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua", + url = "https://github.com/kyazdani42/nvim-tree.lua" }, ["nvim-treesitter"] = { - after = { "nvim-ts-rainbow", "nvim-treesitter-textobjects", "spellsitter.nvim", "nvim-ts-autotag" }, + after = { "nvim-treesitter-textobjects", "nvim-ts-rainbow", "spellsitter.nvim", "nvim-ts-context-commentstring", "nvim-ts-autotag" }, + config = { "\27LJ\2\n;\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0 core.config.nvim-treesitter\frequire\0" }, loaded = true, - only_config = true + only_config = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["nvim-treesitter-textobjects"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects", + url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" }, ["nvim-ts-autotag"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/nvim-ts-autotag" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-ts-autotag", + url = "https://github.com/windwp/nvim-ts-autotag" + }, + ["nvim-ts-context-commentstring"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-ts-context-commentstring", + url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring" }, ["nvim-ts-rainbow"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/nvim-ts-rainbow" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/nvim-ts-rainbow", + url = "https://github.com/p00f/nvim-ts-rainbow" }, ["nvim-web-devicons"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/nvim-web-devicons" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + onebuddy = { + config = { "\27LJ\2\n\1\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2=lua require'colorbuddy'.colorscheme('onebuddy')\15tc4\6n\20nvim_set_keymap\bapi\bvim\0" }, + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/onebuddy", + url = "https://github.com/Th3Whit3Wolf/onebuddy" }, ["packer.nvim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/packer.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" }, ["plenary.nvim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/plenary.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" }, ["popup.nvim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/popup.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/popup.nvim", + url = "https://github.com/nvim-lua/popup.nvim" + }, + ripgrep = { + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/ripgrep", + url = "https://github.com/BurntSushi/ripgrep" + }, + ["shade.nvim"] = { + config = { "\27LJ\2\n[\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\17opacity_step\3\1\20overlay_opacity\0032\nsetup\nshade\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/shade.nvim", + url = "https://github.com/sunjon/shade.nvim" }, sonokai = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/sonokai" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/sonokai", + url = "https://github.com/sainnhe/sonokai" }, ["space-nvim"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/space-nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/space-nvim", + url = "https://github.com/Th3Whit3Wolf/space-nvim" }, ["spellsitter.nvim"] = { load_after = {}, loaded = true, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/spellsitter.nvim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/spellsitter.nvim", + url = "https://github.com/lewis6991/spellsitter.nvim" }, ["telescope.nvim"] = { - config = { "\27LJ\1\0025\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\26core.config.telescope\frequire\0" }, - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/telescope.nvim" + config = { "\27LJ\2\n5\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\26core.config.telescope\frequire\0" }, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" }, ["todo-comments.nvim"] = { - config = { "\27LJ\1\2<\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0!plugins.config.todo-comments\frequire\0" }, + config = { "\27LJ\2\n<\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0!plugins.config.todo-comments\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/todo-comments.nvim", + url = "https://github.com/folke/todo-comments.nvim" + }, + ["trouble.nvim"] = { + load_after = {}, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/todo-comments.nvim" + needs_bufread = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/trouble.nvim", + url = "https://github.com/folke/trouble.nvim" + }, + ["vim-bookmarks"] = { + loaded = true, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/vim-bookmarks", + url = "https://github.com/MattesGroeger/vim-bookmarks" }, ["vim-cursorword"] = { loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/vim-cursorword" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/vim-cursorword", + url = "https://github.com/itchyny/vim-cursorword" }, ["vim-rooter"] = { - config = { "\27LJ\1\0025\0\0\2\0\3\0\0054\0\0\0007\0\1\0'\1\1\0:\1\2\0G\0\1\0\24rooter_silent_chdir\6g\bvim\0" }, + config = { "\27LJ\2\n5\0\0\2\0\3\0\0056\0\0\0009\0\1\0)\1\1\0=\1\2\0K\0\1\0\24rooter_silent_chdir\6g\bvim\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/vim-rooter" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/vim-rooter", + url = "https://github.com/airblade/vim-rooter" }, ["vim-sayonara"] = { - config = { "\27LJ\1\0028\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\29core.config.vim-sayonara\frequire\0" }, - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/vim-sayonara" + config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29core.config.vim-sayonara\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/vim-sayonara", + url = "https://github.com/mhinz/vim-sayonara" }, ["vim-vsnip"] = { - loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/vim-vsnip" + after = { "vim-vsnip-integ" }, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/vim-vsnip", + url = "https://github.com/hrsh7th/vim-vsnip" }, ["vim-vsnip-integ"] = { - after_files = { "/home/jermy/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ/after/plugin/vsnip_integ.vim" }, - loaded = true, + after_files = { "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ/after/plugin/vsnip_integ.vim" }, + load_after = { + ["vim-vsnip"] = true + }, + loaded = false, needs_bufread = false, - path = "/home/jermy/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ", + url = "https://github.com/hrsh7th/vim-vsnip-integ" }, ["vista.vim"] = { - config = { "\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22core.config.vista\frequire\0" }, + config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22core.config.vista\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/vista.vim", + url = "https://github.com/liuchengxu/vista.vim" + }, + ["which-key.nvim"] = { + config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.which-key\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/opt/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + }, + ["zen-mode.nvim"] = { + config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.zen-mode\frequire\0" }, loaded = true, - path = "/home/jermy/.local/share/nvim/site/pack/packer/start/vista.vim" + path = "/home/jeremychen/.local/share/nvim/site/pack/packer/start/zen-mode.nvim", + url = "https://github.com/folke/zen-mode.nvim" } } time([[Defining packer_plugins]], false) +-- Config for: nvim-lspconfig +time([[Config for nvim-lspconfig]], 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$languages.config.nvim-lspconfig\frequire\0", "config", "nvim-lspconfig") +time([[Config for nvim-lspconfig]], false) +-- Config for: onebuddy +time([[Config for onebuddy]], true) +try_loadstring("\27LJ\2\n\1\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2=lua require'colorbuddy'.colorscheme('onebuddy')\15tc4\6n\20nvim_set_keymap\bapi\bvim\0", "config", "onebuddy") +time([[Config for onebuddy]], false) +-- Config for: gruvbox-material +time([[Config for gruvbox-material]], true) +try_loadstring("\27LJ\2\n\3\0\0\6\0\18\0!6\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\0\0009\0\1\0)\1\1\0=\1\4\0006\0\0\0009\0\1\0)\1\1\0=\1\5\0006\0\0\0009\0\1\0'\1\a\0=\1\6\0006\0\0\0009\0\1\0'\1\t\0=\1\b\0006\0\0\0009\0\n\0'\2\v\0B\0\2\0016\0\0\0009\0\f\0009\0\r\0'\2\14\0'\3\15\0'\4\16\0005\5\17\0B\0\5\1K\0\1\0\1\0\1\vsilent\2*colorscheme gruvbox-material\15tc2\6n\20nvim_set_keymap\bapi!colorscheme gruvbox-material\bcmd\fcolored-gruvbox_material_diagnostic_virtual_text\bmix\29gruvbox_material_palette,gruvbox_material_disable_italic_comment#gruvbox_material_enable_italic\tsoft gruvbox_material_background\6g\bvim\0", "config", "gruvbox-material") +time([[Config for gruvbox-material]], false) +-- Config for: gruvbuddy.nvim +time([[Config for gruvbuddy.nvim]], true) +try_loadstring("\27LJ\2\n\1\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2>lua require'colorbuddy'.colorscheme('gruvbuddy')\15tc5\6n\20nvim_set_keymap\bapi\bvim\0", "config", "gruvbuddy.nvim") +time([[Config for gruvbuddy.nvim]], false) +-- Config for: everforest +time([[Config for everforest]], true) +try_loadstring("\27LJ\2\n\1\0\0\6\0\n\0\r6\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\0\0009\0\4\0009\0\5\0'\2\6\0'\3\a\0'\4\b\0005\5\t\0B\0\5\1K\0\1\0\1\0\1\vsilent\2$colorscheme everforest\15tc3\6n\20nvim_set_keymap\bapi\fcolored'everforest_diagnostic_virtual_text\6g\bvim\0", "config", "everforest") +time([[Config for everforest]], false) +-- Config for: accelerated-jk +time([[Config for accelerated-jk]], 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\31core.config.accelerated-jk\frequire\0", "config", "accelerated-jk") +time([[Config for accelerated-jk]], false) +-- Config for: zen-mode.nvim +time([[Config for zen-mode.nvim]], true) +try_loadstring("\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.zen-mode\frequire\0", "config", "zen-mode.nvim") +time([[Config for zen-mode.nvim]], false) +-- Config for: vim-rooter +time([[Config for vim-rooter]], true) +try_loadstring("\27LJ\2\n5\0\0\2\0\3\0\0056\0\0\0009\0\1\0)\1\1\0=\1\2\0K\0\1\0\24rooter_silent_chdir\6g\bvim\0", "config", "vim-rooter") +time([[Config for vim-rooter]], false) +-- Config for: kommentary +time([[Config for kommentary]], 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 languages.config.kommentary\frequire\0", "config", "kommentary") +time([[Config for kommentary]], false) +-- Config for: nvim-colorizer.lua +time([[Config for nvim-colorizer.lua]], true) +try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") +time([[Config for nvim-colorizer.lua]], false) -- Config for: nvim-treesitter time([[Config for nvim-treesitter]], true) -try_loadstring("\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 core.config.nvim-treesitter\frequire\0", "config", "nvim-treesitter") +try_loadstring("\27LJ\2\n;\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0 core.config.nvim-treesitter\frequire\0", "config", "nvim-treesitter") time([[Config for nvim-treesitter]], false) +-- Config for: nvim-cmp +time([[Config for nvim-cmp]], true) +try_loadstring("\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30languages.config.nvim-cmp\frequire\0", "config", "nvim-cmp") +time([[Config for nvim-cmp]], false) +-- Config for: edge +time([[Config for edge]], true) +try_loadstring("\27LJ\2\n\1\0\0\b\0\n\0\r6\0\0\0009\0\1\0'\1\3\0006\2\0\0009\2\4\0029\2\5\2'\4\6\0'\5\a\0'\6\b\0005\a\t\0B\2\5\1=\1\2\0K\0\1\0\1\0\1\vsilent\2\30colorscheme edge\15tc6\6n\20nvim_set_keymap\bapi\fcolored!edge_diagnostic_virtual_text\6g\bvim\0", "config", "edge") +time([[Config for edge]], false) +-- Config for: github-nvim-theme +time([[Config for github-nvim-theme]], true) +try_loadstring("\27LJ\2\n|\0\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\1\vsilent\2%colorscheme github_dark\15tc1\6n\20nvim_set_keymap\bapi\bvim\0", "config", "github-nvim-theme") +time([[Config for github-nvim-theme]], false) -- Config for: dial.nvim time([[Config for dial.nvim]], true) -try_loadstring("\27LJ\1\2\v\0\0\1\0\0\0\1G\0\1\0\0", "config", "dial.nvim") +try_loadstring("\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0", "config", "dial.nvim") time([[Config for dial.nvim]], false) --- Config for: vista.vim -time([[Config for vista.vim]], true) -try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22core.config.vista\frequire\0", "config", "vista.vim") -time([[Config for vista.vim]], false) --- Config for: vim-rooter -time([[Config for vim-rooter]], true) -try_loadstring("\27LJ\1\0025\0\0\2\0\3\0\0054\0\0\0007\0\1\0'\1\1\0:\1\2\0G\0\1\0\24rooter_silent_chdir\6g\bvim\0", "config", "vim-rooter") -time([[Config for vim-rooter]], false) --- Config for: indent-blankline.nvim -time([[Config for indent-blankline.nvim]], true) -try_loadstring("\27LJ\1\2?\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0$plugins.config.indent-blankline\frequire\0", "config", "indent-blankline.nvim") -time([[Config for indent-blankline.nvim]], false) --- Config for: galaxyline.nvim -time([[Config for galaxyline.nvim]], true) -try_loadstring("\27LJ\1\0026\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\27core.config.galaxyline\frequire\0", "config", "galaxyline.nvim") -time([[Config for galaxyline.nvim]], false) --- Config for: vim-sayonara -time([[Config for vim-sayonara]], true) -try_loadstring("\27LJ\1\0028\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\29core.config.vim-sayonara\frequire\0", "config", "vim-sayonara") -time([[Config for vim-sayonara]], false) -- Config for: nvim-autopairs time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\1\2<\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") time([[Config for nvim-autopairs]], false) --- Config for: hop -time([[Config for hop]], true) -try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.config.hop\frequire\0", "config", "hop") -time([[Config for hop]], false) --- Config for: nvim-toggleterm.lua -time([[Config for nvim-toggleterm.lua]], true) -try_loadstring("\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 core.config.nvim-toggleterm\frequire\0", "config", "nvim-toggleterm.lua") -time([[Config for nvim-toggleterm.lua]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\1\0025\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\26core.config.telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], true) -try_loadstring("\27LJ\1\0025\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\26core.config.nvim-tree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) -- Config for: neoscroll.nvim time([[Config for neoscroll.nvim]], true) -try_loadstring("\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14neoscroll\frequire\0", "config", "neoscroll.nvim") +try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14neoscroll\frequire\0", "config", "neoscroll.nvim") time([[Config for neoscroll.nvim]], false) --- Config for: nvim-compe -time([[Config for nvim-compe]], true) -try_loadstring("\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 languages.config.nvim-compe\frequire\0", "config", "nvim-compe") -time([[Config for nvim-compe]], false) --- Config for: accelerated-jk -time([[Config for accelerated-jk]], true) -try_loadstring("\27LJ\1\2:\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\31core.config.accelerated-jk\frequire\0", "config", "accelerated-jk") -time([[Config for accelerated-jk]], false) --- Config for: barbar.nvim -time([[Config for barbar.nvim]], true) -try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23core.config.barbar\frequire\0", "config", "barbar.nvim") -time([[Config for barbar.nvim]], false) --- Config for: gitsigns.nvim -time([[Config for gitsigns.nvim]], true) -try_loadstring("\27LJ\1\0027\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\28plugins.config.gitsigns\frequire\0", "config", "gitsigns.nvim") -time([[Config for gitsigns.nvim]], false) --- Config for: todo-comments.nvim -time([[Config for todo-comments.nvim]], true) -try_loadstring("\27LJ\1\2<\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0!plugins.config.todo-comments\frequire\0", "config", "todo-comments.nvim") -time([[Config for todo-comments.nvim]], false) --- Config for: kommentary -time([[Config for kommentary]], true) -try_loadstring("\27LJ\1\2;\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0 languages.config.kommentary\frequire\0", "config", "kommentary") -time([[Config for kommentary]], false) --- Config for: gruvbox-material -time([[Config for gruvbox-material]], true) -try_loadstring("\27LJ\1\2\1\0\0\2\0\b\0\r4\0\0\0007\0\1\0%\1\3\0:\1\2\0004\0\0\0007\0\1\0%\1\5\0:\1\4\0004\0\0\0007\0\6\0%\1\a\0>\0\2\1G\0\1\0!colorscheme gruvbox-material\bcmd\bmix\29gruvbox_material_palette\vmedium gruvbox_material_background\6g\bvim\0", "config", "gruvbox-material") -time([[Config for gruvbox-material]], false) --- Config for: nvim-lspconfig -time([[Config for nvim-lspconfig]], true) -try_loadstring("\27LJ\1\2?\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0$languages.config.nvim-lspconfig\frequire\0", "config", "nvim-lspconfig") -time([[Config for nvim-lspconfig]], false) --- Config for: dashboard-nvim -time([[Config for dashboard-nvim]], true) -try_loadstring("\27LJ\1\0029\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\30core.config.dashboard-vim\frequire\0", "config", "dashboard-nvim") -time([[Config for dashboard-nvim]], false) -- Load plugins in order defined by `after` time([[Sequenced loading]], true) -vim.cmd [[ packadd lspsaga.nvim ]] -vim.cmd [[ packadd nvim-lspinstall ]] +vim.cmd [[ packadd nvim-ts-context-commentstring ]] +vim.cmd [[ packadd nvim-ts-autotag ]] vim.cmd [[ packadd spellsitter.nvim ]] -vim.cmd [[ packadd nvim-treesitter-textobjects ]] vim.cmd [[ packadd nvim-ts-rainbow ]] -vim.cmd [[ packadd nvim-ts-autotag ]] +vim.cmd [[ packadd nvim-treesitter-textobjects ]] +vim.cmd [[ packadd clangd_extensions.nvim ]] +vim.cmd [[ packadd trouble.nvim ]] +vim.cmd [[ packadd nvim-jdtls ]] +vim.cmd [[ packadd lspsaga.nvim ]] +vim.cmd [[ packadd null-ls.nvim ]] +vim.cmd [[ packadd mason.nvim ]] +vim.cmd [[ packadd nvim-lsp-ts-utils ]] time([[Sequenced loading]], false) +vim.cmd [[augroup packer_load_aucmds]] +vim.cmd [[au!]] + -- Filetype lazy-loads +time([[Defining lazy-load filetype autocommands]], true) +vim.cmd [[au FileType tex ++once lua require("packer.load")({'cmp-latex-symbols'}, { ft = "tex" }, _G.packer_plugins)]] +time([[Defining lazy-load filetype autocommands]], false) + -- Event lazy-loads +time([[Defining lazy-load event autocommands]], true) +vim.cmd [[au InsertCharPre * ++once lua require("packer.load")({'vim-vsnip', 'cmp-calc', 'cmp-treesitter', 'cmp-buffer', 'cmp-emoji', 'cmp-nvim-lua', 'cmp-spell', 'cmp-look', 'cmp-nvim-tags', 'cmp-vsnip', 'cmp-tabnine', 'cmp-path'}, { event = "InsertCharPre *" }, _G.packer_plugins)]] +vim.cmd [[au BufRead * ++once lua require("packer.load")({'shade.nvim', 'gitsigns.nvim', 'hop', 'todo-comments.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] +vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'vista.vim', 'nvim-tree.lua', 'nvim-toggleterm.lua', 'telescope.nvim', 'which-key.nvim', 'nvim-transparent', 'dashboard-nvim', 'indent-blankline.nvim', 'barbar.nvim', 'vim-sayonara', 'galaxyline.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] +time([[Defining lazy-load event autocommands]], false) +vim.cmd("augroup END") + +_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