mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 19:30:01 +02:00
some nvim touching
This commit is contained in:
parent
6dd8f632ad
commit
f910f44191
29 changed files with 467 additions and 233 deletions
36
nvim/lua/config/plugins/bufferline.lua
Normal file
36
nvim/lua/config/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
local icons = require('config.icons')
|
||||
|
||||
return function ()
|
||||
local highlightfunc = require("catppuccin.groups.integrations.bufferline")
|
||||
return {
|
||||
highlights = highlightfunc.get(),
|
||||
options = {
|
||||
mode = "buffers",
|
||||
themable = true,
|
||||
buffer_close_icon = icons.close,
|
||||
close_icon = icons.close,
|
||||
modified_icon = icons.modified_icon,
|
||||
diagnostics = false,
|
||||
enforce_regular_tabs = true,
|
||||
indicator = {
|
||||
style = 'underline',
|
||||
},
|
||||
close_command = function (bufnum)
|
||||
vim.cmd("bprev")
|
||||
vim.api.nvim_buf_delete(bufnum, {})
|
||||
end,
|
||||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = {'close'}
|
||||
},
|
||||
offsets = {
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = "File Explorer",
|
||||
text_align = "left"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
@ -3,7 +3,14 @@ return {
|
|||
color_overrides = {
|
||||
mocha = {
|
||||
base = '#0e1019',
|
||||
mantle = '#131521',
|
||||
mantle = '#0D0F17',
|
||||
crust = '#0C0D14',
|
||||
surface0 = '#131521',
|
||||
surface1 = '#343959',
|
||||
surface2 = '#41476F',
|
||||
overlay0 = '#3F4256',
|
||||
overlay1 = '#5B5F7C',
|
||||
overlay2 = '#767BA0',
|
||||
text = '#eceef4',
|
||||
}
|
||||
},
|
||||
|
|
@ -12,21 +19,29 @@ return {
|
|||
highlight_overrides = {
|
||||
mocha = function(colors)
|
||||
return {
|
||||
CursorLine = { bg = colors.mantle },
|
||||
NormalFloat = { bg = colors.crust },
|
||||
FloatBorder = { fg = colors.crust, bg = colors.crust },
|
||||
WinSeparator = { fg = colors.surface0 },
|
||||
|
||||
NoiceMini = { bg = colors.crust },
|
||||
|
||||
-- indent lines
|
||||
IblScope = { fg = colors.overlay2 },
|
||||
IblScope = { fg = colors.overlay1 },
|
||||
|
||||
BufferCurrent = { fg = colors.text, bg = colors.base },
|
||||
BufferCurrentMod = { fg = colors.yellow, bg = colors.base },
|
||||
BufferCurrentADDED = { fg = colors.green, bg = colors.base },
|
||||
BufferCurrentCHANGED = { fg = colors.yellow, bg = colors.base },
|
||||
BufferCurrentDELETED = { fg = colors.red, bg = colors.base },
|
||||
|
||||
-- LSP
|
||||
LspReferenceText = { bg = colors.surface0 },
|
||||
LspReferenceRead = { link = "LspReferenceText" },
|
||||
LspReferenceWrite = { link = "LspReferenceText" },
|
||||
-- LspReferenceText = { bg = colors.surface0 },
|
||||
-- LspReferenceRead = { link = "LspReferenceText" },
|
||||
-- LspReferenceWrite = { link = "LspReferenceText" },
|
||||
--
|
||||
-- -- telescope
|
||||
TelescopeNormal = { bg = colors.crust },
|
||||
TelescopeBorder = { fg = colors.crust, bg = colors.crust },
|
||||
TelescopePromptNormal = { bg = colors.mantle },
|
||||
TelescopePromptPrefix = { fg = colors.mauve },
|
||||
TelescopePromptBorder = { fg = colors.mantle, bg = colors.mantle },
|
||||
TelescopePromptTitle = { fg = colors.crust, bg = colors.blue },
|
||||
TelescopePreviewTitle = { fg = colors.crust, bg = colors.mauve },
|
||||
|
||||
-- Syntax
|
||||
PreProc = { link = "Include" },
|
||||
|
|
|
|||
20
nvim/lua/config/plugins/comment.lua
Normal file
20
nvim/lua/config/plugins/comment.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
options = {
|
||||
custom_commentstring = function() return vim.bo.commentstring end
|
||||
},
|
||||
mappings = {
|
||||
-- Toggle comment (like `gcip` - comment inner paragraph) for both
|
||||
-- Normal and Visual modes
|
||||
comment = '<leader>/',
|
||||
|
||||
-- Toggle comment on current line
|
||||
comment_line = '<leader>//',
|
||||
|
||||
-- Toggle comment on visual selection
|
||||
comment_visual = '<leader>/',
|
||||
|
||||
-- Define 'comment' textobject (like `dgc` - delete whole comment block)
|
||||
-- Works also in Visual mode if mapping differs from `comment_visual`
|
||||
textobject = 'gc',
|
||||
}
|
||||
}
|
||||
69
nvim/lua/config/plugins/neo-tree.lua
Normal file
69
nvim/lua/config/plugins/neo-tree.lua
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
local icons = require('config.icons')
|
||||
|
||||
return {
|
||||
close_if_last_window = false,
|
||||
hide_root_node = true,
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1,
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = icons.tree.node,
|
||||
last_indent_marker = icons.tree.nodelast,
|
||||
},
|
||||
icon = {
|
||||
folder_open = icons.folder.open,
|
||||
folder_close = icons.folder.close,
|
||||
folder_empty = icons.folder.empty,
|
||||
default = icons.files.text,
|
||||
},
|
||||
name = {
|
||||
use_git_status_colors = false,
|
||||
},
|
||||
git_status = {
|
||||
symbols = icons.gitsigns
|
||||
},
|
||||
file_size = {
|
||||
enabled = false,
|
||||
},
|
||||
type = {
|
||||
enabled = false,
|
||||
},
|
||||
last_modified = {
|
||||
enabled = false,
|
||||
},
|
||||
created = {
|
||||
enabled = false,
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "neo_tree_buffer_enter",
|
||||
handler = function()
|
||||
if vim.bo.filetype == "neo-tree" then
|
||||
vim.cmd("setlocal statuscolumn=")
|
||||
end
|
||||
end,
|
||||
}
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = true,
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||
hide_by_name = {
|
||||
"node_modules",
|
||||
"vendor",
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
use_libuv_file_watcher = true,
|
||||
}
|
||||
}
|
||||
57
nvim/lua/config/plugins/treesitter.lua
Normal file
57
nvim/lua/config/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
return {
|
||||
-- A list of parser names
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"ninja",
|
||||
"cmake",
|
||||
"dockerfile",
|
||||
"make",
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"php",
|
||||
"phpdoc",
|
||||
"blade",
|
||||
"go",
|
||||
"gomod",
|
||||
"gosum",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"css",
|
||||
"scss",
|
||||
"html",
|
||||
"vue",
|
||||
"json",
|
||||
"jsonc",
|
||||
"yaml",
|
||||
"toml",
|
||||
"xml",
|
||||
"glsl",
|
||||
"hlsl",
|
||||
"markdown"
|
||||
},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = true,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = false,
|
||||
|
||||
highlight = {
|
||||
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,
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
9
nvim/lua/config/plugins/which-key.lua
Normal file
9
nvim/lua/config/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
defaults = {
|
||||
mode = { "n", "v" },
|
||||
["<leader>r"] = { name = "+rename" },
|
||||
["<leader>b"] = { name = "+buffers" },
|
||||
["<leader>f"] = { name = "+files" },
|
||||
["<leader>d"] = { name = "+diagnostics" }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue