From 5b0d1e30bc6d27d9343a75a047a0fb6edee5e483 Mon Sep 17 00:00:00 2001 From: Jonathan Hines Date: Tue, 12 Mar 2024 08:29:18 -0400 Subject: [PATCH] Initial load --- nvim/.config/nvim/init.lua | 24 ++ .../nvim/lua/jonchines/core/colorscheme.lua | 7 + .../nvim/lua/jonchines/core/keymaps.lua | 90 +++++ .../nvim/lua/jonchines/core/options.lua | 45 +++ .../nvim/lua/jonchines/plugins-setup.lua | 132 ++++++++ .../lua/jonchines/plugins/ansible-vim.lua | 8 + .../nvim/lua/jonchines/plugins/autopairs.lua | 30 ++ .../nvim/lua/jonchines/plugins/bufferline.lua | 8 + .../nvim/lua/jonchines/plugins/comment.lua | 8 + .../nvim/lua/jonchines/plugins/dadbod.lua | 1 + .../nvim/lua/jonchines/plugins/git.lua | 8 + .../nvim/lua/jonchines/plugins/gitsigns.lua | 8 + .../nvim/lua/jonchines/plugins/harpoon.lua | 20 ++ .../jonchines/plugins/indent-blankline.lua | 11 + .../lua/jonchines/plugins/lsp/lspconfig.lua | 177 ++++++++++ .../lua/jonchines/plugins/lsp/lspsaga.lua | 26 ++ .../nvim/lua/jonchines/plugins/lsp/mason.lua | 45 +++ .../lua/jonchines/plugins/lsp/null-ls.lua | 48 +++ .../nvim/lua/jonchines/plugins/lualine.lua | 37 ++ .../nvim/lua/jonchines/plugins/nvim-cmp.lua | 61 ++++ .../nvim/lua/jonchines/plugins/nvim-tree.lua | 45 +++ .../nvim/lua/jonchines/plugins/surround.lua | 8 + .../nvim/lua/jonchines/plugins/telescope.lua | 27 ++ .../nvim/lua/jonchines/plugins/toggleterm.lua | 38 +++ .../nvim/lua/jonchines/plugins/treesitter.lua | 42 +++ .../nvim/lua/jonchines/plugins/which-key.lua | 3 + nvim/.config/nvim/plugin/packer_compiled.lua | 319 ++++++++++++++++++ 27 files changed, 1276 insertions(+) create mode 100644 nvim/.config/nvim/init.lua create mode 100644 nvim/.config/nvim/lua/jonchines/core/colorscheme.lua create mode 100644 nvim/.config/nvim/lua/jonchines/core/keymaps.lua create mode 100644 nvim/.config/nvim/lua/jonchines/core/options.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins-setup.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/ansible-vim.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/autopairs.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/bufferline.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/comment.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/dadbod.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/git.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/gitsigns.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/harpoon.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/indent-blankline.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/lsp/lspconfig.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/lsp/lspsaga.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/lsp/mason.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/lsp/null-ls.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/lualine.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/nvim-cmp.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/nvim-tree.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/surround.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/telescope.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/toggleterm.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/treesitter.lua create mode 100644 nvim/.config/nvim/lua/jonchines/plugins/which-key.lua create mode 100644 nvim/.config/nvim/plugin/packer_compiled.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..8385278 --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,24 @@ +require("jonchines.plugins-setup") +require("jonchines.core.options") +require("jonchines.core.keymaps") +require("jonchines.core.colorscheme") +require("jonchines.plugins.toggleterm") +require("jonchines.plugins.comment") +require("jonchines.plugins.nvim-tree") +require("jonchines.plugins.lualine") +-- require("jonchines.plugins.bufferline") +require("jonchines.plugins.telescope") +require("jonchines.plugins.nvim-cmp") +require("jonchines.plugins.lsp.mason") +require("jonchines.plugins.lsp.lspsaga") +require("jonchines.plugins.lsp.lspconfig") +require("jonchines.plugins.lsp.null-ls") +require("jonchines.plugins.autopairs") +require("jonchines.plugins.treesitter") +require("jonchines.plugins.gitsigns") +require("jonchines.plugins.harpoon") +-- require("jonchines.plugins.fugitive") +require("jonchines.plugins.git") +require("jonchines.plugins.which-key") +require("jonchines.plugins.surround") +require("jonchines.plugins.ansible-vim") diff --git a/nvim/.config/nvim/lua/jonchines/core/colorscheme.lua b/nvim/.config/nvim/lua/jonchines/core/colorscheme.lua new file mode 100644 index 0000000..c322641 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/core/colorscheme.lua @@ -0,0 +1,7 @@ +-- set colorscheme to nightfly with protected call +-- in case it isn't installed +local status, _ = pcall(vim.cmd, "colorscheme moonfly") +if not status then + print("Colorscheme not found!") -- print error if colorscheme not installed + return +end diff --git a/nvim/.config/nvim/lua/jonchines/core/keymaps.lua b/nvim/.config/nvim/lua/jonchines/core/keymaps.lua new file mode 100644 index 0000000..0f0de84 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/core/keymaps.lua @@ -0,0 +1,90 @@ +-- To be concise +local keymap = vim.keymap +local g = vim.g + +-- set leader key to space +g.mapleader = " " + +--------------------- +-- General Keymaps +--------------------- + +-- use jk to exit insert mode +keymap.set("i", "jk", "") + +-- Move text up and down +keymap.set("i", "", ":m .+1==gi") +keymap.set("i", "", ":m .-2==gi") +keymap.set("n", "", ":m .+1==") +keymap.set("n", "", ":m .-2==") +keymap.set("v", "", ":m '>+1gv=gv") +keymap.set("v", "", ":m '<-2gv=gv") + +-- Set half-page motion to center on screen (zz) or center to top (zt) +keymap.set("n", "", "zz") +keymap.set("n", "", "zz") +-- keymap.set("n", "", "zt") +-- keymap.set("n", "", "zt") + +-- Set recursive search (n/N) to center on the screen (zz) +keymap.set("n", "n", "nzzzv") +keymap.set("n", "N", "Nzzzv") + +-- When pasting move the deleted text into the black hole register +keymap.set("x", "p", '"_dP') +-- Similarly normal and visual mode delete to black hole register +keymap.set("n", "d", '"_d') +keymap.set("v", "d", '"_d') +-- Delete single character to black hole register +keymap.set("n", "x", '"_x') + +-- Yank to system clipboard +vim.keymap.set("n", "y", '"+y') +vim.keymap.set("v", "y", '"+y') +vim.keymap.set("n", "Y", '"+Y') + +-- Replace word at cursor position +-- vim.keymap.set("n", "s", ":%s/\\<\\>//gI") + +-- Set file to executable without leaving nvim +vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) + +-- buffer management +keymap.set("n", "bd", ":newbd#bp") -- delete current buffer leaving split + +-- window management +keymap.set("n", "wv", "v") -- split window vertically +keymap.set("n", "wh", "s") -- split window horizontally +keymap.set("n", "we", "=") -- make split windows equal width & height +keymap.set("n", "wr", "r") -- make split windows rotate +keymap.set("n", "wc", ":close") -- close current split window +keymap.set("n", "wm", ":MaximizerToggle") -- toggle split window maximization USES vim-maximizer + +-- tab management +keymap.set("n", "to", ":tabnew") -- open new tab +keymap.set("n", "tx", ":tabclose") -- close current tab +keymap.set("n", "tn", ":tabn") -- go to next tab +keymap.set("n", "tp", ":tabp") -- go to previous tab + +---------------------- +-- Plugin Keybinds +---------------------- + +-- nvim-tree +keymap.set("n", "e", ":NvimTreeToggle", { silent = true }) -- toggle file explorer + +-- telescope +keymap.set("n", "ff", "Telescope find_files") -- find files within current working directory, respects .gitignore +keymap.set("n", "fs", "Telescope live_grep") -- find string in current working directory as you type +keymap.set("n", "fc", "Telescope grep_string") -- find string under cursor in current working directory +keymap.set("n", "fb", "Telescope buffers") -- list open buffers in current neovim instance +keymap.set("n", "fh", "Telescope help_tags") -- list available help tags + +-- telescope git commands +-- keymap.set("n", "gc", "Telescope git_commits") -- list all git commits (use to checkout) ["gc" for git commits] +-- keymap.set("n", "gfc", "Telescope git_bcommits") -- list git commits for current file/buffer (use to checkout) ["gfc" for git file commits] +-- keymap.set("n", "gb", "Telescope git_branches") -- list git branches (use to checkout) ["gb" for git branch] +-- keymap.set("n", "gs", "Telescope git_status") -- list current changes per file with diff preview ["gs" for git status] + +-- restart lsp server +keymap.set("n", "rs", ":LspRestart") -- mapping to restart lsp if necessary diff --git a/nvim/.config/nvim/lua/jonchines/core/options.lua b/nvim/.config/nvim/lua/jonchines/core/options.lua new file mode 100644 index 0000000..996846d --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/core/options.lua @@ -0,0 +1,45 @@ +local opt = vim.opt -- for conciseness +local indent = 2 + +-- default encoding +opt.fileencoding = "utf-8" + +-- open and maintain multiple buffers +opt.hidden = true + +-- line numbers +opt.relativenumber = true -- show relative line numbers +opt.number = true -- shows absolute line number on cursor line (when relative number is on) + +-- tabs & indentation +opt.tabstop = indent -- spaces for tabs (prettier default) +opt.shiftwidth = indent -- spaces for indent width +opt.expandtab = true -- expand tab to spaces +opt.autoindent = true -- copy indent from current line when starting new one +opt.smartindent = true + +-- line wrapping +opt.wrap = false -- disable line wrapping + +-- search settings +opt.ignorecase = true -- ignore case when searching +opt.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive + +-- cursor position +opt.cursorline = true -- highlight the current cursor line +opt.cursorcolumn = true -- highlight the current cursor column + +-- appearance +opt.termguicolors = true +opt.background = "dark" -- colorschemes that can be light or dark will be made dark +opt.scrolloff = 10 -- don't allow scrolling within 10 lines of top or bottom +opt.sidescrolloff = 10 -- don't allow scrolling within 10 characters of left or right +opt.signcolumn = "yes:1" -- show sign column so that text doesn't shift +opt.colorcolumn = "120" -- place a veritical line at a good place to start a new line + +-- backspace +opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position + +-- split windows +opt.splitright = true -- split vertical window to the right +opt.splitbelow = true -- split horizontal window to the bottom diff --git a/nvim/.config/nvim/lua/jonchines/plugins-setup.lua b/nvim/.config/nvim/lua/jonchines/plugins-setup.lua new file mode 100644 index 0000000..a8b96d9 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins-setup.lua @@ -0,0 +1,132 @@ +-- auto install packer if not installed +local ensure_packer = function() + local fn = vim.fn + local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) + vim.cmd([[packadd packer.nvim]]) + return true + end + return false +end +local packer_bootstrap = ensure_packer() -- true if packer was just installed + +-- autocommand that reloads neovim and installs/updates/removes plugins +-- when file is saved +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins-setup.lua source | PackerSync + augroup end +]]) + +-- import packer safely +local status, packer = pcall(require, "packer") +if not status then + return +end + +-- add list of plugins to install +return packer.startup(function(use) + -- packer can manage itself + use("wbthomason/packer.nvim") + + use("nvim-lua/plenary.nvim") -- lua functions that many plugins use + + -- use("bluz71/vim-nightfly-guicolors") -- preferred colorscheme + use("bluz71/vim-moonfly-colors") -- preferred colorscheme + -- use("fenetikm/falcon") -- preferred colorscheme + + use("akinsho/toggleterm.nvim") + + use("christoomey/vim-tmux-navigator") -- tmux & split window navigation + + use("szw/vim-maximizer") -- maximizes and restores current window + + -- essential plugins + -- use("tpope/vim-surround") -- add, delete, change surroundings (it's awesome) + use({ "kylechui/nvim-surround", tag = "*" }) + -- use("inkarkat/vim-ReplaceWithRegister") -- replace with register contents using motion (gr + motion) + + -- commenting with gc + use("numToStr/Comment.nvim") + + -- file explorer + use("nvim-tree/nvim-tree.lua") + + -- vs-code like icons + use("nvim-tree/nvim-web-devicons") + + -- statusline + use("nvim-lualine/lualine.nvim") + + -- buffer line + use({ "akinsho/bufferline.nvim", tag = "v4.*", requires = "nvim-tree/nvim-web-devicons" }) + + -- fuzzy finding w/ telescope + use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) -- dependency for better sorting performance + use({ "nvim-telescope/telescope.nvim", branch = "0.1.x" }) -- fuzzy finder + + -- buffer management + use("theprimeagen/harpoon") + + -- autocompletion + use("hrsh7th/nvim-cmp") -- completion plugin + use("hrsh7th/cmp-buffer") -- source for text in buffer + use("hrsh7th/cmp-path") -- source for file system paths + + -- snippets + use("L3MON4D3/LuaSnip") -- snippet engine + use("saadparwaiz1/cmp_luasnip") -- for autocompletion + use("rafamadriz/friendly-snippets") -- useful snippets + + -- managing & installing lsp servers, linters & formatters + use("williamboman/mason.nvim") -- in charge of managing lsp servers, linters & formatters + use("williamboman/mason-lspconfig.nvim") -- bridges gap b/w mason & lspconfig + + -- configuring lsp servers + use("neovim/nvim-lspconfig") -- easily configure language servers + use("hrsh7th/cmp-nvim-lsp") -- for autocompletion + use("hrsh7th/cmp-nvim-lua") + use({ "glepnir/lspsaga.nvim", branch = "main" }) -- enhanced lsp uis + use("jose-elias-alvarez/typescript.nvim") -- additional functionality for typescript server (e.g. rename file & update imports) + use("onsails/lspkind.nvim") -- vs-code like icons for autocompletion + + -- formatting & linting + use("jose-elias-alvarez/null-ls.nvim") -- configure formatters & linters + use("jayp0521/mason-null-ls.nvim") -- bridges gap b/w mason & null-ls + use("pearofducks/ansible-vim") -- helps distinguish between Ansible and normal yaml + + -- treesitter configuration + use("nvim-treesitter/nvim-treesitter", { run = ":TSUpdate" }) + use({ + "nvim-treesitter/nvim-treesitter-textobjects", + after = "nvim-treesitter", + requires = "nvim-treesitter/nvim-treesitter", + }) + + -- indention guide lines + use("lukas-reineke/indent-blankline.nvim") + + -- auto closing + use("windwp/nvim-autopairs") -- autoclose parens, brackets, quotes, etc... + use({ "windwp/nvim-ts-autotag", after = "nvim-treesitter" }) -- autoclose tags + + -- git integration + -- use("tpope/vim-fugitive") + -- Switch to using Lua version of Vim-Fugitive + use("dinhhuy258/git.nvim") + use("lewis6991/gitsigns.nvim") -- show line modifications on left hand side + + -- DB integration + use("tpope/vim-dadbod") + use("kristijanhusak/vim-dadbod-ui") + use("kristijanhusak/vim-dadbod-completion") + + -- which-key + use("folke/which-key.nvim") + + if packer_bootstrap then + require("packer").sync() + end +end) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/ansible-vim.lua b/nvim/.config/nvim/lua/jonchines/plugins/ansible-vim.lua new file mode 100644 index 0000000..c7cb9b6 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/ansible-vim.lua @@ -0,0 +1,8 @@ +-- import nvim-surround plugin safely +local setup, ansible_vim = pcall(require, "ansible-vim") +if not setup then + return +end + +-- enable ansible-vim +ansible_vim.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/autopairs.lua b/nvim/.config/nvim/lua/jonchines/plugins/autopairs.lua new file mode 100644 index 0000000..0595e86 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/autopairs.lua @@ -0,0 +1,30 @@ +-- import nvim-autopairs safely +local autopairs_setup, autopairs = pcall(require, "nvim-autopairs") +if not autopairs_setup then + return +end + +-- configure autopairs +autopairs.setup({ + check_ts = true, -- enable treesitter + ts_config = { + lua = { "string" }, -- don't add pairs in lua string treesitter nodes + javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes + java = false, -- don't check treesitter on java + }, +}) + +-- import nvim-autopairs completion functionality safely +local cmp_autopairs_setup, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") +if not cmp_autopairs_setup then + return +end + +-- import nvim-cmp plugin safely (completions plugin) +local cmp_setup, cmp = pcall(require, "cmp") +if not cmp_setup then + return +end + +-- make autopairs and completion work together +cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/bufferline.lua b/nvim/.config/nvim/lua/jonchines/plugins/bufferline.lua new file mode 100644 index 0000000..c4a9d1d --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/bufferline.lua @@ -0,0 +1,8 @@ +-- import bufferline plugin safely +local setup, bufferline = pcall(require, "bufferline") +if not setup then + return +end + +-- enable bufferline +bufferline.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/comment.lua b/nvim/.config/nvim/lua/jonchines/plugins/comment.lua new file mode 100644 index 0000000..35a7640 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/comment.lua @@ -0,0 +1,8 @@ +-- import comment plugin safely +local setup, comment = pcall(require, "Comment") +if not setup then + return +end + +-- enable comment +comment.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/dadbod.lua b/nvim/.config/nvim/lua/jonchines/plugins/dadbod.lua new file mode 100644 index 0000000..80c9070 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/dadbod.lua @@ -0,0 +1 @@ +vim.keymap.set("n", "gs", vim.cmd.Git) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/git.lua b/nvim/.config/nvim/lua/jonchines/plugins/git.lua new file mode 100644 index 0000000..39a8c6b --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/git.lua @@ -0,0 +1,8 @@ +-- import git plugin safely +local setup, git = pcall(require, "git") +if not setup then + return +end + +-- configure/enable gitsigns +git.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/gitsigns.lua b/nvim/.config/nvim/lua/jonchines/plugins/gitsigns.lua new file mode 100644 index 0000000..a2869c6 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/gitsigns.lua @@ -0,0 +1,8 @@ +-- import gitsigns plugin safely +local setup, gitsigns = pcall(require, "gitsigns") +if not setup then + return +end + +-- configure/enable gitsigns +gitsigns.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/harpoon.lua b/nvim/.config/nvim/lua/jonchines/plugins/harpoon.lua new file mode 100644 index 0000000..b66dcb1 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/harpoon.lua @@ -0,0 +1,20 @@ +local keymap = vim.keymap + +local mark = require("harpoon.mark") +local ui = require("harpoon.ui") + +keymap.set("n", "a", mark.add_file) +keymap.set("n", "", ui.toggle_quick_menu) + +-- keymap.set("n", "", function() +-- ui.nav_file(1) +-- end) +-- keymap.set("n", "", function() +-- ui.nav_file(2) +-- end) +-- keymap.set("n", "", function() +-- ui.nav_file(3) +-- end) +-- keymap.set("n", "", function() +-- ui.nav_file(4) +-- end) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/indent-blankline.lua b/nvim/.config/nvim/lua/jonchines/plugins/indent-blankline.lua new file mode 100644 index 0000000..7a3ec88 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/indent-blankline.lua @@ -0,0 +1,11 @@ +-- import indent-blankline plugin safely +local setup, indent_blankline = pcall(require, "indent_blankline") +if not setup then + return +end + +-- enable indent-blankline +indent_blankline.setup({ + show_current_context = true, + show_current_context_start = true, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspconfig.lua b/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspconfig.lua new file mode 100644 index 0000000..b73afdb --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspconfig.lua @@ -0,0 +1,177 @@ +-- import lspconfig plugin safely +local lspconfig_status, lspconfig = pcall(require, "lspconfig") +if not lspconfig_status then + return +end + +-- import cmp-nvim-lsp plugin safely +local cmp_nvim_lsp_status, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") +if not cmp_nvim_lsp_status then + return +end + +-- import typescript plugin safely +local typescript_setup, typescript = pcall(require, "typescript") +if not typescript_setup then + return +end + +local keymap = vim.keymap -- for conciseness + +-- enable keybinds only for when lsp server available +local on_attach = function(client, bufnr) + -- keybind options + local opts = { noremap = true, silent = true, buffer = bufnr } + + -- set keybinds + keymap.set("n", "gf", "Lspsaga lsp_finder", opts) -- show definition, references + keymap.set("n", "gD", "lua vim.lsp.buf.declaration()", opts) -- got to declaration + keymap.set("n", "gd", "Lspsaga peek_definition", opts) -- see definition and make edits in window + keymap.set("n", "gi", "lua vim.lsp.buf.implementation()", opts) -- go to implementation + keymap.set("n", "ca", "Lspsaga code_action", opts) -- see available code actions + keymap.set("n", "rn", "Lspsaga rename", opts) -- smart rename + keymap.set("n", "D", "Lspsaga show_line_diagnostics", opts) -- show diagnostics for line + keymap.set("n", "d", "Lspsaga show_cursor_diagnostics", opts) -- show diagnostics for cursor + keymap.set("n", "[d", "Lspsaga diagnostic_jump_prev", opts) -- jump to previous diagnostic in buffer + keymap.set("n", "]d", "Lspsaga diagnostic_jump_next", opts) -- jump to next diagnostic in buffer + keymap.set("n", "K", "Lspsaga hover_doc", opts) -- show documentation for what is under cursor + keymap.set("n", "o", "LSoutlineToggle", opts) -- see outline on right hand side + + -- typescript specific keymaps (e.g. rename file and update imports) + if client.name == "tsserver" then + keymap.set("n", "rf", ":TypescriptRenameFile") -- rename file and update imports + keymap.set("n", "oi", ":TypescriptOrganizeImports") -- organize imports (not in youtube nvim video) + keymap.set("n", "ru", ":TypescriptRemoveUnused") -- remove unused variables (not in youtube nvim video) + end +end + +-- used to enable autocompletion (assign to every lsp server config) +local capabilities = cmp_nvim_lsp.default_capabilities() + +-- Change the Diagnostic symbols in the sign column (gutter) +local signs = { Error = " ", Warn = " ", Hint = "ﴞ ", Info = " " } +for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) +end + +-- configure html server +lspconfig["html"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure typescript server with plugin +typescript.setup({ + server = { + capabilities = capabilities, + on_attach = on_attach, + }, +}) + +-- configure css server +lspconfig["eslint"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure css server +lspconfig["cssls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure tailwindcss server +lspconfig["tailwindcss"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure emmet language server +lspconfig["emmet_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, +}) + +-- configure lua server (with special settings) +lspconfig["lua_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { -- custom settings for lua + Lua = { + -- make the language server recognize "vim" global + diagnostics = { + globals = { "vim" }, + }, + workspace = { + -- make language server aware of runtime files + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, +}) + +-- configure terraformls server +lspconfig["terraformls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + -- filetypes = { "terraform" }, +}) + +-- configure tflint server +lspconfig["tflint"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure ansiblels server +lspconfig["ansiblels"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure bashls server +lspconfig["bashls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure dockerls server +lspconfig["dockerls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure json-lsp server +lspconfig["jsonls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure sqlls server +lspconfig["sqlls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure vimls server +lspconfig["vimls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure yamlls server +lspconfig["yamlls"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + +-- configure lemminx server +lspconfig["lemminx"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspsaga.lua b/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspsaga.lua new file mode 100644 index 0000000..7cebffb --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/lsp/lspsaga.lua @@ -0,0 +1,26 @@ +-- import lspsaga safely +local saga_status, saga = pcall(require, "lspsaga") +if not saga_status then + return +end + +saga.setup({ + -- -- keybinds for navigation in lspsaga window + -- scroll_preview = { scroll_down = "", scroll_up = "" }, + -- -- use enter to open file with definition preview + -- definition = { + -- edit = "", + -- }, + -- ui = { + -- colors = { + -- normal_bg = "#022746", + -- }, + -- lightbulb = { + -- enable = true, + -- sign = true, + -- virtual_text = true, + -- debounce = "10", + -- sign_priority = "40", + -- }, + -- }, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/lsp/mason.lua b/nvim/.config/nvim/lua/jonchines/plugins/lsp/mason.lua new file mode 100644 index 0000000..06ec403 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/lsp/mason.lua @@ -0,0 +1,45 @@ +-- import mason plugin safely +local mason_status, mason = pcall(require, "mason") +if not mason_status then + return +end + +-- import mason-lspconfig plugin safely +local mason_lspconfig_status, mason_lspconfig = pcall(require, "mason-lspconfig") +if not mason_lspconfig_status then + return +end + +-- import mason-null-ls plugin safely +local mason_null_ls_status, mason_null_ls = pcall(require, "mason-null-ls") +if not mason_null_ls_status then + return +end + +-- enable mason +mason.setup() + +mason_lspconfig.setup({ + -- list of servers for mason to install + ensure_installed = { + "tsserver", + "html", + "cssls", + "tailwindcss", + "lua_ls", + "emmet_ls", + }, + -- auto-install configured servers (with lspconfig) + automatic_installation = true, -- not the same as ensure_installed +}) + +mason_null_ls.setup({ + -- list of formatters & linters for mason to install + ensure_installed = { + "prettier", -- ts/js formatter + "stylua", -- lua formatter + "eslint_d", -- ts/js linter + }, + -- auto-install configured formatters & linters (with null-ls) + automatic_installation = true, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/lsp/null-ls.lua b/nvim/.config/nvim/lua/jonchines/plugins/lsp/null-ls.lua new file mode 100644 index 0000000..6f900b1 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/lsp/null-ls.lua @@ -0,0 +1,48 @@ +-- import null-ls plugin safely +local setup, null_ls = pcall(require, "null-ls") +if not setup then + return +end + +-- for conciseness +local formatting = null_ls.builtins.formatting -- to setup formatters +local diagnostics = null_ls.builtins.diagnostics -- to setup linters + +-- to setup format on save +local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + +-- configure null_ls +null_ls.setup({ + -- setup formatters & linters + sources = { + -- to disable file types use + -- "formatting.prettier.with({disabled_filetypes: {}})" (see null-ls docs) + formatting.prettier, -- js/ts formatter + formatting.stylua, -- lua formatter + diagnostics.eslint_d.with({ -- js/ts linter + -- only enable eslint if root has .eslintrc.js (not in youtube nvim video) + condition = function(utils) + return utils.root_has_file(".eslintrc.js") -- change file extension if you use something else + end, + }), + }, + -- configure format on save + on_attach = function(current_client, bufnr) + if current_client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ + filter = function(client) + -- only use null-ls for formatting instead of lsp server + return client.name == "null-ls" + end, + bufnr = bufnr, + }) + end, + }) + end + end, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/lualine.lua b/nvim/.config/nvim/lua/jonchines/plugins/lualine.lua new file mode 100644 index 0000000..58a94d7 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/lualine.lua @@ -0,0 +1,37 @@ +-- import lualine plugin safely +local status, lualine = pcall(require, "lualine") +if not status then + return +end + +-- get lualine nightfly theme +local lualine_nightfly = require("lualine.themes.nightfly") + +-- new colors for theme +local new_colors = { + blue = "#65D1FF", + green = "#3EFFDC", + violet = "#FF61EF", + yellow = "#FFDA7B", + black = "#000000", +} + +-- change nightlfy theme colors +lualine_nightfly.normal.a.bg = new_colors.blue +lualine_nightfly.insert.a.bg = new_colors.green +lualine_nightfly.visual.a.bg = new_colors.violet +lualine_nightfly.command = { + a = { + gui = "bold", + bg = new_colors.yellow, + fg = new_colors.black, -- black + }, +} + +-- configure lualine with modified theme +lualine.setup({ + options = { + disabled_filetypes = { "packer", "NvimTree" }, + theme = lualine_nightfly, + }, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/nvim-cmp.lua b/nvim/.config/nvim/lua/jonchines/plugins/nvim-cmp.lua new file mode 100644 index 0000000..6e9f1fa --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/nvim-cmp.lua @@ -0,0 +1,61 @@ +-- import nvim-cmp plugin safely +local cmp_status, cmp = pcall(require, "cmp") +if not cmp_status then + return +end + +-- import luasnip plugin safely +local luasnip_status, luasnip = pcall(require, "luasnip") +if not luasnip_status then + return +end + +-- import lspkind plugin safely +local lspkind_status, lspkind = pcall(require, "lspkind") +if not lspkind_status then + return +end + +-- load vs-code like snippets from plugins (e.g. friendly-snippets) +require("luasnip/loaders/from_vscode").lazy_load() + +vim.opt.completeopt = "menu,menuone,noselect" + +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), -- show completion suggestions + [""] = cmp.mapping.abort(), -- close completion window + [""] = cmp.mapping.confirm({ select = false }), + }), + -- sources for autocompletion + sources = cmp.config.sources({ + { name = "nvim_lsp" }, -- lsp + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within current buffer + { name = "path" }, -- file system paths + { name = "vim-dadbod-completion" }, -- DB tables and columns + }), + -- configure lspkind for vs-code like icons + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + mode = "symbol_text", + menu = { + nvim_lsp = "[LSP]", + luasnip = "[snip]", + path = "[path]", + buffer = "[Buffer]", + }, + }), + }, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/nvim-tree.lua b/nvim/.config/nvim/lua/jonchines/plugins/nvim-tree.lua new file mode 100644 index 0000000..55e6466 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/nvim-tree.lua @@ -0,0 +1,45 @@ +-- import nvim-tree plugin safely +local setup, nvimtree = pcall(require, "nvim-tree") +if not setup then + return +end + +-- recommended settings from nvim-tree documentation +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- change color for arrows in tree to light blue +vim.cmd([[ highlight NvimTreeIndentMarker guifg=#3FC5FF ]]) + +-- configure nvim-tree +nvimtree.setup({ + -- change folder arrow icons + renderer = { + icons = { + glyphs = { + folder = { + arrow_closed = "", -- arrow when folder is closed + arrow_open = "", -- arrow when folder is open + }, + }, + }, + }, + -- disable window_picker for + -- explorer to work well with + -- window splits + actions = { + open_file = { + window_picker = { + enable = true, + chars = "ABCDEF", + }, + }, + }, + filters = { + dotfiles = false, + custom = { "node_modules" }, + }, + -- git = { + -- ignore = false, + -- }, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/surround.lua b/nvim/.config/nvim/lua/jonchines/plugins/surround.lua new file mode 100644 index 0000000..888a586 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/surround.lua @@ -0,0 +1,8 @@ +-- import nvim-surround plugin safely +local setup, nvim_surround = pcall(require, "nvim-surround") +if not setup then + return +end + +-- enable nvim-surround +nvim_surround.setup() diff --git a/nvim/.config/nvim/lua/jonchines/plugins/telescope.lua b/nvim/.config/nvim/lua/jonchines/plugins/telescope.lua new file mode 100644 index 0000000..9c6e725 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/telescope.lua @@ -0,0 +1,27 @@ +-- import telescope plugin safely +local telescope_setup, telescope = pcall(require, "telescope") +if not telescope_setup then + return +end + +-- import telescope actions safely +local actions_setup, actions = pcall(require, "telescope.actions") +if not actions_setup then + return +end + +-- configure telescope +telescope.setup({ + -- configure custom mappings + defaults = { + mappings = { + i = { + [""] = actions.move_selection_previous, -- move to prev result + [""] = actions.move_selection_next, -- move to next result + [""] = actions.send_selected_to_qflist + actions.open_qflist, -- send selected to quickfixlist + }, + }, + }, +}) + +telescope.load_extension("fzf") diff --git a/nvim/.config/nvim/lua/jonchines/plugins/toggleterm.lua b/nvim/.config/nvim/lua/jonchines/plugins/toggleterm.lua new file mode 100644 index 0000000..0184cb2 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/toggleterm.lua @@ -0,0 +1,38 @@ +-- import toggleterm plugin safely +local setup, toggleterm = pcall(require, "toggleterm") +if not setup then + return +end + +-- configure/enable toggleterm +toggleterm.setup({ + size = 15, + open_mapping = [[]], + hide_numbers = true, -- hide the number column in toggleterm buffer_start + shade_filetypes = {}, + shade_terminals = true, + shading_factor = 2, -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light + start_in_insert = true, + insert_mappings = true, -- whether or not the open mapping applies in insert mode + persist_size = false, + -- direction = 'vertical' | 'horizontal' | 'window' | 'float', + direction = "float", + close_on_exit = true, -- close the terminal window when the process exits + shell = vim.o.shell, -- change the default shell + -- This field is only relevant if direction is set to 'float' + float_opts = { + -- The border key is *almost* the same as 'nvim_win_open' + -- see :h nvim_win_open for details on borders however + -- the 'curved' border is a custom border type + -- not natively supported but implemented in this plugin. + -- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open + border = "curved", + -- width = , + -- height = , + winblend = 0, + highlights = { + border = "Normal", + background = "Normal", + }, + }, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/treesitter.lua b/nvim/.config/nvim/lua/jonchines/plugins/treesitter.lua new file mode 100644 index 0000000..c960083 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/treesitter.lua @@ -0,0 +1,42 @@ +-- import nvim-treesitter plugin safely +local status, treesitter = pcall(require, "nvim-treesitter.configs") +if not status then + return +end + +-- configure treesitter +treesitter.setup({ + -- enable syntax highlighting + highlight = { + enable = true, + }, + -- enable indentation + indent = { enable = true }, + -- enable autotagging (w/ nvim-ts-autotag plugin) + autotag = { enable = true }, + -- ensure these language parsers are installed + ensure_installed = { + "json", + "javascript", + "jq", + "typescript", + "tsx", + "yaml", + "html", + "css", + "markdown", + "markdown_inline", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "terraform", + "hcl", + "comment", + "python", + "sql", + }, + -- auto install above language parsers + auto_install = true, +}) diff --git a/nvim/.config/nvim/lua/jonchines/plugins/which-key.lua b/nvim/.config/nvim/lua/jonchines/plugins/which-key.lua new file mode 100644 index 0000000..bdab764 --- /dev/null +++ b/nvim/.config/nvim/lua/jonchines/plugins/which-key.lua @@ -0,0 +1,3 @@ +vim.o.timeout = true +vim.o.timeoutlen = 300 +require("which-key").setup() diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..483c3fb --- /dev/null +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,319 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/jhines/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?.lua;/home/jhines/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?/init.lua;/home/jhines/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?.lua;/home/jhines/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/jhines/.cache/nvim/packer_hererocks/2.1.1692716794/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["Comment.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/Comment.nvim", + url = "https://github.com/numToStr/Comment.nvim" + }, + LuaSnip = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["ansible-vim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/ansible-vim", + url = "https://github.com/pearofducks/ansible-vim" + }, + ["bufferline.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + url = "https://github.com/akinsho/bufferline.nvim" + }, + ["cmp-buffer"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-nvim-lua"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, + ["cmp-path"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["friendly-snippets"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/friendly-snippets", + url = "https://github.com/rafamadriz/friendly-snippets" + }, + ["git.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/git.nvim", + url = "https://github.com/dinhhuy258/git.nvim" + }, + ["gitsigns.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", + url = "https://github.com/lewis6991/gitsigns.nvim" + }, + harpoon = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/harpoon", + url = "https://github.com/theprimeagen/harpoon" + }, + ["indent-blankline.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" + }, + ["lspkind.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/lspkind.nvim", + url = "https://github.com/onsails/lspkind.nvim" + }, + ["lspsaga.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", + url = "https://github.com/glepnir/lspsaga.nvim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["mason-lspconfig.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" + }, + ["mason-null-ls.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/mason-null-ls.nvim", + url = "https://github.com/jayp0521/mason-null-ls.nvim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["null-ls.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/null-ls.nvim", + url = "https://github.com/jose-elias-alvarez/null-ls.nvim" + }, + ["nvim-autopairs"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + url = "https://github.com/windwp/nvim-autopairs" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-surround"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-surround", + url = "https://github.com/kylechui/nvim-surround" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-treesitter-textobjects"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/jhines/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects", + url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" + }, + ["nvim-ts-autotag"] = { + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/jhines/.local/share/nvim/site/pack/packer/opt/nvim-ts-autotag", + url = "https://github.com/windwp/nvim-ts-autotag" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/nvim-tree/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["telescope-fzf-native.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["toggleterm.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", + url = "https://github.com/akinsho/toggleterm.nvim" + }, + ["typescript.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/typescript.nvim", + url = "https://github.com/jose-elias-alvarez/typescript.nvim" + }, + ["vim-dadbod"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-dadbod", + url = "https://github.com/tpope/vim-dadbod" + }, + ["vim-dadbod-completion"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-dadbod-completion", + url = "https://github.com/kristijanhusak/vim-dadbod-completion" + }, + ["vim-dadbod-ui"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-dadbod-ui", + url = "https://github.com/kristijanhusak/vim-dadbod-ui" + }, + ["vim-maximizer"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-maximizer", + url = "https://github.com/szw/vim-maximizer" + }, + ["vim-moonfly-colors"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-moonfly-colors", + url = "https://github.com/bluz71/vim-moonfly-colors" + }, + ["vim-tmux-navigator"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator", + url = "https://github.com/christoomey/vim-tmux-navigator" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/jhines/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + } +} + +time([[Defining packer_plugins]], false) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd nvim-treesitter ]] +vim.cmd [[ packadd nvim-treesitter-textobjects ]] +vim.cmd [[ packadd nvim-ts-autotag ]] +time([[Sequenced loading]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end