🔧 Major overhaul of nvim config
This commit is contained in:
parent
351ce052a7
commit
5e7afd99ec
38 changed files with 1091 additions and 87 deletions
|
|
@ -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",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
["<Up>"] = cmp.mapping.select_prev_item(),
|
||||
["<Down>"] = cmp.mapping.select_next_item(),
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = 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", "<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,
|
||||
},
|
||||
},
|
||||
-- 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",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
89
.config/nvim/lua/neovim/pacq.lua
Normal file
89
.config/nvim/lua/neovim/pacq.lua
Normal file
|
|
@ -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,
|
||||
},
|
||||
})
|
||||
|
|
@ -51,7 +51,7 @@ vim.keymap.set("n", "<C-l>", "<c-w>:wincmd l<CR>", {})
|
|||
vim.keymap.set("n", "nv", ":vnew", { silent = true })
|
||||
|
||||
-- shift + p invokes PackerSync
|
||||
vim.keymap.set("n", "<S-p>", "<c-w>:PackerSync<CR>", {})
|
||||
vim.keymap.set("n", "<S-p>", "<c-w>:PaqSync<CR>", {})
|
||||
|
||||
-- control + t enable transparency
|
||||
vim.keymap.set("n", "<leader>t", "<c-w>:lua ColorMyPencils()<CR>", {})
|
||||
|
|
@ -141,13 +141,13 @@ vim.keymap.set("n", "gD", function()
|
|||
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()")
|
||||
-- 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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
3
.config/nvim_pack_old/after/plugin/autopairs.lua
Normal file
3
.config/nvim_pack_old/after/plugin/autopairs.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("nvim-autopairs").setup({
|
||||
ignored_next_char = "[%w%\"]"
|
||||
})
|
||||
6
.config/nvim_pack_old/after/plugin/colorizer.lua
Normal file
6
.config/nvim_pack_old/after/plugin/colorizer.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require'colorizer'.setup({
|
||||
'*';
|
||||
css = { css = true; };
|
||||
html = { css = true; };
|
||||
javascript = { css = true; };
|
||||
})
|
||||
21
.config/nvim_pack_old/after/plugin/colors.lua
Normal file
21
.config/nvim_pack_old/after/plugin/colors.lua
Normal 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()
|
||||
27
.config/nvim_pack_old/after/plugin/conform.lua
Normal file
27
.config/nvim_pack_old/after/plugin/conform.lua
Normal 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",
|
||||
},
|
||||
})
|
||||
1
.config/nvim_pack_old/after/plugin/crates.lua
Normal file
1
.config/nvim_pack_old/after/plugin/crates.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("crates").setup()
|
||||
3
.config/nvim_pack_old/after/plugin/gitblame.lua
Normal file
3
.config/nvim_pack_old/after/plugin/gitblame.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("gitblame").setup({
|
||||
enabled = false,
|
||||
})
|
||||
14
.config/nvim_pack_old/after/plugin/harpoon.lua
Normal file
14
.config/nvim_pack_old/after/plugin/harpoon.lua
Normal 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)
|
||||
3
.config/nvim_pack_old/after/plugin/indentline.lua
Normal file
3
.config/nvim_pack_old/after/plugin/indentline.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("ibl").setup({
|
||||
indent = { char = "¦" },
|
||||
})
|
||||
117
.config/nvim_pack_old/after/plugin/lsp.lua
Normal file
117
.config/nvim_pack_old/after/plugin/lsp.lua
Normal 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,
|
||||
})
|
||||
12
.config/nvim_pack_old/after/plugin/lualine.lua
Normal file
12
.config/nvim_pack_old/after/plugin/lualine.lua
Normal 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 },
|
||||
},
|
||||
},
|
||||
})
|
||||
2
.config/nvim_pack_old/after/plugin/mardownpreview.lua
Normal file
2
.config/nvim_pack_old/after/plugin/mardownpreview.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.g.mkdp_browser = "librewolf"
|
||||
vim.g.mkdp_theme = "dark"
|
||||
1
.config/nvim_pack_old/after/plugin/multicursor.lua
Normal file
1
.config/nvim_pack_old/after/plugin/multicursor.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
vim.opt.cursorcolumn = true
|
||||
6
.config/nvim_pack_old/after/plugin/nerdcommenter.lua
Normal file
6
.config/nvim_pack_old/after/plugin/nerdcommenter.lua
Normal 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]]
|
||||
113
.config/nvim_pack_old/after/plugin/nvimtree.lua
Normal file
113
.config/nvim_pack_old/after/plugin/nvimtree.lua
Normal 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]])
|
||||
1
.config/nvim_pack_old/after/plugin/rainbow.lua
Normal file
1
.config/nvim_pack_old/after/plugin/rainbow.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
vim.g.rainbow_active = 1
|
||||
12
.config/nvim_pack_old/after/plugin/ripgrep.lua
Normal file
12
.config/nvim_pack_old/after/plugin/ripgrep.lua
Normal 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,
|
||||
})
|
||||
10
.config/nvim_pack_old/after/plugin/telescope.lua
Normal file
10
.config/nvim_pack_old/after/plugin/telescope.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
require("telescope").setup({
|
||||
extensions = {
|
||||
undo = {
|
||||
layout_strategy = "vertical",
|
||||
layout_config = {
|
||||
preview_height = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
57
.config/nvim_pack_old/after/plugin/treesitter.lua
Normal file
57
.config/nvim_pack_old/after/plugin/treesitter.lua
Normal 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,
|
||||
},
|
||||
})
|
||||
2
.config/nvim_pack_old/after/plugin/undotree.lua
Normal file
2
.config/nvim_pack_old/after/plugin/undotree.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.g.undotree_DiffAutoOpen = 0
|
||||
vim.g.undotree_SetFocusWhenToggle = 1
|
||||
2
.config/nvim_pack_old/after/plugin/vimsmoothie.lua
Normal file
2
.config/nvim_pack_old/after/plugin/vimsmoothie.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- Use experimental features of vim-smoothie (gg and G)
|
||||
vim.g.smoothie_experimental_mappings = 1
|
||||
5
.config/nvim_pack_old/init.lua
Normal file
5
.config/nvim_pack_old/init.lua
Normal 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()
|
||||
2
.config/nvim_pack_old/lua/neovim/init.lua
Normal file
2
.config/nvim_pack_old/lua/neovim/init.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require("neovim.remap")
|
||||
require("neovim.set")
|
||||
176
.config/nvim_pack_old/lua/neovim/remap.lua
Normal file
176
.config/nvim_pack_old/lua/neovim/remap.lua
Normal 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")
|
||||
150
.config/nvim_pack_old/lua/neovim/set.lua
Normal file
150
.config/nvim_pack_old/lua/neovim/set.lua
Normal 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
|
||||
|
|
@ -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")
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue