mirror of
https://github.com/Cian-H/my_nvim_config.git
synced 2025-12-22 20:21:57 +00:00
Stylua formatting pass
This commit is contained in:
@@ -2,10 +2,10 @@
|
|||||||
vim.wo.number = true -- Line numbers
|
vim.wo.number = true -- Line numbers
|
||||||
vim.wo.relativenumber = true
|
vim.wo.relativenumber = true
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.mouse = "a" -- enable mouse mode for window resizing
|
vim.opt.mouse = "a" -- enable mouse mode for window resizing
|
||||||
vim.opt.clipboard = "unnamedplus" -- share system and nvim clipboard
|
vim.opt.clipboard = "unnamedplus" -- share system and nvim clipboard
|
||||||
vim.g.have_nerd_font = true
|
vim.g.have_nerd_font = true
|
||||||
vim.opt.undofile = true -- Save undo history
|
vim.opt.undofile = true -- Save undo history
|
||||||
-- Add shell-specific settings
|
-- Add shell-specific settings
|
||||||
local shell_path = os.getenv("SHELL") or ""
|
local shell_path = os.getenv("SHELL") or ""
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ if (vim.fn.executable("nu") == 1) and shell_path:find("nu") then
|
|||||||
vim.opt.shellxquote = ""
|
vim.opt.shellxquote = ""
|
||||||
vim.opt.shellquote = ""
|
vim.opt.shellquote = ""
|
||||||
vim.opt.shellpipe =
|
vim.opt.shellpipe =
|
||||||
"| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s } | into record"
|
"| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s } | into record"
|
||||||
end
|
end
|
||||||
-- Add custom commentstring definitions
|
-- Add custom commentstring definitions
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
@@ -61,8 +61,8 @@ vim.opt.smartindent = true
|
|||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
vim.opt.smarttab = true
|
vim.opt.smarttab = true
|
||||||
vim.opt.inccommand = "split" -- Preview substitutions live, as you type!
|
vim.opt.inccommand = "split" -- Preview substitutions live, as you type!
|
||||||
vim.opt.cursorline = true -- Show which line your cursor is on
|
vim.opt.cursorline = true -- Show which line your cursor is on
|
||||||
vim.opt.scrolloff = 4 -- Minimal number of screen lines to keep above and below the cursor.
|
vim.opt.scrolloff = 4 -- Minimal number of screen lines to keep above and below the cursor.
|
||||||
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
||||||
vim.opt.hlsearch = true
|
vim.opt.hlsearch = true
|
||||||
|
|
||||||
|
|||||||
@@ -79,21 +79,21 @@ return {
|
|||||||
},
|
},
|
||||||
globals = {
|
globals = {
|
||||||
-- Window Navigation
|
-- Window Navigation
|
||||||
{ "<A-h>", "<C-w>h", desc = "Window Left" },
|
{ "<A-h>", "<C-w>h", desc = "Window Left" },
|
||||||
{ "<A-j>", "<C-w>j", desc = "Window Down" },
|
{ "<A-j>", "<C-w>j", desc = "Window Down" },
|
||||||
{ "<A-k>", "<C-w>k", desc = "Window Up" },
|
{ "<A-k>", "<C-w>k", desc = "Window Up" },
|
||||||
{ "<A-l>", "<C-w>l", desc = "Window Right" },
|
{ "<A-l>", "<C-w>l", desc = "Window Right" },
|
||||||
-- Window Resizing
|
-- Window Resizing
|
||||||
{ "<A-=>", "<C-w>+", desc = "Resize Increase Height" },
|
{ "<A-=>", "<C-w>+", desc = "Resize Increase Height" },
|
||||||
{ "<A-->", "<C-w>-", desc = "Resize Decrease Height" },
|
{ "<A-->", "<C-w>-", desc = "Resize Decrease Height" },
|
||||||
{ "<A-.>", "<C-w>>", desc = "Resize Increase Width" },
|
{ "<A-.>", "<C-w>>", desc = "Resize Increase Width" },
|
||||||
{ "<A-,>", "<C-w><", desc = "Resize Decrease Width" },
|
{ "<A-,>", "<C-w><", desc = "Resize Decrease Width" },
|
||||||
-- Splits
|
-- Splits
|
||||||
{ "<A-n>", "<C-w>s", desc = "Split Window Horizontal" },
|
{ "<A-n>", "<C-w>s", desc = "Split Window Horizontal" },
|
||||||
{ "<A-;>", "<C-w>x", desc = "Swap Window" },
|
{ "<A-;>", "<C-w>x", desc = "Swap Window" },
|
||||||
{ "<A-q>", ":q<CR>", desc = "Close Window" },
|
{ "<A-q>", ":q<CR>", desc = "Close Window" },
|
||||||
-- Misc
|
-- Misc
|
||||||
{ "<Esc>", "<cmd>nohlsearch<CR>", desc = "Clear Highlight" },
|
{ "<Esc>", "<cmd>nohlsearch<CR>", desc = "Clear Highlight" },
|
||||||
{ "<leader>dd", vim.diagnostic.open_float, desc = "Show [D]iagnostics" },
|
{ "<leader>dd", vim.diagnostic.open_float, desc = "Show [D]iagnostics" },
|
||||||
},
|
},
|
||||||
harpoon = {
|
harpoon = {
|
||||||
@@ -174,45 +174,59 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
{ "K", vim.lsp.buf.hover, desc = "[K] Hover Documentation" },
|
{ "K", vim.lsp.buf.hover, desc = "[K] Hover Documentation" },
|
||||||
{
|
{
|
||||||
"gd",
|
"gd",
|
||||||
function() require("telescope.builtin").lsp_definitions() end,
|
function()
|
||||||
desc = "[G]oto [D]efinition"
|
require("telescope.builtin").lsp_definitions()
|
||||||
|
end,
|
||||||
|
desc = "[G]oto [D]efinition",
|
||||||
},
|
},
|
||||||
{ "ge", vim.lsp.buf.declaration, desc = "[G]oto D[e]claration" },
|
{ "ge", vim.lsp.buf.declaration, desc = "[G]oto D[e]claration" },
|
||||||
{
|
{
|
||||||
"gi",
|
"gi",
|
||||||
function() require("telescope.builtin").lsp_implementations() end,
|
function()
|
||||||
desc = "[G]oto [I]mplementation"
|
require("telescope.builtin").lsp_implementations()
|
||||||
|
end,
|
||||||
|
desc = "[G]oto [I]mplementation",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gr",
|
"gr",
|
||||||
function() require("telescope.builtin").lsp_references() end,
|
function()
|
||||||
desc = "[G]oto [R]eferences"
|
require("telescope.builtin").lsp_references()
|
||||||
|
end,
|
||||||
|
desc = "[G]oto [R]eferences",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gt",
|
"gt",
|
||||||
function() require("telescope.builtin").lsp_type_definitions() end,
|
function()
|
||||||
desc = "[G]oto [T]ype"
|
require("telescope.builtin").lsp_type_definitions()
|
||||||
|
end,
|
||||||
|
desc = "[G]oto [T]ype",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>ss",
|
"<leader>ss",
|
||||||
function() require("telescope.builtin").lsp_document_symbols() end,
|
function()
|
||||||
desc = "[S]earch [S]ymbols"
|
require("telescope.builtin").lsp_document_symbols()
|
||||||
|
end,
|
||||||
|
desc = "[S]earch [S]ymbols",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>ws",
|
"<leader>ws",
|
||||||
function() require("telescope.builtin").lsp_dynamic_workspace_symbols() end,
|
function()
|
||||||
desc = "[W]orkspace [S]ymbols"
|
require("telescope.builtin").lsp_dynamic_workspace_symbols()
|
||||||
|
end,
|
||||||
|
desc = "[W]orkspace [S]ymbols",
|
||||||
},
|
},
|
||||||
{ "<leader>r", vim.lsp.buf.rename, desc = "[R]ename" },
|
{ "<leader>r", vim.lsp.buf.rename, desc = "[R]ename" },
|
||||||
{ "<leader>ca", vim.lsp.buf.code_action, desc = "[C]ode [A]ction" },
|
{ "<leader>ca", vim.lsp.buf.code_action, desc = "[C]ode [A]ction" },
|
||||||
{ "<leader>f", vim.lsp.buf.format, desc = "[F]ormat" },
|
{ "<leader>f", vim.lsp.buf.format, desc = "[F]ormat" },
|
||||||
{
|
{
|
||||||
"<leader>ci",
|
"<leader>ci",
|
||||||
function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end,
|
function()
|
||||||
desc = "[I]nlay Hints"
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
|
end,
|
||||||
|
desc = "[I]nlay Hints",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
neogen = {
|
neogen = {
|
||||||
@@ -277,10 +291,10 @@ return {
|
|||||||
{ "<leader>te", vim.cmd.Oil, desc = "[T]ree [E]dit", mode = "n" },
|
{ "<leader>te", vim.cmd.Oil, desc = "[T]ree [E]dit", mode = "n" },
|
||||||
},
|
},
|
||||||
overseer = {
|
overseer = {
|
||||||
{ "<leader>ob", vim.cmd.OverseerBuild, desc = "[O]verseer [B]uild", mode = "n" },
|
{ "<leader>ob", vim.cmd.OverseerBuild, desc = "[O]verseer [B]uild", mode = "n" },
|
||||||
{ "<leader>oc", vim.cmd.OverseerRunCmd, desc = "[O]verseer Run [C]ommand", mode = "n" },
|
{ "<leader>oc", vim.cmd.OverseerRunCmd, desc = "[O]verseer Run [C]ommand", mode = "n" },
|
||||||
{ "<leader>or", vim.cmd.OverseerRun, desc = "[O]verseer [R]un", mode = "n" },
|
{ "<leader>or", vim.cmd.OverseerRun, desc = "[O]verseer [R]un", mode = "n" },
|
||||||
{ "<leader>ot", vim.cmd.OverseerToggle, desc = "[O]verseer [T]oggle", mode = "n" },
|
{ "<leader>ot", vim.cmd.OverseerToggle, desc = "[O]verseer [T]oggle", mode = "n" },
|
||||||
},
|
},
|
||||||
precognition = {
|
precognition = {
|
||||||
{
|
{
|
||||||
@@ -424,7 +438,7 @@ return {
|
|||||||
"<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>",
|
"<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>",
|
||||||
desc = "Todo/Fix/Fixme",
|
desc = "Todo/Fix/Fixme",
|
||||||
},
|
},
|
||||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
||||||
{
|
{
|
||||||
"<leader>sT",
|
"<leader>sT",
|
||||||
"<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>",
|
"<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>",
|
||||||
@@ -438,14 +452,14 @@ return {
|
|||||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||||
desc = "Buffer Diagnostics",
|
desc = "Buffer Diagnostics",
|
||||||
},
|
},
|
||||||
{ "<leader>cs", "<cmd>Trouble symbols toggle<cr>", desc = "Symbols" },
|
{ "<leader>cs", "<cmd>Trouble symbols toggle<cr>", desc = "Symbols" },
|
||||||
{
|
{
|
||||||
"<leader>cS",
|
"<leader>cS",
|
||||||
"<cmd>Trouble lsp toggle<cr>",
|
"<cmd>Trouble lsp toggle<cr>",
|
||||||
desc = "LSP references/definitions/... (Trouble)",
|
desc = "LSP references/definitions/... (Trouble)",
|
||||||
},
|
},
|
||||||
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List" },
|
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List" },
|
||||||
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List" },
|
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List" },
|
||||||
{
|
{
|
||||||
"[q",
|
"[q",
|
||||||
function()
|
function()
|
||||||
@@ -491,7 +505,7 @@ return {
|
|||||||
vim.notify("Rainbow Delimiters: OFF", vim.log.levels.INFO)
|
vim.notify("Rainbow Delimiters: OFF", vim.log.levels.INFO)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
desc = "Toggle Rainbow Delimiters"
|
desc = "Toggle Rainbow Delimiters",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
undotree = {
|
undotree = {
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ for _, map in ipairs(keys) do
|
|||||||
vim.keymap.set("n", map[1], map[2], {
|
vim.keymap.set("n", map[1], map[2], {
|
||||||
noremap = true,
|
noremap = true,
|
||||||
silent = true,
|
silent = true,
|
||||||
desc = map.desc
|
desc = map.desc,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ return {
|
|||||||
preset = "super-tab",
|
preset = "super-tab",
|
||||||
},
|
},
|
||||||
appearance = {
|
appearance = {
|
||||||
nerd_font_variant = "mono"
|
nerd_font_variant = "mono",
|
||||||
},
|
},
|
||||||
completion = { documentation = { auto_show = true } },
|
completion = { documentation = { auto_show = true } },
|
||||||
sources = {
|
sources = {
|
||||||
default = { "lsp", "path", "snippets", "buffer" },
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
},
|
},
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" }
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
},
|
},
|
||||||
opts_extend = { "sources.default" }
|
opts_extend = { "sources.default" },
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ return { -- Non programming quality of life utilities go here
|
|||||||
path = fallback_path,
|
path = fallback_path,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.notify("Obsidian: 'Work_Notes' not found. Using fallback path.", vim.log.levels.WARN)
|
vim.notify(
|
||||||
|
"Obsidian: 'Work_Notes' not found. Using fallback path.",
|
||||||
|
vim.log.levels.WARN
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return {
|
|||||||
for _, map in ipairs(lsp_keys) do
|
for _, map in ipairs(lsp_keys) do
|
||||||
vim.keymap.set("n", map[1], map[2], {
|
vim.keymap.set("n", map[1], map[2], {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
desc = "LSP: " .. map.desc
|
desc = "LSP: " .. map.desc,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -55,6 +55,6 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "fladson/vim-kitty", ft = "kitty" },
|
{ "fladson/vim-kitty", ft = "kitty" },
|
||||||
{ "scallop-lang/vim-scallop", ft = "scallop" },
|
{ "scallop-lang/vim-scallop", ft = "scallop" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return { -- Mini is so varied it's hard to categorise. So i dumped my mini installs here
|
return { -- Mini is so varied it's hard to categorise. So i dumped my mini installs here
|
||||||
{ -- Collection of various small independent plugins/modules
|
{ -- Collection of various small independent plugins/modules
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
-- Better Around/Inside textobjects
|
-- Better Around/Inside textobjects
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return { -- UI components and other visual elements are declared here
|
return { -- UI components and other visual elements are declared here
|
||||||
{ -- Theme
|
{ -- Theme
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
@@ -133,5 +133,5 @@ return { -- UI components and other visual elements are declared here
|
|||||||
config = function()
|
config = function()
|
||||||
require("rainbow-delimiters.setup").setup()
|
require("rainbow-delimiters.setup").setup()
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ return { -- General programming utilities go here
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Privilege escalation plugin
|
-- Privilege escalation plugin
|
||||||
{ "lambdalisue/suda.vim", event = "VeryLazy" },
|
{ "lambdalisue/suda.vim", event = "VeryLazy" },
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
cmd = { "Trouble" },
|
cmd = { "Trouble" },
|
||||||
|
|||||||
Reference in New Issue
Block a user