mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 09:01:16 +00:00
Merge pull request #3 from harivansh-afk/02-04-net_config
02 04 net config
This commit is contained in:
commit
6e8e6e28dc
37 changed files with 964 additions and 611 deletions
2
after/ftplugin/go.lua
Normal file
2
after/ftplugin/go.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.expandtab = false
|
||||
vim.opt_local.tabstop = 4
|
||||
2
after/ftplugin/lua.lua
Normal file
2
after/ftplugin/lua.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.shiftwidth = 4
|
||||
3
after/ftplugin/markdown.lua
Normal file
3
after/ftplugin/markdown.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
vim.opt_local.wrap = true
|
||||
vim.opt_local.textwidth = 80
|
||||
vim.opt_local.conceallevel = 2
|
||||
2
after/ftplugin/python.lua
Normal file
2
after/ftplugin/python.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.makeprg = "python %"
|
||||
vim.opt_local.colorcolumn = "88"
|
||||
2
after/ftplugin/rust.lua
Normal file
2
after/ftplugin/rust.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.makeprg = "cargo run"
|
||||
vim.opt_local.colorcolumn = "100"
|
||||
76
init.lua
76
init.lua
|
|
@ -1,6 +1,24 @@
|
|||
-- Set leader keys before lazy
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- Global mapping helpers
|
||||
_G.map = function(mode, lhs, rhs, opts)
|
||||
opts = opts or {}
|
||||
opts.silent = opts.silent ~= false
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
_G.bmap = function(buf, mode, lhs, rhs, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = buf
|
||||
opts.silent = opts.silent ~= false
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
|
|
@ -12,55 +30,6 @@ if not vim.loop.fs_stat(lazypath) then
|
|||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Basic settings
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- NvChad base46 cache path (must be before lazy setup)
|
||||
vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46_cache/"
|
||||
|
||||
-- Essential vim options
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.config/nvim/undodir"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.colorcolumn = ""
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.showmode = false -- Disable built-in mode display
|
||||
vim.opt.shortmess:append("S") -- Disable native search count display
|
||||
vim.opt.ruler = false -- Disable native ruler (NvChad statusline shows position)
|
||||
vim.opt.cmdheight = 0 -- Hide command line when not in use
|
||||
vim.opt.laststatus = 3 -- Global statusline at the very bottom
|
||||
vim.opt.fillchars = { vert = "│", fold = "─", foldsep = "│", diff = "─" }
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||
|
||||
-- Buffer navigation (using native commands since tabufline is disabled)
|
||||
vim.keymap.set("n", "<Tab>", "<cmd>bnext<CR>", { desc = "Next buffer" })
|
||||
vim.keymap.set("n", "<S-Tab>", "<cmd>bprev<CR>", { desc = "Previous buffer" })
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>bdelete<CR>", { desc = "Close buffer" })
|
||||
vim.keymap.set("n", "<leader>b", "<cmd>enew<CR>", { desc = "New buffer" })
|
||||
|
||||
-- Load plugins
|
||||
require("lazy").setup("plugins", {
|
||||
defaults = { lazy = true },
|
||||
|
|
@ -79,10 +48,3 @@ require("lazy").setup("plugins", {
|
|||
},
|
||||
})
|
||||
|
||||
-- Load NvChad base46 highlights (safe load)
|
||||
local cache = vim.g.base46_cache
|
||||
if vim.uv.fs_stat(cache) then
|
||||
for _, v in ipairs(vim.fn.readdir(cache)) do
|
||||
dofile(cache .. v)
|
||||
end
|
||||
end
|
||||
|
|
@ -1,26 +1,26 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
||||
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
||||
"diffs.nvim": { "branch": "main", "commit": "75a6bf184ca70358d2fde93df5b5c4da79d9a2e5" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"diffs.nvim": { "branch": "main", "commit": "52013d007d9edb9eff75c7cd820fc289d561c6fc" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
||||
"fzf-lua": { "branch": "main", "commit": "ec3fe3d9587005a995a00d55ea424bfc924eaf3e" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3d89e7c92fbd96c5e10e0298fc2b006f21cf9428" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "007047febaa3681a8d2f3dd5126fdb9c6e81f393" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "238583bb00770b079c68c69a860d65e5d1d8acf9" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "66fd02ad1c7ea31616d3ca678fa04e6d0b360824" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "a0e182ae21fda68c59d1f36c9ed45600aef50311" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "gruvbox", -- NvChad's gruvbox theme
|
||||
transparency = false, -- Keep your transparent mode
|
||||
-- theme_toggle = { "gruvbox", "gruvbox_light" },
|
||||
}
|
||||
|
||||
M.ui = {
|
||||
statusline = {
|
||||
enabled = true,
|
||||
theme = "default", -- options: default, vscode, vscode_colored, minimal
|
||||
separator_style = "round", -- default, round, block, arrow
|
||||
},
|
||||
tabufline = {
|
||||
enabled = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- Disable nvdash if you want to keep your dashboard.lua
|
||||
M.nvdash = {
|
||||
load_on_startup = false,
|
||||
}
|
||||
|
||||
return M
|
||||
41
lua/config/lsp.lua
Normal file
41
lua/config/lsp.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
-- Shared LSP utilities
|
||||
local M = {}
|
||||
|
||||
-- Set up buffer-local keymaps when LSP attaches
|
||||
function M.on_attach(client, bufnr)
|
||||
local opts = { buffer = bufnr, silent = true }
|
||||
|
||||
-- Navigation
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, vim.tbl_extend("force", opts, { desc = "Go to definition" }))
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, vim.tbl_extend("force", opts, { desc = "Go to declaration" }))
|
||||
vim.keymap.set("n", "<C-]>", vim.lsp.buf.definition, vim.tbl_extend("force", opts, { desc = "Go to definition" }))
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, vim.tbl_extend("force", opts, { desc = "Go to implementation" }))
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, vim.tbl_extend("force", opts, { desc = "Go to references" }))
|
||||
|
||||
-- Documentation
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, vim.tbl_extend("force", opts, { desc = "Hover documentation" }))
|
||||
|
||||
-- Refactoring
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, vim.tbl_extend("force", opts, { desc = "Rename symbol" }))
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, vim.tbl_extend("force", opts, { desc = "Code action" }))
|
||||
|
||||
-- Formatting
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, vim.tbl_extend("force", opts, { desc = "Format buffer" }))
|
||||
end
|
||||
|
||||
-- Return default capabilities for LSP servers
|
||||
function M.capabilities()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
-- If nvim-cmp is available, extend capabilities
|
||||
local ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if ok then
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, cmp_nvim_lsp.default_capabilities())
|
||||
end
|
||||
|
||||
return capabilities
|
||||
end
|
||||
|
||||
return M
|
||||
139
lua/config/statusline.lua
Normal file
139
lua/config/statusline.lua
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
-- Minimal custom statusline
|
||||
local M = {}
|
||||
|
||||
-- Mode mapping
|
||||
local mode_map = {
|
||||
n = "NORMAL",
|
||||
no = "N-PENDING",
|
||||
nov = "N-PENDING",
|
||||
noV = "N-PENDING",
|
||||
["no\22"] = "N-PENDING",
|
||||
niI = "NORMAL",
|
||||
niR = "NORMAL",
|
||||
niV = "NORMAL",
|
||||
nt = "NORMAL",
|
||||
ntT = "NORMAL",
|
||||
v = "VISUAL",
|
||||
vs = "VISUAL",
|
||||
V = "V-LINE",
|
||||
Vs = "V-LINE",
|
||||
["\22"] = "V-BLOCK",
|
||||
["\22s"] = "V-BLOCK",
|
||||
s = "SELECT",
|
||||
S = "S-LINE",
|
||||
["\19"] = "S-BLOCK",
|
||||
i = "INSERT",
|
||||
ic = "INSERT",
|
||||
ix = "INSERT",
|
||||
R = "REPLACE",
|
||||
Rc = "REPLACE",
|
||||
Rx = "REPLACE",
|
||||
Rv = "V-REPLACE",
|
||||
Rvc = "V-REPLACE",
|
||||
Rvx = "V-REPLACE",
|
||||
c = "COMMAND",
|
||||
cv = "EX",
|
||||
ce = "EX",
|
||||
r = "REPLACE",
|
||||
rm = "MORE",
|
||||
["r?"] = "CONFIRM",
|
||||
["!"] = "SHELL",
|
||||
t = "TERMINAL",
|
||||
}
|
||||
|
||||
-- Get current mode indicator
|
||||
local function get_mode()
|
||||
local mode = vim.api.nvim_get_mode().mode
|
||||
return mode_map[mode] or mode
|
||||
end
|
||||
|
||||
-- Get git branch from gitsigns
|
||||
local function get_git_branch()
|
||||
local branch = vim.b.gitsigns_head
|
||||
if branch and branch ~= "" then
|
||||
return " " .. branch
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
-- Get filename with modified indicator
|
||||
local function get_filename()
|
||||
local filename = vim.fn.expand("%:t")
|
||||
if filename == "" then
|
||||
filename = "[No Name]"
|
||||
end
|
||||
|
||||
local modified = vim.bo.modified and " [+]" or ""
|
||||
local readonly = vim.bo.readonly and " [RO]" or ""
|
||||
|
||||
return filename .. modified .. readonly
|
||||
end
|
||||
|
||||
-- Get file path (relative to cwd)
|
||||
local function get_filepath()
|
||||
local filepath = vim.fn.expand("%:~:.")
|
||||
if filepath == "" then
|
||||
return ""
|
||||
end
|
||||
return filepath
|
||||
end
|
||||
|
||||
-- Get current position
|
||||
local function get_position()
|
||||
local line = vim.fn.line(".")
|
||||
local col = vim.fn.col(".")
|
||||
local total = vim.fn.line("$")
|
||||
return string.format("%d:%d/%d", line, col, total)
|
||||
end
|
||||
|
||||
-- Get filetype
|
||||
local function get_filetype()
|
||||
local ft = vim.bo.filetype
|
||||
if ft == "" then
|
||||
return ""
|
||||
end
|
||||
return ft
|
||||
end
|
||||
|
||||
-- Build the statusline
|
||||
function M.statusline()
|
||||
local parts = {}
|
||||
|
||||
-- Left side
|
||||
table.insert(parts, " " .. get_mode() .. " ")
|
||||
table.insert(parts, get_git_branch())
|
||||
|
||||
local filepath = get_filepath()
|
||||
if filepath ~= "" then
|
||||
table.insert(parts, " " .. filepath)
|
||||
end
|
||||
|
||||
-- Modified indicator
|
||||
if vim.bo.modified then
|
||||
table.insert(parts, " [+]")
|
||||
end
|
||||
|
||||
-- Separator
|
||||
table.insert(parts, "%=")
|
||||
|
||||
-- Right side
|
||||
local ft = get_filetype()
|
||||
if ft ~= "" then
|
||||
table.insert(parts, ft .. " ")
|
||||
end
|
||||
|
||||
table.insert(parts, get_position() .. " ")
|
||||
|
||||
return table.concat(parts, "")
|
||||
end
|
||||
|
||||
-- Setup function to configure the statusline
|
||||
function M.setup()
|
||||
-- Use the %!v:lua.require() pattern
|
||||
vim.o.statusline = "%!v:lua.require('config.statusline').statusline()"
|
||||
|
||||
-- Ensure statusline is always shown
|
||||
vim.o.laststatus = 2
|
||||
end
|
||||
|
||||
return M
|
||||
25
lua/lsp/lua_ls.lua
Normal file
25
lua/lsp/lua_ls.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
-- Lua language server configuration
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
},
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
hint = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
13
lua/lsp/pyright.lua
Normal file
13
lua/lsp/pyright.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- Pyright (Python) language server configuration
|
||||
return {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = "basic",
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = "workspace",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
28
lua/lsp/rust_analyzer.lua
Normal file
28
lua/lsp/rust_analyzer.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- Rust Analyzer configuration with clippy integration
|
||||
return {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy",
|
||||
},
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
inlayHints = {
|
||||
bindingModeHints = { enable = true },
|
||||
chainingHints = { enable = true },
|
||||
closingBraceHints = { enable = true },
|
||||
closureReturnTypeHints = { enable = "always" },
|
||||
lifetimeElisionHints = { enable = "always" },
|
||||
parameterHints = { enable = true },
|
||||
typeHints = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
27
lua/lsp/ts_ls.lua
Normal file
27
lua/lsp/ts_ls.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-- TypeScript language server configuration
|
||||
return {
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
"otavioschwanck/arrow.nvim",
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
show_icons = true,
|
||||
leader_key = '-'
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
keys = {
|
||||
{ "gcc", mode = "n", desc = "Comment toggle current line" },
|
||||
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||
},
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
return {
|
||||
"nvimdev/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
-- Calculate vertical padding to center the dashboard
|
||||
local header_art = {
|
||||
" ██▒ █▓ ██▓ ███▄ ▄███▓",
|
||||
"▓██░ █▒▓██▒▓██▒▀█▀ ██▒",
|
||||
" ▓██ █▒░▒██▒▓██ ▓██░",
|
||||
" ▒██ █░░░██░▒██ ▒██ ",
|
||||
" ▒▀█░ ░██░▒██▒ ░██▒",
|
||||
" ░ ▐░ ░▓ ░ ▒░ ░ ░",
|
||||
" ░ ░░ ▒ ░░ ░ ░",
|
||||
" ░░ ▒ ░░ ░ ",
|
||||
" ░ ░ ░ ",
|
||||
" ░ ",
|
||||
}
|
||||
local center_items = 6
|
||||
local content_height = #header_art + 2 + (center_items * 2) -- header + spacing + center items
|
||||
local win_height = vim.fn.winheight(0)
|
||||
local padding = math.max(0, math.floor((win_height - content_height) / 2))
|
||||
|
||||
local header = {}
|
||||
for _ = 1, padding do
|
||||
table.insert(header, "")
|
||||
end
|
||||
for _, line in ipairs(header_art) do
|
||||
table.insert(header, line)
|
||||
end
|
||||
table.insert(header, "")
|
||||
table.insert(header, "")
|
||||
|
||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#83a598" })
|
||||
|
||||
require("dashboard").setup({
|
||||
theme = "doom",
|
||||
config = {
|
||||
header = header,
|
||||
center = {
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Find File ",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Recent Files ",
|
||||
key = "r",
|
||||
action = "Telescope oldfiles",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Find Text ",
|
||||
key = "g",
|
||||
action = "Telescope live_grep",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "File Explorer ",
|
||||
key = "e",
|
||||
action = "Neotree toggle",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Quit ",
|
||||
key = "q",
|
||||
action = "quit",
|
||||
},
|
||||
},
|
||||
footer = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
"barrettruth/diffs.nvim",
|
||||
ft = { "git", "fugitive", "diff" },
|
||||
opts = {
|
||||
hide_prefix = true,
|
||||
highlights = {
|
||||
gutter = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
67
lua/plugins/editor.lua
Normal file
67
lua/plugins/editor.lua
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
return {
|
||||
-- Autopairs
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Comment.nvim
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
keys = {
|
||||
{ "gcc", mode = "n", desc = "Comment toggle current line" },
|
||||
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||
},
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- Flash.nvim for navigation
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
modes = {
|
||||
search = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Supermaven AI completion
|
||||
{
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = "<Tab>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
ignore_filetypes = { "gitcommit", "TelescopePrompt" },
|
||||
color = {
|
||||
suggestion_color = vim.api.nvim_get_hl(0, { name = "Comment" }).fg,
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info",
|
||||
disable_inline_completion = false,
|
||||
disable_keymaps = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
return {
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
modes = {
|
||||
search = {
|
||||
enabled = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
||||
55
lua/plugins/fzf.lua
Normal file
55
lua/plugins/fzf.lua
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
return {
|
||||
"ibhagwan/fzf-lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
cmd = "FzfLua",
|
||||
keys = {
|
||||
-- Main keybinds
|
||||
{
|
||||
"<C-f>",
|
||||
function()
|
||||
local fzf = require("fzf-lua")
|
||||
local git_dir = vim.fn.system("git rev-parse --git-dir 2>/dev/null"):gsub("\n", "")
|
||||
if vim.v.shell_error == 0 and git_dir ~= "" then
|
||||
fzf.git_files()
|
||||
else
|
||||
fzf.files()
|
||||
end
|
||||
end,
|
||||
desc = "Find files",
|
||||
},
|
||||
{ "<C-g>", function() require("fzf-lua").live_grep() end, desc = "Live grep" },
|
||||
|
||||
-- Leader keybinds
|
||||
{ "<leader>ff", function() require("fzf-lua").files() end, desc = "Files" },
|
||||
{ "<leader>fg", function() require("fzf-lua").live_grep() end, desc = "Live grep" },
|
||||
{ "<leader>fb", function() require("fzf-lua").buffers() end, desc = "Buffers" },
|
||||
{ "<leader>fh", function() require("fzf-lua").help_tags() end, desc = "Help tags" },
|
||||
{ "<leader>fr", function() require("fzf-lua").resume() end, desc = "Resume last search" },
|
||||
{ "<leader>fo", function() require("fzf-lua").oldfiles() end, desc = "Recent files" },
|
||||
{ "<leader>fc", function() require("fzf-lua").commands() end, desc = "Commands" },
|
||||
{ "<leader>fk", function() require("fzf-lua").keymaps() end, desc = "Keymaps" },
|
||||
{ "<leader>f/", function() require("fzf-lua").search_history() end, desc = "Search history" },
|
||||
{ "<leader>f:", function() require("fzf-lua").command_history() end, desc = "Command history" },
|
||||
{ "<leader>fe", function() require("fzf-lua").files({ cwd = "~/.config" }) end, desc = "Config files" },
|
||||
-- Quickfix/loclist
|
||||
{ "gq", function() require("fzf-lua").quickfix() end, desc = "Quickfix" },
|
||||
{ "gl", function() require("fzf-lua").loclist() end, desc = "Loclist" },
|
||||
-- Git
|
||||
{ "<leader>GB", function() require("fzf-lua").git_branches() end, desc = "Git branches" },
|
||||
{ "<leader>Gc", function() require("fzf-lua").git_commits() end, desc = "Git commits" },
|
||||
{ "<leader>Gs", function() require("fzf-lua").git_status() end, desc = "Git status" },
|
||||
},
|
||||
opts = {
|
||||
"default-title",
|
||||
winopts = {
|
||||
border = "single",
|
||||
preview = {
|
||||
layout = "vertical",
|
||||
vertical = "down:50%",
|
||||
},
|
||||
},
|
||||
fzf_opts = {
|
||||
["--layout"] = "reverse",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,78 +1,83 @@
|
|||
return {
|
||||
-- Neogit: Modern Git interface with tree view
|
||||
-- Fugitive: The gold standard for Git in Vim
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
},
|
||||
config = function()
|
||||
require('neogit').setup({
|
||||
-- Neo-tree style integration
|
||||
kind = "split",
|
||||
commit_editor = {
|
||||
kind = "split",
|
||||
},
|
||||
popup = {
|
||||
kind = "split",
|
||||
},
|
||||
-- Signs for different git states
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
hunk = { "", "" },
|
||||
item = { "", "" },
|
||||
section = { "", "" },
|
||||
},
|
||||
-- Integrations
|
||||
integrations = {
|
||||
telescope = true,
|
||||
diffview = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
"tpope/vim-fugitive",
|
||||
cmd = { "Git", "G", "Gread", "Gwrite", "Gdiffsplit", "Gvdiffsplit", "Gblame" },
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>Neogit<cr>", desc = "Open Neogit" },
|
||||
{ "<leader>gc", "<cmd>Neogit commit<cr>", desc = "Git Commit" },
|
||||
{ "<leader>gp", "<cmd>Neogit push<cr>", desc = "Git Push" },
|
||||
{ "<leader>gl", "<cmd>Neogit pull<cr>", desc = "Git Pull" },
|
||||
{ "<leader>gg", "<cmd>Git<cr><cmd>only<cr>", desc = "Git status (fullscreen)" },
|
||||
{ "<leader>gc", "<cmd>Git commit<cr>", desc = "Git commit" },
|
||||
{ "<leader>gp", "<cmd>Git push<cr>", desc = "Git push" },
|
||||
{ "<leader>gl", "<cmd>Git pull<cr>", desc = "Git pull" },
|
||||
{ "<leader>gb", "<cmd>Git blame<cr>", desc = "Git blame" },
|
||||
{ "<leader>gd", "<cmd>Gvdiffsplit<cr>", desc = "Git diff vertical" },
|
||||
{ "<leader>gr", "<cmd>Gread<cr>", desc = "Git checkout file" },
|
||||
{ "<leader>gw", "<cmd>Gwrite<cr>", desc = "Git add file" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Diffview: Enhanced diff viewing
|
||||
-- Gitsigns: Git info in the gutter
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles" },
|
||||
config = function()
|
||||
-- Set up diff highlights before loading diffview
|
||||
vim.api.nvim_set_hl(0, "DiffAdd", { bg = "#2a3a2a" })
|
||||
vim.api.nvim_set_hl(0, "DiffChange", { bg = "#3a3a2a" })
|
||||
vim.api.nvim_set_hl(0, "DiffDelete", { bg = "#3a2a2a" })
|
||||
vim.api.nvim_set_hl(0, "DiffText", { bg = "#5a3d3d" })
|
||||
|
||||
require("diffview").setup({
|
||||
diff_binaries = false, -- Show diffs for binaries
|
||||
enhanced_diff_hl = true, -- Better word-level diff highlighting
|
||||
git_cmd = { "git" }, -- The git executable followed by default args.
|
||||
use_icons = true, -- Requires nvim-web-devicons
|
||||
show_help_hints = true, -- Show hints for how to open the help panel
|
||||
watch_index = true, -- Update views and index on git index changes.
|
||||
})
|
||||
end,
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "│" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "│" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "┃" },
|
||||
change = { text = "┃" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "┃" },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
linehl = false, -- disabled - let colorscheme handle
|
||||
word_diff = false,
|
||||
current_line_blame = false,
|
||||
current_line_blame_opts = {
|
||||
delay = 500,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gdo", "<cmd>DiffviewOpen<cr>", desc = "Open Diffview" },
|
||||
{ "<leader>gdc", "<cmd>DiffviewClose<cr>", desc = "Close Diffview" },
|
||||
{ "<leader>gdh", "<cmd>DiffviewFileHistory<cr>", desc = "File History" },
|
||||
{ "]g", "<cmd>Gitsigns next_hunk<cr>", desc = "Next hunk" },
|
||||
{ "[g", "<cmd>Gitsigns prev_hunk<cr>", desc = "Prev hunk" },
|
||||
{ "<leader>ghs", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage hunk" },
|
||||
{ "<leader>ghr", "<cmd>Gitsigns reset_hunk<cr>", desc = "Reset hunk" },
|
||||
{ "<leader>ghp", "<cmd>Gitsigns preview_hunk<cr>", desc = "Preview hunk" },
|
||||
{ "<leader>gB", "<cmd>Gitsigns toggle_current_line_blame<cr>", desc = "Toggle line blame" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Fugitive: Additional Git commands
|
||||
-- Snacks: GitHub integration (browse, issues, PRs)
|
||||
{
|
||||
'tpope/vim-fugitive',
|
||||
cmd = { 'Git', 'Gblame', 'Gdiff', 'Gread', 'Gwrite', 'Ggrep' },
|
||||
"folke/snacks.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
gitbrowse = {},
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>gb', '<cmd>Git blame<cr>', desc = 'Git Blame' },
|
||||
{ '<leader>gd', '<cmd>Gdiff<cr>', desc = 'Git Diff (Fugitive)' },
|
||||
}
|
||||
{ "<leader>go", function() Snacks.gitbrowse() end, desc = "Open in GitHub" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Diffs.nvim: Better diff highlighting
|
||||
{
|
||||
"barrettruth/diffs.nvim",
|
||||
ft = { "git", "fugitive", "diff" },
|
||||
config = function()
|
||||
vim.g.diffs = {
|
||||
hide_prefix = true,
|
||||
highlights = {
|
||||
gutter = true,
|
||||
blend_alpha = 0.4,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
linehl = true,
|
||||
word_diff = false,
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "│" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "┃" },
|
||||
change = { text = "┃" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
on_attach = function(bufnr)
|
||||
-- Unstaged changes - line highlighting
|
||||
vim.api.nvim_set_hl(0, "GitSignsAddLn", { bg = "#2a3a2a" })
|
||||
vim.api.nvim_set_hl(0, "GitSignsChangeLn", { bg = "#3a3a2a" })
|
||||
vim.api.nvim_set_hl(0, "GitSignsDeleteLn", { bg = "#3a2a2a" })
|
||||
-- Staged changes - NO line highlighting (gutter only)
|
||||
vim.api.nvim_set_hl(0, "GitSignsStagedAddLn", {})
|
||||
vim.api.nvim_set_hl(0, "GitSignsStagedChangeLn", {})
|
||||
vim.api.nvim_set_hl(0, "GitSignsStagedDeleteLn", {})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,89 +1,66 @@
|
|||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls", -- Lua
|
||||
"pyright", -- Python
|
||||
"ts_ls", -- TypeScript/JavaScript (tsserver renamed)
|
||||
"rust_analyzer", -- Rust
|
||||
"gopls", -- Go
|
||||
"clangd", -- C/C++
|
||||
"bashls", -- Bash
|
||||
"jsonls", -- JSON
|
||||
"yamlls", -- YAML
|
||||
"html", -- HTML
|
||||
"cssls", -- CSS
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
config = function()
|
||||
local lsp_config = require("config.lsp")
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
-- Basic LSP keymaps
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "<C-]>", vim.lsp.buf.definition, opts) -- Ctrl+] for go to definition
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Auto-setup all installed servers
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
-- Default handler for all servers
|
||||
function(server_name)
|
||||
lspconfig[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
|
||||
-- Custom configuration for specific servers
|
||||
["lua_ls"] = function()
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
-- Set up Mason for auto-installation
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"ts_ls",
|
||||
"rust_analyzer",
|
||||
"gopls",
|
||||
"clangd",
|
||||
"bashls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"cssls",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
["pyright"] = function()
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = "basic",
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = lsp_config.capabilities()
|
||||
|
||||
-- LspAttach autocmd for keymaps
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
if client then
|
||||
lsp_config.on_attach(client, ev.buf)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Helper to load per-server config from lua/lsp/ if it exists
|
||||
local function get_server_config(server_name)
|
||||
local ok, server_config = pcall(require, "lsp." .. server_name)
|
||||
if ok then
|
||||
return server_config
|
||||
end
|
||||
return {}
|
||||
end
|
||||
|
||||
-- Auto-setup all installed servers
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
-- Default handler for all servers
|
||||
function(server_name)
|
||||
local server_config = get_server_config(server_name)
|
||||
local config = vim.tbl_deep_extend("force", {
|
||||
capabilities = capabilities,
|
||||
}, server_config)
|
||||
|
||||
lspconfig[server_name].setup(config)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{ "<leader>e", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<BS>", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<leader>gs", "<cmd>Neotree git_status left<cr>", desc = "Focus git status" },
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
width = 30,
|
||||
},
|
||||
-- Source selector (tabs) to switch between files/git
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
content_layout = "center",
|
||||
tabs_layout = "equal",
|
||||
sources = {
|
||||
{ source = "filesystem", display_name = " Files" },
|
||||
{ source = "git_status", display_name = " Git" },
|
||||
},
|
||||
},
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true, -- Highlight and auto-expand to current file
|
||||
leave_dirs_open = false, -- Close dirs when navigating away
|
||||
},
|
||||
filtered_items = {
|
||||
visible = true, -- Show filtered items (hidden files)
|
||||
hide_dotfiles = false, -- Show dotfiles
|
||||
hide_gitignored = false, -- Show git ignored files
|
||||
hide_hidden = false, -- Show hidden files on Windows
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
{
|
||||
"nvchad/base46",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
build = function()
|
||||
require("base46").load_all_highlights()
|
||||
end,
|
||||
config = function()
|
||||
-- Generate cache on first load if it doesn't exist
|
||||
local cache_path = vim.g.base46_cache
|
||||
if not vim.uv.fs_stat(cache_path) then
|
||||
vim.fn.mkdir(cache_path, "p")
|
||||
require("base46").load_all_highlights()
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvchad/ui",
|
||||
lazy = false,
|
||||
priority = 999,
|
||||
config = function()
|
||||
require("nvchad")
|
||||
end,
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -6,10 +6,8 @@ return {
|
|||
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory" },
|
||||
},
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
columns = {
|
||||
"icon",
|
||||
},
|
||||
default_file_explorer = true, -- nvim . opens oil
|
||||
columns = { "icon" },
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
},
|
||||
|
|
@ -17,17 +15,10 @@ return {
|
|||
["g?"] = "actions.show_help",
|
||||
["<CR>"] = "actions.select",
|
||||
["<C-v>"] = "actions.select_vsplit",
|
||||
["<C-s>"] = "actions.select_split",
|
||||
["<C-t>"] = "actions.select_tab",
|
||||
["<C-x>"] = "actions.select_split",
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-c>"] = "actions.close",
|
||||
["<C-r>"] = "actions.refresh",
|
||||
["-"] = "actions.parent",
|
||||
["_"] = "actions.open_cwd",
|
||||
["`"] = "actions.cd",
|
||||
["~"] = "actions.tcd",
|
||||
["gs"] = "actions.change_sort",
|
||||
["gx"] = "actions.open_external",
|
||||
["g."] = "actions.toggle_hidden",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
return {
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = "<Tab>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
ignore_filetypes = { "gitcommit", "TelescopePrompt" },
|
||||
color = {
|
||||
suggestion_color = "#808080",
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info",
|
||||
disable_inline_completion = false,
|
||||
disable_keymaps = false,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
cmd = "Telescope",
|
||||
keys = {
|
||||
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" },
|
||||
{ "<leader>fs", function()
|
||||
require("telescope.builtin").find_files({
|
||||
find_command = { "fd", "--type", "f", "--max-depth", "3", "--strip-cwd-prefix", "--hidden", "--exclude", ".git", "--exclude", "node_modules", "--exclude", ".next" }
|
||||
})
|
||||
end, desc = "Shallow find files" },
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
|
||||
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"node_modules",
|
||||
".next",
|
||||
".git",
|
||||
"dist",
|
||||
"build",
|
||||
"%.lock",
|
||||
},
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
"--glob=!.git/",
|
||||
"--glob=!node_modules/",
|
||||
"--glob=!.next/",
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-j>"] = "move_selection_next",
|
||||
["<C-k>"] = "move_selection_previous",
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "--hidden", "--exclude", ".git", "--exclude", "node_modules", "--exclude", ".next" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
43
lua/plugins/tree.lua
Normal file
43
lua/plugins/tree.lua
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{ "<C-e>", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<leader>e", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<BS>", "<cmd>Neotree toggle<cr>", desc = "Toggle file explorer" },
|
||||
{ "<leader>gs", "<cmd>Neotree git_status left<cr>", desc = "Git status tree" },
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
width = 30,
|
||||
mappings = {
|
||||
["<space>"] = "none",
|
||||
},
|
||||
},
|
||||
-- Source selector at top (just Files, no Git tab)
|
||||
source_selector = {
|
||||
winbar = false,
|
||||
},
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
leave_dirs_open = false,
|
||||
},
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
hide_hidden = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,17 +1,92 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "html", "css", "json", "yaml", "markdown" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- Treesitter for syntax highlighting and code understanding
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"python",
|
||||
"html",
|
||||
"css",
|
||||
"json",
|
||||
"yaml",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"regex",
|
||||
},
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["ai"] = "@conditional.outer",
|
||||
["ii"] = "@conditional.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["ib"] = "@block.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]f"] = "@function.outer",
|
||||
["]c"] = "@class.outer",
|
||||
["]a"] = "@parameter.inner",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]F"] = "@function.outer",
|
||||
["]C"] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[f"] = "@function.outer",
|
||||
["[c"] = "@class.outer",
|
||||
["[a"] = "@parameter.inner",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[F"] = "@function.outer",
|
||||
["[C"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>sn"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>sp"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
155
lua/plugins/ui.lua
Normal file
155
lua/plugins/ui.lua
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
return {
|
||||
-- Gruvbox colorscheme
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true,
|
||||
undercurl = true,
|
||||
underline = false,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = false,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = false,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true,
|
||||
contrast = "hard",
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = true,
|
||||
})
|
||||
vim.cmd.colorscheme("gruvbox")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Lualine statusline
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
lazy = false,
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "gruvbox",
|
||||
icons_enabled = false,
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff" },
|
||||
lualine_c = { { "filename", path = 1 } },
|
||||
lualine_x = { "diagnostics" },
|
||||
lualine_y = { "filetype" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Dashboard
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local header_art = {
|
||||
" ██▒ █▓ ██▓ ███▄ ▄███▓",
|
||||
"▓██░ █▒▓██▒▓██▒▀█▀ ██▒",
|
||||
" ▓██ █▒░▒██▒▓██ ▓██░",
|
||||
" ▒██ █░░░██░▒██ ▒██ ",
|
||||
" ▒▀█░ ░██░▒██▒ ░██▒",
|
||||
" ░ ▐░ ░▓ ░ ▒░ ░ ░",
|
||||
" ░ ░░ ▒ ░░ ░ ░",
|
||||
" ░░ ▒ ░░ ░ ",
|
||||
" ░ ░ ░ ",
|
||||
" ░ ",
|
||||
}
|
||||
local center_items = 6
|
||||
local content_height = #header_art + 2 + (center_items * 2)
|
||||
local win_height = vim.fn.winheight(0)
|
||||
local padding = math.max(0, math.floor((win_height - content_height) / 2))
|
||||
|
||||
local header = {}
|
||||
for _ = 1, padding do
|
||||
table.insert(header, "")
|
||||
end
|
||||
for _, line in ipairs(header_art) do
|
||||
table.insert(header, line)
|
||||
end
|
||||
table.insert(header, "")
|
||||
table.insert(header, "")
|
||||
|
||||
require("dashboard").setup({
|
||||
theme = "doom",
|
||||
config = {
|
||||
header = header,
|
||||
center = {
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Find File ",
|
||||
key = "f",
|
||||
action = function() require("fzf-lua").files() end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Recent Files ",
|
||||
key = "r",
|
||||
action = function() require("fzf-lua").oldfiles() end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Find Text ",
|
||||
key = "g",
|
||||
action = function() require("fzf-lua").live_grep() end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "File Explorer ",
|
||||
key = "e",
|
||||
action = function() vim.cmd("Neotree toggle") end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Quit ",
|
||||
key = "q",
|
||||
action = function() vim.cmd("quit") end,
|
||||
},
|
||||
},
|
||||
footer = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Which-key for keybinding hints
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
win = {
|
||||
border = { "┏", "━", "┓", "┃", "┛", "━", "┗", "┃" },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
win = {
|
||||
border = { "┏", "━", "┓", "┃", "┛","━", "┗", "┃" },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
}
|
||||
36
plugin/autocmds.lua
Normal file
36
plugin/autocmds.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
-- Autocommands
|
||||
local api = vim.api
|
||||
local augroup = api.nvim_create_augroup("UserAutocmds", { clear = true })
|
||||
|
||||
-- Highlight on yank
|
||||
api.nvim_create_autocmd("TextYankPost", {
|
||||
group = augroup,
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "Visual", timeout = 200 })
|
||||
end,
|
||||
desc = "Highlight text on yank",
|
||||
})
|
||||
|
||||
-- Restore cursor position on file open
|
||||
api.nvim_create_autocmd("BufReadPost", {
|
||||
group = augroup,
|
||||
callback = function()
|
||||
local mark = api.nvim_buf_get_mark(0, '"')
|
||||
local line_count = api.nvim_buf_line_count(0)
|
||||
if mark[1] > 0 and mark[1] <= line_count then
|
||||
pcall(api.nvim_win_set_cursor, 0, mark)
|
||||
end
|
||||
end,
|
||||
desc = "Restore cursor position",
|
||||
})
|
||||
|
||||
-- Auto-resize splits on VimResized
|
||||
api.nvim_create_autocmd("VimResized", {
|
||||
group = augroup,
|
||||
callback = function()
|
||||
local current_tab = vim.fn.tabpagenr()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
vim.cmd("tabnext " .. current_tab)
|
||||
end,
|
||||
desc = "Auto-resize splits",
|
||||
})
|
||||
26
plugin/keymaps.lua
Normal file
26
plugin/keymaps.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Keymaps using global map() helper
|
||||
|
||||
-- File operations
|
||||
map("n", "<leader>w", "<cmd>w<cr>", { desc = "Save file" })
|
||||
map("n", "<leader>q", "<cmd>q<cr>", { desc = "Quit" })
|
||||
|
||||
-- Buffer navigation
|
||||
map("n", "<Tab>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
map("n", "<S-Tab>", "<cmd>bprev<cr>", { desc = "Previous buffer" })
|
||||
map("n", "<leader>x", "<cmd>bdelete<cr>", { desc = "Close buffer" })
|
||||
map("n", "<leader>b", "<cmd>enew<cr>", { desc = "New buffer" })
|
||||
|
||||
-- Window navigation
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Move to left window" })
|
||||
map("n", "<C-j>", "<C-w>j", { desc = "Move to lower window" })
|
||||
map("n", "<C-k>", "<C-w>k", { desc = "Move to upper window" })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Move to right window" })
|
||||
|
||||
-- Better defaults
|
||||
map("n", "J", "mzJ`z", { desc = "Join lines keeping cursor position" })
|
||||
map("x", "x", '"_x', { desc = "Delete char without yanking" })
|
||||
map("x", "p", '"_dP', { desc = "Paste without yanking replaced text" })
|
||||
map("n", "<Esc>", "<cmd>nohlsearch<cr>", { desc = "Clear search highlight" })
|
||||
|
||||
-- Terminal
|
||||
map("t", "<Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
47
plugin/options.lua
Normal file
47
plugin/options.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
-- Vim options
|
||||
local o, opt = vim.o, vim.opt
|
||||
|
||||
-- Line numbers
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
|
||||
-- Indentation
|
||||
o.tabstop = 2
|
||||
o.shiftwidth = 2
|
||||
o.expandtab = true
|
||||
o.smartindent = true
|
||||
o.breakindent = true
|
||||
|
||||
-- Search
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
o.hlsearch = false
|
||||
o.incsearch = true
|
||||
|
||||
-- UI
|
||||
o.termguicolors = true
|
||||
o.cursorline = true
|
||||
o.scrolloff = 8
|
||||
o.signcolumn = "yes"
|
||||
o.wrap = false
|
||||
o.showmode = false
|
||||
o.laststatus = 3
|
||||
o.cmdheight = 0
|
||||
|
||||
opt.fillchars = { vert = "│", fold = "─", foldsep = "│", diff = "─" }
|
||||
opt.shortmess:append("S")
|
||||
|
||||
-- Splits
|
||||
o.splitbelow = true
|
||||
o.splitright = true
|
||||
|
||||
-- Files
|
||||
o.swapfile = false
|
||||
o.backup = false
|
||||
o.undofile = true
|
||||
o.undodir = vim.fn.stdpath("data") .. "/undo"
|
||||
|
||||
-- Misc
|
||||
o.updatetime = 250
|
||||
o.mouse = "a"
|
||||
o.clipboard = "unnamedplus"
|
||||
Loading…
Add table
Add a link
Reference in a new issue