diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/colors/dark.vim | 259 | ||||
-rw-r--r-- | .config/nvim/config.lua | 1 | ||||
-rw-r--r-- | .config/nvim/init.lua | 22 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/autopairs/init.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/colorizer/init.lua | 6 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/compe/init.lua | 10 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/dashboard/init.lua | 9 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/galaxyline/init.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/gitsigns/init.lua | 6 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/lspinstall/init.lua | 26 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/neoformat/init.lua | 12 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/nvimtree/init.lua | 24 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/telescope/init.lua | 11 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/treesitter/init.lua | 26 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/utils/init.lua | 15 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/which-key/init.lua | 98 | ||||
-rw-r--r-- | .config/nvim/lua/cfg/zen/init.lua | 6 | ||||
-rw-r--r-- | .config/nvim/lua/default-config.lua | 12 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 59 |
19 files changed, 425 insertions, 185 deletions
diff --git a/.config/nvim/colors/dark.vim b/.config/nvim/colors/dark.vim new file mode 100644 index 0000000..be065c2 --- /dev/null +++ b/.config/nvim/colors/dark.vim @@ -0,0 +1,259 @@ +"Theme built with Lush.nvim, exported at Sun 04 Jul 2021 02:47:35 PM EDT +highlight StatusLineLspDiagnosticsHint guifg=#4DC1FF guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight BufferInactive guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight markdownCode guifg=#C67158 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewStatusRenamed SignChange +highlight! link StorageClass Type +highlight! link SpecialChar Character +highlight FoldColumn guifg=#858585 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight TabLine guifg=#C7C8D1 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight TelescopeSelection guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitDelete guifg=#93151B guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSMethod Function +highlight Identifier guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeRootFolder guifg=#3B6AA0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight GitSignsChange guifg=#0C7D9D guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSLabel Label +highlight! link TSComment Comment +highlight! link LspDiagnosticsWarning LspDiagnosticsSignWarning +highlight SignAdd guifg=#5A7D0C guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link IncSearch Search +highlight WhichKey guifg=#BF85C1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSLiteral String +highlight BufferCurrent guifg=NONE guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight Todo guifg=#AF4B57 guibg=NONE guisp=NONE gui=bold blend=NONE +highlight! link TSParameterReference TSParameter +highlight NvimTreeOpenedFolderName guifg=#4E99BC guibg=NONE guisp=NONE gui=italic blend=NONE +highlight! link MsgSeparator Normal +highlight! link TermCursor Cursor +highlight LspDiagnosticsFloatingHint guifg=#4DC1FF guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSConstBuiltin Constant +highlight TSStrike guifg=NONE guibg=NONE guisp=NONE gui=strikethrough blend=NONE +highlight Number guifg=#AF4B57 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link WildMenu PmenuSel +highlight DiffText guifg=NONE guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight SignDelete guifg=#93151B guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Normal guifg=#C7C8D1 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsSignInformation guifg=#FFCC66 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Type guifg=#BF85C1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Float guifg=#AF4B57 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight CompeDocumentation guifg=NONE guibg=#393E46 guisp=NONE gui=NONE blend=NONE +highlight Ignore guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight GitSignsDelete guifg=#93151B guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSConstant Constant +highlight StatusLineSeparator guifg=NONE guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSConstructor Type +highlight! link Substitute Search +highlight StatusLineGitDelete guifg=#AF4B57 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsSignError guifg=#F44848 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight StatusLineLspDiagnosticsError guifg=#F44848 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight WhichKeyFloat guifg=NONE guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight markdownItalic guifg=NONE guibg=NONE guisp=NONE gui=italic blend=NONE +highlight Pmenu guifg=#C7C8D1 guibg=#393E46 guisp=NONE gui=NONE blend=NONE +highlight! link TabLineWarning LspDiagnosticsSignWarning +highlight PmenuSel guifg=#262626 guibg=#67899E guisp=NONE gui=NONE blend=NONE +highlight! link Typedef Type +highlight! link Define PreProc +highlight TSError guifg=NONE guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Directory guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight DashboardFooter guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight WhichKeyGroup guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TermCursorNC Cursor +highlight MatchParen guifg=NONE guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSOperator Operator +highlight TSVariableBuiltin guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitDirty guifg=#5A7D0C guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight BufferVisibleIndex guifg=NONE guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsFloatingError guifg=#F44848 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight WarningMsg guifg=#AF4B57 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight DashboardCenter guifg=#BF85C1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Conceal guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeVertSplit guifg=#292929 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsSignWarning guifg=#FF8800 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsUnderlineHint guifg=NONE guibg=NONE guisp=#87B479 gui=underline blend=NONE +highlight Visual guifg=NONE guibg=#2C2F35 guisp=NONE gui=NONE blend=NONE +highlight Tag guifg=#7299EE guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TelescopeMatching guifg=#AF4B57 guibg=NONE guisp=NONE gui=bold blend=NONE +highlight LspDiagnosticsDefaultInformation guifg=#FFCC66 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight WhichKeySeperator guifg=#87B479 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link htmlH1 Title +highlight! link TSParameter TSField +highlight! link LspDiagnosticsVirtualTextWarning LspDiagnosticsDefaultWarning +highlight! link TSTagDelimiter Delimiter +highlight BufferInactiveTarget guifg=#AF4B57 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link LspDiagnosticsVirtualTextInformation LspDiagnosticsDefaultInformation +highlight StatusLineLspDiagnosticsWarning guifg=#FF8800 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link CursorIM Cursor +highlight! link TSFloat Float +highlight! link markdownIdDelimiter Delimiter +highlight BufferCurrentMod guifg=#FFCC66 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight Whitespace guifg=#575757 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link Repeat Keyword +highlight NvimTreeIndentMarker guifg=#858585 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Character guifg=#B1D67A guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitRenamed guifg=#0C7D9D guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight BufferInactiveMod guifg=#FFCC66 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewFilePanelDeletion SignDelete +highlight StatusLineTreeSitter guifg=#87B479 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight SpecialKey guifg=#5486C0 guibg=NONE guisp=NONE gui=bold blend=NONE +highlight DiffAdd guifg=NONE guibg=#5A7D0C guisp=NONE gui=NONE blend=NONE +highlight CursorLine guifg=NONE guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSPunctSpecial Delimiter +highlight! link QuickFixLine CursorLine +highlight! link Label Keyword +highlight TSEmphasis guifg=NONE guibg=NONE guisp=NONE gui=italic blend=NONE +highlight Error guifg=#F44848 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSWarning Todo +highlight! link TSNumber Number +highlight BufferVisible guifg=NONE guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight SpellRare guifg=#C7C8D1 guibg=NONE guisp=#5486C0 gui=underline blend=NONE +highlight LspDiagnosticsDefaultError guifg=#F44848 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link Question MoreMsg +highlight Operator guifg=#67899E guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Cursor guifg=NONE guibg=NONE guisp=NONE gui=reverse blend=NONE +highlight BufferCurrentIndex guifg=#64A6C4 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight! link CursorColumn CursorLine +highlight! link TSType Type +highlight StatusLine guifg=#C7C8D1 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsUnderlineInformation guifg=NONE guibg=NONE guisp=#5486C0 gui=underline blend=NONE +highlight! link NormalNC Normal +highlight! link TSRepeat Repeat +highlight NvimTreeNormal guifg=#B1B3BE guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight ErrorMsg guifg=#F44848 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitMerge guifg=#0C7D9D guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight mkdLineBreak guifg=NONE guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitNew guifg=#5A7D0C guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link LspDiagnosticsHint LspDiagnosticsSignHint +highlight! link DiffviewNormal NvimTreeNormal +highlight! link PreCondit PreProc +highlight! link Macro PreProc +highlight NormalFloat guifg=NONE guibg=#292D32 guisp=NONE gui=NONE blend=NONE +highlight! link TSStringRegex TSString +highlight FlutterWidgetGuides guifg=#919191 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Debug guifg=#AF4B57 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TSAttribute guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight BufferInactiveIndex guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSKeyword Keyword +highlight mkdHeading guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link LspDiagnosticsVirtualTextError LspDiagnosticsDefaultError +highlight Function guifg=#EEBA59 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight StatusLineNC guifg=#C7C8C0 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewStatusAdded SignAdd +highlight! link TSString String +highlight TSText guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewFilePanelInsertion SignAdd +highlight! link TSTag Tag +highlight! link LspDiagnosticsInformation LspDiagnosticsSignInformation +highlight! link TSKeywordFunction Keyword +highlight LspDiagnosticsDefaultHint guifg=#4DC1FF guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewStatusModified SignChange +highlight DiffviewVertSplit guifg=#858585 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight NvimTreeGitStaged guifg=#5A7D0C guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link NonText EndOfBuffer +highlight NvimTreeSpecialFile guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight SpecialComment guifg=#858585 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link Exception Keyword +highlight PreProc guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link markdownUrl mkdLink +highlight LspDiagnosticsFloatingWarning guifg=#FF8800 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TSNamespace guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight VertSplit guifg=#393E46 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight BufferVisibleTarget guifg=#AF4B57 guibg=#212121 guisp=NONE gui=bold blend=NONE +highlight FloatBorder guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TabLineHint LspDiagnosticsSignHint +highlight BufferVisibleSign guifg=#FFCC66 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight BufferVisibleMod guifg=#FFCC66 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight TSUnderline guifg=NONE guibg=NONE guisp=NONE gui=underline blend=NONE +highlight LspTroubleIndent guifg=#919191 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight EndOfBuffer guifg=#212121 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TabLineError LspDiagnosticsSignError +highlight! link LspDiagnosticsVirtualTextHint LspDiagnosticsDefaultHint +highlight! link Structure Type +highlight CodiVirtualText guifg=#4DC1FF guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link DiffviewStatusDeleted SignDelete +highlight! link TSFuncBuiltin Function +highlight! link lCursor Cursor +highlight DiffDelete guifg=NONE guibg=#93151B guisp=NONE gui=NONE blend=NONE +highlight markdownLinkText guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TSTypeBuiltin Type +highlight! link TSFuncMacro Macro +highlight BufferCurrentTarget guifg=#AF4B57 guibg=#212121 guisp=NONE gui=bold blend=NONE +highlight! link TSPunctDelimiter Delimiter +highlight! link TSException Exception +highlight TSProperty guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight NvimTreeImageFile guifg=#BF85C1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TSVariable guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsUnderlineWarning guifg=NONE guibg=NONE guisp=#EEBA59 gui=underline blend=NONE +highlight DashboardHeader guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TabLineFill guifg=#C7C8D1 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsSignHint guifg=#4DC1FF guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Bold guifg=NONE guibg=NONE guisp=NONE gui=bold blend=NONE +highlight String guifg=#87B479 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link TabLineInformation LspDiagnosticsSignInformation +highlight mkdLink guifg=#64A6C4 guibg=NONE guisp=NONE gui=underline blend=NONE +highlight! link TSFunction Function +highlight NvimTreeFolderIcon guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Title guifg=#5486C0 guibg=NONE guisp=NONE gui=bold blend=NONE +highlight! link SignColumn Normal +highlight! link TSPunctBracket Delimiter +highlight! link TSCharacter Character +highlight luaTSConstructor guifg=#9092A2 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Keyword guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link Statement Keyword +highlight MoreMsg guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TSURI guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight SpellCap guifg=#C7C8D1 guibg=NONE guisp=#EEBA59 gui=underline blend=NONE +highlight GitSignsAdd guifg=#5A7D0C guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight LspDiagnosticsFloatingInformation guifg=#FFCC66 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Special guifg=#C67158 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Comment guifg=#858585 guibg=NONE guisp=NONE gui=italic blend=NONE +highlight Folded guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSStringEscape Character +highlight! link markdownLinkDelimiter Delimiter +highlight LspDiagnosticsDefaultWarning guifg=#FF8800 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link Conditional Keyword +highlight Search guifg=#C7C8D1 guibg=#67899E guisp=NONE gui=NONE blend=NONE +highlight Italic guifg=NONE guibg=NONE guisp=NONE gui=italic blend=NONE +highlight CursorLineNr guifg=#C7C8C0 guibg=NONE guisp=NONE gui=bold blend=NONE +highlight! link VisualNOS Visual +highlight DiffChange guifg=NONE guibg=#0C7D9D guisp=NONE gui=NONE blend=NONE +highlight! link ColorColumn CursorLine +highlight! link TSBoolean Boolean +highlight! link markdownLinkTextDelimiter Delimiter +highlight SpellBad guifg=#C7C8D1 guibg=NONE guisp=#AF4B57 gui=underline blend=NONE +highlight StatusLineGitChange guifg=#5486C0 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link TSInclude Include +highlight! link Include Keyword +highlight SpellLocal guifg=#C7C8D1 guibg=NONE guisp=#87B479 gui=underline blend=NONE +highlight! link NvimTreeOpenedFile NvimTreeOpenedFolderName +highlight! link TSSymbol Identifier +highlight! link TSConstMacro Macro +highlight! link TSTitle Title +highlight PmenuThumb guifg=NONE guibg=#C7C8D1 guisp=NONE gui=NONE blend=NONE +highlight SignChange guifg=#0C7D9D guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Delimiter guifg=#9092A2 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TelescopeBorder guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight NvimTreeFolderName guifg=#5486C0 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Underlined guifg=NONE guibg=NONE guisp=NONE gui=underline blend=NONE +highlight! link ModeMsg Normal +highlight LspDiagnosticsUnderlineError guifg=NONE guibg=NONE guisp=#AF4B57 gui=underline blend=NONE +highlight NvimTreeExecFile guifg=#87B479 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight IndentBlanklineContextChar guifg=#6B6B6B guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link MsgArea Normal +highlight TabLineSel guifg=#292929 guibg=#5486C0 guisp=NONE gui=NONE blend=NONE +highlight! link TSConditional Conditional +highlight BufferCurrentSign guifg=#64A6C4 guibg=#212121 guisp=NONE gui=NONE blend=NONE +highlight TSField guifg=#C7C8D1 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight LineNr guifg=#858585 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight WhichKeyDesc guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight Constant guifg=#C67158 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight TSAnnotation guifg=#64A6C4 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight BufferInactiveSign guifg=#858585 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight! link mkdInlineURL mkdLink +highlight mkdUnderline guifg=#858585 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight! link LspDiagnosticsError LspDiagnosticsSignError +highlight Boolean guifg=#AF4B57 guibg=NONE guisp=NONE gui=NONE blend=NONE +highlight PmenuSbar guifg=NONE guibg=#535A65 guisp=NONE gui=NONE blend=NONE +highlight StatusLineGit guifg=#C67158 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight StatusLineGitAdd guifg=#87B479 guibg=#292929 guisp=NONE gui=NONE blend=NONE +highlight StatusLineLspDiagnosticsInformation guifg=#FFCC66 guibg=#292929 guisp=NONE gui=NONE blend=NONE diff --git a/.config/nvim/config.lua b/.config/nvim/config.lua index b50537c..f3a5f26 100644 --- a/.config/nvim/config.lua +++ b/.config/nvim/config.lua @@ -36,6 +36,7 @@ O.lang.python.diagnostics.signs = true O.lang.python.diagnostics.underline = true -- rust +O.lang.rust.rust_tools.active = true -- go O.lang.go.autoformat = true diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index e1acacd..d5ff96d 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -7,23 +7,7 @@ require "cfg.utils" require "cfg.galaxyline" require "cfg.treesitter" require "cfg.which-key" -require "cfg.lsp" -if O.lang.emmet.active then - require "cfg.lsp.emmet-ls" -end -if O.lang.tailwindcss.active then - require "cfg.lsp.tailwindcss-ls" -end - --- autoformat -if O.format_on_save then - require("cfg.utils").define_augroups { - autoformat = { - { - "BufWritePre", - "*", - [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], - }, - }, - } +require "cfg.neoformat" +if O.plugin.dashboard.active then + require("cfg.dashboard").config() end diff --git a/.config/nvim/lua/cfg/autopairs/init.lua b/.config/nvim/lua/cfg/autopairs/init.lua index 6a9e428..b8dad5f 100644 --- a/.config/nvim/lua/cfg/autopairs/init.lua +++ b/.config/nvim/lua/cfg/autopairs/init.lua @@ -1,6 +1,10 @@ -- if not package.loaded['nvim-autopairs'] then -- return -- end +local status_ok, autopairs = pcall(require, "nvim-autopairs") +if not status_ok then + return +end local npairs = require "nvim-autopairs" local Rule = require "nvim-autopairs.rule" diff --git a/.config/nvim/lua/cfg/colorizer/init.lua b/.config/nvim/lua/cfg/colorizer/init.lua index ac5f135..abe2f72 100644 --- a/.config/nvim/lua/cfg/colorizer/init.lua +++ b/.config/nvim/lua/cfg/colorizer/init.lua @@ -1,4 +1,8 @@ -require("colorizer").setup({ "*" }, { +local status_ok, colorizer = pcall(require, "colorizer") +if not status_ok then + return +end +colorizer.setup({ "*" }, { RGB = true, -- #RGB hex codes RRGGBB = true, -- #RRGGBB hex codes RRGGBBAA = true, -- #RRGGBBAA hex codes diff --git a/.config/nvim/lua/cfg/compe/init.lua b/.config/nvim/lua/cfg/compe/init.lua index 5b86f27..f42e8ad 100644 --- a/.config/nvim/lua/cfg/compe/init.lua +++ b/.config/nvim/lua/cfg/compe/init.lua @@ -7,7 +7,7 @@ local M = {} vim.g.vsnip_snippet_dir = O.vnsip_dir M.config = function() - opt = { + local opt = { enabled = O.auto_complete, autocomplete = true, debug = false, @@ -39,8 +39,12 @@ M.config = function() -- for emoji press : (idk if that in compe tho) }, } + local status_ok, compe = pcall(require, "compe") + if not status_ok then + return + end - require("compe").setup(opt) + compe.setup(opt) local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) @@ -86,7 +90,7 @@ M.config = function() vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true }) vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true }) - -- vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", { noremap = true, silent = true, expr = true }) + vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", { noremap = true, silent = true, expr = true }) diff --git a/.config/nvim/lua/cfg/dashboard/init.lua b/.config/nvim/lua/cfg/dashboard/init.lua index 2305243..bac9081 100644 --- a/.config/nvim/lua/cfg/dashboard/init.lua +++ b/.config/nvim/lua/cfg/dashboard/init.lua @@ -1,3 +1,4 @@ + local M = {} M.config = function() @@ -28,10 +29,10 @@ M.config = function() description = { " Settings " }, command = ":e " .. CONFIG_PATH .. "/config.lua", }, - f = { - description = { " Neovim Config Files" }, - command = "Telescope find_files cwd=" .. CONFIG_PATH, - }, + -- f = { + -- description = { " Neovim Config Files" }, + -- command = "Telescope find_files cwd=" .. CONFIG_PATH, + -- }, -- e = {description = {' Marks '}, command = 'Telescope marks'} } vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'" diff --git a/.config/nvim/lua/cfg/galaxyline/init.lua b/.config/nvim/lua/cfg/galaxyline/init.lua index 058846a..536144d 100644 --- a/.config/nvim/lua/cfg/galaxyline/init.lua +++ b/.config/nvim/lua/cfg/galaxyline/init.lua @@ -51,7 +51,7 @@ table.insert(gls.left, { t = colors.blue, } vim.api.nvim_command("hi GalaxyViMode guifg=" .. mode_color[vim.fn.mode()]) - return "▊" + return "▎" end, highlight = "StatusLineNC", }, @@ -173,7 +173,7 @@ local get_lsp_client = function(msg) lsps = client.name else lsps = lsps .. ", " .. client.name - -- print("more", lsps) + -- print("more", lsps) end end end diff --git a/.config/nvim/lua/cfg/gitsigns/init.lua b/.config/nvim/lua/cfg/gitsigns/init.lua index 7f1fbff..920c312 100644 --- a/.config/nvim/lua/cfg/gitsigns/init.lua +++ b/.config/nvim/lua/cfg/gitsigns/init.lua @@ -1,7 +1,11 @@ local M = {} M.config = function() - require("gitsigns").setup { + local status_ok, gitsigns = pcall(require, "gitsigns") + if not status_ok then + return + end + gitsigns.setup { signs = { -- TODO add hl to colorscheme add = { diff --git a/.config/nvim/lua/cfg/lspinstall/init.lua b/.config/nvim/lua/cfg/lspinstall/init.lua index 68fcfa2..af5e175 100644 --- a/.config/nvim/lua/cfg/lspinstall/init.lua +++ b/.config/nvim/lua/cfg/lspinstall/init.lua @@ -1,27 +1 @@ --- 1. get the config for this server from nvim-lspconfig and adjust the cmd path. --- relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us! -local config = require("lspconfig").jdtls.document_config -require("lspconfig/configs").jdtls = nil -- important, unset the loaded config again --- config.default_config.cmd[1] = "./node_modules/.bin/bash-language-server" - --- 2. extend the config with an install_script and (optionally) uninstall_script --- require'lspinstall/servers'.jdtls = vim.tbl_extend('error', config, { --- -- lspinstall will automatically create/delete the install directory for every server --- install_script = [[ --- git clone https://github.com/eclipse/eclipse.jdt.ls.git --- cd eclipse.jdt.ls --- ./mvnw clean verify --- ]], --- uninstall_script = nil -- can be omitted --- }) - --- require'lspinstall/servers'.kotlin = vim.tbl_extend('error', config, { --- install_script = [[ --- git clone https://github.com/fwcd/kotlin-language-server.git language-server --- cd language-server --- ./gradlew :server:installDist --- ]], --- uninstall_script = nil -- can be omitted --- }) - require("lspinstall").setup() diff --git a/.config/nvim/lua/cfg/neoformat/init.lua b/.config/nvim/lua/cfg/neoformat/init.lua new file mode 100644 index 0000000..eb9596e --- /dev/null +++ b/.config/nvim/lua/cfg/neoformat/init.lua @@ -0,0 +1,12 @@ +-- autoformat +if O.format_on_save then + require("cfg.utils").define_augroups { + autoformat = { + { + "BufWritePre", + "*", + [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], + }, + }, + } +end diff --git a/.config/nvim/lua/cfg/nvimtree/init.lua b/.config/nvim/lua/cfg/nvimtree/init.lua index 37a931e..97cfe03 100644 --- a/.config/nvim/lua/cfg/nvimtree/init.lua +++ b/.config/nvim/lua/cfg/nvimtree/init.lua @@ -1,9 +1,13 @@ ---if not package.loaded['nvim-tree.view'] then --- return ---end - +-- --if not package.loaded['nvim-tree.view'] then +-- -- return +-- --end +-- local M = {} - +local status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") +if not status_ok then + return +end +-- M.config = function() local g = vim.g @@ -52,7 +56,7 @@ M.config = function() symlink = "", }, } - local tree_cb = require("nvim-tree.config").nvim_tree_callback + local tree_cb = nvim_tree_config.nvim_tree_callback vim.g.nvim_tree_bindings = { { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" }, @@ -61,8 +65,10 @@ M.config = function() } end -local view = require "nvim-tree.view" - +local view_status_ok, view = pcall(require, "nvim-tree.view") +if not view_status_ok then + return +end M.toggle_tree = function() if view.win_open() then require("nvim-tree").close() @@ -77,5 +83,5 @@ M.toggle_tree = function() require("nvim-tree").find_file(true) end end - +-- return M diff --git a/.config/nvim/lua/cfg/telescope/init.lua b/.config/nvim/lua/cfg/telescope/init.lua index 6bbce29..5411c32 100644 --- a/.config/nvim/lua/cfg/telescope/init.lua +++ b/.config/nvim/lua/cfg/telescope/init.lua @@ -1,3 +1,7 @@ +local status_ok, telescope = pcall(require, "telescope") +if not status_ok then + return +end local actions = require "telescope.actions" -- if O.plugin.trouble.active then -- local trouble = require("trouble.providers.telescope") @@ -5,7 +9,7 @@ local actions = require "telescope.actions" -- Global remapping ------------------------------ -- '--color=never', -require("telescope").setup { +telescope.setup { defaults = { find_command = { "rg", @@ -20,11 +24,11 @@ require("telescope").setup { entry_prefix = " ", initial_mode = "insert", selection_strategy = "reset", - sorting_strategy = "descending", + sorting_strategy = "ascending", layout_strategy = "horizontal", layout_config = { width = 0.75, - prompt_position = "bottom", + prompt_position = "top", preview_cutoff = 120, horizontal = { mirror = false }, vertical = { mirror = false }, @@ -83,4 +87,3 @@ require("telescope").setup { }, } --- require'telescope'.load_extension('project') diff --git a/.config/nvim/lua/cfg/treesitter/init.lua b/.config/nvim/lua/cfg/treesitter/init.lua index 12525da..deaa86e 100644 --- a/.config/nvim/lua/cfg/treesitter/init.lua +++ b/.config/nvim/lua/cfg/treesitter/init.lua @@ -80,8 +80,12 @@ if status then wk.register(textobj_move_keymaps["goto_previous_start"], normal) wk.register(textobj_move_keymaps["goto_previous_end"], normal) end +local status_ok, treesitter_configs = pcall(require, "nvim-treesitter.configs") +if not status_ok then + return +end -require("nvim-treesitter.configs").setup { +treesitter_configs.setup { ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages ignore_install = O.treesitter.ignore_install, matchup = { @@ -97,7 +101,7 @@ require("nvim-treesitter.configs").setup { enable = O.plugin.ts_context_commentstring.active, config = { css = "// %s" }, }, - -- indent = {enable = true, disable = {"python", "html", "javascript"}}, + -- indent = {enable = true, disable = {"python", "html, "javascript"}}, -- TODO seems to be broken indent = { enable = { "javascriptreact" } }, autotag = { enable = O.plugin.ts_autotag.active }, @@ -116,22 +120,4 @@ require("nvim-treesitter.configs").setup { enable = O.plugin.ts_textsubjects, keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" }, }, - playground = { - enable = O.plugin.ts_playground.active, - disable = {}, - updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code - persist_queries = false, -- Whether the query persists across vim sessions - keybindings = { - toggle_query_editor = "o", - toggle_hl_groups = "i", - toggle_injected_languages = "t", - toggle_anonymous_nodes = "a", - toggle_language_display = "I", - focus_language = "f", - unfocus_language = "F", - update = "R", - goto_node = "<cr>", - show_help = "?", - }, - }, } diff --git a/.config/nvim/lua/cfg/utils/init.lua b/.config/nvim/lua/cfg/utils/init.lua index e879831..f8ed082 100644 --- a/.config/nvim/lua/cfg/utils/init.lua +++ b/.config/nvim/lua/cfg/utils/init.lua @@ -1,5 +1,13 @@ local utils = {} +function utils.reload_config() + vim.cmd "source ~/.config/nvim/config.lua" + vim.cmd "source ~/.config/nvim/lua/plugins.lua" + vim.cmd "source ~/.config/nvim/lua/neoformat/init.lua" + vim.cmd ":PackerCompile" + vim.cmd ":PackerInstall" +end + function utils.define_augroups(definitions) -- {{{1 -- Create autocommand groups based on the passed definitions -- @@ -24,7 +32,7 @@ end utils.define_augroups { - _user_autocommands = O.user_autocommands, + _user_autocommands = O.user_autocommands, _general_settings = { { "TextYankPost", @@ -46,6 +54,7 @@ utils.define_augroups { "*", "setlocal formatoptions-=c formatoptions-=r formatoptions-=o", }, + { "BufWritePost", "config.lua", "lua require('utils').reload_config()" }, { "VimLeavePre", "*", "set title set titleold=" }, }, -- _solidity = { @@ -65,7 +74,7 @@ utils.define_augroups { }, _auto_resize = { -- will cause split windows to be resized evenly if main window is resized - {'VimResized ', '*', 'wincmd ='}, + { "VimResized ", "*", "wincmd =" }, }, -- _mode_switching = { -- -- will switch between absolute and relative line numbers depending on mode @@ -77,5 +86,3 @@ utils.define_augroups { } return utils - --- TODO find a new home for these autocommands diff --git a/.config/nvim/lua/cfg/which-key/init.lua b/.config/nvim/lua/cfg/which-key/init.lua index 1558a50..ca87c6f 100644 --- a/.config/nvim/lua/cfg/which-key/init.lua +++ b/.config/nvim/lua/cfg/which-key/init.lua @@ -1,8 +1,12 @@ -- if not package.loaded['which-key'] then -- return -- end +local status_ok, which_key = pcall(require, "which-key") +if not status_ok then + return +end -require("which-key").setup { +which_key.setup { plugins = { marks = true, -- shows a list of your marks on ' and ` registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode @@ -61,16 +65,12 @@ vim.api.nvim_set_keymap("n", "<Leader>n", ':let @/=""<CR>', { noremap = true, si -- explorer --- TODO this introduces some bugs unfortunately vim.api.nvim_set_keymap( "n", "<Leader>e", ":lua require'cfg.nvimtree'.toggle_tree()<CR>", { noremap = true, silent = true } ) --- vim.api.nvim_set_keymap('n', '<Leader>e', --- ":NvimTreeToggle<CR>", --- {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true }) @@ -81,23 +81,31 @@ vim.api.nvim_set_keymap("n", "<Leader>;", ":Dashboard<CR>", { noremap = true, si vim.api.nvim_set_keymap("n", "<leader>k", ":CommentToggle<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "<leader>k", ":CommentToggle<CR>", { noremap = true, silent = true }) - -- split window vim.api.nvim_set_keymap("n", "<leader>v", ":vsplit<CR>", {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "<leader>h", ":split<CR>", {noremap = true, silent = true}) + -- close buffer vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true }) --- TODO create entire treesitter section +-- open config +vim.api.nvim_set_keymap( + "n", + "<leader>.", + ":e " .. CONFIG_PATH .. "/config.lua<CR>", + { noremap = true, silent = true } +) local mappings = { + ["."] = "LunarConfig", ["k"] = "Comment", ["c"] = "Close Buffer", ["e"] = "Explorer", ["f"] = "Find File", ["n"] = "No Highlight", + [";"] = "Dashboard", ["v"] = "Vertical Split", ["h"] = "Horizontal Split", b = { @@ -127,54 +135,10 @@ local mappings = { name = "Packer", c = { "<cmd>PackerCompile<cr>", "Compile" }, i = { "<cmd>PackerInstall<cr>", "Install" }, - r = { ":luafile %<cr>", "Reload" }, + r = { "<cmd>lua require('cfg.utils').reload_config()<cr>", "Reload" }, s = { "<cmd>PackerSync<cr>", "Sync" }, u = { "<cmd>PackerUpdate<cr>", "Update" }, }, - -- diagnostics vanilla nvim - -- -- diagnostic - -- function lv_utils.get_all() - -- vim.lsp.diagnostic.get_all() - -- end - -- function lv_utils.get_next() - -- vim.lsp.diagnostic.get_next() - -- end - -- function lv_utils.get_prev() - -- vim.lsp.diagnostic.get_prev() - -- end - -- function lv_utils.goto_next() - -- vim.lsp.diagnostic.goto_next() - -- end - -- function lv_utils.goto_prev() - -- vim.lsp.diagnostic.goto_prev() - -- end - -- function lv_utils.show_line_diagnostics() - -- vim.lsp.diagnostic.show_line_diagnostics() - -- end - - -- " Available Debug Adapters: - -- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ - -- " Adapter configuration and installation instructions: - -- " https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation - -- " Debug Adapter protocol: - -- " https://microsoft.github.io/debug-adapter-protocol/ - -- " Debugging - d = { - name = "Debug", - t = { "<cmd>lua require'dap'.toggle_breakpoint()<cr>", "Toggle Breakpoint" }, - b = { "<cmd>lua require'dap'.step_back()<cr>", "Step Back" }, - c = { "<cmd>lua require'dap'.continue()<cr>", "Continue" }, - C = { "<cmd>lua require'dap'.run_to_cursor()<cr>", "Run To Cursor" }, - d = { "<cmd>lua require'dap'.disconnect()<cr>", "Disconnect" }, - g = { "<cmd>lua require'dap'.session()<cr>", "Get Session" }, - i = { "<cmd>lua require'dap'.step_into()<cr>", "Step Into" }, - o = { "<cmd>lua require'dap'.step_over()<cr>", "Step Over" }, - u = { "<cmd>lua require'dap'.step_out()<cr>", "Step Out" }, - p = { "<cmd>lua require'dap'.pause.toggle()<cr>", "Pause" }, - r = { "<cmd>lua require'dap'.repl.toggle()<cr>", "Toggle Repl" }, - s = { "<cmd>lua require'dap'.continue()<cr>", "Start" }, - q = { "<cmd>lua require'dap'.stop()<cr>", "Quit" }, - }, g = { name = "Git", j = { "<cmd>lua require 'gitsigns'.next_hunk()<cr>", "Next Hunk" }, @@ -207,7 +171,7 @@ local mappings = { "<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics", }, - f = { "<cmd>lua vim.lsp.buf.formatting()<cr>", "Format" }, + f = { "<cmd>Neoformat<cr>", "Format" }, i = { "<cmd>LspInfo<cr>", "Info" }, j = { "<cmd>lua vim.lsp.diagnostic.goto_next({popup_opts = {border = O.lsp.popup_border}})<cr>", "Next Diagnostic" }, k = { "<cmd>lua vim.lsp.diagnostic.goto_prev({popup_opts = {border = O.lsp.popup_border}})<cr>", "Prev Diagnostic" }, @@ -244,18 +208,6 @@ local mappings = { }, } --- if O.plugin.trouble.active then --- mappings["d"] = { --- name = "Diagnostics", --- t = { "<cmd>TroubleToggle<cr>", "trouble" }, --- w = { "<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace" }, --- d = { "<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document" }, --- q = { "<cmd>TroubleToggle quickfix<cr>", "quickfix" }, --- l = { "<cmd>TroubleToggle loclist<cr>", "loclist" }, --- r = { "<cmd>TroubleToggle lsp_references<cr>", "references" }, --- } --- end - if O.plugin.symbol_outline.active then vim.api.nvim_set_keymap("n", "<leader>o", ":SymbolsOutline<CR>", { noremap = true, silent = true }) mappings["o"] = "Symbols outline" @@ -270,10 +222,7 @@ if O.plugin.zen.active then vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true }) mappings["z"] = "Zen" end -if O.plugin.lazygit.active then - vim.api.nvim_set_keymap("n", "<leader>gg", ":LazyGit<CR>", { noremap = true, silent = true }) - mappings["gg"] = "LazyGit" -end + if O.plugin.telescope_project.active then -- open projects vim.api.nvim_set_keymap( @@ -285,8 +234,6 @@ if O.plugin.telescope_project.active then mappings["P"] = "Projects" end --- [";"] = "Dashboard", - if O.lang.latex.active then mappings["L"] = { name = "+Latex", @@ -309,5 +256,14 @@ if O.lushmode then } end +-- for _, v in pairs(O.user_which_key) do +-- end +for k, v in pairs(O.user_which_key) do + mappings[k] = v + -- table.insert(mappings, O.user_which_key[1]) + -- print(k) + -- print(v) +end + local wk = require "which-key" wk.register(mappings, opts) diff --git a/.config/nvim/lua/cfg/zen/init.lua b/.config/nvim/lua/cfg/zen/init.lua index 0d6bfca..d4a3da5 100644 --- a/.config/nvim/lua/cfg/zen/init.lua +++ b/.config/nvim/lua/cfg/zen/init.lua @@ -1,7 +1,11 @@ local M = {} +local status_ok, zen_mode = pcall(require, "zen-mode") +if not status_ok then + return +end M.config = function() - require("zen-mode").setup { + zen_mode.setup { window = { backdrop = 1, height = 0.85, -- height of the Zen window diff --git a/.config/nvim/lua/default-config.lua b/.config/nvim/lua/default-config.lua index 0207635..fce3caf 100644 --- a/.config/nvim/lua/default-config.lua +++ b/.config/nvim/lua/default-config.lua @@ -20,6 +20,7 @@ O = { smart_case = true, lushmode = false, hl_search = false, + document_highlight = false, transparent_window = false, leader_key = "space", vnsip_dir = vim.fn.stdpath "config" .. "/snippets", @@ -65,8 +66,6 @@ O = { dashboard = { active = false }, colorizer = { active = false }, zen = { active = false }, - hop = { active = false }, - vim_rooter = { active = false }, ts_context_commentstring = { active = false }, ts_hintobjects = { active = false }, ts_autotag = { active = false }, @@ -84,9 +83,13 @@ O = { floatterm = { active = false }, trouble = { active = false }, sanegx = { active = false }, + vim_rooter = { active = false }, + hop = { active = false }, }, - custom_plugins = { + user_which_key = {}, + + user_plugins = { -- use config.lua for this not put here }, @@ -203,7 +206,7 @@ O = { ' ##########..........########## ', ' ##########........########## ', ' ##########.......########## ', - ' ##########.....##########.. ', + ' ##########.....##########.. ', ' ##########....##########..... ', ' ..##########..##########......... ', ' ....##########.#########............. ', @@ -217,6 +220,5 @@ O = { ' ..... ', ' . ', }, - footer = { "chrisatmachine.com" }, }, } diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 4fc780d..2545dcb 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -61,7 +61,9 @@ return require("packer").startup(function(use) use { "kyazdani42/nvim-tree.lua", + -- event = "BufEnter", -- cmd = "NvimTreeToggle", + commit = "fd7f60e242205ea9efc9649101c81a07d5f458bb", config = function() require("cfg.nvimtree").config() end, @@ -92,9 +94,14 @@ return require("packer").startup(function(use) -- Comments use { "terrortylor/nvim-comment", - cmd = "CommentToggle", + event = "BufRead", + -- cmd = "CommentToggle", config = function() - require("nvim_comment").setup() + local status_ok, nvim_comment = pcall(require, "nvim_comment") + if not status_ok then + return + end + nvim_comment.setup() end, } @@ -123,13 +130,9 @@ return require("packer").startup(function(use) use { "ChristianChiarulli/dashboard-nvim", event = "BufWinEnter", - cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" }, - config = function() - require("cfg.dashboard").config() - end, disable = not O.plugin.dashboard.active, - opt = true, } + -- Zen Mode use { "folke/zen-mode.nvim", @@ -145,12 +148,31 @@ return require("packer").startup(function(use) "norcalli/nvim-colorizer.lua", event = "BufRead", config = function() - require("colorizer").setup() - vim.cmd "ColorizerReloadAllBuffers" + require "cfg.colorizer" end, disable = not O.plugin.colorizer.active, } + use { + "lukas-reineke/indent-blankline.nvim", + event = "BufRead", + setup = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = { + "help", + "terminal", + "dashboard", + } + vim.g.indent_blankline_buftype_exclude = { "terminal" } + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = true + end, + disable = not O.plugin.indent_line.active, + } + -- comments in context use { "JoosepAlviste/nvim-ts-context-commentstring", @@ -164,6 +186,7 @@ return require("packer").startup(function(use) cmd = "SymbolsOutline", disable = not O.plugin.symbol_outline.active, } + -- diagnostics use { "folke/trouble.nvim", @@ -182,7 +205,9 @@ return require("packer").startup(function(use) use { "nvim-telescope/telescope-project.nvim", event = "BufRead", - setup = function () vim.cmd[[packadd telescope.nvim]] end, + setup = function() + vim.cmd [[packadd telescope.nvim]] + end, disable = not O.plugin.telescope_project.active, } @@ -249,7 +274,7 @@ return require("packer").startup(function(use) -- Custom semantic text objects use { "nvim-treesitter/nvim-treesitter-textobjects", - disable = not O.plugin.ts_textobjects.active, + disable= not O.plugin.ts_textobjects.active, } -- Smart text objects @@ -264,7 +289,6 @@ return require("packer").startup(function(use) event = "BufRead", disable = not O.plugin.ts_hintobjects.active, } - -- vim rooter for projects use { "airblade/vim-rooter", @@ -274,11 +298,16 @@ return require("packer").startup(function(use) -- hop use { - "phaazon/hop.nvim", - disable = not O.plugin.hop.active, + "phaazon/hop.nvim", + event = "BufRead", + config = function() + require("cfg.hop").config() + end, + disable = not O.plugin.hop.active, } - for _, plugin in pairs(O.custom_plugins) do + for _, plugin in pairs(O.user_plugins) do packer.use(plugin) end + end) |