🔧 Major overhaul of nvim config

This commit is contained in:
z3rOR0ne 2025-03-28 18:57:42 -07:00
parent 351ce052a7
commit 5e7afd99ec
38 changed files with 1091 additions and 87 deletions

View file

@ -0,0 +1,3 @@
require("nvim-autopairs").setup({
ignored_next_char = "[%w%\"]"
})

View file

@ -0,0 +1,6 @@
require'colorizer'.setup({
'*';
css = { css = true; };
html = { css = true; };
javascript = { css = true; };
})

View file

@ -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()

View file

@ -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",
},
})

View file

@ -0,0 +1 @@
require("crates").setup()

View file

@ -0,0 +1,31 @@
require("dap-vscode-js").setup({
adapaters = { "pwa-node", "pwa-chrome", "pwa-msedge", "node-terminal", "pwa-extensionHost" },
})
local languages = { "typescript", "javascript" }
for _, language in ipairs(languages) do
require("dap").configurations[language] = {
{
type = "pwa-node",
request = "launch",
name = "Launch file",
program = "${file}",
cwd = "${workspaceFolder}",
},
{
type = "pwa-node",
request = "attach",
name = "Attach",
processId = require("dap.utils").pick_process,
cwd = "${workspaceFolder}",
},
{
type = "pwa-chrome",
request = "launch",
name = 'Start Chrome with "localhost"',
url = "http://localhost:3000",
webRoot = "${workspaceFolder}",
userDataDir = "${workspaceFolder}/.vscode/vscode-chrome-debug-userdatadir",
},
}
end

View file

@ -0,0 +1,13 @@
require("dapui").setup()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close({})
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close({})
end

View file

@ -0,0 +1,3 @@
require("gitblame").setup({
enabled = false,
})

View file

@ -0,0 +1,14 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-o>", ui.toggle_quick_menu)
vim.keymap.set("n", "<leader>j", function() ui.nav_file(1) end)
vim.keymap.set("n", "<leader>k", function() ui.nav_file(2) end)
vim.keymap.set("n", "<leader>l", function() ui.nav_file(3) end)
vim.keymap.set("n", "<leader>;", function() ui.nav_file(4) end)
vim.keymap.set("n", "<leader>m", function() ui.nav_file(5) end)
vim.keymap.set("n", "<leader>,", function() ui.nav_file(6) end)
vim.keymap.set("n", "<leader>.", function() ui.nav_file(7) end)
vim.keymap.set("n", "<leader>/", function() ui.nav_file(8) end)

View file

@ -0,0 +1,3 @@
require("ibl").setup({
indent = { char = "¦" },
})

View file

@ -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", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>")
-- 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,
})

View file

@ -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 },
},
},
})

View file

@ -0,0 +1,2 @@
vim.g.mkdp_browser = "librewolf"
vim.g.mkdp_theme = "dark"

View file

@ -0,0 +1 @@
vim.opt.cursorcolumn = true

View file

@ -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]]

View file

@ -0,0 +1,32 @@
local null_ls = require("null-ls")
local group = vim.api.nvim_create_augroup("lsp_format_on_save", { clear = false })
local event = "BufWritePre" -- or "BufWritePost"
local async = event == "BufWritePost"
null_ls.setup({
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.keymap.set("n", "<Leader>f", function()
vim.lsp.buf.format({ bufnr = vim.api.nvim_get_current_buf() })
end, { buffer = bufnr, desc = "[lsp] format" })
-- format on save
vim.api.nvim_clear_autocmds({ buffer = bufnr, group = group })
vim.api.nvim_create_autocmd(event, {
buffer = bufnr,
group = group,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr, async = async })
end,
desc = "[lsp] format on save",
})
end
if client.supports_method("textDocument/rangeFormatting") then
vim.keymap.set("x", "<Leader>f", function()
vim.lsp.buf.format({ bufnr = vim.api.nvim_get_current_buf() })
end, { buffer = bufnr, desc = "[lsp] format" })
end
end,
})

View file

@ -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]])

View file

@ -0,0 +1 @@
vim.g.rainbow_active = 1

View file

@ -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,
})

View file

@ -0,0 +1,10 @@
require("telescope").setup({
extensions = {
undo = {
layout_strategy = "vertical",
layout_config = {
preview_height = 0.8,
},
},
},
})

View file

@ -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,
},
})

View file

@ -0,0 +1,2 @@
vim.g.undotree_DiffAutoOpen = 0
vim.g.undotree_SetFocusWhenToggle = 1

View file

@ -0,0 +1,2 @@
-- Use experimental features of vim-smoothie (gg and G)
vim.g.smoothie_experimental_mappings = 1

View file

@ -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()

View file

@ -0,0 +1,3 @@
local function configure_debuggers()
require("config.dap.javascript").setup()
end

View file

@ -0,0 +1,25 @@
local dap = require('dap')
dap.adapters.node2 = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/dev/microsoft/vscode-node-debug2/out/src/nodeDebug.js'},
}
dap.configurations.javascript = {
{
name = 'Launch',
type = 'node2',
request = 'launch',
program = '${file}',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
},
{
-- For this to work you need to make sure the node process is started with the `--inspect` flag.
name = 'Attach to process',
type = 'node2',
request = 'attach',
processId = require'dap.utils'.pick_process,
},
}

View file

@ -0,0 +1,2 @@
require("neovim.remap")
require("neovim.set")

View file

@ -0,0 +1,128 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- Only required if you have packer configured as `opt`
vim.cmd([[packadd packer.nvim]])
return require("packer").startup(function(use)
-- Packer can manage itself
use("wbthomason/packer.nvim")
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
use({ "nvim-treesitter/playground" })
use({
"shaunsingh/nord.nvim",
config = function()
vim.cmd("colorscheme nord")
end,
})
use({ "preservim/nerdcommenter" })
use({ "nvim-lualine/lualine.nvim", requires = { "kyazdani42/nvim-web-devicons", opt = true } })
use({ "kyazdani42/nvim-web-devicons" })
use({ "kyazdani42/nvim-tree.lua" })
use({ "psliwka/vim-smoothie" })
use({ "mg979/vim-visual-multi" })
-- use({ "Yggdroot/indentLine" })
use({ "lukas-reineke/indent-blankline.nvim" })
use({ "lewis6991/impatient.nvim" })
use({ "airblade/vim-gitgutter" })
use({ "f-person/git-blame.nvim" })
use({ "kkoomen/vim-doge", run = ":call doge#install()" })
-- use({ "norcalli/nvim-colorizer.lua" })
use({ "windwp/nvim-autopairs" })
use({ "simeji/winresizer" })
-- use({ "sbdchd/neoformat" })
use({ "stevearc/conform.nvim" })
use({ "rhysd/vim-clang-format" })
use({ "sangdol/mintabline.vim" })
use({ "ThePrimeagen/harpoon" })
use({
"nvim-telescope/telescope.nvim",
tag = "0.1.0",
-- or , branch = '0.1.x',
requires = { { "nvim-lua/plenary.nvim" } },
})
use({ "tpope/vim-fugitive" })
use({ "tpope/vim-surround" })
use({ "lambdalisue/suda.vim" })
use({
"iamcco/markdown-preview.nvim",
run = function()
vim.fn["mkdp#util#install"]()
end,
})
-- use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })
use({ "junegunn/fzf.vim" })
use({ "junegunn/gv.vim" })
use({ "kien/ctrlp.vim" })
use({ "rinx/nvim-ripgrep" })
use({ "mbbill/undotree" })
use({
"VonHeikemen/lsp-zero.nvim",
requires = {
-- LSP Support
{ "neovim/nvim-lspconfig" },
{ "williamboman/mason.nvim" },
{ "williamboman/mason-lspconfig.nvim" },
-- Autocompletion
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "saadparwaiz1/cmp_luasnip" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-nvim-lua" },
-- Snippets
{ "L3MON4D3/LuaSnip" },
{ "rafamadriz/friendly-snippets" },
},
})
use("jose-elias-alvarez/null-ls.nvim")
use({ "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } })
use({
"mfussenegger/nvim-dap",
opt = true,
module = { "dap" },
requires = {
"theHamsta/nvim-dap-virtual-text",
"mfussenegger/nvim-dap-python",
"nvim-telescope/telescope-dap.nvim",
{ "leoluz/nvim-dap-go", module = "dap-go" },
{ "jbyuki/one-small-step-for-vimkind", module = "osv" },
{ "mxsdev/nvim-dap-vscode-js" },
{
"microsoft/vscode-js-debug",
opt = true,
-- NOTE: didn't compile on install for some reason,
-- navigate to ~/.local/share/nvim/site/pack/packer/opt/vscode-js-debug
-- and npm run compile by hand...
run = "npm install --legacy-peer-deps && npm run compile",
},
},
})
-- codeium AI
use("Exafunction/codeium.vim")
-- golang
use("ray-x/go.nvim")
use("ray-x/guihua.lua")
-- rustlang
use("rust-lang/rust.vim")
-- use("mrcjkb/rustaceanvim")
use("saecki/crates.nvim")
-- code snippet screenshots
-- capture code snippets using :Silicon,
-- in Visual mode highlight then enter command
use({
"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,
})
end)

View file

@ -0,0 +1,176 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", "J", "mzJ`z")
-- remap for vim-smoothie
vim.cmd([[nnoremap <C-D> <cmd>call smoothie#do("\<C-D>zz")<CR>]])
vim.cmd([[nnoremap <C-U> <cmd>call smoothie#do("\<C-U>zz")<CR>]])
vim.cmd([[nnoremap gg <cmd>call smoothie#do("gg")<CR>]])
vim.cmd([[nnoremap <S-g> <cmd>call smoothie#do("\<S-g>zz")<CR>]])
-- 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", "<C-c>", "<Plug>NERDCommenterToggle")
vim.keymap.set("n", "Q", "<nop>")
-- reformats
--vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
-- global search and replace
vim.keymap.set("n", "<S-s>", ":%s///gI<Left><Left><Left><Left>")
-- single line search and replace
vim.keymap.set("n", "<S-y>", ":.,.s///g<Left><Left><Left>")
-- toggle english spellcheck
vim.keymap.set("n", "<F11>", ":set spell!<cr>", { silent = true })
-- make current file executable
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
-- Vimium Like Keybindings
vim.keymap.set("n", "<S-t>", "<c-w>:tabnew<CR>", {})
-- tab keybindings
vim.keymap.set("n", "<A-left>", "<c-w>:tabprevious<CR>", {})
vim.keymap.set("n", "<A-right>", "<c-w>:tabnext<CR>", {})
-- Use ctrl- [hl] to select the active split!
vim.keymap.set("n", "<C-h>", "<c-w>:wincmd h<CR>", {})
vim.keymap.set("n", "<C-l>", "<c-w>:wincmd l<CR>", {})
-- remap Nvim_Tree toggle to leader+'
vim.keymap.set("n", "<leader>'", "<c-w>:NvimTreeToggle<CR>", {})
-- Use ctrl - [hl] to select the active split
vim.keymap.set("n", "<C-h>", "<c-w>:wincmd h<CR>", {})
vim.keymap.set("n", "<C-l>", "<c-w>:wincmd l<CR>", {})
-- nv creates new vertical split
vim.keymap.set("n", "nv", ":vnew", { silent = true })
-- shift + p invokes PackerSync
vim.keymap.set("n", "<S-p>", "<c-w>:PackerSync<CR>", {})
-- control + t enable transparency
vim.keymap.set("n", "<leader>t", "<c-w>:lua ColorMyPencils()<CR>", {})
-- open :Mason using msn
vim.keymap.set("n", "msn", ":Mason", { silent = true })
-- toggle relative line number with shift + x
vim.keymap.set("n", "<S-x>", ":set relativenumber! number<cr>", {})
-- toggle multi-corsor with control + j/k
vim.cmd([[nmap <C-j> <C-Down>]])
vim.cmd([[nmap <C-k> <C-Up>]])
-- enable gitblame with ctrl + g
vim.keymap.set("n", "<C-g>", "<c-w>:GitBlameToggle<CR>", { silent = true })
-- shift + m brings up markdown previewer
vim.keymap.set("n", "<S-m>", "<c-w>:MarkdownPreview<CR>", {})
-- invoke neoformat with nf
vim.keymap.set("n", "nf", ":Neoformat<cr>", { silent = true })
-- format C and C++ Code with cp
vim.keymap.set("n", "cp", ":ClangFormat<cr>", { silent = true })
-- open fzf with ctrl + p
vim.cmd([[nnoremap fzf :silent :FZFExplore]])
vim.keymap.set("n", "<leader>f", ":FZFExplore<CR>")
-- vim.keymap.set("n", "<C-p>", "<c-w>:FZFExplore<CR>", {})
-- CtrlP: similar to fzf, but with a more simple interface
vim.keymap.set("n", "<C-p>", "<c-w>:CtrlPMixed<cr>")
-- open ripgrep
vim.cmd([[nnoremap rg :silent :Rg]])
vim.keymap.set("n", "<leader>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", "<leader>sw", ":SudaWrite")
-- appends backslash to end of specified number of lines (min 2)
-- usage: 4<leader>b 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 <leader>b :.,+<C-R>=v:count1<CR>norm A\<Esc>]])
--toggle undotree
vim.keymap.set("n", "<leader>u", ":UndotreeToggle<cr>")
-- runs npm tests without having to leave vim
-- vim.keymap.set("n", "<leader>t", ":w|!npm test<cr>")
-- 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", "<space>e", "<cmd>vim.diagnostic.open_float()<CR>", 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", "<leader>dbp", ":lua require'dap'.toggle_breakpoint()")
vim.keymap.set("n", "<leader>dco", ":lua require'dap'.continue()")
vim.keymap.set("n", "<leader>dov", ":lua require'dap'.step_over()")
vim.keymap.set("n", "<leader>dso", ":lua require'dap'.step_out()")
vim.keymap.set("n", "<leader>dsi", ":lua require'dap'.step_into()")
vim.keymap.set("n", "<leader>dcl", ":lua require'dap'.close()")
vim.keymap.set("n", "<leader>dui", ":lua require('dapui').toggle()")
--
-- codeium remappings
vim.keymap.set("i", "<A-tab>", function()
return vim.fn["codeium#Accept"]()
end, { expr = true })
vim.keymap.set("i", "<C-right>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, { expr = true })
vim.keymap.set("i", "<C-left>", function()
return vim.fn["codeium#CycleCompletions"](-2)
end, { expr = true })
vim.keymap.set("i", "<C-x>", 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", "<leader>c", ":lua Toggle_codeium()<cr>", { noremap = true, silent = true })
-- move single line or highlighted lines of text up cursor (alt + j/k)
vim.keymap.set("n", "<A-k>", "<c-w>:m .-2<CR>==")
vim.keymap.set("n", "<A-j>", "<c-w>:m .+1<CR>==")
vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv")

View file

@ -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(<q-args>))]])
-- 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

View file

@ -0,0 +1,467 @@
-- 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/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
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 = {
LuaSnip = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/brian/.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/brian/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
cmp_luasnip = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["codeium.vim"] = {
loaded = true,
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,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["fzf.vim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/fzf.vim",
url = "https://github.com/junegunn/fzf.vim"
},
["git-blame.nvim"] = {
loaded = true,
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"
},
["impatient.nvim"] = {
loaded = true,
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,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["markdown-preview.nvim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim",
url = "https://github.com/iamcco/markdown-preview.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["mintabline.vim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/mintabline.vim",
url = "https://github.com/sangdol/mintabline.vim"
},
nerdcommenter = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/nerdcommenter",
url = "https://github.com/preservim/nerdcommenter"
},
["nord.nvim"] = {
config = { "\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" },
loaded = true,
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",
url = "https://github.com/windwp/nvim-autopairs"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["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-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-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,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-ripgrep"] = {
loaded = true,
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",
url = "https://github.com/kyazdani42/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
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",
url = "https://github.com/wbthomason/packer.nvim"
},
playground = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/playground",
url = "https://github.com/nvim-treesitter/playground"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["rust.vim"] = {
loaded = true,
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,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
undotree = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/undotree",
url = "https://github.com/mbbill/undotree"
},
["vim-clang-format"] = {
loaded = true,
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",
url = "https://github.com/tpope/vim-fugitive"
},
["vim-gitgutter"] = {
loaded = true,
path = "/home/brian/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
url = "https://github.com/airblade/vim-gitgutter"
},
["vim-smoothie"] = {
loaded = true,
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",
url = "https://github.com/simeji/winresizer"
}
}
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")
time([[Config for nord.nvim]], 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