diff --git a/.config/nvim/after/plugin/conform.lua b/.config/nvim/after/plugin/conform.lua index 23d8938f..cfe822a3 100644 --- a/.config/nvim/after/plugin/conform.lua +++ b/.config/nvim/after/plugin/conform.lua @@ -22,6 +22,7 @@ require("conform").setup({ format_on_save = { -- These options will be passed to conform.format() timeout_ms = 500, + async = false, lsp_format = "fallback", }, }) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 5491cddd..756ee446 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -1,10 +1,10 @@ local lsp = require("lsp-zero") local lspconfig = require("lspconfig") local cmp = require("cmp") -lsp.preset("recommended") require("mason").setup() -lsp.ensure_installed({ +-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md +local servers = { "bashls", "biome", "clangd", @@ -12,14 +12,24 @@ lsp.ensure_installed({ "dockerls", "emmet_ls", "eslint", - "html", + "gopls", + "jqls", "lua_ls", + "pyright", "quick_lint_js", "rust_analyzer", + "stylelint_lsp", "svelte", "ts_ls", - "volar", "zls", +} + +for _, server in ipairs(servers) do + lspconfig[server].setup({}) +end + +require("mason-lspconfig").setup({ + ensure_installed = servers, }) cmp.setup({ @@ -27,16 +37,22 @@ cmp.setup({ completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), }, -}) - -lsp.set_preferences({ - suggest_lsp_servers = false, - sign_icons = { - error = "E", - warn = "W", - hint = "H", - info = "I", - }, + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + { name = "vsnip" }, + }), + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), }) -- function that is used with keybinding cm to toggle autocompletion @@ -76,42 +92,34 @@ vim.diagnostic.config({ vim.keymap.set("n", "e", "lua vim.diagnostic.open_float()") -- LSP Specific Settings --- Volar TypeScript Config (turn off for Vue with Vanilla JS) -require("mason-lspconfig").setup_handlers({ - function(server_name) - local server_config = {} - if server_name == "volar" then - server_config.filetypes = { "vue", "ts_ls", "javascript" } - lspconfig.volar.setup({ - settings = { - ["volar.takeOverMode.enabled"] = true, - }, - }) - end - lspconfig.rust_analyzer.setup({ - settings = { - ["rust-analyzer"] = { - procMacro = { - ignored = { - leptos_macro = { - "server", - }, - }, - }, - rustfmt = { - overrideCommand = { - "leptosfmt", - "--stdin", - "--rustfmt", - }, - edition = { "2021" }, - }, - cargo = { - allFeatures = true, - }, - }, +-- require("mason-lspconfig").setup_handlers({} + +-- Vue TypeScript Setup +-- https://lsp-zero.netlify.app/blog/configure-volar-v2.html +-- NOTE: Don't install volar through Mason, this is done manually: +-- npm install -g @vue/language-server +-- npm install -g @vue/typescript-plugin +local vue_typescript_plugin = "/usr/lib/node_modules" + .. "/usr/lib/node_modules/@vue/language-server" + .. "/usr/lib/node_modules/@vue/typescript-plugin" + +lspconfig.ts_ls.setup({ + init_options = { + plugins = { + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "javascript", "typescript", "vue" }, }, - }) - lspconfig[server_name].setup(server_config) - end, + }, + }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + }, }) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 9b5edf17..ba15ffbd 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,5 +1,2 @@ require("neovim") -require("impatient") --- require("config.dap.javascript") --- very recent error: https://github.com/rcarriga/nvim-dap-ui/issues/233 --- require("dapui").setup() +vim.loader.enable() diff --git a/.config/nvim/lua/neovim/pacq.lua b/.config/nvim/lua/neovim/pacq.lua new file mode 100644 index 00000000..e2ea8c20 --- /dev/null +++ b/.config/nvim/lua/neovim/pacq.lua @@ -0,0 +1,89 @@ +-- https://github.com/savq/paq-nvim +require("paq")({ + { "savq/paq-nvim" }, -- Let Paq manage itself + + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + { "nvim-treesitter/playground" }, + { + "shaunsingh/nord.nvim", + config = function() + vim.cmd("colorscheme nord") + end, + }, + { "preservim/nerdcommenter" }, + { "nvim-lualine/lualine.nvim" }, + { "kyazdani42/nvim-web-devicons", opt = true }, + { "kyazdani42/nvim-web-devicons" }, + { "kyazdani42/nvim-tree.lua" }, + { "psliwka/vim-smoothie" }, + { "mg979/vim-visual-multi" }, + { "lukas-reineke/indent-blankline.nvim" }, + { "airblade/vim-gitgutter" }, + { "f-person/git-blame.nvim" }, + { "kkoomen/vim-doge", build = ":call doge#install()" }, + { "norcalli/nvim-colorizer.lua" }, + { "windwp/nvim-autopairs" }, + { "simeji/winresizer" }, + { "stevearc/conform.nvim" }, + { "rhysd/vim-clang-format" }, + { "sangdol/mintabline.vim" }, + { "nvim-lua/plenary.nvim" }, + { "ThePrimeagen/harpoon" }, + { + "nvim-telescope/telescope.nvim", + tag = "0.1.0", + }, + { "tpope/vim-fugitive" }, + { "tpope/vim-surround" }, + { "lambdalisue/suda.vim" }, + { + "iamcco/markdown-preview.nvim", + build = function() + vim.fn["mkdp#util#install"]() + end, + }, + { "junegunn/fzf.vim" }, + { "junegunn/gv.vim" }, + { "kien/ctrlp.vim" }, + { "rinx/nvim-ripgrep" }, + { "mbbill/undotree" }, + { "williamboman/mason.nvim" }, + { "williamboman/mason-lspconfig.nvim" }, + { "neovim/nvim-lspconfig" }, + + -- Autocompletion/Snippets + { "hrsh7th/nvim-cmp" }, + { "hrsh7th/cmp-buffer" }, + { "hrsh7th/cmp-path" }, + { "hrsh7th/cmp-nvim-lsp" }, + { "hrsh7th/cmp-nvim-lua" }, + { "saadparwaiz1/cmp_luasnip" }, + { "hrsh7th/cmp-vsnip" }, + + { "VonHeikemen/lsp-zero.nvim" }, + -- codeium AI + { "Exafunction/codeium.vim" }, + -- golang + { "ray-x/go.nvim" }, + { "ray-x/guihua.lua" }, + -- rustlang + { "rust-lang/rust.vim" }, + { "saecki/crates.nvim" }, + -- code snippet screenshots + -- capture code snippets using :Silicon, + -- in Visual mode highlight then enter command + { + "michaelrommel/nvim-silicon", + config = function() + require("silicon").setup({ + command = "silicon", + font = "mononoki NF=34", + theme = "Nord", + no_round_corner = true, + no_line_number = true, + no_window_controls = true, + background = "#20201e", + }) + end, + }, +}) diff --git a/.config/nvim/lua/neovim/remap.lua b/.config/nvim/lua/neovim/remap.lua index 67b1a9ca..1962e40d 100644 --- a/.config/nvim/lua/neovim/remap.lua +++ b/.config/nvim/lua/neovim/remap.lua @@ -51,7 +51,7 @@ vim.keymap.set("n", "", ":wincmd l", {}) vim.keymap.set("n", "nv", ":vnew", { silent = true }) -- shift + p invokes PackerSync -vim.keymap.set("n", "", ":PackerSync", {}) +vim.keymap.set("n", "", ":PaqSync", {}) -- control + t enable transparency vim.keymap.set("n", "t", ":lua ColorMyPencils()", {}) @@ -141,13 +141,13 @@ vim.keymap.set("n", "gD", function() end, bufopts) -- dap Keybindings -vim.keymap.set("n", "dbp", ":lua require'dap'.toggle_breakpoint()") -vim.keymap.set("n", "dco", ":lua require'dap'.continue()") -vim.keymap.set("n", "dov", ":lua require'dap'.step_over()") -vim.keymap.set("n", "dso", ":lua require'dap'.step_out()") -vim.keymap.set("n", "dsi", ":lua require'dap'.step_into()") -vim.keymap.set("n", "dcl", ":lua require'dap'.close()") -vim.keymap.set("n", "dui", ":lua require('dapui').toggle()") +-- vim.keymap.set("n", "dbp", ":lua require'dap'.toggle_breakpoint()") +-- vim.keymap.set("n", "dco", ":lua require'dap'.continue()") +-- vim.keymap.set("n", "dov", ":lua require'dap'.step_over()") +-- vim.keymap.set("n", "dso", ":lua require'dap'.step_out()") +-- vim.keymap.set("n", "dsi", ":lua require'dap'.step_into()") +-- vim.keymap.set("n", "dcl", ":lua require'dap'.close()") +-- vim.keymap.set("n", "dui", ":lua require('dapui').toggle()") -- -- codeium remappings vim.keymap.set("i", "", function() diff --git a/.config/nvim/lua/neovim/set.lua b/.config/nvim/lua/neovim/set.lua index f2243020..39857599 100644 --- a/.config/nvim/lua/neovim/set.lua +++ b/.config/nvim/lua/neovim/set.lua @@ -146,5 +146,5 @@ augroup END -- codeium disable default keybindings vim.g.codeium_disable_bindings = 1 --- codeium disable by default +-- codeium enable(1)/disable(0) by default vim.g.codeium_enabled = 0 diff --git a/.config/nvim_pack_old/after/plugin/autopairs.lua b/.config/nvim_pack_old/after/plugin/autopairs.lua new file mode 100644 index 00000000..27d0f7f2 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/autopairs.lua @@ -0,0 +1,3 @@ +require("nvim-autopairs").setup({ + ignored_next_char = "[%w%\"]" +}) diff --git a/.config/nvim_pack_old/after/plugin/colorizer.lua b/.config/nvim_pack_old/after/plugin/colorizer.lua new file mode 100644 index 00000000..2720b604 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/colorizer.lua @@ -0,0 +1,6 @@ +require'colorizer'.setup({ + '*'; + css = { css = true; }; + html = { css = true; }; + javascript = { css = true; }; +}) diff --git a/.config/nvim_pack_old/after/plugin/colors.lua b/.config/nvim_pack_old/after/plugin/colors.lua new file mode 100644 index 00000000..e5b7e0ce --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/colors.lua @@ -0,0 +1,21 @@ +function ColorMyPencils(color) + color = color or "nord" + vim.cmd.colorscheme(color) + + -- vim.api.nvim_set_hl(0, "@attribute", { fg = "#B48EAD", italic = true }) -- For Tree-sitter + -- vim.api.nvim_set_hl(0, "@decorator", { fg = "#B48EAD", italic = true }) -- Some setups may use this + + vim.api.nvim_set_hl(0, "TabLine", { bg = "none", fg = "#81A1C1" }) -- Inactive tabs + vim.api.nvim_set_hl(0, "TabLineSel", { bg = "none", fg = "#D8DEE9" }) -- Active tab + vim.api.nvim_set_hl(0, "TabLineFill", { bg = "none" }) -- Background area behind tabs + + -- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextError", { fg = "#BF616A", bg = "none" }) -- Nord red + -- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextWarn", { fg = "#EBCB8B", bg = "none" }) -- Nord yellow + -- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextInfo", { fg = "#B48EAD", bg = "none" }) -- Nord purple + -- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextHint", { fg = "#81A1C1", bg = "none" }) -- Nord blue + + vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +end + +ColorMyPencils() diff --git a/.config/nvim_pack_old/after/plugin/conform.lua b/.config/nvim_pack_old/after/plugin/conform.lua new file mode 100644 index 00000000..23d8938f --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/conform.lua @@ -0,0 +1,27 @@ +require("conform").setup({ + formatters_by_ft = { + python = { "isort", "black" }, + lua = { "stylua" }, + css = { "prettierd" }, + javascript = { "prettierd", "prettier", stop_after_first = true }, + typescript = { "prettierd", "prettier", stop_after_first = true }, + javascriptreact = { "prettierd", "prettier", stop_after_first = true }, + typescriptreact = { "prettierd", "prettier", stop_after_first = true }, + html = { "prettierd", "prettier", stop_after_first = true }, + pug = { "prettierd", "prettier", stop_after_first = true }, + vue = { "prettierd", "prettier", stop_after_first = true }, + sql = { "sql_formatter" }, + rust = { "rustfmt" }, + golang = { "gofmt" }, + sh = { "shfmt" }, + json = { "jq", "deno_fmt", stop_after_first = true }, + toml = { "taplo" }, + yaml = { "yq" }, + markdown = { "deno_fmt" }, + }, + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_format = "fallback", + }, +}) diff --git a/.config/nvim_pack_old/after/plugin/crates.lua b/.config/nvim_pack_old/after/plugin/crates.lua new file mode 100644 index 00000000..a2669a9c --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/crates.lua @@ -0,0 +1 @@ +require("crates").setup() diff --git a/.config/nvim/after/plugin/dap.lua b/.config/nvim_pack_old/after/plugin/dap.lua similarity index 100% rename from .config/nvim/after/plugin/dap.lua rename to .config/nvim_pack_old/after/plugin/dap.lua diff --git a/.config/nvim/after/plugin/dapui.lua b/.config/nvim_pack_old/after/plugin/dapui.lua similarity index 100% rename from .config/nvim/after/plugin/dapui.lua rename to .config/nvim_pack_old/after/plugin/dapui.lua diff --git a/.config/nvim_pack_old/after/plugin/gitblame.lua b/.config/nvim_pack_old/after/plugin/gitblame.lua new file mode 100644 index 00000000..726ca609 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/gitblame.lua @@ -0,0 +1,3 @@ +require("gitblame").setup({ + enabled = false, +}) diff --git a/.config/nvim_pack_old/after/plugin/harpoon.lua b/.config/nvim_pack_old/after/plugin/harpoon.lua new file mode 100644 index 00000000..d9165f01 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/harpoon.lua @@ -0,0 +1,14 @@ +local mark = require("harpoon.mark") +local ui = require("harpoon.ui") + +vim.keymap.set("n", "a", mark.add_file) +vim.keymap.set("n", "", ui.toggle_quick_menu) + +vim.keymap.set("n", "j", function() ui.nav_file(1) end) +vim.keymap.set("n", "k", function() ui.nav_file(2) end) +vim.keymap.set("n", "l", function() ui.nav_file(3) end) +vim.keymap.set("n", ";", function() ui.nav_file(4) end) +vim.keymap.set("n", "m", function() ui.nav_file(5) end) +vim.keymap.set("n", ",", function() ui.nav_file(6) end) +vim.keymap.set("n", ".", function() ui.nav_file(7) end) +vim.keymap.set("n", "/", function() ui.nav_file(8) end) diff --git a/.config/nvim_pack_old/after/plugin/indentline.lua b/.config/nvim_pack_old/after/plugin/indentline.lua new file mode 100644 index 00000000..62ddc1b8 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/indentline.lua @@ -0,0 +1,3 @@ +require("ibl").setup({ + indent = { char = "¦" }, +}) diff --git a/.config/nvim_pack_old/after/plugin/lsp.lua b/.config/nvim_pack_old/after/plugin/lsp.lua new file mode 100644 index 00000000..5491cddd --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/lsp.lua @@ -0,0 +1,117 @@ +local lsp = require("lsp-zero") +local lspconfig = require("lspconfig") +local cmp = require("cmp") +lsp.preset("recommended") +require("mason").setup() + +lsp.ensure_installed({ + "bashls", + "biome", + "clangd", + "cssls", + "dockerls", + "emmet_ls", + "eslint", + "html", + "lua_ls", + "quick_lint_js", + "rust_analyzer", + "svelte", + "ts_ls", + "volar", + "zls", +}) + +cmp.setup({ + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, +}) + +lsp.set_preferences({ + suggest_lsp_servers = false, + sign_icons = { + error = "E", + warn = "W", + hint = "H", + info = "I", + }, +}) + +-- function that is used with keybinding cm to toggle autocompletion +Mode = require("cmp.types").cmp.TriggerEvent.TextChanged +function SetAutoCmp(mode) + if mode then + cmp.setup({ + completion = { + autocomplete = { Mode }, + }, + }) + Mode = false + else + cmp.setup({ + completion = { + autocomplete = Mode, + }, + }) + Mode = require("cmp.types").cmp.TriggerEvent.TextChanged + end +end + +SetAutoCmp(Mode) +lsp.setup() + +-- configure diagnostic lsp err msgs +vim.diagnostic.config({ + underline = true, + virtual_text = true, + float = { + source = "always", + focusable = false, + }, +}) + +-- toggles floating error messages +vim.keymap.set("n", "e", "lua vim.diagnostic.open_float()") + +-- LSP Specific Settings +-- Volar TypeScript Config (turn off for Vue with Vanilla JS) +require("mason-lspconfig").setup_handlers({ + function(server_name) + local server_config = {} + if server_name == "volar" then + server_config.filetypes = { "vue", "ts_ls", "javascript" } + lspconfig.volar.setup({ + settings = { + ["volar.takeOverMode.enabled"] = true, + }, + }) + end + lspconfig.rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + procMacro = { + ignored = { + leptos_macro = { + "server", + }, + }, + }, + rustfmt = { + overrideCommand = { + "leptosfmt", + "--stdin", + "--rustfmt", + }, + edition = { "2021" }, + }, + cargo = { + allFeatures = true, + }, + }, + }, + }) + lspconfig[server_name].setup(server_config) + end, +}) diff --git a/.config/nvim_pack_old/after/plugin/lualine.lua b/.config/nvim_pack_old/after/plugin/lualine.lua new file mode 100644 index 00000000..f63d740d --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/lualine.lua @@ -0,0 +1,12 @@ +local function show_codeium_status() + return "{…}" .. vim.fn["codeium#GetStatusString"]() +end + +require("lualine").setup({ + options = { theme = "nord" }, + sections = { + lualine_x = { + { show_codeium_status }, + }, + }, +}) diff --git a/.config/nvim_pack_old/after/plugin/mardownpreview.lua b/.config/nvim_pack_old/after/plugin/mardownpreview.lua new file mode 100644 index 00000000..abf1fa36 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/mardownpreview.lua @@ -0,0 +1,2 @@ +vim.g.mkdp_browser = "librewolf" +vim.g.mkdp_theme = "dark" diff --git a/.config/nvim_pack_old/after/plugin/multicursor.lua b/.config/nvim_pack_old/after/plugin/multicursor.lua new file mode 100644 index 00000000..162339af --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/multicursor.lua @@ -0,0 +1 @@ +vim.opt.cursorcolumn = true diff --git a/.config/nvim_pack_old/after/plugin/nerdcommenter.lua b/.config/nvim_pack_old/after/plugin/nerdcommenter.lua new file mode 100644 index 00000000..12bcba65 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/nerdcommenter.lua @@ -0,0 +1,6 @@ +-- Create Default Mappings for NerdCommenter +vim.g.NERDCreateDefaultMappings = 1 +-- Add spaces after NerdCommenter delimiters by default +vim.g.NERDSpaceDelims = 1 +-- Enable Comments with Italics +-- vim.cmd[[highlight Comment cterm=italic gui=italic]] diff --git a/.config/nvim/after/plugin/null-ls.lua b/.config/nvim_pack_old/after/plugin/null-ls.lua similarity index 100% rename from .config/nvim/after/plugin/null-ls.lua rename to .config/nvim_pack_old/after/plugin/null-ls.lua diff --git a/.config/nvim_pack_old/after/plugin/nvimtree.lua b/.config/nvim_pack_old/after/plugin/nvimtree.lua new file mode 100644 index 00000000..a8d4916a --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/nvimtree.lua @@ -0,0 +1,113 @@ +-- Nvim_Tree configuration: -- setup with all defaults +-- each of these are documented in `:help nvim-tree.OPTION_NAME` +require("nvim-tree").setup({ -- BEGIN_DEFAULT_OPTS + auto_reload_on_write = true, + disable_netrw = false, + -- hide_root_folder = false, + hijack_cursor = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, + open_on_tab = false, + sort_by = "name", + update_cwd = false, + view = { + width = 25, + -- height = 30, + side = "right", + preserve_window_proportions = true, + number = false, + relativenumber = false, + signcolumn = "yes", + -- mappings = { + -- custom_only = false, + -- list = { + -- user mappings go here + -- }, + -- }, + }, + renderer = { + indent_markers = { + enable = false, + icons = { + corner = "└ ", + edge = "│ ", + none = " ", + }, + }, + icons = { + webdev_colors = true, + }, + }, + hijack_directories = { + enable = true, + auto_open = true, + }, + update_focused_file = { + enable = false, + update_cwd = false, + ignore_list = {}, + }, + system_open = { + cmd = nil, + args = {}, + }, + diagnostics = { + enable = false, + show_on_dirs = false, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, + filters = { + dotfiles = false, + custom = {}, + exclude = {}, + }, + git = { + enable = true, + ignore = true, + timeout = 400, + }, + actions = { + use_system_clipboard = true, + change_dir = { + enable = true, + global = false, + restrict_above_cwd = false, + }, + open_file = { + quit_on_open = false, + resize_window = false, + window_picker = { + enable = true, + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + }, + }, + }, + trash = { + cmd = "trash", + require_confirm = true, + }, + log = { + enable = false, + truncate = false, + types = { + all = false, + config = false, + copy_paste = false, + diagnostics = false, + git = false, + profile = false, + }, + }, +}) -- END_DEFAULT_OPTS for Nvim_Tree + +-- Automatically closes Nvim tree if last window open +vim.cmd([[autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif]]) diff --git a/.config/nvim_pack_old/after/plugin/rainbow.lua b/.config/nvim_pack_old/after/plugin/rainbow.lua new file mode 100644 index 00000000..3a0549cf --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/rainbow.lua @@ -0,0 +1 @@ +vim.g.rainbow_active = 1 diff --git a/.config/nvim_pack_old/after/plugin/ripgrep.lua b/.config/nvim_pack_old/after/plugin/ripgrep.lua new file mode 100644 index 00000000..2bc6cab8 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/ripgrep.lua @@ -0,0 +1,12 @@ +-- Enable use of ripgrep +require("nvim-ripgrep").setup({ + runner = require("nvim-ripgrep.run").ripgrep, -- grep command + prompt = "❯ ", -- prompt + window = { + width = 0.8, + border = "rounded", + }, + open_qf_fn = function() + return vim.api.nvim_command("copen") + end, +}) diff --git a/.config/nvim_pack_old/after/plugin/telescope.lua b/.config/nvim_pack_old/after/plugin/telescope.lua new file mode 100644 index 00000000..8359ab48 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/telescope.lua @@ -0,0 +1,10 @@ +require("telescope").setup({ + extensions = { + undo = { + layout_strategy = "vertical", + layout_config = { + preview_height = 0.8, + }, + }, + }, +}) diff --git a/.config/nvim_pack_old/after/plugin/treesitter.lua b/.config/nvim_pack_old/after/plugin/treesitter.lua new file mode 100644 index 00000000..fe0ccd55 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/treesitter.lua @@ -0,0 +1,57 @@ +vim.treesitter.query.set("javascript", "injections", "") +vim.treesitter.query.set("typescript", "injections", "") +vim.treesitter.query.set("tsx", "injections", "") +vim.treesitter.query.set("lua", "injections", "") +require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" + ensure_installed = { + "bash", + "c", + "c_sharp", + "cmake", + "cpp", + "css", + "dockerfile", + "go", + "html", + "http", + "java", + "javascript", + "json", + "json5", + "jsonc", + "lua", + "make", + "perl", + "php", + "pug", + "python", + "ruby", + "toml", + "tsx", + "typescript", + "rust", + "vim", + "vue", + "yaml", + "zig", + }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + highlight = { + -- `false` will disable the whole extension + enable = true, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +}) diff --git a/.config/nvim_pack_old/after/plugin/undotree.lua b/.config/nvim_pack_old/after/plugin/undotree.lua new file mode 100644 index 00000000..b61d7e89 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/undotree.lua @@ -0,0 +1,2 @@ +vim.g.undotree_DiffAutoOpen = 0 +vim.g.undotree_SetFocusWhenToggle = 1 diff --git a/.config/nvim_pack_old/after/plugin/vimsmoothie.lua b/.config/nvim_pack_old/after/plugin/vimsmoothie.lua new file mode 100644 index 00000000..23b06127 --- /dev/null +++ b/.config/nvim_pack_old/after/plugin/vimsmoothie.lua @@ -0,0 +1,2 @@ +-- Use experimental features of vim-smoothie (gg and G) +vim.g.smoothie_experimental_mappings = 1 diff --git a/.config/nvim_pack_old/init.lua b/.config/nvim_pack_old/init.lua new file mode 100644 index 00000000..9b5edf17 --- /dev/null +++ b/.config/nvim_pack_old/init.lua @@ -0,0 +1,5 @@ +require("neovim") +require("impatient") +-- require("config.dap.javascript") +-- very recent error: https://github.com/rcarriga/nvim-dap-ui/issues/233 +-- require("dapui").setup() diff --git a/.config/nvim/lua/config/dap/index.lua b/.config/nvim_pack_old/lua/config/dap/index.lua similarity index 100% rename from .config/nvim/lua/config/dap/index.lua rename to .config/nvim_pack_old/lua/config/dap/index.lua diff --git a/.config/nvim/lua/config/dap/javascript.lua b/.config/nvim_pack_old/lua/config/dap/javascript.lua similarity index 100% rename from .config/nvim/lua/config/dap/javascript.lua rename to .config/nvim_pack_old/lua/config/dap/javascript.lua diff --git a/.config/nvim_pack_old/lua/neovim/init.lua b/.config/nvim_pack_old/lua/neovim/init.lua new file mode 100644 index 00000000..af867b76 --- /dev/null +++ b/.config/nvim_pack_old/lua/neovim/init.lua @@ -0,0 +1,2 @@ +require("neovim.remap") +require("neovim.set") diff --git a/.config/nvim/lua/neovim/packer.lua b/.config/nvim_pack_old/lua/neovim/packer.lua similarity index 100% rename from .config/nvim/lua/neovim/packer.lua rename to .config/nvim_pack_old/lua/neovim/packer.lua diff --git a/.config/nvim_pack_old/lua/neovim/remap.lua b/.config/nvim_pack_old/lua/neovim/remap.lua new file mode 100644 index 00000000..67b1a9ca --- /dev/null +++ b/.config/nvim_pack_old/lua/neovim/remap.lua @@ -0,0 +1,176 @@ +vim.g.mapleader = " " +vim.keymap.set("n", "pv", vim.cmd.Ex) + +vim.keymap.set("n", "J", "mzJ`z") + +-- remap for vim-smoothie +vim.cmd([[nnoremap call smoothie#do("\zz")]]) +vim.cmd([[nnoremap call smoothie#do("\zz")]]) +vim.cmd([[nnoremap gg call smoothie#do("gg")]]) +vim.cmd([[nnoremap call smoothie#do("\zz")]]) + +-- recenter on next/previous search +vim.keymap.set("n", "n", "nzzzv") +vim.keymap.set("n", "N", "Nzzzv") + +--Toggle NERDCommenter with Ctrl + c +vim.keymap.set("n", "", "NERDCommenterToggle") + +vim.keymap.set("n", "Q", "") +-- reformats +--vim.keymap.set("n", "f", vim.lsp.buf.format) + +-- global search and replace +vim.keymap.set("n", "", ":%s///gI") +-- single line search and replace +vim.keymap.set("n", "", ":.,.s///g") + +-- toggle english spellcheck +vim.keymap.set("n", "", ":set spell!", { silent = true }) + +-- make current file executable +vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) +-- Vimium Like Keybindings +vim.keymap.set("n", "", ":tabnew", {}) + +-- tab keybindings +vim.keymap.set("n", "", ":tabprevious", {}) +vim.keymap.set("n", "", ":tabnext", {}) +-- Use ctrl- [hl] to select the active split! +vim.keymap.set("n", "", ":wincmd h", {}) +vim.keymap.set("n", "", ":wincmd l", {}) + +-- remap Nvim_Tree toggle to leader+' +vim.keymap.set("n", "'", ":NvimTreeToggle", {}) + +-- Use ctrl - [hl] to select the active split +vim.keymap.set("n", "", ":wincmd h", {}) +vim.keymap.set("n", "", ":wincmd l", {}) + +-- nv creates new vertical split +vim.keymap.set("n", "nv", ":vnew", { silent = true }) + +-- shift + p invokes PackerSync +vim.keymap.set("n", "", ":PackerSync", {}) + +-- control + t enable transparency +vim.keymap.set("n", "t", ":lua ColorMyPencils()", {}) + +-- open :Mason using msn +vim.keymap.set("n", "msn", ":Mason", { silent = true }) + +-- toggle relative line number with shift + x +vim.keymap.set("n", "", ":set relativenumber! number", {}) + +-- toggle multi-corsor with control + j/k +vim.cmd([[nmap ]]) +vim.cmd([[nmap ]]) + +-- enable gitblame with ctrl + g +vim.keymap.set("n", "", ":GitBlameToggle", { silent = true }) + +-- shift + m brings up markdown previewer +vim.keymap.set("n", "", ":MarkdownPreview", {}) + +-- invoke neoformat with nf +vim.keymap.set("n", "nf", ":Neoformat", { silent = true }) + +-- format C and C++ Code with cp +vim.keymap.set("n", "cp", ":ClangFormat", { silent = true }) + +-- open fzf with ctrl + p +vim.cmd([[nnoremap fzf :silent :FZFExplore]]) +vim.keymap.set("n", "f", ":FZFExplore") +-- vim.keymap.set("n", "", ":FZFExplore", {}) + +-- CtrlP: similar to fzf, but with a more simple interface +vim.keymap.set("n", "", ":CtrlPMixed") + +-- open ripgrep +vim.cmd([[nnoremap rg :silent :Rg]]) +vim.keymap.set("n", "r", ":silent :Rg") + +-- restart lsp +vim.cmd([[nnoremap lsp :silent :LspRestart]]) + +--toggle autocompletion +vim.cmd([[nnoremap cmp :silent lua SetAutoCmp(Mode)]]) + +-- SudaWrite +-- vim.cmd([[nnoremap sw :SudaWrite]]) +vim.keymap.set("n", "sw", ":SudaWrite") + +-- appends backslash to end of specified number of lines (min 2) +-- usage: 4b will append a backslash to the end of 4 lines +-- note: useful for grabbing code snippets for chatting with codellama in terminal +vim.cmd([[nnoremap b :.,+=v:count1norm A\]]) + +--toggle undotree +vim.keymap.set("n", "u", ":UndotreeToggle") + +-- runs npm tests without having to leave vim +-- vim.keymap.set("n", "t", ":w|!npm test") + +-- opens go to definition in new tab if not in current file +vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts) + +-- toggles floating error messages +vim.keymap.set("n", "e", "vim.diagnostic.open_float()", opts) + +vim.keymap.set("n", "gD", function() + local org_path = vim.api.nvim_buf_get_name(0) + + -- Go to definition: + vim.api.nvim_command("normal gd") + + -- Wait LSP server response + vim.wait(100, function() end) + + local new_path = vim.api.nvim_buf_get_name(0) + if not (org_path == new_path) then + -- Create a new tab for the original file + vim.api.nvim_command("0tabnew %") + + -- Restore the cursor position + vim.api.nvim_command("b " .. org_path) + vim.api.nvim_command('normal! `"') + + -- Switch to the original tab + vim.api.nvim_command("normal! gt") + end +end, bufopts) + +-- dap Keybindings +vim.keymap.set("n", "dbp", ":lua require'dap'.toggle_breakpoint()") +vim.keymap.set("n", "dco", ":lua require'dap'.continue()") +vim.keymap.set("n", "dov", ":lua require'dap'.step_over()") +vim.keymap.set("n", "dso", ":lua require'dap'.step_out()") +vim.keymap.set("n", "dsi", ":lua require'dap'.step_into()") +vim.keymap.set("n", "dcl", ":lua require'dap'.close()") +vim.keymap.set("n", "dui", ":lua require('dapui').toggle()") +-- +-- codeium remappings +vim.keymap.set("i", "", function() + return vim.fn["codeium#Accept"]() +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](1) +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](-2) +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#Clear"]() +end, { expr = true }) + +--toggle codeium on/off +function Toggle_codeium() + vim.g.codeium_enabled = not vim.g.codeium_enabled +end +vim.keymap.set("n", "c", ":lua Toggle_codeium()", { noremap = true, silent = true }) + +-- move single line or highlighted lines of text up cursor (alt + j/k) +vim.keymap.set("n", "", ":m .-2==") +vim.keymap.set("n", "", ":m .+1==") +vim.keymap.set("v", "", ":m '>+1gv=gv") +vim.keymap.set("v", "", ":m '<-2gv=gv") diff --git a/.config/nvim_pack_old/lua/neovim/set.lua b/.config/nvim_pack_old/lua/neovim/set.lua new file mode 100644 index 00000000..f2243020 --- /dev/null +++ b/.config/nvim_pack_old/lua/neovim/set.lua @@ -0,0 +1,150 @@ +-- fat cursor no matter what +vim.opt.guicursor = "" +-- +vim.opt.nu = true +vim.opt.relativenumber = true +vim.opt.softtabstop = 0 +vim.opt.shiftwidth = 4 +-- vim.opt.shiftwidth = 2 + +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 18 +vim.opt.signcolumn = "yes" +-- vim.opt.isfname:append("@-@") + +vim.opt.updatetime = 50 + +vim.opt.mouse = "a" +vim.opt.autoindent = true +vim.opt.smarttab = true +vim.opt.ignorecase = true +vim.opt.cindent = true +vim.opt.tabstop = 4 +vim.opt.cursorcolumn = true +-- Disable folds +-- vim.g.nofoldenable = true +-- Fix Splitting +vim.opt.splitbelow = true +vim.opt.splitright = true + +-- Removes trailing spaces +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) + +-- Marks end of line, space, and trailing space characters +vim.opt.listchars:append({ eol = "↵", trail = "·", space = "·" }) +vim.opt.list = true + +-- return quotation marks to json files +vim.cmd([[autocmd Filetype json let g:indentLine_setConceal = 0]]) + +-- vertically center document when entering Insert mode (breaks shift+A) +-- vim.cmd([[autocmd InsertEnter * norm zz]]) + +-- enable clipboard +vim.cmd([[set clipboard+=unnamedplus]]) + +-- disable intro screen +vim.cmd([[set shortmess+=I]]) + +-- enable folds +vim.cmd([[set foldmethod=manual]]) + +-- enable hard/soft wrap +-- vim.cmd([[set wrap linebreak textwidth=80]]) +-- vim.opt.textwidth = 80 +-- vim.opt.wrap = true +-- vim.opt.linebreak = true +vim.cmd([[au BufRead,BufNewFile *.md setlocal textwidth=80]]) + +-- max tab characters +vim.cmd([[let g:mintabline_tab_max_chars=10]]) + +-- Search pattern across repository files using fzf +vim.cmd([[ +function! FzfExplore(...) +let inpath = substitute(a:1, "'", '', 'g') +if inpath == "" || matchend(inpath, '/') == strlen(inpath) + execute "cd" getcwd() . '/' . inpath + let cwpath = getcwd() . '/' + call fzf#run(fzf#wrap(fzf#vim#with_preview({'source': 'ls -1ap', 'dir': cwpath, 'sink': 'FZFExplore', 'options': ['--prompt', cwpath]}))) +else + let file = getcwd() . '/' . inpath + execute "e" file +endif +endfunction]]) + +vim.cmd([[command! -nargs=* FZFExplore call FzfExplore(shellescape())]]) + +-- CtrlP will ignore .git and node_modules directories +vim.cmd([[set wildignore+=*/node_modules/*,*/.git/*]]) +vim.cmd([[let g:ctrlp_custom_ignore = '\v[\/]\.(git|node_modules)']]) + +-- fzf is on bottom of screen +-- vim.cmd([[let g:fzf_layout = { 'down': '~30%' }]]) + +--lastplace ignores fzf +--vim.cmd([[let g:lastplace_ignore_buftype = "quickfix, nofile, help, FZF"]]) + +-- jump to last place visited in file +vim.api.nvim_create_autocmd("BufReadPost", { + callback = function() + local mark = vim.api.nvim_buf_get_mark(0, '"') + local lcount = vim.api.nvim_buf_line_count(0) + if mark[1] > 0 and mark[1] <= lcount then + pcall(vim.api.nvim_win_set_cursor, 0, mark) + end + end, +}) + +-- turns off LSP semantic tokens by default +-- vim.api.nvim_create_autocmd("LspAttach", { +-- callback = function(args) +-- local client = vim.lsp.get_client_by_id(args.data.client_id) +-- client.server_capabilities.semanticTokensProvider = nil +-- end, +-- }) + +-- set folds to be remembered on save +vim.cmd([[ +augroup remember_folds + autocmd! + autocmd BufWinLeave *.* mkview + autocmd BufWinEnter *.* silent! loadview +augroup END +]]) + +-- configure diagnostic lsp err msgs +-- vim.diagnostic.config({ +-- underline = true, +-- signs = true, +-- virtual_text = true, +-- float = { +-- show_header = true, +-- source = "always", +-- border = "border", +-- focusable = false, +-- }, +-- update_in_insert = false, -- default to false +-- severity_sort = false, -- default to false +-- }) + +-- codeium disable default keybindings +vim.g.codeium_disable_bindings = 1 +-- codeium disable by default +vim.g.codeium_enabled = 0 diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim_pack_old/plugin/packer_compiled.lua similarity index 60% rename from .config/nvim/plugin/packer_compiled.lua rename to .config/nvim_pack_old/plugin/packer_compiled.lua index 66478c14..c7ac7a19 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim_pack_old/plugin/packer_compiled.lua @@ -49,8 +49,8 @@ local function save_profiles(threshold) end time([[Luarocks path setup]], true) -local package_path_str = "/home/brian/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/brian/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +local package_path_str = "/home/brian/.cache/nvim/packer_hererocks/2.1.1736781742/share/lua/5.1/?.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.1736781742/share/lua/5.1/?/init.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.1736781742/lib/luarocks/rocks-5.1/?.lua;/home/brian/.cache/nvim/packer_hererocks/2.1.1736781742/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/brian/.cache/nvim/packer_hererocks/2.1.1736781742/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 @@ -104,10 +104,25 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, - ["emmet-vim"] = { + ["codeium.vim"] = { loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/emmet-vim", - url = "https://github.com/mattn/emmet-vim" + path = "/home/brian/.local/share/nvim/site/pack/packer/start/codeium.vim", + url = "https://github.com/Exafunction/codeium.vim" + }, + ["conform.nvim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/conform.nvim", + url = "https://github.com/stevearc/conform.nvim" + }, + ["crates.nvim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/crates.nvim", + url = "https://github.com/saecki/crates.nvim" + }, + ["ctrlp.vim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/ctrlp.vim", + url = "https://github.com/kien/ctrlp.vim" }, ["friendly-snippets"] = { loaded = true, @@ -124,15 +139,35 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/git-blame.nvim", url = "https://github.com/f-person/git-blame.nvim" }, + ["go.nvim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/go.nvim", + url = "https://github.com/ray-x/go.nvim" + }, + ["guihua.lua"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/guihua.lua", + url = "https://github.com/ray-x/guihua.lua" + }, + ["gv.vim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/gv.vim", + url = "https://github.com/junegunn/gv.vim" + }, harpoon = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/harpoon", url = "https://github.com/ThePrimeagen/harpoon" }, - indentLine = { + ["impatient.nvim"] = { loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/indentLine", - url = "https://github.com/Yggdroot/indentLine" + path = "/home/brian/.local/share/nvim/site/pack/packer/start/impatient.nvim", + url = "https://github.com/lewis6991/impatient.nvim" + }, + ["indent-blankline.nvim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" }, ["lsp-zero.nvim"] = { loaded = true, @@ -164,11 +199,6 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/mintabline.vim", url = "https://github.com/sangdol/mintabline.vim" }, - neoformat = { - loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/neoformat", - url = "https://github.com/sbdchd/neoformat" - }, nerdcommenter = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/nerdcommenter", @@ -180,6 +210,11 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/nord.nvim", url = "https://github.com/shaunsingh/nord.nvim" }, + ["null-ls.nvim"] = { + loaded = true, + path = "/home/brian/.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/brian/.local/share/nvim/site/pack/packer/start/nvim-autopairs", @@ -190,15 +225,55 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, - ["nvim-colorizer.lua"] = { - loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", - url = "https://github.com/norcalli/nvim-colorizer.lua" + ["nvim-dap"] = { + after = { "nvim-dap-python", "telescope-dap.nvim", "nvim-dap-go", "one-small-step-for-vimkind", "nvim-dap-vscode-js", "nvim-dap-virtual-text", "vscode-js-debug" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/nvim-dap", + url = "https://github.com/mfussenegger/nvim-dap" }, - ["nvim-lastplace"] = { + ["nvim-dap-go"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/nvim-dap-go", + url = "https://github.com/leoluz/nvim-dap-go" + }, + ["nvim-dap-python"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/nvim-dap-python", + url = "https://github.com/mfussenegger/nvim-dap-python" + }, + ["nvim-dap-ui"] = { loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-lastplace", - url = "https://github.com/ethanholz/nvim-lastplace" + path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", + url = "https://github.com/rcarriga/nvim-dap-ui" + }, + ["nvim-dap-virtual-text"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/nvim-dap-virtual-text", + url = "https://github.com/theHamsta/nvim-dap-virtual-text" + }, + ["nvim-dap-vscode-js"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/nvim-dap-vscode-js", + url = "https://github.com/mxsdev/nvim-dap-vscode-js" }, ["nvim-lspconfig"] = { loaded = true, @@ -210,6 +285,12 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-ripgrep", url = "https://github.com/rinx/nvim-ripgrep" }, + ["nvim-silicon"] = { + config = { "\27LJ\2\n\1\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\a\fcommand\fsilicon\23no_window_controls\2\19no_line_number\2\20no_round_corner\2\ntheme\tNord\15background\f#20201e\tfont\19mononoki NF=34\nsetup\fsilicon\frequire\0" }, + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-silicon", + url = "https://github.com/michaelrommel/nvim-silicon" + }, ["nvim-tree.lua"] = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", @@ -225,6 +306,16 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, + ["one-small-step-for-vimkind"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/one-small-step-for-vimkind", + url = "https://github.com/jbyuki/one-small-step-for-vimkind" + }, ["packer.nvim"] = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/packer.nvim", @@ -240,10 +331,24 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/plenary.nvim", url = "https://github.com/nvim-lua/plenary.nvim" }, - rainbow = { + ["rust.vim"] = { loaded = true, - path = "/home/brian/.local/share/nvim/site/pack/packer/start/rainbow", - url = "https://github.com/luochen1990/rainbow" + path = "/home/brian/.local/share/nvim/site/pack/packer/start/rust.vim", + url = "https://github.com/rust-lang/rust.vim" + }, + ["suda.vim"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/suda.vim", + url = "https://github.com/lambdalisue/suda.vim" + }, + ["telescope-dap.nvim"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/telescope-dap.nvim", + url = "https://github.com/nvim-telescope/telescope-dap.nvim" }, ["telescope.nvim"] = { loaded = true, @@ -260,6 +365,11 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-clang-format", url = "https://github.com/rhysd/vim-clang-format" }, + ["vim-doge"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-doge", + url = "https://github.com/kkoomen/vim-doge" + }, ["vim-fugitive"] = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-fugitive", @@ -275,11 +385,25 @@ _G.packer_plugins = { path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-smoothie", url = "https://github.com/psliwka/vim-smoothie" }, + ["vim-surround"] = { + loaded = true, + path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-surround", + url = "https://github.com/tpope/vim-surround" + }, ["vim-visual-multi"] = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-visual-multi", url = "https://github.com/mg979/vim-visual-multi" }, + ["vscode-js-debug"] = { + load_after = { + ["nvim-dap"] = true + }, + loaded = false, + needs_bufread = false, + path = "/home/brian/.local/share/nvim/site/pack/packer/opt/vscode-js-debug", + url = "https://github.com/microsoft/vscode-js-debug" + }, winresizer = { loaded = true, path = "/home/brian/.local/share/nvim/site/pack/packer/start/winresizer", @@ -288,6 +412,40 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +local module_lazy_loads = { + ["^dap"] = "nvim-dap", + ["^dap%-go"] = "nvim-dap-go", + ["^osv"] = "one-small-step-for-vimkind" +} +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 + +-- Config for: nvim-silicon +time([[Config for nvim-silicon]], true) +try_loadstring("\27LJ\2\n\1\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\a\fcommand\fsilicon\23no_window_controls\2\19no_line_number\2\20no_round_corner\2\ntheme\tNord\15background\f#20201e\tfont\19mononoki NF=34\nsetup\fsilicon\frequire\0", "config", "nvim-silicon") +time([[Config for nvim-silicon]], false) -- Config for: nord.nvim time([[Config for nord.nvim]], true) try_loadstring("\27LJ\2\n4\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\21colorscheme nord\bcmd\bvim\0", "config", "nord.nvim") diff --git a/updates.txt b/updates.txt index 0105d47f..f50e5aee 100755 --- a/updates.txt +++ b/updates.txt @@ -729,3 +729,8 @@ install wireshark-dumpcap.hook 03/04/2025 Adjust ~/.gitconfig according to https://blog.gitbutler.com/how-git-core-devs-configure-git/ + +03/28/2025 +Install @vue/typescript-plugin and language-server: +doas npm install -g @vue/typescript-plugin +doas npm install -g @vue/language-server