commit 70099e1f5688597104496f13af8af5f05e00be00 Author: Price Hiller Date: Sun Mar 6 22:17:07 2022 -0600 Initial commit diff --git a/ftdetect/cf3.vim b/ftdetect/cf3.vim new file mode 100644 index 0000000..a6b58e6 --- /dev/null +++ b/ftdetect/cf3.vim @@ -0,0 +1,2 @@ +au BufRead,BufNewFile *.cf set ft=cf3 + diff --git a/ftplugin/cf3.vim b/ftplugin/cf3.vim new file mode 100644 index 0000000..bfa93ee --- /dev/null +++ b/ftplugin/cf3.vim @@ -0,0 +1,221 @@ +" Vim file plugin +" This is my first attempt at a ftplugin file. Feel free to send me +" corrections or improvements. I'll give you a credit. +" +" USAGE +" There is already a vim file that uses 'cf' as a file extension. You can use +" cf3 for your cf3 file extensions or identify via your vimrc file: +" au BufRead,BufNewFile *.cf set ft=cf3 + +" Check to see if DisableCF3Ftplugin is defined +" If you only want the syntax plugin add "let g:DisableCF3Ftplugin=1" in +" ~/.vimrc +if exists("g:DisableCF3Ftplugin") + finish +endif + + +" Only do this when not done yet for this buffer +if exists("b:loaded_CFE3Ftplugin") + finish +endif +let b:loaded_CFE3Ftplugin = 1 + +let s:install_dir = expand(':p:h:h') + +" =============== Keyword Abbreviations =============== +" enable keyword abbreviations with by adding +" "let g:EnableCFE3KeywordAbbreviations=1" to your vimrc +" Convenience function ToggleCFE3KeywordAbbreviations +" mapped to ,i by default to toggle abbreviations on or off +" +function! EnableCFE3KeywordAbbreviations() + iab = => + iab ba bundle agent + iab bc bundle common + iab bu bundle + iab cano canonify( "=Eatchar('\s') + iab cla classes: + iab comma commands: + iab comme comment => "=Eatchar('\s') + iab exp expression => =Eatchar('\s') + iab fil files: + iab han handle => "=Eatchar('\s') + iab ifv ifvarclass => =Eatchar('\s') + iab met methods: + iab pro processes: + iab rep reports: + iab sli slist => { + iab str string => "=Eatchar('\s') + iab sysw ${sys.workdir} + iab ub usebundle => + iab var vars: +endfunction + +function! DisableCFE3KeywordAbbreviations() + iunab = + iunab ba + iunab bc + iunab bu + iunab cano + iunab cla + iunab comma + iunab comme + iunab exp + iunab fil + iunab han + iunab ifv + iunab met + iunab pro + iunab rep + iunab sli + iunab str + iunab sysw + iunab ub + iunab var +endfunction + +" Default abbreviations off +" to disable let g:EnableCFE3KeywordAbbreviations=1 in ~/.vimrc +if exists('g:EnableCFE3KeywordAbbreviations') + call EnableCFE3KeywordAbbreviations() +endif + +function! ToggleCFE3KeywordAbbreviations() + if !exists('b:EnableCFE3KeywordAbbreviations') + let b:EnableCFE3KeywordAbbreviations=1 + call EnableCFE3KeywordAbbreviations() + else + unlet b:EnableCFE3KeywordAbbreviations + call DisableCFE3KeywordAbbreviations() + endif +endfunction + +function! EnableCFE3PermissionFix() +" On Save set the permissions of the edited file so others can't access + :autocmd BufWritePost *.cf silent !chmod g-w,o-rwx % +endfunction + +" Default permission fix off +" To enable permission fixing in your main .vimrc +" let g:EnableCFE3PermissionFix=1 +if exists('g:EnableCFE3PermissionFix') + call EnableCFE3PermissionFix() +endif + +" maps +" Toggle KeywordAbbreviations +nnoremap ,i :call ToggleCFE3KeywordAbbreviations() +" Wrap WORD in double quotes +nnoremap ,q dEi"pa" +" Insert blank promise +nnoremap ,p o""handle => "",comment => "" +" quote list items +vnoremap ,q :s/^\s*\(.*\)\s*$/"\1",/g + +" Function to align groups of => assignment lines. +" Credit to 'Scripting the Vim editor, Part 2: User-defined functions' +" by Damian Conway +" http://www.ibm.com/developerworks/linux/library/l-vim-script-2/index.html +if !exists("*CF3AlignAssignments") +function CF3AlignAssignments (AOP) + "Patterns needed to locate assignment operators... + if a:AOP == 'vars' + let ASSIGN_OP = '\(string\|int\|real\|data\|slist\|ilist\|rlist\|expression\|and\|or\|not\|volume\)*\s\+=>' + else + let ASSIGN_OP = '=>' + endif + let ASSIGN_LINE = '^\(.\{-}\)\s*\(' . ASSIGN_OP . '\)' + + "Locate block of code to be considered (same indentation, no blanks) + let indent_pat = '^' . matchstr(getline('.'), '^\s*') . '\S' + let firstline = search('^\%('. indent_pat . '\)\@!','bnW') + 1 + let lastline = search('^\%('. indent_pat . '\)\@!', 'nW') - 1 + if lastline < 0 + let lastline = line('$') + endif + + "Find the column at which the operators should be aligned... + let max_align_col = 0 + let max_op_width = 0 + for linetext in getline(firstline, lastline) + "Does this line have an assignment in it? + let left_width = match(linetext, '\s*' . ASSIGN_OP) + + "If so, track the maximal assignment column and operator width... + if left_width >= 0 + let max_align_col = max([max_align_col, left_width]) + + let op_width = strlen(matchstr(linetext, ASSIGN_OP)) + let max_op_width = max([max_op_width, op_width+1]) + endif + endfor + + "Code needed to reformat lines so as to align operators... + let FORMATTER = '\=printf("%-*s%*s", max_align_col, submatch(1), + \ max_op_width, submatch(2))' + + " Reformat lines with operators aligned in the appropriate column... + for linenum in range(firstline, lastline) + let oldline = getline(linenum) + let newline = substitute(oldline, ASSIGN_LINE, FORMATTER, "") + call setline(linenum, newline) + endfor +endfunction +endif + +nnoremap ,= :call CF3AlignAssignments("null") +nnoremap = :call CF3AlignAssignments("vars") + +" For pasting code snippets +function! Pastefile( FILE ) + let arg_file = s:install_dir."/snippets/".a:FILE + let @" = join( readfile( arg_file ), "\n" ) + put + return "" +endfunction + +nnoremap ,k :call Pastefile("template.cf")kdd +nnoremap ,s :call Pastefile("stdlib.cf")kdd + +" TODO +" Indents + +" CREDITS +" Neil Watson +" Other Cfengine information: http://watson-wilson.ca/cfengine/ +" +" CHANGES +" Wednesday January 09 2013 +" Operator alignment now works for just '=>' with ',=' or 'string, stlist ,etc +" and => ' with '=' +" +" Wednesday October 05 2011 +" - Added comment and handle abbs. Assumes you have the Eatchar and Getchar +" functions. +" - Can now wrap words and lists in quotes. +" - Insert blank promises (,p) +" - Insert blank testing skeleton (,k) +" +" CHANGES +" Monday November 21 2011 +" - IAB's for string, slist and usebundle. + +" CHANGES +" Fri Apr 27 2012 +" Added function to align assigment operators + +" vim_cf3 files (https://github.com/neilhwatson/vim_cf3) +" Copyright (C) 2011 Neil H. Watson +" +" This program is free software: you can redistribute it and/or modify it under +" the terms of the GNU General Public License as published by the Free Software +" Foundation, either version 3 of the License, or (at your option) any later +" version. +" +" This program is distributed in the hope that it will be useful, but WITHOUT ANY +" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +" PARTICULAR PURPOSE. See the GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License along with +" this program. If not, see . diff --git a/ftplugin/yaml.lua b/ftplugin/yaml.lua new file mode 100644 index 0000000..09aa45b --- /dev/null +++ b/ftplugin/yaml.lua @@ -0,0 +1,3 @@ +local opt = vim.opt + +opt.foldmethod = "indent" diff --git a/init.lua b/init.lua new file mode 100755 index 0000000..c8c0962 --- /dev/null +++ b/init.lua @@ -0,0 +1,2 @@ +pcall(require, "impatient") +require("main") diff --git a/lua/core/disabled.lua b/lua/core/disabled.lua new file mode 100755 index 0000000..df6305b --- /dev/null +++ b/lua/core/disabled.lua @@ -0,0 +1,25 @@ +local M = {} +M.setup = function() + local disabled_built_ins = { + "gzip", + "zip", + "zipPlugin", + "tar", + "tarPlugin", + "getscript", + "getscriptPlugin", + "vimball", + "vimballPlugin", + "2html_plugin", + "logipat", + "rrhelper", + "spellfile_plugin", + "matchit", + } + + for _, plugin in pairs(disabled_built_ins) do + vim.g["loaded_" .. plugin] = 1 + end +end + +return M diff --git a/lua/core/globals.lua b/lua/core/globals.lua new file mode 100644 index 0000000..427ac6b --- /dev/null +++ b/lua/core/globals.lua @@ -0,0 +1,8 @@ +local g = vim.g + +local M = {} + +M.setup = function() +end + +return M diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100755 index 0000000..78231de --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,4 @@ +require("core.disabled").setup() +require("core.options").setup() +require("core.mappings").setup() +require("core.globals").setup() diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua new file mode 100755 index 0000000..f3801a7 --- /dev/null +++ b/lua/core/mappings.lua @@ -0,0 +1,26 @@ +local utils_func = require("utils.funcs") +local map = utils_func.map +local M = {} + +M.setup = function() + -- set mapleader to space + vim.g.mapleader = " " + + -- Get rid of highlight after search + map("n", "", ":noh") + + -- Spell Checking + map("n", "st",":set spell!") + + -- Better split movement + map("n", "", "l") + map("n", "", "h") + map("n", "", "k") + map("n", "", "j") + + -- Better split closing + map("n", "", "c") + +end + +return M diff --git a/lua/core/options.lua b/lua/core/options.lua new file mode 100755 index 0000000..b569b44 --- /dev/null +++ b/lua/core/options.lua @@ -0,0 +1,89 @@ +local opt = vim.opt + +local M = {} + +M.setup = function() + -- Number settings + opt.number = true + opt.numberwidth = 2 + opt.relativenumber = false + + -- Scroll Offset + opt.scrolloff = 3 + + -- Disable showmode + opt.showmode = false + + -- Set truecolor support + opt.termguicolors = true + vim.cmd("highlight Normal guibg=none") + + -- Enable system clipboard + opt.clipboard = "unnamedplus" + + -- Set mouse support for any mode + opt.mouse = "a" + + -- Allow hidden + opt.hidden = true + + -- Useful defaults for tab, indentation, etc. + opt.tabstop = 4 + opt.shiftwidth = 4 + opt.smartindent = true + opt.breakindent = true + opt.expandtab = true + opt.smarttab = true + + -- Search settings + opt.hlsearch = true + opt.incsearch = true + opt.ignorecase = true + opt.smartcase = true + + -- Better backspaces + opt.backspace = "indent,eol,start" + + -- Make new splits vertical + opt.splitright = true + + -- Show line & column num of cursor + opt.ruler = true + + -- Set timeouts + opt.ttimeoutlen = 20 + opt.timeoutlen = 1000 + opt.updatetime = 250 + opt.signcolumn = "yes" + + -- Enable persistent undo + opt.undodir = vim.fn.stdpath("cache") .. "/undo" + opt.undofile = true + + -- Better folding + opt.foldmethod = "expr" + opt.foldexpr = "nvim_treesitter#foldexpr()" + opt.fillchars = { fold = " " } + opt.foldlevel = 20 + + -- Concealment for nicer rendering + opt.conceallevel = 2 + opt.concealcursor = "ic" + + -- Lazy Redraw to Speed Up Macros + opt.lazyredraw = true + + -- Spell Settings + opt.spelllang = { "en_us" } + + -- Better completion experience + opt.completeopt = "menuone,noselect" + + -- Set max text width + opt.textwidth = 120 + + -- Highlight cursor line + opt.cursorline = true +end + +return M diff --git a/lua/core/postload.lua b/lua/core/postload.lua new file mode 100755 index 0000000..b9e8051 --- /dev/null +++ b/lua/core/postload.lua @@ -0,0 +1 @@ +require("core.theme").setup() diff --git a/lua/core/theme.lua b/lua/core/theme.lua new file mode 100755 index 0000000..214cbf3 --- /dev/null +++ b/lua/core/theme.lua @@ -0,0 +1,26 @@ +local M = {} + +M.setup = function() + vim.g.tokyonight_style = "night" + vim.g.tokyonight_transparent = true + vim.g.tokyonight_transparent_sidebar = true + + + local colorscheme_name = "tokyonight" + local loaded, _ = pcall(vim.cmd, "colorscheme " ..colorscheme_name) + + if not loaded then + vim.notify( + "Colorscheme \"" ..colorscheme_name.. "\" could not be loaded!", + vim.lsp.log_levels.WARN, + { + title = "Colorscheme", + } + ) + end + + vim.cmd([[ + hi SpecialKey guifg=#61AFEF + ]]) +end +return M diff --git a/lua/main.lua b/lua/main.lua new file mode 100755 index 0000000..ee1ef08 --- /dev/null +++ b/lua/main.lua @@ -0,0 +1,17 @@ +-- INFO: Primary loading, where most things are loaded in +-- +-- INFO: All modules/dirs that are going to be loaded +-- INFO: SHOULD have a init.lua file associated with them. +-- INFO: init.lua is responsible for loading all configuration +-- INFO: related to that directory. +require("core.init") +require("plugins.init") +require("utils.init") + +-- INFO: Post load, for things that need to setup keybindings etc after the fact +-- +-- NOTE: All postload modules should be independent of each other, they shouldn't +-- NOTE: rely on each other's load order. That type of logic should be shifted +-- NOTE: into non-postload regions then handled in postload modules. +require("plugins.postload") +require("core.postload") diff --git a/lua/packer_compiled.lua b/lua/packer_compiled.lua new file mode 100644 index 0000000..9ce8663 --- /dev/null +++ b/lua/packer_compiled.lua @@ -0,0 +1,728 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + + local time + local profile_info + local should_profile = false + if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end + else + time = function(chunk, start) end + end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + + _G._packer = _G._packer or {} + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/Users/pricehiller/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/pricehiller/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/pricehiller/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/pricehiller/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/Users/pricehiller/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["DAPInstall.nvim"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/DAPInstall.nvim", + url = "https://github.com/Pocco81/DAPInstall.nvim" + }, + LuaSnip = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["ansible-vim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/ansible-vim", + url = "https://github.com/pearofducks/ansible-vim" + }, + ["cmp-buffer"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-cmdline"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + url = "https://github.com/hrsh7th/cmp-cmdline" + }, + ["cmp-emoji"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp-emoji", + url = "https://github.com/hrsh7th/cmp-emoji" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-path"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["dashboard-nvim"] = { + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/dashboard-nvim", + url = "https://github.com/glepnir/dashboard-nvim" + }, + ["fidget.nvim"] = { + config = { "\27LJ\2\n>\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0#plugins.configs.fidget-spinner\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/fidget.nvim", + url = "https://github.com/j-hui/fidget.nvim" + }, + ["friendly-snippets"] = { + config = { "\27LJ\2\nH\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\tload luasnip.loaders.from_vscode\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/friendly-snippets", + url = "https://github.com/rafamadriz/friendly-snippets" + }, + ["git-worktree.nvim"] = { + config = { "\27LJ\2\n>\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\17git-worktree\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/git-worktree.nvim", + url = "https://github.com/ThePrimeagen/git-worktree.nvim" + }, + ["gitsigns.nvim"] = { + config = { "\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rgitsigns\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim", + url = "https://github.com/lewis6991/gitsigns.nvim" + }, + ["impatient.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/impatient.nvim", + url = "https://github.com/lewis6991/impatient.nvim" + }, + ["indent-blankline.nvim"] = { + config = { "\27LJ\2\n@\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0%plugins.configs.indent-blankline\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" + }, + ["lsp_signature.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\4\16hint_enable\2\16hint_prefix\5\15toggle_key\n\20floating_window\1\nsetup\18lsp_signature\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim", + url = "https://github.com/ray-x/lsp_signature.nvim" + }, + ["lualine.nvim"] = { + config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31plugins.configs.statusline\frequire\0" }, + load_after = { + ["nvim-bufferline.lua"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["markdown-preview.nvim"] = { + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim", + url = "https://github.com/iamcco/markdown-preview.nvim" + }, + ["mini.nvim"] = { + config = { "\27LJ\2\nš\1\0\0\5\0\a\0\0156\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\0016\0\0\0'\2\3\0B\0\2\0029\1\2\0005\3\4\0005\4\5\0=\4\6\3B\1\2\1K\0\1\0\foptions\1\0\1\18try_as_border\2\1\0\1\vsymbol\bâ–\21mini.indentscope\nsetup\20mini.cursorword\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/mini.nvim", + url = "https://github.com/echasnovski/mini.nvim" + }, + ["mkdir.nvim"] = { + commands = { "new" }, + config = { "\27LJ\2\n%\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\nmkdir\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/mkdir.nvim", + url = "https://github.com/jghauser/mkdir.nvim" + }, + ["modes.nvim"] = { + config = { "\27LJ\2\nZ\0\0\3\0\6\0\v6\0\0\0009\0\1\0+\1\2\0=\1\2\0006\0\3\0'\2\4\0B\0\2\0029\0\5\0004\2\0\0B\0\2\1K\0\1\0\nsetup\nmodes\frequire\15cursorline\bopt\bvim\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/modes.nvim", + url = "https://github.com/mvllow/modes.nvim" + }, + neoformat = { + commands = { "Neoformat" }, + config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.configs.neoformat\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/neoformat", + url = "https://github.com/sbdchd/neoformat" + }, + neogen = { + config = { "\27LJ\2\nR\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\1\19snippet_engine\fluasnip\nsetup\vneogen\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/neogen", + url = "https://github.com/danymat/neogen" + }, + neorg = { + config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.configs._neorg\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/neorg", + url = "https://github.com/nvim-neorg/neorg" + }, + ["neorg-telescope"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/neorg-telescope", + url = "https://github.com/nvim-neorg/neorg-telescope" + }, + ["neoscroll.nvim"] = { + config = { "\27LJ\2\nW\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\1\20easing_function\rcircular\nsetup\14neoscroll\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/neoscroll.nvim", + url = "https://github.com/karb94/neoscroll.nvim" + }, + ["nightfox.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nightfox.nvim", + url = "https://github.com/EdenEast/nightfox.nvim" + }, + ["null-ls.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.configs.null_ls\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/null-ls.nvim", + url = "https://github.com/jose-elias-alvarez/null-ls.nvim" + }, + ["nvim-autopairs"] = { + 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 = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + url = "https://github.com/windwp/nvim-autopairs" + }, + ["nvim-bufferline.lua"] = { + after = { "lualine.nvim" }, + config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31plugins.configs.bufferline\frequire\0" }, + load_after = { + ["nvim-web-devicons"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-bufferline.lua", + url = "https://github.com/akinsho/nvim-bufferline.lua" + }, + ["nvim-cmp"] = { + config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.configs._cmp\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-code-action-menu"] = { + commands = { "CodeActionMenu" }, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-code-action-menu", + url = "https://github.com/weilbith/nvim-code-action-menu" + }, + ["nvim-colorizer.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.configs.nvim-colorizer\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua", + url = "https://github.com/norcalli/nvim-colorizer.lua" + }, + ["nvim-comment"] = { + commands = { "CommentToggle" }, + 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\17nvim_comment\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-comment", + url = "https://github.com/terrortylor/nvim-comment" + }, + ["nvim-dap"] = { + after = { "DAPInstall.nvim", "nvim-dap-ui", "nvim-dap-python" }, + loaded = true, + only_config = true + }, + ["nvim-dap-python"] = { + config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31plugins.configs.python-dap\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-dap-python", + url = "https://github.com/mfussenegger/nvim-dap-python" + }, + ["nvim-dap-ui"] = { + config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.configs.dap-ui\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-dap-ui", + url = "https://github.com/rcarriga/nvim-dap-ui" + }, + ["nvim-hlslens"] = { + after = { "nvim-scrollbar" }, + keys = { { "", "/" } }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-hlslens", + url = "https://github.com/kevinhwang91/nvim-hlslens" + }, + ["nvim-lsp-installer"] = { + config = { "\27LJ\2\n3\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\24plugins.configs.lsp\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-lsp-installer", + url = "https://github.com/williamboman/nvim-lsp-installer" + }, + ["nvim-lspconfig"] = { + after = { "nvim-lsp-installer" }, + loaded = true, + only_config = true + }, + ["nvim-neoclip.lua"] = { + config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.configs._neoclip\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua", + url = "https://github.com/AckslD/nvim-neoclip.lua" + }, + ["nvim-notify"] = { + config = { "\27LJ\2\n;\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0 plugins.configs.nvim-notify\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nvim-notify", + url = "https://github.com/rcarriga/nvim-notify" + }, + ["nvim-scrollbar"] = { + config = { "\27LJ\2\n>\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0#plugins.configs.diag-scrollbar\frequire\0" }, + load_after = { + ["nvim-hlslens"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-scrollbar", + url = "https://github.com/petertriho/nvim-scrollbar" + }, + ["nvim-treesitter"] = { + after = { "neorg" }, + loaded = true, + only_config = true + }, + ["nvim-web-devicons"] = { + after = { "nvim-bufferline.lua" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["nvim-yati"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/nvim-yati", + url = "https://github.com/yioneko/nvim-yati" + }, + ["packer.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["presence.nvim"] = { + config = { "\27LJ\2\n>\0\0\4\0\3\0\b6\0\0\0'\2\1\0B\0\2\2\18\2\0\0009\0\2\0004\3\0\0B\0\3\1K\0\1\0\nsetup\rpresence\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/presence.nvim", + url = "https://github.com/andweeb/presence.nvim" + }, + ["pretty-fold.nvim"] = { + config = { "\27LJ\2\n…\1\0\0\3\0\6\0\f6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\0016\0\0\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\21setup_keybinding\24pretty-fold.preview\1\0\1\14fill_char\6 \nsetup\16pretty-fold\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/pretty-fold.nvim", + url = "https://github.com/anuvyklack/pretty-fold.nvim" + }, + ["rust-tools.nvim"] = { + config = { "\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15rust-tools\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/rust-tools.nvim", + url = "https://github.com/simrat39/rust-tools.nvim" + }, + ["sqlite.lua"] = { + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/sqlite.lua", + url = "https://github.com/tami5/sqlite.lua" + }, + ["stabilize.nvim"] = { + config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31plugins.configs._stabilize\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/stabilize.nvim", + url = "https://github.com/luukvbaal/stabilize.nvim" + }, + ["symbols-outline.nvim"] = { + commands = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/symbols-outline.nvim", + url = "https://github.com/simrat39/symbols-outline.nvim" + }, + ["telescope-file-browser.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/telescope-file-browser.nvim", + url = "https://github.com/nvim-telescope/telescope-file-browser.nvim" + }, + ["telescope-fzf-native.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + ["telescope-media-files.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim", + url = "https://github.com/nvim-telescope/telescope-media-files.nvim" + }, + ["telescope.nvim"] = { + config = { "\27LJ\2\n>\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0#plugins.configs.telescope-nvim\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + telescope_find_directories = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/telescope_find_directories", + url = "https://github.com/artart222/telescope_find_directories" + }, + ["todo-comments.nvim"] = { + config = { "\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/todo-comments.nvim", + url = "https://github.com/folke/todo-comments.nvim" + }, + ["tokyodark.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/tokyodark.nvim", + url = "https://github.com/tiagovla/tokyodark.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["vim-easy-align"] = { + commands = { "EasyAlign" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/vim-easy-align", + url = "https://github.com/junegunn/vim-easy-align" + }, + ["vim-fugitive"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-fugitive", + url = "https://github.com/tpope/vim-fugitive" + }, + ["vim-ghost"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-ghost", + url = "https://github.com/raghur/vim-ghost" + }, + ["vim-log-highlighting"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-log-highlighting", + url = "https://github.com/MTDL9/vim-log-highlighting" + }, + ["vim-move"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-move", + url = "https://github.com/matze/vim-move" + }, + ["vim-surround"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-surround", + url = "https://github.com/tpope/vim-surround" + }, + ["vim-vsnip"] = { + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/vim-vsnip", + url = "https://github.com/hrsh7th/vim-vsnip" + }, + ["which-key.nvim"] = { + 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\14which-key\frequire\0" }, + loaded = true, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + }, + ["zen-mode.nvim"] = { + commands = { "ZenMode" }, + config = { "\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rzen-mode\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/pricehiller/.local/share/nvim/site/pack/packer/opt/zen-mode.nvim", + url = "https://github.com/folke/zen-mode.nvim" + } +} + +time([[Defining packer_plugins]], false) +local module_lazy_loads = { + ["^hlslens"] = "nvim-hlslens", + ["^sqlite"] = "sqlite.lua" +} +local lazy_load_called = {['packer.load'] = true} +local function lazy_load_module(module_name) + local to_load = {} + if lazy_load_called[module_name] then return nil end + lazy_load_called[module_name] = true + for module_pat, plugin_name in pairs(module_lazy_loads) do + if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then + to_load[#to_load + 1] = plugin_name + end + end + + if #to_load > 0 then + require('packer.load')(to_load, {module = module_name}, _G.packer_plugins) + local loaded_mod = package.loaded[module_name] + if loaded_mod then + return function(modname) return loaded_mod end + end + end +end + +if not vim.g.packer_custom_loader_enabled then + table.insert(package.loaders, 1, lazy_load_module) + vim.g.packer_custom_loader_enabled = true +end + +-- Setup for: dashboard-nvim +time([[Setup for dashboard-nvim]], 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#plugins.configs.dashboard-nvim\frequire\0", "setup", "dashboard-nvim") +time([[Setup for dashboard-nvim]], false) +time([[packadd for dashboard-nvim]], true) +vim.cmd [[packadd dashboard-nvim]] +time([[packadd for dashboard-nvim]], false) +-- Setup for: markdown-preview.nvim +time([[Setup for markdown-preview.nvim]], true) +try_loadstring("\27LJ\2\n=\0\0\2\0\4\0\0056\0\0\0009\0\1\0005\1\3\0=\1\2\0K\0\1\0\1\2\0\0\rmarkdown\19mkdp_filetypes\6g\bvim\0", "setup", "markdown-preview.nvim") +time([[Setup for markdown-preview.nvim]], false) +-- Config for: nvim-treesitter +time([[Config for nvim-treesitter]], 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\31plugins.configs.treesitter\frequire\0", "config", "nvim-treesitter") +time([[Config for nvim-treesitter]], false) +-- Config for: modes.nvim +time([[Config for modes.nvim]], true) +try_loadstring("\27LJ\2\nZ\0\0\3\0\6\0\v6\0\0\0009\0\1\0+\1\2\0=\1\2\0006\0\3\0'\2\4\0B\0\2\0029\0\5\0004\2\0\0B\0\2\1K\0\1\0\nsetup\nmodes\frequire\15cursorline\bopt\bvim\0", "config", "modes.nvim") +time([[Config for modes.nvim]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], 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#plugins.configs.telescope-nvim\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) +-- Config for: nvim-cmp +time([[Config for nvim-cmp]], true) +try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.configs._cmp\frequire\0", "config", "nvim-cmp") +time([[Config for nvim-cmp]], false) +-- Config for: git-worktree.nvim +time([[Config for git-worktree.nvim]], true) +try_loadstring("\27LJ\2\n>\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\17git-worktree\frequire\0", "config", "git-worktree.nvim") +time([[Config for git-worktree.nvim]], false) +-- Config for: mini.nvim +time([[Config for mini.nvim]], true) +try_loadstring("\27LJ\2\nš\1\0\0\5\0\a\0\0156\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\0016\0\0\0'\2\3\0B\0\2\0029\1\2\0005\3\4\0005\4\5\0=\4\6\3B\1\2\1K\0\1\0\foptions\1\0\1\18try_as_border\2\1\0\1\vsymbol\bâ–\21mini.indentscope\nsetup\20mini.cursorword\frequire\0", "config", "mini.nvim") +time([[Config for mini.nvim]], false) +-- Config for: nvim-notify +time([[Config for nvim-notify]], 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 plugins.configs.nvim-notify\frequire\0", "config", "nvim-notify") +time([[Config for nvim-notify]], false) +-- Config for: which-key.nvim +time([[Config for which-key.nvim]], 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\14which-key\frequire\0", "config", "which-key.nvim") +time([[Config for which-key.nvim]], false) +-- Config for: nvim-neoclip.lua +time([[Config for nvim-neoclip.lua]], true) +try_loadstring("\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.configs._neoclip\frequire\0", "config", "nvim-neoclip.lua") +time([[Config for nvim-neoclip.lua]], false) +-- Config for: stabilize.nvim +time([[Config for stabilize.nvim]], 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\31plugins.configs._stabilize\frequire\0", "config", "stabilize.nvim") +time([[Config for stabilize.nvim]], false) +-- Config for: lsp_signature.nvim +time([[Config for lsp_signature.nvim]], true) +try_loadstring("\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\4\16hint_enable\2\16hint_prefix\5\15toggle_key\n\20floating_window\1\nsetup\18lsp_signature\frequire\0", "config", "lsp_signature.nvim") +time([[Config for lsp_signature.nvim]], false) +-- Config for: neoscroll.nvim +time([[Config for neoscroll.nvim]], true) +try_loadstring("\27LJ\2\nW\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\1\20easing_function\rcircular\nsetup\14neoscroll\frequire\0", "config", "neoscroll.nvim") +time([[Config for neoscroll.nvim]], false) +-- Config for: presence.nvim +time([[Config for presence.nvim]], true) +try_loadstring("\27LJ\2\n>\0\0\4\0\3\0\b6\0\0\0'\2\1\0B\0\2\2\18\2\0\0009\0\2\0004\3\0\0B\0\3\1K\0\1\0\nsetup\rpresence\frequire\0", "config", "presence.nvim") +time([[Config for presence.nvim]], false) +-- Config for: fidget.nvim +time([[Config for fidget.nvim]], 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#plugins.configs.fidget-spinner\frequire\0", "config", "fidget.nvim") +time([[Config for fidget.nvim]], false) +-- Config for: rust-tools.nvim +time([[Config for rust-tools.nvim]], true) +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15rust-tools\frequire\0", "config", "rust-tools.nvim") +time([[Config for rust-tools.nvim]], false) +-- Config for: nvim-lspconfig +time([[Config for nvim-lspconfig]], 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\30plugins.configs.lspconfig\frequire\0", "config", "nvim-lspconfig") +time([[Config for nvim-lspconfig]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +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: pretty-fold.nvim +time([[Config for pretty-fold.nvim]], true) +try_loadstring("\27LJ\2\n…\1\0\0\3\0\6\0\f6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\0016\0\0\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\21setup_keybinding\24pretty-fold.preview\1\0\1\14fill_char\6 \nsetup\16pretty-fold\frequire\0", "config", "pretty-fold.nvim") +time([[Config for pretty-fold.nvim]], false) +-- Config for: null-ls.nvim +time([[Config for null-ls.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.configs.null_ls\frequire\0", "config", "null-ls.nvim") +time([[Config for null-ls.nvim]], false) +-- Config for: nvim-dap +time([[Config for nvim-dap]], true) +try_loadstring("\27LJ\2\nD\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\18load_launchjs\19dap.ext.vscode\frequire\0", "config", "nvim-dap") +time([[Config for nvim-dap]], false) +-- Config for: neogen +time([[Config for neogen]], true) +try_loadstring("\27LJ\2\nR\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\1\19snippet_engine\fluasnip\nsetup\vneogen\frequire\0", "config", "neogen") +time([[Config for neogen]], false) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd neorg ]] + +-- Config for: neorg +try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.configs._neorg\frequire\0", "config", "neorg") + +vim.cmd [[ packadd nvim-dap-python ]] + +-- Config for: nvim-dap-python +try_loadstring("\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31plugins.configs.python-dap\frequire\0", "config", "nvim-dap-python") + +vim.cmd [[ packadd DAPInstall.nvim ]] +vim.cmd [[ packadd nvim-dap-ui ]] + +-- Config for: nvim-dap-ui +try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.configs.dap-ui\frequire\0", "config", "nvim-dap-ui") + +vim.cmd [[ packadd nvim-lsp-installer ]] + +-- Config for: nvim-lsp-installer +try_loadstring("\27LJ\2\n3\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\24plugins.configs.lsp\frequire\0", "config", "nvim-lsp-installer") + +vim.cmd [[ packadd LuaSnip ]] +vim.cmd [[ packadd friendly-snippets ]] + +-- Config for: friendly-snippets +try_loadstring("\27LJ\2\nH\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\tload luasnip.loaders.from_vscode\frequire\0", "config", "friendly-snippets") + +vim.cmd [[ packadd tokyonight.nvim ]] +time([[Sequenced loading]], false) + +-- Command lazy-loads +time([[Defining lazy-load commands]], true) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file CodeActionMenu lua require("packer.load")({'nvim-code-action-menu'}, { cmd = "CodeActionMenu", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file new lua require("packer.load")({'mkdir.nvim'}, { cmd = "new", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neoformat lua require("packer.load")({'neoformat'}, { cmd = "Neoformat", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutline lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutline", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutlineOpen lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutlineOpen", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file ZenMode lua require("packer.load")({'zen-mode.nvim'}, { cmd = "ZenMode", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file EasyAlign lua require("packer.load")({'vim-easy-align'}, { cmd = "EasyAlign", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file CommentToggle lua require("packer.load")({'nvim-comment'}, { cmd = "CommentToggle", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file SymbolsOutlineClose lua require("packer.load")({'symbols-outline.nvim'}, { cmd = "SymbolsOutlineClose", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +time([[Defining lazy-load commands]], false) + +-- Keymap lazy-loads +time([[Defining lazy-load keymaps]], true) +vim.cmd [[noremap / lua require("packer.load")({'nvim-hlslens'}, { keys = "/", prefix = "" }, _G.packer_plugins)]] +time([[Defining lazy-load keymaps]], false) + +vim.cmd [[augroup packer_load_aucmds]] +vim.cmd [[au!]] + -- Filetype lazy-loads +time([[Defining lazy-load filetype autocommands]], true) +vim.cmd [[au FileType markdown ++once lua require("packer.load")({'markdown-preview.nvim'}, { ft = "markdown" }, _G.packer_plugins)]] +time([[Defining lazy-load filetype autocommands]], false) + -- Event lazy-loads +time([[Defining lazy-load event autocommands]], true) +vim.cmd [[au BufEnter * ++once lua require("packer.load")({'todo-comments.nvim', 'nvim-colorizer.lua', 'indent-blankline.nvim', 'nvim-web-devicons'}, { event = "BufEnter *" }, _G.packer_plugins)]] +vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] +time([[Defining lazy-load event autocommands]], false) +vim.cmd("augroup END") +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 diff --git a/lua/plugins/configs/_cmp.lua b/lua/plugins/configs/_cmp.lua new file mode 100755 index 0000000..66b02ce --- /dev/null +++ b/lua/plugins/configs/_cmp.lua @@ -0,0 +1,129 @@ +local cmp = require("cmp") +local luasnip = require("luasnip") + +local kind_icons = { + Text = "", + Method = "", + Function = "ïž”", + Constructor = "ï£", + Field = "", + Variable = "ï– ", + Class = "ï´¯", + Interface = "", + Module = "ï’‡", + Property = "ï° ", + Unit = "", + Value = "", + Enum = "ï…", + Keyword = "ï Š", + Snippet = "ï‘", + Color = "", + File = "", + Reference = "ï’", + Folder = "ïŠ", + EnumMember = "ï…", + Constant = "", + Struct = "", + Event = "", + Operator = "ïš”", + TypeParameter = "ï™±", +} + +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 + +-- Load Snippets +require("luasnip.loaders.from_vscode").load() + +cmp.setup({ + formatting = { + format = function(entry, vim_item) + -- Kind icons + vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind + -- Source + vim_item.menu = ({ + buffer = "[Buffer]", + nvim_lsp = "[LSP]", + luasnip = "[LuaSnip]", + nvim_lua = "[Lua]", + latex_symbols = "[LaTeX]", + path = "[Path]", + })[entry.source.name] + return vim_item + end, + }, + documentation = { + border = { "â•­", "─", "â•®", "│", "╯", "─", "â•°", "│" }, + }, + experimental = { + ghost_text = true, + native_menu = false, + }, + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require("luasnip").lsp_expand(args.body) -- For `luasnip` users. + end, + }, + mapping = { + [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. + [""] = cmp.mapping({ + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }), + [""] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }, + sources = cmp.config.sources( + { + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "path" }, + { name = "buffer" }, + { name = "emoji" }, + { name = "neorg" }, + { name = "luasnip" }, -- For luasnip users. + } + ), +}) + +-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline("/", { + sources = { + { name = "buffer" }, + }, +}) + +-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline(":", { + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), +}) diff --git a/lua/plugins/configs/_neoclip.lua b/lua/plugins/configs/_neoclip.lua new file mode 100755 index 0000000..48bfe02 --- /dev/null +++ b/lua/plugins/configs/_neoclip.lua @@ -0,0 +1,3 @@ +require("neoclip").setup({ + enable_persistent_history = true +}) diff --git a/lua/plugins/configs/_neorg.lua b/lua/plugins/configs/_neorg.lua new file mode 100755 index 0000000..f188239 --- /dev/null +++ b/lua/plugins/configs/_neorg.lua @@ -0,0 +1,50 @@ +local neorg = require("neorg") + +neorg.setup({ + load = { + ["core.defaults"] = {}, + ["core.norg.concealer"] = {}, + ["core.norg.esupports.metagen"] = { + config = { + type = "auto", + } + }, + ["core.integrations.nvim-cmp"] = { + config = {} + }, + ["core.norg.completion"] = { + config = { + engine = "nvim-cmp" + }, + }, + ["core.keybinds"] = { + config = { + default_keybinds = true, + -- norg_leader = "-" + } + }, + ["core.norg.dirman"] = { + config = { + workspaces = { + default = "~/.notes", -- Format: = + }, + autochdir = true, -- Automatically change the directory to the current workspace's root every time + index = "index.norg", -- The name of the main (root) .norg file + last_workspace = vim.fn.stdpath("cache") .. "/neorg_last_workspace.txt" -- The location to write and read the workspace cache file + } + }, + ["core.integrations.telescope"] = {}, + ["core.norg.qol.toc"] = {}, + ["core.gtd.base"] = { + config = { + workspace = "default", + } + }, + ["core.gtd.ui"] = { + config = {} + }, + ["core.gtd.helpers"] = { + config = {} + } + } +}) diff --git a/lua/plugins/configs/_stabilize.lua b/lua/plugins/configs/_stabilize.lua new file mode 100755 index 0000000..13876f9 --- /dev/null +++ b/lua/plugins/configs/_stabilize.lua @@ -0,0 +1,20 @@ +require("stabilize").setup({ + -- stabilize window even when current cursor position will be hidden behind new window + force = true, + -- set context mark to register on force event which can be jumped to with ' + forcemark = nil, + -- do not manage windows matching these file/buftypes + ignore = { + filetype = { "packer", "Dashboard", "Trouble", "TelescopePrompt" }, + buftype = { + "packer", + "Dashboard", + "terminal", + "quickfix", + "loclist", + "LspInstall" + }, + }, + -- comma-separated list of autocmds that wil trigger the plugins window restore function + nested = nil, +}) diff --git a/lua/plugins/configs/_windline.lua b/lua/plugins/configs/_windline.lua new file mode 100755 index 0000000..edb99a0 --- /dev/null +++ b/lua/plugins/configs/_windline.lua @@ -0,0 +1,7 @@ +-- Load Animations +require("wlanimation") +-- Load a line (these include setup) +require("wlsample.bubble2") + +-- In the future I may want to implement +-- my own, for now much too lazy for that diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua new file mode 100755 index 0000000..93684c9 --- /dev/null +++ b/lua/plugins/configs/bufferline.lua @@ -0,0 +1,18 @@ +local bufferline = require("bufferline") + +bufferline.setup({ + options = { + numbers = function(opts) + return string.format("%s", opts.id) + end, + diagnostics = "nvim_lsp", + offsets = { + { + filetype = "NvimTree", + text = "File Explorer", + highlight = "Directory", + text_align = "left", + }, + }, + }, +}) diff --git a/lua/plugins/configs/code-outline.lua b/lua/plugins/configs/code-outline.lua new file mode 100755 index 0000000..e95a638 --- /dev/null +++ b/lua/plugins/configs/code-outline.lua @@ -0,0 +1 @@ +map("n", "ls", ":SymbolsOutline") diff --git a/lua/plugins/configs/coq.lua b/lua/plugins/configs/coq.lua new file mode 100755 index 0000000..b4efa61 --- /dev/null +++ b/lua/plugins/configs/coq.lua @@ -0,0 +1,10 @@ +-- Alias for vim.g +local g = vim.g + +-- Run COQ on open +g.coq_settings = { + auto_start = "shut-up", + limits = { + completion_manual_timeout = 2000, + } +} diff --git a/lua/plugins/configs/dap-ui.lua b/lua/plugins/configs/dap-ui.lua new file mode 100755 index 0000000..c80cac1 --- /dev/null +++ b/lua/plugins/configs/dap-ui.lua @@ -0,0 +1,9 @@ +local fn = vim.fn + +require("dapui").setup({}) + +fn.sign_define("DapBreakpoint", {text="â— ", texthl="DiagnosticSignError", linehl="", numhl=""}) +fn.sign_define("DapBreakpointCondition", {text="â— ", texthl="DiagnosticSignWarn", linehl="", numhl=""}) +fn.sign_define("DapLogPoint", {text="â— ", texthl="DiagnosticSignInfo", linehl="", numhl=""}) +fn.sign_define("DapStopped", {text="→ ", texthl="DiagnosticSignWarn", linehl="", numhl=""}) +fn.sign_define("DapBreakpointReject", {text="â—" , texthl="DiagnosticSignHint", linehl="", numhl=""}) diff --git a/lua/plugins/configs/dashboard-nvim.lua b/lua/plugins/configs/dashboard-nvim.lua new file mode 100755 index 0000000..6d29866 --- /dev/null +++ b/lua/plugins/configs/dashboard-nvim.lua @@ -0,0 +1,31 @@ +local g = vim.g +local fn = vim.fn + +local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) + +g.dashboard_disable_statusline = 1 +g.dashboard_default_executive = "telescope" + +g.dashboard_custom_header = { + " ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗", + " ████╗ ██║ ██╔â•â•â•â•â•â–ˆâ–ˆâ•”â•â•â•â–ˆâ–ˆâ•— ██║ ██║ ██║ ████╗ ████║", + " ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║", + " ██║╚██╗██║ ██╔â•â•â• ██║ ██║ ╚██╗ ██╔╠██║ ██║╚██╔â•â–ˆâ–ˆâ•‘", + " ██║ ╚████║ ███████╗╚██████╔╠╚████╔╠██║ ██║ â•šâ•â• ██║", + " â•šâ•â• â•šâ•â•â•â• â•šâ•â•â•â•â•â•â• â•šâ•â•â•â•â•â• â•šâ•â•â•â• â•šâ•â• â•šâ•â• â•šâ•â•", +} + +g.dashboard_custom_section = { + a = { description = { " Find File SPC t f" }, command = "Telescope find_files" }, + b = { description = { "ï¼ Find directory SPC t d" }, command = "Telescope find_directories" }, + c = { description = { " Recents SPC t o" }, command = "Telescope oldfiles" }, + d = { description = { " Find Word SPC t w" }, command = "Telescope live_grep" }, +} + +g.dashboard_custom_footer = { + "Loaded " .. plugins_count .. " plugins! ï’’ ", +} + +-- Disable statusline and cursorline in dashboard. +vim.cmd('autocmd BufEnter * if &ft is "dashboard" | set laststatus=0 | else | set laststatus=2 | endif') +vim.cmd('autocmd BufEnter * if &ft is "dashboard" | set nocursorline | endif') diff --git a/lua/plugins/configs/diag-scrollbar.lua b/lua/plugins/configs/diag-scrollbar.lua new file mode 100755 index 0000000..82523d8 --- /dev/null +++ b/lua/plugins/configs/diag-scrollbar.lua @@ -0,0 +1,18 @@ +local colors = require("tokyonight.colors").setup() +require("scrollbar").setup({ + handle = { + color = colors.bg_highlight, + }, + marks = { + Search = { color = colors.orange }, + Error = { color = colors.error }, + Warn = { color = colors.warning }, + Info = { color = colors.info }, + Hint = { color = colors.hint }, + Misc = { color = colors.purple }, + }, + handlers = { + diagnostic = true, + search = true, + }, +}) diff --git a/lua/plugins/configs/fidget-spinner.lua b/lua/plugins/configs/fidget-spinner.lua new file mode 100755 index 0000000..8f7aad9 --- /dev/null +++ b/lua/plugins/configs/fidget-spinner.lua @@ -0,0 +1,10 @@ +local fidget = require("fidget") + +fidget.setup({ + text = { + spinner = "dots" + }, + window = { + blend = 0, + } +}) diff --git a/lua/plugins/configs/file-explorer.lua b/lua/plugins/configs/file-explorer.lua new file mode 100755 index 0000000..938200a --- /dev/null +++ b/lua/plugins/configs/file-explorer.lua @@ -0,0 +1,18 @@ +local treesitter = require("nvim-tree.configs") + +treesitter.setup({ + highlight = { + enable = true, + additional_vim_regex_highlighting = true, + disable = { + -- Ansible support reasons + "ansible.yaml", + }, + }, + matchup = { + enable = true, + }, + autotag = { + enable = true, + }, +}) diff --git a/lua/plugins/configs/indent-blankline.lua b/lua/plugins/configs/indent-blankline.lua new file mode 100755 index 0000000..144b1d5 --- /dev/null +++ b/lua/plugins/configs/indent-blankline.lua @@ -0,0 +1,24 @@ +local g = vim.g + +g.indent_blankline_char = "â–" +g.indent_blankline_context_char = "â–" + +-- Disable indent-blankline on these pages. +g.indent_blankline_filetype_exclude = { + "help", + "terminal", + "dashboard", + "packer", + "lsp-installer", + "lspinfo", +} + +g.indent_blankline_buftype_exclude = { "terminal" } +g.indent_blankline_show_trailing_blankline_indent = false +g.indent_blankline_show_first_indent_level = true + +require("indent_blankline").setup({ + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = true, +}) diff --git a/lua/plugins/configs/lsp.lua b/lua/plugins/configs/lsp.lua new file mode 100755 index 0000000..50a8229 --- /dev/null +++ b/lua/plugins/configs/lsp.lua @@ -0,0 +1,110 @@ +local lsp_installer = require("nvim-lsp-installer") +local async = require("plenary.async") + +local required_servers = { + "sumneko_lua", + "rust_analyzer", + "bashls", + "eslint", + "dockerls", + "ansiblels", + "pyright", + "tsserver" +} + +for _, name in pairs(required_servers) do + local server_is_found, server = lsp_installer.get_server(name) + if server_is_found then + if not server:is_installed() then + async.run(function() + vim.notify.async("Installing Language Server " .. name, "info", { + title = "Lsp Installer", + }) + end) + server:install() + end + end +end + +local function on_attach(client, bufnr) + async.run(function() + vim.notify.async("Attached server " .. client.name, "info", { + title = "Lsp Attach", + }).events.close() + end) +end + +lsp_installer.on_server_ready(function(server) + local opts = { + -- Coq configuration, ensure coq actual has capabilties shown + -- capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()), + capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), + on_attach = on_attach, + } + + -- In the scenario we're using rust it makes more sense to use rust-tools + -- see: https://github.com/williamboman/nvim-lsp-installer/wiki/Rust + -- + -- NOTE: Requires rust_analyzer + if server.name == "rust_analyzer" then + -- Dap installation, required vscode and the following extension to be installed: + -- https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb + -- + -- locate it with `find ~/ -name ` + local extension_path = os.getenv("HOME") .. "/.vscode/extensions/vadimcn.vscode-lldb-1.6.10/" + local codelldb_path = extension_path .. "adapter/codelldb" + local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib" + + local rustopts = { + server = vim.tbl_deep_extend("force", server:get_default_options(), opts, {}), + dap = { + adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path), + }, + tools = { + hover_actions = { auto_focus = true }, + }, + } + require("rust-tools").setup(rustopts) + server:attach_buffers() + else + -- I use ansible a lot, define exceptions for servers that can use + -- server:setup & vim.cmd at the bottom here + if server.name == "ansiblels" then + opts.settings = { + ansible = { + ansible = { + useFullyQualifiedCollectionNames = true, + path = "ansible", + }, + ansibleLint = { + enabled = true, + path = "ansible-lint", + }, + python = { + interpreterPath = "python3", + }, + }, + } + elseif server.name == "bashls" then + opts.settings = { + filetypes = { + "zsh", + "bash", + "profile", + }, + } + elseif server.name == "pylsp" then + opts.settings = { + pylsp = { + plugins = { + pycodestyle = { + enabled = false + } + } + } + } + end + server:setup(opts) + vim.cmd([[ do User LspAttachBuffers ]]) + end +end) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua new file mode 100755 index 0000000..095bf6c --- /dev/null +++ b/lua/plugins/configs/lspconfig.lua @@ -0,0 +1,42 @@ +local function lspSymbol(name, icon) + local hl = "DiagnosticSign" .. name + vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) +end + +lspSymbol("Error", "ï™™") +lspSymbol("Warn", "") +lspSymbol("Info", "") +lspSymbol("Hint", "ï µ") + + +local border = { + {"🭽", "FloatBorder"}, + {"â–”", "FloatBorder"}, + {"🭾", "FloatBorder"}, + {"â–•", "FloatBorder"}, + {"🭿", "FloatBorder"}, + {"â–", "FloatBorder"}, + {"🭼", "FloatBorder"}, + {"â–", "FloatBorder"}, +} + +local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview +function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) + opts = opts or {} + opts.border = opts.border or border + return orig_util_open_floating_preview(contents, syntax, opts, ...) +end + +-- vim.o.updatetime = 100 +-- vim.cmd([[autocmd CursorHold,CursorHoldI,CmdlineEnter * lua vim.diagnostic.open_float(nil, {focus=false})]]) +vim.diagnostic.config({ + virtual_text = { + prefix = 'á…' + }, + virtual_lines = true, + severity_sort = true, + update_in_insert = false, + float = { + source = "always" + } +}) diff --git a/lua/plugins/configs/neoformat.lua b/lua/plugins/configs/neoformat.lua new file mode 100755 index 0000000..3056b34 --- /dev/null +++ b/lua/plugins/configs/neoformat.lua @@ -0,0 +1,8 @@ +vim.cmd[[ +let g:neoformat_python_black = { + \ 'exe': 'black', + \ 'stdin': 1, + \ 'args': ['-q', '-'], + \ } +let g:neoformat_enabled_python = ['black'] +]] diff --git a/lua/plugins/configs/null_ls.lua b/lua/plugins/configs/null_ls.lua new file mode 100755 index 0000000..1f62a1e --- /dev/null +++ b/lua/plugins/configs/null_ls.lua @@ -0,0 +1,10 @@ +local null_ls = require("null-ls") + +null_ls.setup({ + sources = { + null_ls.builtins.formatting.shfmt, + null_ls.builtins.diagnostics.hadolint, + null_ls.builtins.diagnostics.shellcheck, + null_ls.builtins.diagnostics.ansiblelint + }, +}) diff --git a/lua/plugins/configs/nvim-colorizer.lua b/lua/plugins/configs/nvim-colorizer.lua new file mode 100755 index 0000000..37f335e --- /dev/null +++ b/lua/plugins/configs/nvim-colorizer.lua @@ -0,0 +1,3 @@ +local colorizer = require("colorizer") +colorizer.setup({}) +vim.cmd("ColorizerAttachToBuffer") diff --git a/lua/plugins/configs/nvim-notify.lua b/lua/plugins/configs/nvim-notify.lua new file mode 100755 index 0000000..03f2b18 --- /dev/null +++ b/lua/plugins/configs/nvim-notify.lua @@ -0,0 +1,34 @@ +require("notify").setup({ + -- Animation style (see below for details) + stages = "fade_in_slide_out", + + -- Function called when a new window is opened, use for changing win settings/config + on_open = nil, + + -- Function called when a window is closed + on_close = nil, + + -- Render function for notifications. See notify-render() + render = "default", + + -- Default timeout for notifications + timeout = 5000, + + -- For stages that change opacity this is treated as the highlight behind the window + -- Set this to either a highlight group, an RGB hex value e.g. "#000000" or a function returning an RGB code for dynamic values + background_colour = "#000000", + + -- Minimum width for notification windows + minimum_width = 50, + + -- Icons for the different levels + icons = { + ERROR = "ï—", + WARN = "ïª", + INFO = "ïš", + DEBUG = "", + TRACE = "✎", + }, +}) + +vim.notify = require("notify") diff --git a/lua/plugins/configs/python-dap.lua b/lua/plugins/configs/python-dap.lua new file mode 100755 index 0000000..f79d650 --- /dev/null +++ b/lua/plugins/configs/python-dap.lua @@ -0,0 +1,3 @@ +local dap_python = require("dap-python") +dap_python.setup("~/.venvs/debugpy/bin/python") +dap_python.test_runner = "pytest" diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua new file mode 100755 index 0000000..528990b --- /dev/null +++ b/lua/plugins/configs/statusline.lua @@ -0,0 +1,42 @@ +local present, lualine = pcall(require, "lualine") +if not present then + return +end + +local left_pad = "î‚´" +local right_pad = "" + +lualine.setup({ + options = { + icons_enabled = true, + theme = "auto", + component_separators = "|", + section_separators = { left = left_pad, right = right_pad }, + disabled_filetypes = {}, + always_divide_middle = true, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { + { + "filename", + file_status = true, + path = 1, + }, + }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = { "fugitive", "fzf" }, +}) diff --git a/lua/plugins/configs/telescope-nvim.lua b/lua/plugins/configs/telescope-nvim.lua new file mode 100755 index 0000000..5a01e21 --- /dev/null +++ b/lua/plugins/configs/telescope-nvim.lua @@ -0,0 +1,71 @@ +local telescope = require("telescope") + +telescope.setup({ + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "flex", + layout_config = { + vertical = { + prompt_position = "top", + width = 0.90, + height = 0.98, + preview_height = 0.65, + }, + horizontal = { + prompt_position = "top", + width = 0.90, + height = 0.98, + preview_width = 0.70, + }, + flex = { + flip_cloumns = 120, + }, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "â•­", "â•®", "╯", "â•°" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + extensions = { + media_files = { + filetypes = { "png", "webp", "jpg", "jpeg" }, + find_cmd = "rg", + }, + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, +}) + +telescope.load_extension("fzf") +telescope.load_extension("git_worktree") +telescope.load_extension("media_files") +telescope.load_extension("find_directories") +telescope.load_extension("file_browser") +telescope.load_extension("notify") diff --git a/lua/plugins/configs/todo-comments.lua b/lua/plugins/configs/todo-comments.lua new file mode 100755 index 0000000..ae7ceee --- /dev/null +++ b/lua/plugins/configs/todo-comments.lua @@ -0,0 +1 @@ +require("todo-comments").setup({}) diff --git a/lua/plugins/configs/tokyonight.lua b/lua/plugins/configs/tokyonight.lua new file mode 100755 index 0000000..aea2cdd --- /dev/null +++ b/lua/plugins/configs/tokyonight.lua @@ -0,0 +1,7 @@ +local g = vim.g + +g.tokyonight_style = "night" +g.tokyonight_transparent = true +g.tokyonight_transparent_sidebar = true + +vim.cmd("colorscheme tokyonight") diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua new file mode 100755 index 0000000..d4215a1 --- /dev/null +++ b/lua/plugins/configs/treesitter.lua @@ -0,0 +1,49 @@ +local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() + +parser_configs.norg = { + install_info = { + url = "https://github.com/nvim-neorg/tree-sitter-norg", + files = { "src/parser.c", "src/scanner.cc" }, + branch = "main", + }, +} + +parser_configs.norg_meta = { + install_info = { + url = "https://github.com/nvim-neorg/tree-sitter-norg-meta", + files = { "src/parser.c" }, + branch = "main", + }, +} + +parser_configs.norg_table = { + install_info = { + url = "https://github.com/nvim-neorg/tree-sitter-norg-table", + files = { "src/parser.c" }, + branch = "main", + }, +} + +local nvim_treesitter = require("nvim-treesitter.configs") + +nvim_treesitter.setup({ + ensure_installed = { + "norg", + "norg_meta", + "norg_table", + }, + highlight = { + enable = true, + additional_vim_regex_highlighting = true, + disable = { "yaml" }, + }, + matchup = { + enable = true, + }, + autotag = { + enable = true, + }, + yati = { + enable = true, + }, +}) diff --git a/lua/plugins/configs/wilder.lua b/lua/plugins/configs/wilder.lua new file mode 100755 index 0000000..8ffe072 --- /dev/null +++ b/lua/plugins/configs/wilder.lua @@ -0,0 +1,49 @@ +vim.cmd([[ +call wilder#enable_cmdline_enter() +set wildcharm= +cmap wilder#in_context() ? wilder#next() : "\" +cmap wilder#in_context() ? wilder#previous() : "\" +call wilder#set_option('modes', ['/', '?', ':']) + +call wilder#set_option('pipeline', [ + \ wilder#branch( + \ wilder#python_file_finder_pipeline({ + \ 'file_command': ['rg', '--files'], + \ 'dir_command': ['find', '.', '-type', 'd', '-printf', '%P\n'], + \ 'filters': ['fuzzy_filter', 'difflib_sorter'], + \ }), + \ wilder#cmdline_pipeline({ + \ 'fuzzy': 1, + \ 'fuzzy_filter': wilder#vim_fuzzy_filter(), + \ }), + \ wilder#python_search_pipeline({ + \ 'pattern': 'fuzzy', + \ }), + \ ), + \ ]) + +let s:highlighters = [ + \ wilder#pcre2_highlighter(), + \ wilder#basic_highlighter(), + \ ] + + +call wilder#set_option('renderer', wilder#popupmenu_renderer(wilder#popupmenu_border_theme({ + \ 'highlighter': s:highlighters, + \ 'highlights': { + \ 'accent': wilder#make_hl('WilderAccent', 'Pmenu', [{}, {}, {'foreground': '#00b6ff'}]), + \ }, + \ 'left': [ + \ wilder#popupmenu_devicons(), + \ ], + \ 'right': [ + \ ' ', + \ wilder#popupmenu_scrollbar(), + \ ], + \ 'min_width': '30%', + \ 'min_height': '0%', + \ 'max_height': '50%', + \ 'reverse': 1, + \ 'border': 'rounded', + \ }))) +]]) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100755 index 0000000..9a03ba0 --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1,5 @@ +require("plugins.plugins") +local found, _ = pcall(require, "packer_compiled") +if not found then + vim.notify("Unable to locate packer_compiled!") +end diff --git a/lua/plugins/mappings.lua b/lua/plugins/mappings.lua new file mode 100755 index 0000000..655781e --- /dev/null +++ b/lua/plugins/mappings.lua @@ -0,0 +1,81 @@ +local utils = require("utils.funcs") +local map = utils.map + +-- Telescope mappings +map("n", "tw", ":Telescope live_grep") +map("n", "gs", ":Telescope git_status") +map("n", "gc", ":Telescope git_commits") +map("n", "gb", ":Telescope git_branches") +map("n", "gw", ":lua require('telescope').extensions.git_worktree.create_git_worktree()") +map("n", "tf", ":Telescope find_files") +map("n", "td", ":Telescope find_directories") +map("n", "tb", ":Telescope buffers") +map("n", "th", ":Telescope help_tags") +map("n", "to", ":Telescope oldfiles") +map("n", "tc", ":Telescope neoclip default") +map("n", "tr", ":Telescope registers") +map("n", "tt", ":Telescope file_browser") +map("n", "ts", ":Telescope spell_suggest") +map("n", "tT", ":TodoTelescope") + +-- Lsp Mappings +map("n", "lD", ":lua vim.lsp.buf.declaration()") +map("n", "ld", ":lua vim.lsp.buf.definition()") +map("n", "k", ":lua vim.lsp.buf.hover()") +map("n", "K", ":lua vim.lsp.buf.signature_help()") +map("n", "li", ":lua vim.lsp.buf.implementation()") +map("n", "la", ":lua vim.lsp.buf.add_workspace_folder()") +map("n", "lx", ":lua vim.lsp.buf.remove_workspace_folder()") +map("n", "ll", ":lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))") +map("n", "lT", ":lua vim.lsp.buf.type_definition()") +map("n", "ln", ":lua vim.lsp.buf.rename()") +map("n", "lc", ":CodeActionMenu") +map("n", "lr", ":lua vim.lsp.buf.references()") +map("n", "lR", ":LspRestart") +map("n", "ls", ":lua vim.diagnostic.open_float(nil, {focus=false, scope='cursor'})") +map("n", "lf", ":lua vim.lsp.buf.formatting()") +map("n", "[l", ":lua vim.diagnostic.goto_prev()") +map("n", "]l", ":lua vim.diagnostic.goto_next()") +map("n", "lq", ":Telescope diagnostics bufnr=0") + +-- Formatter +map("n", "fr", ":Neoformat") + +-- DAP Mappings +map("n", "dR", ':lua require("dap").continue()') +map("n", "de", ':lua require("dap").terminate()') +map("n", "db", ':lua require("dap").toggle_breakpoint()') +map("n", "dr", ":lua require(\"dap\").set_breakpoint(vim.fn.input('Breakpoint condition: '))") +map("n", "dp", ":lua require(\"dap\").set_breakpoint(nil, nil, vim.fn.input('Log point message: '))") +map("n", "", ':lua require("dap").step_over()') +map("n", "", ':lua require("dap").step_into()') +map("n", "", ':lua require("dap").step_out()') +map("n", "dB", ':lua require("dap").step_back()') +map("n", "dc", ':lua require("dap").run_to_cursor()') +map("n", "do", ':lua require("dap").repl.open()') +map("n", "dt", ':lua require("dapui").toggle()') +map("n", "dl", ':lua require("dap").run_last()') + +-- Comments +map("n", "/", ":CommentToggle") +map("v", "/", ":'<,'>CommentToggle") + +-- Code Outline +map("n", "co", ":SymbolsOutline") + +-- Bufferline mappings +map("n", "", ":BufferLineCyclePrev") +map("n", "", ":BufferLineCycleNext") +map("n", "", ":lua require('utils.funcs').close_buffer()") + +-- Vim Notify Mappings +map("n", "nv", ":lua require('telescope').extensions.notify.notify()") +map("n", "nd", ":lua require('notify').dismiss()") + +-- Whichkey Mappings +map("n", "ww", ":WhichKey") +map("n", "wk", ":Telescope keymaps") +map("n", "wc", ":Telescope commands") + +-- Neogen Mappings +map("n", "ng", ":Neogen") diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua new file mode 100755 index 0000000..62aeeff --- /dev/null +++ b/lua/plugins/plugins.lua @@ -0,0 +1,580 @@ +local fn = vim.fn + +-- Packer strap, install packer automatically and configure plugins +-- See the end of this file for how the variable `packer_strap` gets used +local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_STRAP = fn.system({ + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + }) + -- Update the runtime so packer can be used + vim.o.runtimepath = vim.fn.stdpath("data") .. "/site/pack/*/start/*," .. vim.o.runtimepath +end + +return require("packer").startup({ + function(use) + -- Performance boost on startup + -- keep at top of plugins + use({ "lewis6991/impatient.nvim" }) + + -- Packer Itself + use({ "wbthomason/packer.nvim" }) + + -- Commonly used library + use({ + "nvim-lua/plenary.nvim", + }) + + -- Nvim Notify + use({ + "rcarriga/nvim-notify", + config = function() + require("plugins.configs.nvim-notify") + end, + }) + + -- Color schemes + use({ "folke/tokyonight.nvim" }) + use({ "EdenEast/nightfox.nvim" }) + + -- Icons for folders, files, etc. + use({ + "kyazdani42/nvim-web-devicons", + event = "BufEnter", + }) + + -- Tab Line at top of editor + use({ + "akinsho/nvim-bufferline.lua", + after = "nvim-web-devicons", + requires = { "nvim-web-devicons" }, + config = function() + require("plugins.configs.bufferline") + end, + }) + + -- Statusline. + use({ + "nvim-lualine/lualine.nvim", + after = { + "nvim-bufferline.lua", + "tokyonight.nvim", + }, + config = function() + require("plugins.configs.statusline") + end, + }) + + -- Indentation Guides + use({ + "lukas-reineke/indent-blankline.nvim", + event = "BufEnter", + config = function() + require("plugins.configs.indent-blankline") + end, + }) + + -- Treesitter + use({ + "nvim-treesitter/nvim-treesitter", + run = ":TSUpdate", + config = function() + require("plugins.configs.treesitter") + end, + }) + + -- Better treesitter indentations + -- NOTE: Remove this once treesitter gets up to par + -- NOTE: this is just a placeholder until it is. + use({ + "yioneko/nvim-yati", + requires = "nvim-treesitter/nvim-treesitter", + }) + + -- Highlight given color codes + use({ + "norcalli/nvim-colorizer.lua", + event = "BufEnter", + config = function() + require("plugins.configs.nvim-colorizer") + end, + }) + + -- Dashboard when no file is given to nvim + use({ + "glepnir/dashboard-nvim", + setup = function() + require("plugins.configs.dashboard-nvim") + end, + }) + + -- Telescope Extensions + use({ + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + }) + + use({ + "nvim-telescope/telescope-media-files.nvim", + "nvim-telescope/telescope-file-browser.nvim", + "artart222/telescope_find_directories", + }) + + use({ + "ThePrimeagen/git-worktree.nvim", + config = function() + require("git-worktree").setup({}) + end, + }) + + -- Telescope + use({ + "nvim-telescope/telescope.nvim", + config = function() + require("plugins.configs.telescope-nvim") + end, + }) + + -- LSP, LSP Installer + use({ + "neovim/nvim-lspconfig", + config = function() + require("plugins.configs.lspconfig") + end, + }) + + use({ + "williamboman/nvim-lsp-installer", + after = "nvim-lspconfig", + config = function() + require("plugins.configs.lsp") + end, + }) + + -- Display LSP Progress + use({ + "j-hui/fidget.nvim", + config = function() + require("plugins.configs.fidget-spinner") + end, + -- after = "nvim-lspconfig" + }) + + -- Display Lsp Signature + use({ + "ray-x/lsp_signature.nvim", + config = function() + require("lsp_signature").setup({ + hint_prefix = "", + hint_enable = true, + floating_window = false, + toggle_key = "", + }) + end, + }) + + -- Code Action Menu, prettier ui for LSP code actions + require("packer").use({ + "weilbith/nvim-code-action-menu", + cmd = "CodeActionMenu", + }) + + -- Lsp From Null LS + use({ + "jose-elias-alvarez/null-ls.nvim", + config = function() + require("plugins.configs.null_ls") + end, + }) + + -- Better LSP Handling for Rust + use({ + "simrat39/rust-tools.nvim", + config = function() + require("rust-tools").setup({}) + end, + }) + + -- Autopairs + use({ + "windwp/nvim-autopairs", + config = function() + require("nvim-autopairs").setup() + end, + }) + + -- use({ + -- "ms-jpq/coq_nvim", + -- config = function() + -- require("plugins.configs.coq") + -- end, + -- requires = { + -- "ms-jpq/coq.artifacts", + -- "ms-jpq/coq.thirdparty", + -- }, + -- }) + + -- Snippets + use({ + "L3MON4D3/LuaSnip", + "https://github.com/saadparwaiz1/cmp_luasnip", + }) + use({ + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").load() + end, + requires = { + "L3MON4D3/LuaSnip", + "https://github.com/saadparwaiz1/cmp_luasnip", + }, + after = "LuaSnip", + }) + + -- Code completion + use({ + "hrsh7th/nvim-cmp", + requires = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-emoji", + "hrsh7th/vim-vsnip", + }, + config = function() + require("plugins.configs._cmp") + end, + }) + + -- Show code outline + use({ + "simrat39/symbols-outline.nvim", + cmd = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" }, + }) + + -- DAP, debugger + use({ + "mfussenegger/nvim-dap", + config = function() + require("dap.ext.vscode").load_launchjs() + end, + }) + + -- Allows more Dap providers to be installed easily + use({ + "Pocco81/DAPInstall.nvim", + after = "nvim-dap", + }) + + -- Python debugger, dapinstall does not play nice with debugpy + use({ + "mfussenegger/nvim-dap-python", + after = "nvim-dap", + config = function() + require("plugins.configs.python-dap") + end, + }) + + -- Fancy ui for dap + use({ + "rcarriga/nvim-dap-ui", + after = "nvim-dap", + config = function() + require("plugins.configs.dap-ui") + end, + }) + + -- Easy align, better than piping out to !column -t + use({ + "junegunn/vim-easy-align", + cmd = { "EasyAlign" }, + }) + + -- Code formatting + use({ + "sbdchd/neoformat", + cmd = "Neoformat", + config = function() + require("plugins.configs.neoformat") + end, + }) + + use({ + "anuvyklack/pretty-fold.nvim", + config = function() + require("pretty-fold").setup({ + fill_char = " ", + }) + require("pretty-fold.preview").setup_keybinding() + end, + }) + + -- Stabalize closing buffers + use({ + "luukvbaal/stabilize.nvim", + config = function() + require("plugins.configs._stabilize") + end, + }) + + -- Git signs + use({ + "lewis6991/gitsigns.nvim", + event = "BufRead", + config = function() + require("gitsigns").setup({}) + end, + }) + + -- Highlight certain comments, TODO, BUG, etc. + use({ + "folke/todo-comments.nvim", + event = "BufEnter", + config = function() + require("todo-comments").setup({}) + end, + }) + + -- Show possible key bindings during typing + use({ + "folke/which-key.nvim", + config = function() + require("which-key").setup() + end, + }) + + -- Create full path if not existing on write + use({ + "jghauser/mkdir.nvim", + cmd = "new", + config = function() + require("mkdir") + end, + }) + + -- Text commenting + use({ + "terrortylor/nvim-comment", + cmd = "CommentToggle", + config = function() + require("nvim_comment").setup() + end, + }) + + -- Move selections with alt+movement key + use({ + "matze/vim-move", + }) + + -- Register support in telescope with persistent save + use({ + "AckslD/nvim-neoclip.lua", + requires = { + { "tami5/sqlite.lua", module = "sqlite" }, + { "nvim-telescope/telescope.nvim" }, + }, + config = function() + require("plugins.configs._neoclip") + end, + }) + + -- Markdown Previewer + use({ + "iamcco/markdown-preview.nvim", + run = "cd app && npm install", + setup = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + }) + + -- Allows manipulation of surrounding characters + use({ + "tpope/vim-surround", + }) + + -- Better Git integration on the command line + use({ + "tpope/vim-fugitive", + }) + + -- Ansible Syntax Highlighting + use({ + "pearofducks/ansible-vim", + }) + + -- Better search display + use({ + "kevinhwang91/nvim-hlslens", + module = "hlslens", + keys = "/", + }) + + -- Lsp Diags on scrollbar + use({ + "petertriho/nvim-scrollbar", + requires = { + "kevinhwang91/nvim-hlslens", + "folke/tokyonight.nvim", + }, + after = "nvim-hlslens", + config = function() + require("plugins.configs.diag-scrollbar") + end, + }) + + -- Better in-line Lsp Diags + -- use({ + -- "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + -- config = function() + -- require("lsp_lines").register_lsp_virtual_lines() + -- end, + -- }) + + -- Discord Rich Presence + use({ + "andweeb/presence.nvim", + config = function() + require("presence"):setup({}) + end, + }) + + -- Note Taking + use({ + "nvim-neorg/neorg", + config = function() + require("plugins.configs._neorg") + end, + requires = { + "nvim-lua/plenary.nvim", + "nvim-neorg/neorg-telescope", + }, + after = "nvim-treesitter", + }) + + -- Edit text region in browser with neovim (:GhostStart) + use({ + "raghur/vim-ghost", + run = function() + vim.cmd([[ + ":GhostInstall" + ]]) + end, + }) + + -- Log Syntax Highlighting + use({ + "MTDL9/vim-log-highlighting", + }) + + -- Completions for /, :, ? + -- use({ + -- "gelguy/wilder.nvim", + -- event = "BufEnter", + -- config = function() + -- require("plugins.configs.wilder") + -- end + -- }) + + -- Lots of small modules pulled into + -- one git repository + use({ + "echasnovski/mini.nvim", + config = function() + -- Underline matching words to word undor cursor + require("mini.cursorword").setup({}) + -- Indent Scope Operations + local indent_scope = require("mini.indentscope") + indent_scope.setup({ + symbol = "â–", + options = { + try_as_border = true, + }, + }) + end, + }) + + -- Smoother Scrolling + use({ + "karb94/neoscroll.nvim", + config = function() + require("neoscroll").setup({ + easing_function = "circular", + }) + end, + }) + + -- Highlight cursorlines based on mode + use({ + "mvllow/modes.nvim", + config = function() + vim.opt.cursorline = true + require("modes").setup({}) + end, + }) + + -- Generate function/class/etc annotations + use({ + "danymat/neogen", + requires = "nvim-treesitter/nvim-treesitter", + config = function() + require("neogen").setup({ + snippet_engine = "luasnip", + }) + end, + }) + + -- Center code, make it visually prettier + use({ + "folke/zen-mode.nvim", + config = function() + require("zen-mode").setup({}) + end, + cmd = "ZenMode", + }) + + -- Leave at end!!! + -- Install and deploy packer plugins + -- automatically + if PACKER_STRAP then + vim.notify("Syncing packer from bootstrap") + + function _G.NotifyRestartNeeded() + local notify_available, _ = require("notify") + local message = "Neovim Restart Required to Finish Installation!" + if notify_available then + vim.notify(message, vim.lsp.log_levels.WARN, { + title = "Packer Strap", + keep = function() + return true + end, + }) + else + vim.notify(message) + end + end + + vim.api.nvim_exec( + [[ + autocmd User PackerCompileDone lua NotifyRestartNeeded() + ]], + false + ) + require("packer").sync() + end + end, + config = { + display = { + open_fn = function() + return require("packer.util").float({ border = "double" }) + end, + }, + compile_path = vim.fn.stdpath("config") .. "/lua/packer_compiled.lua", + }, +}) diff --git a/lua/plugins/postload.lua b/lua/plugins/postload.lua new file mode 100755 index 0000000..ffbd3fb --- /dev/null +++ b/lua/plugins/postload.lua @@ -0,0 +1,3 @@ +-- Anything that needs to be loaded LAST +-- needs to required here +require("plugins.mappings") diff --git a/lua/utils/cmd.lua b/lua/utils/cmd.lua new file mode 100755 index 0000000..70c0784 --- /dev/null +++ b/lua/utils/cmd.lua @@ -0,0 +1,6 @@ +-- Highlight yanked text +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank() + end, +}) diff --git a/lua/utils/funcs.lua b/lua/utils/funcs.lua new file mode 100755 index 0000000..91f4c3b --- /dev/null +++ b/lua/utils/funcs.lua @@ -0,0 +1,126 @@ +local U = {} +U.map = function(mode, lhs, rhs, opts) + local options = { noremap = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +U.close_buffer = function(force) + -- Yanked from NvChad, thanks to them. This saves + -- a lot of pain + + -- This is a modification of a NeoVim plugin from + -- Author: ojroques - Olivier Roques + -- Src: https://github.com/ojroques/nvim-bufdel + + -- Options + local opts = { + next = "cycle", -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted + --TODO make this a chadrc flag/option + } + + -- ---------------- + -- Helper functions + -- ---------------- + + -- Switch to buffer 'buf' on each window from list 'windows' + local function switch_buffer(windows, buf) + local cur_win = vim.fn.winnr() + for _, winid in ipairs(windows) do + vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) + vim.cmd(string.format("buffer %d", buf)) + end + vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window + end + + -- Select the first buffer with a number greater than given buffer + local function get_next_buf(buf) + local next = vim.fn.bufnr("#") + if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then + return next + end + for i = 0, vim.fn.bufnr("$") - 1 do + next = (buf + i) % vim.fn.bufnr("$") + 1 -- will loop back to 1 + if vim.fn.buflisted(next) == 1 then + return next + end + end + end + + -- ---------------- + -- End helper functions + -- ---------------- + + local buf = vim.fn.bufnr() + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + vim.cmd("close") + return + end + + if #vim.fn.getbufinfo({ buflisted = 1 }) < 2 then + if opts.quit then + -- exit when there is only one buffer left + if force then + vim.cmd("qall!") + else + vim.cmd("confirm qall") + end + return + end + + local chad_term, _ = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + if chad_term then + -- Must be a window type + vim.cmd(string.format("setlocal nobl", buf)) + vim.cmd("enew") + return + end + -- don't exit and create a new empty buffer + vim.cmd("enew") + vim.cmd("bp") + end + + local next_buf = get_next_buf(buf) + local windows = vim.fn.getbufinfo(buf)[1].windows + + -- force deletion of terminal buffers to avoid the prompt + if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + -- TODO this scope is error prone, make resilient + if chad_term then + if type == "wind" then + -- hide from bufferline + vim.cmd(string.format("%d bufdo setlocal nobl", buf)) + -- swtich to another buff + -- TODO switch to next bufffer, this works too + vim.cmd("BufferLineCycleNext") + else + local cur_win = vim.fn.winnr() + -- we can close this window + vim.cmd(string.format("%d wincmd c", cur_win)) + return + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("bd! %d", buf)) + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("silent! confirm bd %d", buf)) + end + -- revert buffer switches if user has canceled deletion + if vim.fn.buflisted(buf) == 1 then + switch_buffer(windows, buf) + end +end + +return U diff --git a/lua/utils/init.lua b/lua/utils/init.lua new file mode 100755 index 0000000..d3a8906 --- /dev/null +++ b/lua/utils/init.lua @@ -0,0 +1 @@ +require("utils.cmd") diff --git a/syntax/cf3.vim b/syntax/cf3.vim new file mode 100644 index 0000000..54d0fc0 --- /dev/null +++ b/syntax/cf3.vim @@ -0,0 +1,626 @@ +" vim:foldmethod=marker + +" Vim syntax file +" Language: Cfengine version 3 +" Maintainer: Neil Watson +" Last Change: Jun 02 2018 +" Location: +" +" TODO: +" - would be great to know current promise type +" +" This is my first attempt at a syntax file. Feel free to send me corrections +" or improvements. I'll give you a credit. +" +" USAGE +" There is already a vim file that uses 'cf' as a file extension. You can use +" cf3 for your cf3 file extensions or identify via your vimrc file: +" au BufRead,BufNewFile *.cf set ft=cf3 +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded + +if version < 600 " {{{ + syntax clear +elseif exists ("b:current_syntax") + finish +endif + +syn case ignore + +syn match cf3BundleParams /(\w\+\(,\s*\w\+\)*)/hs=s+1,he=e-1 contained +syn match cf3BundleName /\s\+\w\+\s*/ contained nextgroup=cf3BundleParams + +syn keyword cf3BundleTypes agent common server knowledge monitor edit_line contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BundleTypes edit_xml contained nextgroup=cf3BundleName skipwhite +syn match cf3Bundle /^\s*bundle\s\+/ nextgroup=Cf3BundleTypes skipwhite + +syn keyword cf3BodyTypes action classes contain acl changes contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes copy_from delete depth_search contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes edit_defaults file_select password contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes link_from perms rename tcp_ip contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes package_method process_count package_module contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes process_select service_method contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes mount volume printfile match_value contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes association select_region delete_select contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes insert_select location edit_field replace_with contained nextgroup=cf3BundleName skipwhite +syn keyword cf3BodyTypes common database_server environment_resources contained nextgroup=cf3BundleName skipwhite +syn match cf3Body /^\s*body\s\+/ nextgroup=Cf3BodyTypes skipwhite + +syn match cf3BodyControl /^\s*body\s\+\(common\|agent\|server\)\s\+control/ +syn match cf3BodyControl /^\s*body\s\+\(monitor\|runagent\)\s\+control/ +syn match cf3BodyControl /^\s*body\s\+\(executor\|knowledge\|hub\)\s\+control/ +syn match cf3BodyControl /^\s*body\s\+\(reporter\|file\)\s\+control/ + +syn match cf3Action /\<\(vars\|classes\|reports\|meta\|users\):/ +syn match cf3Action /\<\(commands\|databases\|files\|interfaces\|methods\|packages\|storage\):/ +syn match cf3Action /\<\(access\|measurements\|roles\|topics\|occurrences\|defaults\):/ +syn match cf3Action /\<\(control\|guest_environments\|outputs\|processes\|services\|things\):/ +syn match cf3Action /\<\(delete_lines\|field_edits\|insert_lines\|replace_patterns\):/ + +syn match cf3Class /[^ "\t:#]\+::/ +syn region cf3ClassBlock start=/\[%CFEngine/ end=/%\]/ contains=Cf3Class + +syn keyword TODO todo TODO FIXME TBD NOTE contained +syn match cf3Comment /#.*/ contains=TODO + +syn match cf3Identifier /=>/ + +" Escape sequences in regexes +syn match cf3Esc /\\\\[sSdD+][\+\*]*/ contained +" Array indexes contained in []. Does not seems to be working. +syn region cf3Array start=/\(\\\)\@]/ contains=cf3BuiltIns,cf3Stdlib +syn match cf3Function /\<\w\+[,;()]/ contains=cf3BuiltIns,cf3Stdlib,cf3Evolve_freelib + +syn keyword cf3ControlAttr bundlesequence cache_system_functions goal_categories contained +syn keyword cf3ControlAttr ignore_missing_bundles ignore_missing_inputs inputs contained +syn keyword cf3ControlAttr version lastseenexpireafter output_prefix domain contained +syn keyword cf3ControlAttr require_comments host_licenses_paid site_classes contained +syn keyword cf3ControlAttr syslog_host syslog_port fips_mode protocol_version contained +syn keyword cf3ControlAttr package_module contained +syn keyword cf3MethodAttr usebundle useresult inherit contained +syn keyword cf3CommonAttr action classes if unless ifvarclass handle depends_on comment policy with meta contained +syn keyword cf3ClassesAttr and dist expression not or persistence scope select_class xor contained +syn keyword cf3CommandsAttr args contain module contained +syn keyword cf3ProcessesAttr process_count process_select contained +syn keyword cf3ProcessesAttr process_stop restart_class signals contained +syn keyword cf3PackagesAttr package_architectures package_method package_policy contained +syn keyword cf3PackagesAttr package_select package_version package_module contained +syn keyword cf3GuestEnvAttr environment_host environment_interface contained +syn keyword cf3GuestEnvAttr environment_resources environment_state contained +syn keyword cf3GuestEnvAttr environment_type contained +syn keyword cf3TopicsAttr association synonyms generalizations contained +syn keyword cf3ServicesAttr service_policy service_dependencies service_method contained +syn keyword cf3DatabasesAttr database_server database_type contained +syn keyword cf3DatabasesAttr database_operation database_columns contained +syn keyword cf3DatabasesAttr database_rows registry_exclude contained +syn keyword cf3DefaultsAttr if_match_regex contained +syn keyword cf3StorageAttr mount volume contained +syn keyword cf3FilesAttr acl changes copy_from create delete depth_search contained +syn keyword cf3FilesAttr edit_defaults edit_line edit_template edit_xml file_select contained +syn keyword cf3FilesAttr link_from move_obstructions pathtype perms contained +syn keyword cf3FilesAttr rename repository template_method template_data touch transformer contained +syn keyword cf3AccessAttr admit_ips admit_hostnames admit_keys admit deny deny_ips deny_hostnames deny_keys maproot contained +syn keyword cf3AccessAttr ifencrypted resource_type contained +syn keyword cf3MeasurementsAttr stream_type data_type history_type contained +syn keyword cf3MeasurementsAttr units match_value contained +syn keyword cf3ReportsAttr friend_pattern intermittency lastseen contained +syn keyword cf3ReportsAttr printfile report_to_file showstate contained +syn keyword cf3ReportsAttr bundle_return_value_index contained + +" Bodies +syn keyword cf3EditLineAttr replace_with edit_field whitespace_policy location contained +syn keyword cf3EditLineAttr insert_select insert_type expand_scalars not_matching contained +syn keyword cf3EditLineAttr delete_select select_region contained +syn keyword cf3EditFieldAttr allow_blank_fields extend_fields field_operation contained +syn keyword cf3EditFieldAttr field_separator field_value select_field contained +syn keyword cf3EditFieldAttr start_fields_from_zero value_separator contained +syn keyword cf3ReplaceWithAttr occurrences replace_value contained +syn keyword cf3SelectRegionAttr include_start_delimiter include_end_delimiter contained +syn keyword cf3SelectRegionAttr select_start select_end contained +syn keyword cf3ProcCountAttr in_range_define match_range out_of_range_define contained +syn keyword cf3ProcSelectAttr command pid ppid pgid priority process_owner contained +syn keyword cf3ProcSelectAttr process_result rsize status stime_range ttime_range contained +syn keyword cf3ProcSelectAttr tty threads vsize contained +syn keyword cf3EditDefAttr edit_backup empty_file_before_editing max_file_size recognize_join contained +syn keyword cf3LocationAttr before_after first_last select_line_matching contained +syn keyword cf3BodyFileSelectAttr leaf_name path_name search_mode search_size search_owners contained +syn keyword cf3BodyFileSelectAttr search_groups search_bsdflags ctime mtime atime contained +syn keyword cf3BodyFileSelectAttr exec_regex exec_program file_types issymlinkto file_result contained +syn keyword cf3BodyClassesAttr promise_repaired repair_failed repair_denied contained +syn keyword cf3BodyClassesAttr repair_timeout promise_kept cancel_kept cancel_repaired contained +syn keyword cf3BodyClassesAttr cancel_notkept kept_returncodes repaired_returncodes contained +syn keyword cf3BodyClassesAttr failed_returncodes persist_time scope timer_policy contained +syn keyword cf3BodyLinkFromAttr copy_patterns link_children link_type source contained +syn keyword cf3BodyLinkFromAttr when_linking_children when_no_source contained +syn keyword cf3BodyPermsAttr bsdflags groups mode owners rxdirs contained +syn keyword cf3BodyACLAttr aces acl_directory_inherit acl_method acl_type specify_inherit_aces contained +syn keyword cf3BodyDepthSearchAttr depth exclude_dirs include_basedir include_dirs contained +syn keyword cf3BodyDepthSearchAttr rmdeadlinks traverse_links xdev contained +syn keyword cf3BodyDeleteAttr dirlinks rmdirs contained +syn keyword cf3BodyRenameAttr disable disable_mode disable_suffix newname rotate contained +syn keyword cf3BodyChangesAttr hash report_changes update_hashes report_diffs contained +syn keyword cf3BodyPackageModuleAttr default_options query_installed_ifelapsed contained +syn keyword cf3BodyPackageModuleAttr query_updates_ifelapsed contained +syn keyword cf3BodyPackageMethodAttr package_add_command package_arch_regex contained +syn keyword cf3BodyPackageMethodAttr package_changes package_delete_command contained +syn keyword cf3BodyPackageMethodAttr package_delete_convention package_file_repositories contained +syn keyword cf3BodyPackageMethodAttr package_installed_regex package_list_arch_regex contained +syn keyword cf3BodyPackageMethodAttr package_list_command package_list_name_regex contained +syn keyword cf3BodyPackageMethodAttr package_list_update_command package_list_update_ifelapsed contained +syn keyword cf3BodyPackageMethodAttr package_list_version_regex package_name_convention contained +syn keyword cf3BodyPackageMethodAttr package_name_regex package_noverify_regex contained +syn keyword cf3BodyPackageMethodAttr package_noverify_returncode package_patch_arch_regex contained +syn keyword cf3BodyPackageMethodAttr package_patch_command package_patch_installed_regex contained +syn keyword cf3BodyPackageMethodAttr package_patch_list_command package_patch_name_regex contained +syn keyword cf3BodyPackageMethodAttr package_patch_version_regex package_update_command contained +syn keyword cf3BodyPackageMethodAttr package_verify_command package_version_regex contained +syn keyword cf3BodyPackageMethodAttr package_version_less_command package_version_equal_command contained +syn keyword cf3BodyPackageMethodAttr package_multiline_start contained +syn keyword cf3BodyActionAttr action_policy ifelapsed expireafter log_string contained +syn keyword cf3BodyActionAttr log_level log_kept log_priority log_repaired contained +syn keyword cf3BodyActionAttr log_failed value_kept value_repaired value_notkept contained +syn keyword cf3BodyActionAttr audit background report_level contained +syn keyword cf3BodyActionAttr measurement_class contained +syn keyword cf3BodyContainAttr useshell umask exec_owner exec_group exec_timeout contained +syn keyword cf3BodyContainAttr chdir chroot preview no_output contained +syn keyword cf3BodyCopyFromAttr source servers collapse_destination_dir contained +syn keyword cf3BodyCopyFromAttr compare copy_backup encrypt check_root contained +syn keyword cf3BodyCopyFromAttr copylink_patterns copy_size findertype contained +syn keyword cf3BodyCopyFromAttr linkcopy_patterns link_type force_update contained +syn keyword cf3BodyCopyFromAttr force_ipv4 portnumber preserve protocol_version purge contained +syn keyword cf3BodyCopyFromAttr stealth timeout trustkey type_check verify contained +syn keyword cf3BodyVolumeAttr check_foreign freespace sensible_size contained +syn keyword cf3BodyVolumeAttr sensible_count scan_arrivals contained +syn keyword cf3BodyMountAttr edit_fstab mount_type mount_source contained +syn keyword cf3BodyMountAttr mount_server mount_options unmount contained +syn keyword cf3BodyServiceMethodAttr service_type service_args contained +syn keyword cf3BodyServiceMethodAttr service_autostart_policy service_dependence_chain contained +syn keyword cf3BodyDatabaseServerAttr db_server_owner db_server_password contained +syn keyword cf3BodyDatabaseServerAttr db_server_host db_server_type contained +syn keyword cf3BodyDatabaseServerAttr db_server_connection_db contained +syn keyword cf3BodyEnvResourcesAttr env_cpus env_memory env_disk contained +syn keyword cf3BodyEnvResourcesAttr env_baseline env_spec_file env_spec contained +syn keyword cf3BodyMatchValueAttr select_line_matching select_line_number contained +syn keyword cf3BodyMatchValueAttr extraction_regex track_growing_file contained +syn keyword cf3BodyServiceMethodAttr service_type service_args service_bundle contained +syn keyword cf3BodyServiceMethodAttr service_autostart_policy service_dependence_chain contained +syn keyword cf3BodyEnvInterfaceAttr env_addresses env_name env_network contained +syn keyword cf3BodyServerControlAttr allowallconnects allowconnects allowlegacyconnects contained +syn keyword cf3BodyServerControlAttr allowusers auditing bindtointerface contained +syn keyword cf3BodyServerControlAttr cfruncommand denybadclocks denyconnects contained +syn keyword cf3BodyServerControlAttr dynamicaddresses hostnamekeys keycacheTTL contained +syn keyword cf3BodyServerControlAttr logallconnections logencryptedtransfers contained +syn keyword cf3BodyServerControlAttr maxconnections port serverfacility contained +syn keyword cf3BodyServerControlAttr skipverify trustkeysfrom contained +syn keyword cf3BodyAgentControlAttr abortclasses abortbundleclasses addclasses contained +syn keyword cf3BodyAgentControlAttr agentaccess agentfacility alwaysvalidate contained +syn keyword cf3BodyAgentControlAttr auditing binarypaddingchar bindtointerface contained +syn keyword cf3BodyAgentControlAttr hashupdates childlibpath checksum_alert_time contained +syn keyword cf3BodyAgentControlAttr defaultcopytype dryrun editbinaryfilesize contained +syn keyword cf3BodyAgentControlAttr editfilesize environment exclamation expireafter contained +syn keyword cf3BodyAgentControlAttr files_single_copy files_auto_define hostnamekeys contained +syn keyword cf3BodyAgentControlAttr ifelapsed inform intermittency max_children contained +syn keyword cf3BodyAgentControlAttr maxconnections mountfilesystems nonalphanumfiles contained +syn keyword cf3BodyAgentControlAttr repchar refresh_processes default_repository contained +syn keyword cf3BodyAgentControlAttr secureinput sensiblecount sensiblesize contained +syn keyword cf3BodyAgentControlAttr skipidentify suspiciousnames syslog verbose contained +syn keyword cf3BodyAgentControlAttr track_value timezone default_timeout contained +syn keyword cf3BodyExecutorControlAttr splaytime mailfrom mailsubject mailto smtpserver contained +syn keyword cf3BodyExecutorControlAttr mailmaxlines schedule executorfacility contained +syn keyword cf3BodyExecutorControlAttr exec_command contained +syn keyword cf3BodyEditDefsAttr edit_backup empty_file_before_editing contained +syn keyword cf3BodyEditDefsAttr max_file_size recognize_join inherit contained +syn keyword cf3BodyDeleteSelectAttr delete_if_startwith_from_list contained +syn keyword cf3BodyDeleteSelectAttr delete_if_not_startwith_from_list contained +syn keyword cf3BodyDeleteSelectAttr delete_if_match_from_list contained +syn keyword cf3BodyDeleteSelectAttr delete_if_not_match_from_list contained +syn keyword cf3BodyDeleteSelectAttr delete_if_contains_from_list contained +syn keyword cf3BodyDeleteSelectAttr delete_if_not_contains_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_startwith_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_not_startwith_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_match_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_not_match_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_contains_from_list contained +syn keyword cf3BodyInsertSelectAttr insert_if_not_contains_from_list contained +syn keyword cf3BodyMonitorControlAttr forgetrate monitorfacility histograms contained +syn keyword cf3BodyMonitorControlAttr tcpdump tcpdumpcommand contained +syn keyword cf3BodyPrintfileAttr file_to_print number_of_lines contained + +syn cluster cf3AttrCluster contains=cf3CommonAttr,cf3ClassesAttr,cf3Identifier, +syn cluster cf3AttrCluster add=cf3ProcessesAttr,cf3FilesAttr,cf3ReportsAttr +syn cluster cf3AttrCluster add=cf3PackagesAttr,cf3GuestEnvAttr,cf3TopicsAttr +syn cluster cf3AttrCluster add=cf3StorageAttr,cf3AccessAttr,cf3MeasurementsAttr +syn cluster cf3AttrCluster add=cf3EditLineAttr,cf3EditFieldAttr,cf3ReplaceWithAttr +syn cluster cf3AttrCluster add=cf3SelectRegionAttr,cf3ProcCountAttr,cf3ProcSelectAttr +syn cluster cf3AttrCluster add=cf3EditDefAttr,cf3LocationAttr,cf3CommandsAttr,cf3BodyFileSelectAttr +syn cluster cf3AttrCluster add=cf3ControlAttr,cf3MethodAttr,cf3BodyClassesAttr +syn cluster cf3AttrCluster add=cf3ServicesAttr,cf3DatabasesAttr,cf3DefaultsAttr + +syn cluster cf3AttrCluster add=cf3BodyLinkFromAttr,cf3BodyPermsAttr,cf3BodyACLAttr +syn cluster cf3AttrCluster add=cf3BodyDepthSearchAttr,cf3BodyDeleteAttr,cf3BodyRenameAttr +syn cluster cf3AttrCluster add=cf3BodyChangesAttr,cf3BodyPackageMethodAttr,cf3BodyActionAttr +syn cluster cf3AttrCluster add=cf3BodyPackageModuleAttr +syn cluster cf3AttrCluster add=cf3BodyContainAttr,cf3BodyCopyFromAttr,cf3BodyVolumeAttr +syn cluster cf3AttrCluster add=cf3BodyMountAttr,cf3BodyServiceMethodAttr,cf3BodyDatabaseServerAttr +syn cluster cf3AttrCluster add=cf3BodyEnvResourcesAttr,cf3BodyMatchValueAttr,cf3BodyServiceMethodAttr +syn cluster cf3AttrCluster add=cf3BodyEnvInterfaceAttr,cf3BodyServerControlAttr,cf3BodyEditDefsAttr +syn cluster cf3AttrCluster add=cf3BodyAgentControlAttr,cf3BodyExecutorControlAttr +syn cluster cf3AttrCluster add=cf3BodyDeleteSelectAttr,cf3BodyInsertSelectAttr +syn cluster cf3AttrCluster add=cf3BodyMonitorControlAttr,cf3BodyPrintfileAttr +syn match cf3Attributes /\w\+\s*=>/ contains=@cf3AttrCluster + +" }}} + +if version >= 508 || !exists("did_cfg_syn_inits") " {{{ + if version < 508 + let did_cfg_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + hi cf3Context ctermfg=DarkGreen + hi cf3Arrows ctermfg=DarkCyan + hi cf3Type ctermfg=Magenta + hi Identifier ctermfg=Blue + hi Function ctermfg=DarkGreen + hi Library ctermfg=DarkGrey + hi cf3ClassBlock ctermfg=Yellow + + HiLink cf3Bundle Statement + HiLink cf3BundleTypes Statement + HiLink cf3BundleName Function + HiLink cf3BundleParams Identifier + + HiLink cf3Body Statement + HiLink cf3BodyTypes Statement + HiLink cf3Comment Comment + + HiLink cf3BodyControl Statement + HiLink cf3BodyControlTypes Statement + HiLink cf3BodyControlName Statement + + HiLink cf3Action Underlined + HiLink cf3Class cf3Context + + HiLink cf3String String + HiLink cf3BuiltIns Function + HiLink cf3Evolve_freelib Function + HiLink cf3Stdlib Library + + HiLink cf3Identifier cf3Arrows + HiLink cf3Esc Special + HiLink cf3Array Special + HiLink cf3Var Identifier + + HiLink cf3Type cf3Type + HiLink cf3CommonAttr Statement + HiLink cf3ClassesAttr Statement + HiLink cf3CommandsAttr Statement + HiLink cf3ProcessesAttr Statement + HiLink cf3FilesAttr Statement + HiLink cf3MethodAttr cf3Type + HiLink cf3PackagesAttr Statement + HiLink cf3ControlAttr Statement + HiLink cf3GuestEnvAttr Statement + HiLink cf3TopicsAttr Statement + HiLink cf3ServicesAttr Statement + HiLink cf3DatabasesAttr Statement + HiLink cf3DefaultsAttr Statement + HiLink cf3StorageAttr Statement + HiLink cf3AccessAttr Statement + HiLink cf3MeasurementsAttr Statement + HiLink cf3ReportsAttr Statement + + HiLink cf3EditLineAttr Statement + HiLink cf3EditFieldAttr Statement + HiLink cf3ReplaceWithAttr Statement + HiLink cf3SelectRegionAttr Statement + HiLink cf3ProcCountAttr Statement + HiLink cf3ProcSelectAttr Statement + HiLink cf3EditDefAttr Statement + HiLink cf3LocationAttr Statement + HiLink cf3BodyFileSelectAttr Statement + HiLink cf3BodyClassesAttr Statement + HiLink cf3BodyLinkFromAttr Statement + HiLink cf3BodyPermsAttr Statement + HiLink cf3BodyACLAttr Statement + HiLink cf3BodyDepthSearchAttr Statement + HiLink cf3BodyDeleteAttr Statement + HiLink cf3BodyRenameAttr Statement + HiLink cf3BodyChangesAttr Statement + HiLink cf3BodyPackageMethodAttr Statement + HiLink cf3BodyPackageModuleAttr Statement + HiLink cf3BodyActionAttr Statement + HiLink cf3BodyContainAttr Statement + HiLink cf3BodyCopyFromAttr Statement + HiLink cf3BodyVolumeAttr Statement + HiLink cf3BodyMountAttr Statement + HiLink cf3BodyServiceMethodAttr Statement + HiLink cf3BodyDatabaseServerAttr Statement + HiLink cf3BodyEnvResourcesAttr Statement + HiLink cf3BodyMatchValueAttr Statement + HiLink cf3BodyServiceMethodAttr Statement + HiLink cf3BodyEnvInterfaceAttr Statement + HiLink cf3BodyServerControlAttr Statement + HiLink cf3BodyAgentControlAttr Statement + HiLink cf3BodyExecutorControlAttr Statement + HiLink cf3BodyEditDefsAttr Statement + HiLink cf3BodyInsertSelectAttr Statement + HiLink cf3BodyDeleteSelectAttr Statement + HiLink cf3BodyMonitorControlAttr Statement + HiLink cf3BodyPrintfileAttr Statement + + delcommand HiLink +endif +let b:current_syntax = "cf3" + +" }}} + +" Folding {{{ + +function! CF3Folds() + let line = getline(v:lnum) + + " Don't include blank lines in previous fold {{{ + if line =~? '\v^\s*$' + return '-1' + endif + " }}} + + " Don't include comments in the previous fold {{{ + if line =~? '\v^\s*#.*$' + return '-1' + endif + " }}} + + " Fold bodies/bundles {{{ + let body_types = [ + \"^bundle", + \"^body" + \ ] + for type in body_types + if line =~ type + return ">1" + endif + endfor + " }}} + + " Fold promises {{{ + let promise_types = [ + \"meta:", + \"vars:", + \"defaults:", + \"classes:", + \"users:", + \"files:", + \"packages:", + \"guest_environments:", + \"methods:", + \"processes:", + \"services:", + \"commands:", + \"storage:", + \"databases:", + \"access:", + \"roles:", + \"measurements:", + \"reports:", + \ ] + for promise_type in promise_types + if line =~ promise_type + return ">2" + endif + endfor + " }}} + + " TODO: + " - fold lists + " - include trailing }'s in fdl 1 + + " If nothing matches, keep the previous foldlevel + return '=' + +endfunction + +setlocal foldmethod=expr +setlocal foldexpr=CF3Folds() + +" }}} + +" CREDITS +" Neil Watson +" Aleksey Tsalolikhin +" John Coleman of Yale U +" Matt Lesko +" Ivan Pesin +" Zach Himsel +" +" vim_cf3 files (https://github.com/neilhwatson/vim_cf3) +" Copyright (C) 2011 Neil H. Watson +" +" This program is free software: you can redistribute it and/or modify it under +" the terms of the GNU General Public License as published by the Free Software +" Foundation, either version 3 of the License, or (at your option) any later +" version. +" +" This program is distributed in the hope that it will be useful, but WITHOUT ANY +" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +" PARTICULAR PURPOSE. See the GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License along with +" this program. If not, see .