feat(nvim): smaller updates
This commit is contained in:
parent
bace762f66
commit
c661810b89
5 changed files with 65 additions and 46 deletions
|
@ -25,6 +25,7 @@ vim.o.pumheight = 15
|
||||||
-- split directions
|
-- split directions
|
||||||
vim.o.splitbelow = true
|
vim.o.splitbelow = true
|
||||||
vim.o.splitright = true
|
vim.o.splitright = true
|
||||||
|
vim.o.wrap = false
|
||||||
-- redefine word boundaries - '_' is a word seperator, this helps with snake_case
|
-- redefine word boundaries - '_' is a word seperator, this helps with snake_case
|
||||||
vim.opt.iskeyword:remove("_")
|
vim.opt.iskeyword:remove("_")
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
local colors = require("catppuccin.palettes").get_palette()
|
|
||||||
vim.g.catppuccin_flavour = "mocha"
|
vim.g.catppuccin_flavour = "mocha"
|
||||||
|
|
||||||
local darkmode_overrides = {
|
|
||||||
base = "#000000",
|
|
||||||
crust = "#000000",
|
|
||||||
mantle = "#000000",
|
|
||||||
-- surface0 = "#101010",
|
|
||||||
-- surface1 = "#141414",
|
|
||||||
-- surface2 = "#181818",
|
|
||||||
-- overlay1 = "#202020",
|
|
||||||
-- overlay2 = "#242424",
|
|
||||||
-- overlay3 = "#282828",
|
|
||||||
}
|
|
||||||
|
|
||||||
require("catppuccin").setup({
|
require("catppuccin").setup({
|
||||||
dim_inactive = {
|
dim_inactive = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -76,18 +63,24 @@ require("catppuccin").setup({
|
||||||
vim_sneak = false,
|
vim_sneak = false,
|
||||||
vimwiki = true,
|
vimwiki = true,
|
||||||
},
|
},
|
||||||
custom_highlights = {
|
highlight_overrides = {
|
||||||
DashboardHeader = { fg = colors.pink },
|
mocha = function(colors)
|
||||||
DashboardCenter = { fg = colors.peach },
|
return {
|
||||||
DashboardShortCut = { fg = colors.yellow },
|
DashboardHeader = { fg = colors.pink },
|
||||||
DashboardFooter = { fg = colors.maroon },
|
DashboardCenter = { fg = colors.peach },
|
||||||
FloatBorder = { fg = colors.overlay0 },
|
DashboardShortCut = { fg = colors.yellow },
|
||||||
TelescopeBorder = { link = "FloatBorder" },
|
DashboardFooter = { fg = colors.maroon },
|
||||||
|
FloatBorder = { fg = colors.overlay0 },
|
||||||
|
TelescopeBorder = { link = "FloatBorder" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
color_overrides = {
|
color_overrides = {
|
||||||
mocha = darkmode_overrides,
|
mocha = {
|
||||||
macchiato = darkmode_overrides,
|
base = "#000000",
|
||||||
frappe = darkmode_overrides,
|
crust = "#000000",
|
||||||
|
mantle = "#000000",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,24 @@
|
||||||
require("colorizer").setup({
|
require("colorizer").setup({
|
||||||
user_default_options = {
|
user_default_options = {
|
||||||
RGB = true, -- #RGB hex codes
|
RGB = true,
|
||||||
RRGGBB = true, -- #RRGGBB hex codes
|
RRGGBB = true,
|
||||||
names = false, -- "Name" codes like Blue or blue
|
names = false,
|
||||||
RRGGBBAA = false, -- #RRGGBBAA hex codes
|
RRGGBBAA = true,
|
||||||
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
AARRGGBB = false,
|
||||||
rgb_fn = false, -- CSS rgb() and rgba() functions
|
rgb_fn = false,
|
||||||
hsl_fn = false, -- CSS hsl() and hsla() functions
|
hsl_fn = false,
|
||||||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
css = false,
|
||||||
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
css_fn = false,
|
||||||
-- Available modes for `mode`: foreground, background, virtualtext
|
mode = "background",
|
||||||
mode = "background", -- Set the display mode.
|
|
||||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
|
||||||
-- True is same as normal
|
|
||||||
tailwind = true,
|
tailwind = true,
|
||||||
-- parsers can contain values used in |user_default_options|
|
sass = { enable = true },
|
||||||
sass = { enable = true }, -- Enable sass colors
|
virtualtext = " ",
|
||||||
},
|
},
|
||||||
buftypes = {
|
buftypes = {
|
||||||
"*",
|
"*",
|
||||||
-- exclude prompt and popup buftypes from highlight
|
"!dashboard",
|
||||||
"!prompt",
|
"!packer",
|
||||||
"!popup",
|
"!popup",
|
||||||
|
"!prompt",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -133,15 +133,23 @@ local on_attach = function(client, bufnr)
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts)
|
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts)
|
||||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
||||||
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
||||||
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
|
vim.keymap.set(
|
||||||
vim.keymap.set("n", "<space>wl", function()
|
"n",
|
||||||
|
"<leader>wr",
|
||||||
|
vim.lsp.buf.remove_workspace_folder,
|
||||||
|
bufopts
|
||||||
|
)
|
||||||
|
vim.keymap.set("n", "<leader>wl", function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, bufopts)
|
end, bufopts)
|
||||||
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, bufopts)
|
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, bufopts)
|
||||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts)
|
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, bufopts)
|
||||||
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts)
|
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, bufopts)
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
|
||||||
|
vim.keymap.set("n", "<leader>lr", "<cmd>LspRestart<CR>", bufopts)
|
||||||
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, bufopts)
|
||||||
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, bufopts)
|
||||||
end
|
end
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
@ -246,6 +254,11 @@ lspconfig.ltex.setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
lspconfig.yamlls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
local null = require("null-ls")
|
local null = require("null-ls")
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,20 @@ return packer.startup({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
use({
|
||||||
|
"Pocco81/true-zen.nvim",
|
||||||
|
config = function()
|
||||||
|
local tz = require("true-zen")
|
||||||
|
tz.setup({
|
||||||
|
integrations = {
|
||||||
|
lualine = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
Map("n", "<leader>zz", ":TZAtaraxis<CR>")
|
||||||
|
Map("n", "<leader>zf", ":TZFocus<CR>")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- git gutter
|
-- git gutter
|
||||||
use({
|
use({
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
|
Loading…
Reference in a new issue