mirror of
https://github.com/pnx/dotfiles
synced 2026-06-17 03:30:01 +02:00
Update nvim
This commit is contained in:
parent
5286b45f9d
commit
4c1b128c96
15 changed files with 223 additions and 72 deletions
65
nvim/lua/config/catppuccin.lua
Normal file
65
nvim/lua/config/catppuccin.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
return {
|
||||
flavour = "mocha",
|
||||
color_overrides = {
|
||||
mocha = {
|
||||
base = '#0E1019',
|
||||
mantle = '#131521',
|
||||
text = '#ECEEF4',
|
||||
}
|
||||
},
|
||||
highlight_overrides = {
|
||||
mocha = function(colors)
|
||||
return {
|
||||
CursorLine = { bg = colors.mantle },
|
||||
|
||||
-- indent lines
|
||||
IblScope = { fg = colors.overlay2 },
|
||||
|
||||
BufferCurrent = { fg = colors.text, bg = colors.base },
|
||||
-- BufferInactive = { bg=colors.base},
|
||||
-- BufferOffset = { bg = colors.mantle },
|
||||
-- BufferTabpageFill = {bg=colors.base},
|
||||
-- Bufferbar
|
||||
|
||||
-- Syntax
|
||||
Operator = { link = "@text" },
|
||||
Function = { link = "@text" },
|
||||
Delimiter = { link = "@text" },
|
||||
Include = { fg = colors.yellow },
|
||||
Keyword = { fg = colors.yellow },
|
||||
Repeat = { link = "Keyword" },
|
||||
Conditional = { link = "Keyword" },
|
||||
Type = { fg = colors.blue },
|
||||
String = { fg = colors.lavender },
|
||||
["@constructor"] = { link = "Function" },
|
||||
["@variable"] = { fg = colors.green },
|
||||
["@variable.builtin"] = { link = "@variable" },
|
||||
["@variable.parameter"] = { link = "@variable" },
|
||||
["@variable.member"] = { link = "@variable" },
|
||||
["@keyword.function"] = { link = "Keyword" },
|
||||
["@keyword.return"] = { link = "Keyword" },
|
||||
["@property"] = { link = "@variable" },
|
||||
["@tag"] = { link = "Keyword" },
|
||||
["@tag.delimiter"] = { link = "@text" },
|
||||
["@punctuation"] = { link = "@text" },
|
||||
["@punctuation.bracket"] = { link = "@punctuation" },
|
||||
["@lsp.type.property"] = { link = "@variable" },
|
||||
["@class_name.php"] = { link = "@text" },
|
||||
["@extend_name.php"] = { link = "@text" },
|
||||
["@implements_name.php"] = { link = "@text" },
|
||||
["@namespace_name.php"] = { link = "@text" },
|
||||
["@namespace_alias.php"] = { link = "@text" },
|
||||
}
|
||||
end
|
||||
},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
treesitter = true,
|
||||
barbar = true,
|
||||
neotree = true,
|
||||
noice = true,
|
||||
telescope = {
|
||||
enabled = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ map("v", "<S-d>", ":m '>+1<CR>gv=gv", { silent = true, desc = "move current sele
|
|||
-- copy/paste
|
||||
map("x", "<leader>p", [["_dP]], { silent = true, desc = "Paste over selected text without losing content in \"-register" })
|
||||
map({"n", "v"}, "<leader>y", [["+y]], { desc = "Yank to system clipboard register" })
|
||||
map("n", "<leader>p", [["+p]], { desc = "Paste from system clipboard register" })
|
||||
|
||||
-- File operations
|
||||
map("n", "<leader>fx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Set execute flag on current file" })
|
||||
|
|
@ -50,3 +51,8 @@ map("n", "<leader>rw", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {
|
|||
})
|
||||
|
||||
map("n", "Q", "<nop>")
|
||||
|
||||
-- diagnostics
|
||||
map("n", "<leader>DD", vim.diagnostic.open_float, { desc = "Open"})
|
||||
map("n", "<leader>Dn", vim.diagnostic.get_next, { desc = "Open"})
|
||||
map("n", "<leader>Dp", vim.diagnostic.get_prev, { desc = "Open"})
|
||||
|
|
|
|||
|
|
@ -22,7 +22,12 @@ set.cursorline = true
|
|||
set.number = true
|
||||
set.relativenumber = true
|
||||
set.numberwidth = 5
|
||||
set.statuscolumn = '%=%{v:relnum?v:relnum:v:lnum} %s '
|
||||
|
||||
-- sign column to the right.
|
||||
--set.statuscolumn = '%=%{v:relnum?v:relnum:v:lnum} %s '
|
||||
|
||||
-- sign column to the left
|
||||
set.statuscolumn = '%s %=%{v:relnum?v:relnum:v:lnum} '
|
||||
|
||||
-- indent
|
||||
set.tabstop = 4
|
||||
|
|
@ -38,10 +43,20 @@ vim.filetype.add({
|
|||
},
|
||||
})
|
||||
|
||||
-- Sign configuration
|
||||
--
|
||||
-- Diagnostics
|
||||
--
|
||||
local icons = require('config.icons').diagnostics
|
||||
vim.fn.sign_define('DiagnosticSignError', { text = icons.error, texthl = 'DiagnosticSignError' })
|
||||
vim.fn.sign_define('DiagnosticSignWarn', { text = icons.warn, texthl = 'DiagnosticSignWarn' })
|
||||
vim.fn.sign_define('DiagnosticSignInfo', { text = icons.info, texthl = 'DiagnosticSignInfo' })
|
||||
vim.fn.sign_define('DiagnosticSignHint', { text = icons.hint, texthl = 'DiagnosticSignHint' })
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
border = 'single',
|
||||
source = 'always',
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue