Format config

This commit is contained in:
Janis Hutz 2025-06-05 11:33:49 +02:00
parent 5870ed5fc5
commit 4aa0c54fc4
35 changed files with 867 additions and 856 deletions

View File

@ -1,26 +1,25 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins.nav" },
{ import = "plugins.lsp" },
{ import = "plugins.style" },
{ import = "plugins.util" },
{ import = "plugins.testing" }
{ import = "plugins.testing" },
},
change_detection = {
notify = false, -- dont notify when plugins are changed
}
},
})

View File

@ -16,8 +16,8 @@ vim.opt.breakindent = true
vim.opt.linebreak = true
-- folding
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo.foldmethod = "expr"
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- line numbers
vim.wo.number = true

View File

@ -1,25 +1,25 @@
return {
-- competion
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{ "hrsh7th/cmp-buffer" }, -- source for text in buffer
{ "hrsh7th/cmp-path" }, -- source for file system paths
{ "L3MON4D3/LuaSnip" }, -- snippet engine
{ "saadparwaiz1/cmp_luasnip" }, -- for autocompletion
{ "rafamadriz/friendly-snippets" }, -- useful snippets
{ "onsails/lspkind.nvim" }, -- icons for cmp
-- competion
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{ "hrsh7th/cmp-buffer" }, -- source for text in buffer
{ "hrsh7th/cmp-path" }, -- source for file system paths
{ "L3MON4D3/LuaSnip" }, -- snippet engine
{ "saadparwaiz1/cmp_luasnip" }, -- for autocompletion
{ "rafamadriz/friendly-snippets" }, -- useful snippets
{ "onsails/lspkind.nvim" }, -- icons for cmp
{ "hrsh7th/cmp-nvim-lsp-signature-help" }, -- signature help
},
},
config = function()
local cmp = require("cmp")
local lspkind = require("lspkind")
local luasnip = require("luasnip")
config = function()
local cmp = require("cmp")
local lspkind = require("lspkind")
local luasnip = require("luasnip")
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").load({paths = { "~/.config/nvim/snippets" }})
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").load({ paths = { "~/.config/nvim/snippets" } })
luasnip.setup({
region_check_events = { "CursorMoved" },
delete_check_events = { "TextChanged" },
@ -27,32 +27,32 @@ return {
-- luasnip.filetype_extend("htmldjango", { "html" })
cmp.setup({
completion = {
completeopt = "menu,menuone,preview,noselect",
},
cmp.setup({
completion = {
completeopt = "menu,menuone,preview,noselect",
},
window = {
documentation = cmp.config.window.bordered(),
completion = cmp.config.window.bordered({
winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None",
}),
},
window = {
documentation = cmp.config.window.bordered(),
completion = cmp.config.window.bordered({
winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None",
}),
},
snippet = { -- configure how nvim-cmp interacts with snippet engine
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
snippet = { -- configure how nvim-cmp interacts with snippet engine
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.ConfirmBehavior.Select }), -- next suggestion
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.ConfirmBehavior.Select }), -- prev suggestion
["<C-S-J>"] = cmp.mapping.scroll_docs(4, { behavior = cmp.ConfirmBehavior.Select }), -- docs forward
["<C-S-K>"] = cmp.mapping.scroll_docs(-4, { behavior = cmp.ConfirmBehavior.Select }), -- docs back
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-q>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = false }), -- autocomplete if selected
mapping = cmp.mapping.preset.insert({
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.ConfirmBehavior.Select }), -- next suggestion
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.ConfirmBehavior.Select }), -- prev suggestion
["<C-S-J>"] = cmp.mapping.scroll_docs(4, { behavior = cmp.ConfirmBehavior.Select }), -- docs forward
["<C-S-K>"] = cmp.mapping.scroll_docs(-4, { behavior = cmp.ConfirmBehavior.Select }), -- docs back
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-q>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = false }), -- autocomplete if selected
-- Mapping for Tab key
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
@ -86,46 +86,46 @@ return {
-- Otherwise, fallback (insert a tab character)
fallback()
end
end, { "i", "s" })
}),
end, { "i", "s" }),
}),
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" }, -- lsp
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = 'nvim_lsp_signature_help' }, -- signature help
}),
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" }, -- lsp
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = "nvim_lsp_signature_help" }, -- signature help
}),
formatting = {
fields = { "kind", "abbr", "menu" },
format = lspkind.cmp_format({
mode = "symbol", -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- can also be a function to dynamically calculate max width such as
-- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
ellipsis_char = "", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
formatting = {
fields = { "kind", "abbr", "menu" },
format = lspkind.cmp_format({
mode = "symbol", -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- can also be a function to dynamically calculate max width such as
-- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
ellipsis_char = "", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
before = function(entry, vim_item)
return vim_item
end,
}),
},
})
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
before = function(entry, vim_item)
return vim_item
end,
}),
},
})
local opts = { silent = true }
opts.desc = "next snippet placeholder"
vim.keymap.set({ "i", "s" }, "<C-w>", function()
luasnip.jump(1)
end, opts)
local opts = { silent = true }
opts.desc = "next snippet placeholder"
vim.keymap.set({ "i", "s" }, "<C-w>", function()
luasnip.jump(1)
end, opts)
opts.desc = "previous snippet placeholder"
vim.keymap.set({ "i", "s" }, "<C-b>", function()
luasnip.jump(-1)
end, opts)
end,
opts.desc = "previous snippet placeholder"
vim.keymap.set({ "i", "s" }, "<C-b>", function()
luasnip.jump(-1)
end, opts)
end,
}

View File

@ -1,16 +1,16 @@
return {
---------- for lsp diagnostic lines ----------
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
event = "LspAttach",
config = function()
require("lsp_lines").setup()
vim.diagnostic.config({ virtual_lines = false })
---------- for lsp diagnostic lines ----------
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
event = "LspAttach",
config = function()
require("lsp_lines").setup()
vim.diagnostic.config({ virtual_lines = false })
local lsplines = false
vim.keymap.set("n", "<Leader>L", function ()
vim.keymap.set("n", "<Leader>L", function()
lsplines = not lsplines
vim.diagnostic.config({ virtual_text = not lsplines })
vim.diagnostic.config({ virtual_lines = lsplines })
end, { desc = "Toggle lsp_lines" })
end,
end, { desc = "Toggle lsp_lines" })
end,
}

View File

@ -1,12 +1,3 @@
return {
'L3MON4D3/LuaSnip',
-- config = function()
-- local luasnip = require('luasnip')
-- -- luasnip.setup({
-- -- region_check_events = "CursorMoved",
-- -- delete_check_events = "TextChanged",
-- -- })
--
-- require("luasnip.loaders.from_vscode").load({paths = "~/.config/nvim/my_snippets"})
-- end
"L3MON4D3/LuaSnip",
}

View File

@ -1,56 +1,59 @@
-- ┌ ┐
-- │ Formatting, diagnostics │
-- └ ┘
return {
"nvimtools/none-ls.nvim",
"nvimtools/none-ls.nvim",
dependencies = {
'nvimtools/none-ls-extras.nvim'
"nvimtools/none-ls-extras.nvim",
},
config = function()
local null_ls = require("null-ls")
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier.with({
filetypes = {
"css",
"scss",
"less",
"html",
"json",
"yaml",
"markdown",
"graphql",
},
extra_args = {
"--print-width",
"120",
"--tab-width",
"4",
"--bracket-spacing",
"true",
"--arrow-parens",
"avoid",
"--jsx-single-quote",
"true",
"--trailing-comma",
"es5",
"--no-semi",
"false",
"--single-quote",
"true",
"--bracket-same-line",
"true",
"--vue-indent-script-and-style",
"true",
},
}),
null_ls.builtins.formatting.shfmt,
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier.with({
filetypes = {
"css",
"scss",
"less",
"html",
"json",
"yaml",
"markdown",
"graphql",
},
extra_args = {
"--print-width",
"120",
"--tab-width",
"4",
"--bracket-spacing",
"true",
"--arrow-parens",
"avoid",
"--jsx-single-quote",
"true",
"--trailing-comma",
"es5",
"--no-semi",
"false",
"--single-quote",
"true",
"--bracket-same-line",
"true",
"--vue-indent-script-and-style",
"true",
},
}),
null_ls.builtins.formatting.shfmt,
null_ls.builtins.formatting.asmfmt,
null_ls.builtins.code_actions.proselint,
require( 'none-ls.diagnostics.eslint_d' ),
require( 'none-ls.code_actions.eslint_d' ),
require( 'none-ls.formatting.eslint_d' ),
null_ls.builtins.formatting.black,
},
})
end,
require("none-ls.diagnostics.eslint_d"),
require("none-ls.code_actions.eslint_d"),
require("none-ls.formatting.eslint_d"),
null_ls.builtins.formatting.black,
},
})
end,
}

View File

@ -1,30 +1,30 @@
return {
-- syntax highlighting
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
-- syntax highlighting
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"asm",
"bash",
"c",
"cpp",
"bash",
"c",
"cpp",
"css",
"html",
"hyprlang",
"hyprlang",
"java",
"javadoc",
"javascript",
"javascript",
"jsdoc",
"json",
"json",
"jsonc",
-- "latex",
"lua",
"lua",
"markdown",
"meson",
"nginx",
"php",
"python",
"python",
"rasi",
"requirements",
"robots",
@ -35,20 +35,20 @@ return {
"svelte",
"swift",
"toml",
"typescript",
"typescript",
"tsx",
"verilog",
"vue",
"xml",
"yaml",
"zathurarc"
},
sync_install = false,
"zathurarc",
},
sync_install = false,
highlight = {
enable = true,
disable = { "tex" }
},
})
end,
highlight = {
enable = true,
disable = { "tex" },
},
})
end,
}

View File

@ -1,15 +1,15 @@
return {
"lervag/vimtex",
config = function()
-- vimtex settings
-- vim.g.vimtex_view_method = 'startup' -- PDF viewer (example: zathura, or use 'skim' for macOS)
vim.g.vimtex_compiler_method = 'latexmk' -- Use latexmk for compilation
vim.g.vimtex_fold_enabled = 1 -- Enable folding for LaTeX sections
vim.g.vimtex_quickfix_mode = 0 -- Disable quickfix mode for compilation errors
-- Key Mappings for LaTeX workflow
vim.api.nvim_set_keymap('n', '<leader>lc', ':VimtexCompile<CR>', {}) -- Compile LaTeX file
vim.api.nvim_set_keymap('n', '<leader>lv', ':VimtexView<CR>', {}) -- View compiled PDF
vim.api.nvim_set_keymap('n', '<leader>lq', ':VimtexStop<CR>', {}) -- Stop compilation
-- vimtex settings
-- vim.g.vimtex_view_method = 'zathura' -- PDF viewer (example: zathura, or use 'skim' for macOS)
vim.g.vimtex_compiler_method = "latexmk" -- Use latexmk for compilation
vim.g.vimtex_fold_enabled = 1 -- Enable folding for LaTeX sections
vim.g.vimtex_quickfix_mode = 0 -- Disable quickfix mode for compilation errors
end
-- ── Key Mappings for LaTeX workflow ──────────────────────────────
vim.api.nvim_set_keymap("n", "<leader>lc", ":VimtexCompile<CR>", {}) -- Compile LaTeX file
vim.api.nvim_set_keymap("n", "<leader>lv", ":VimtexView<CR>", {}) -- View compiled PDF
vim.api.nvim_set_keymap("n", "<leader>lq", ":VimtexStop<CR>", {}) -- Stop compilation
end,
}

View File

@ -1,7 +1,12 @@
return {
"echasnovski/mini.bufremove",
config = function ()
_G.MiniBufremove = require( 'mini.bufremove' );
vim.keymap.set( 'n', '<C-x>', ':lua MiniBufremove.delete()<CR>', { silent = true, noremap = true, desc = 'Remove buffer' } );
config = function()
_G.MiniBufremove = require("mini.bufremove")
vim.keymap.set(
"n",
"<C-x>",
":lua MiniBufremove.delete()<CR>",
{ silent = true, noremap = true, desc = "Remove buffer" }
)
end,
}

View File

@ -1,7 +1,7 @@
return {
-- open file at previous position
'ethanholz/nvim-lastplace',
"ethanholz/nvim-lastplace",
config = function()
require('nvim-lastplace').setup{}
require("nvim-lastplace").setup({})
end,
}

View File

@ -82,7 +82,7 @@ return {
["h"] = actions.parent(), -- Move to left panel
["l"] = actions.children(), -- Move to right panel
["0"] = actions.root(), -- Move to first panel
["0"] = actions.root(), -- Move to first panel
["<C-S-v>"] = actions.visual_name(), -- Visual selection of name
["<C-S-V>"] = actions.visual_scope(), -- Visual selection of scope
@ -141,6 +141,6 @@ return {
custom_hl_group = nil, -- "Visual" or any other hl group to use instead of inverted colors
})
vim.keymap.set("n", "<leader>n", ":Navbuddy<CR>", { silent = true, desc = "open navbuddy menu" })
vim.keymap.set("n", "<leader><leader>n", ":Navbuddy<CR>", { silent = true, desc = "open navbuddy menu" })
end,
}

View File

@ -1,336 +1,336 @@
return {
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
},
lazy = false, -- neo-tree will lazily load itself
config = function()
-- Automatically open up
require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
use_default_mappings = false,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
open_files_using_relative_paths = false,
sort_case_insensitive = false, -- used when sorting files and directories in the tree
-- sort_function = nil, -- use a custom function for sorting files and directories in the tree
sort_function = function(a, b) -- natural sort
if a.type == b.type then
local ap = a.path:lower()
local bp = b.path:lower()
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
},
lazy = false, -- neo-tree will lazily load itself
config = function()
-- Automatically open up
require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
use_default_mappings = false,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
open_files_using_relative_paths = false,
sort_case_insensitive = false, -- used when sorting files and directories in the tree
-- sort_function = nil, -- use a custom function for sorting files and directories in the tree
sort_function = function(a, b) -- natural sort
if a.type == b.type then
local ap = a.path:lower()
local bp = b.path:lower()
if ap == bp then
return false
end
if ap == bp then
return false
end
for i = 1, math.max(string.len(ap), string.len(bp)), 1 do
local l = string.sub(ap, i, -1)
local r = string.sub(bp, i, -1)
for i = 1, math.max(string.len(ap), string.len(bp)), 1 do
local l = string.sub(ap, i, -1)
local r = string.sub(bp, i, -1)
if
type(tonumber(string.sub(l, 1, 1))) == "number"
and type(tonumber(string.sub(r, 1, 1))) == "number"
then
local l_number = tonumber(string.match(l, "^[0-9]+"))
local r_number = tonumber(string.match(r, "^[0-9]+"))
if
type(tonumber(string.sub(l, 1, 1))) == "number"
and type(tonumber(string.sub(r, 1, 1))) == "number"
then
local l_number = tonumber(string.match(l, "^[0-9]+"))
local r_number = tonumber(string.match(r, "^[0-9]+"))
if l_number ~= r_number then
return l_number < r_number
end
elseif string.sub(l, 1, 1) ~= string.sub(r, 1, 1) then
return l < r
end
end
else
return a.type < b.type
end
end,
default_component_configs = {
container = {
enable_character_fade = true,
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = true,
indent_marker = "",
last_indent_marker = "",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "󰜌",
provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available
if node.type == "file" or node.type == "terminal" then
local success, web_devicons = pcall(require, "nvim-web-devicons")
local name = node.type == "terminal" and "terminal" or node.name
if success then
local devicon, hl = web_devicons.get_icon(name)
icon.text = devicon or icon.text
icon.highlight = hl or icon.highlight
end
end
end,
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- then these will never be used.
default = "*",
highlight = "NeoTreeFileIcon",
},
modified = {
symbol = "[+]",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = true,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
-- Change type
added = "+", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "", -- this can only be used in the git_status source
renamed = "󰁕", -- this can only be used in the git_status source
-- Status type
untracked = "",
ignored = "",
unstaged = "󰄱",
staged = "",
conflict = "",
},
},
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
file_size = {
enabled = true,
width = 12, -- width of the column
required_width = 64, -- min width of window required to show this column
},
type = {
enabled = true,
width = 10, -- width of the column
required_width = 122, -- min width of window required to show this column
},
last_modified = {
enabled = true,
width = 20, -- width of the column
required_width = 88, -- min width of window required to show this column
},
created = {
enabled = true,
width = 20, -- width of the column
required_width = 110, -- min width of window required to show this column
},
symlink_target = {
enabled = false,
},
},
-- A list of functions, each representing a global custom command
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global`
commands = {},
window = {
position = "left",
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
mappings = {
["<2-LeftMouse>"] = "open",
["<cr>"] = "open",
["o"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
-- Read `# Preview Mode` for more information
["l"] = "focus_preview",
["S"] = "open_split",
["v"] = "open_vsplit",
["t"] = "open_tabnew",
["w"] = "open_with_window_picker",
["C"] = "close_node",
-- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes",
["q"] = "close_window",
["R"] = "refresh",
["?"] = "show_help",
["<"] = "prev_source",
[">"] = "next_source",
["i"] = "show_file_details",
},
},
nesting_rules = {},
filesystem = {
scan_mode = 'deep',
filtered_items = {
visible = false, -- 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"
},
hide_by_pattern = { -- uses glob style patterns
--"*.meta",
--"*/src/*/tsconfig.json",
},
always_show = { -- remains visible even if other settings would normally hide it
--".gitignored",
},
always_show_by_pattern = { -- uses glob style patterns
--".env*",
},
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
--".DS_Store",
--"thumbs.db"
},
never_show_by_pattern = { -- uses glob style patterns
--".null-ls_*",
},
},
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events.
window = {
mappings = {
["a"] = {
"add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none", -- "none", "relative", "absolute"
},
},
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
["d"] = "delete",
["r"] = "rename",
["b"] = "rename_basename",
["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
["<bs>"] = "navigate_up",
["."] = "set_root",
["H"] = "toggle_hidden",
["/"] = "fuzzy_finder",
["D"] = "fuzzy_finder_directory",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- ["D"] = "fuzzy_sorter_directory",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["[g"] = "prev_git_modified",
["]g"] = "next_git_modified",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sg"] = { "order_by_git_status", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
-- ['<key>'] = function(state) ... end,
},
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up",
["<C-p>"] = "move_cursor_up",
["<esc>"] = "close",
-- ['<key>'] = function(state, scroll_padding) ... end,
},
},
if l_number ~= r_number then
return l_number < r_number
end
elseif string.sub(l, 1, 1) ~= string.sub(r, 1, 1) then
return l < r
end
end
else
return a.type < b.type
end
end,
default_component_configs = {
container = {
enable_character_fade = true,
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = true,
indent_marker = "",
last_indent_marker = "",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "󰜌",
provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available
if node.type == "file" or node.type == "terminal" then
local success, web_devicons = pcall(require, "nvim-web-devicons")
local name = node.type == "terminal" and "terminal" or node.name
if success then
local devicon, hl = web_devicons.get_icon(name)
icon.text = devicon or icon.text
icon.highlight = hl or icon.highlight
end
end
end,
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- then these will never be used.
default = "*",
highlight = "NeoTreeFileIcon",
},
modified = {
symbol = "[+]",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = true,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
-- Change type
added = "+", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "", -- this can only be used in the git_status source
renamed = "󰁕", -- this can only be used in the git_status source
-- Status type
untracked = "",
ignored = "",
unstaged = "󰄱",
staged = "",
conflict = "",
},
},
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
file_size = {
enabled = true,
width = 12, -- width of the column
required_width = 64, -- min width of window required to show this column
},
type = {
enabled = true,
width = 10, -- width of the column
required_width = 122, -- min width of window required to show this column
},
last_modified = {
enabled = true,
width = 20, -- width of the column
required_width = 88, -- min width of window required to show this column
},
created = {
enabled = true,
width = 20, -- width of the column
required_width = 110, -- min width of window required to show this column
},
symlink_target = {
enabled = false,
},
},
-- A list of functions, each representing a global custom command
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global`
commands = {},
window = {
position = "left",
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
mappings = {
["<2-LeftMouse>"] = "open",
["<cr>"] = "open",
["o"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
-- Read `# Preview Mode` for more information
["l"] = "focus_preview",
["S"] = "open_split",
["v"] = "open_vsplit",
["t"] = "open_tabnew",
["w"] = "open_with_window_picker",
["C"] = "close_node",
-- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes",
["q"] = "close_window",
["R"] = "refresh",
["?"] = "show_help",
["<"] = "prev_source",
[">"] = "next_source",
["i"] = "show_file_details",
},
},
nesting_rules = {},
filesystem = {
scan_mode = "deep",
filtered_items = {
visible = false, -- 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"
},
hide_by_pattern = { -- uses glob style patterns
--"*.meta",
--"*/src/*/tsconfig.json",
},
always_show = { -- remains visible even if other settings would normally hide it
--".gitignored",
},
always_show_by_pattern = { -- uses glob style patterns
--".env*",
},
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
--".DS_Store",
--"thumbs.db"
},
never_show_by_pattern = { -- uses glob style patterns
--".null-ls_*",
},
},
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events.
window = {
mappings = {
["a"] = {
"add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none", -- "none", "relative", "absolute"
},
},
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
["d"] = "delete",
["r"] = "rename",
["b"] = "rename_basename",
["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
["<bs>"] = "navigate_up",
["."] = "set_root",
["H"] = "toggle_hidden",
["/"] = "fuzzy_finder",
["D"] = "fuzzy_finder_directory",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- ["D"] = "fuzzy_sorter_directory",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["[g"] = "prev_git_modified",
["]g"] = "next_git_modified",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sg"] = { "order_by_git_status", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
-- ['<key>'] = function(state) ... end,
},
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up",
["<C-p>"] = "move_cursor_up",
["<esc>"] = "close",
-- ['<key>'] = function(state, scroll_padding) ... end,
},
},
commands = {}, -- Add a custom command or override a global one using the same function name
},
buffers = {
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
show_unloaded = true,
window = {
mappings = {
["d"] = "buffer_delete",
["bd"] = "buffer_delete",
["<bs>"] = "navigate_up",
["."] = "set_root",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
},
},
},
git_status = {
window = {
position = "float",
mappings = {
["A"] = "git_add_all",
["u"] = "git_unstage_file",
["a"] = "git_add_file",
["r"] = "git_revert_file",
["c"] = "git_commit",
["p"] = "git_push",
["g"] = "git_commit_and_push",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
},
},
},
})
commands = {}, -- Add a custom command or override a global one using the same function name
},
buffers = {
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
show_unloaded = true,
window = {
mappings = {
["d"] = "buffer_delete",
["bd"] = "buffer_delete",
["<bs>"] = "navigate_up",
["."] = "set_root",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
},
},
},
git_status = {
window = {
position = "float",
mappings = {
["A"] = "git_add_all",
["u"] = "git_unstage_file",
["a"] = "git_add_file",
["r"] = "git_revert_file",
["c"] = "git_commit",
["p"] = "git_push",
["g"] = "git_commit_and_push",
["s"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "s" },
},
["sc"] = { "order_by_created", nowait = false },
["sd"] = { "order_by_diagnostics", nowait = false },
["sm"] = { "order_by_modified", nowait = false },
["sn"] = { "order_by_name", nowait = false },
["ss"] = { "order_by_size", nowait = false },
["st"] = { "order_by_type", nowait = false },
},
},
},
})
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree<CR>", { silent = true, desc = "Open Neotree" })
vim.keymap.set(
"n",
"<leader><leader>g",
"<Cmd>Neotree source=git_status position=float<CR>",
{ silent = true, desc = "Open git view" }
)
end,
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree<CR>", { silent = true, desc = "Open Neotree" })
vim.keymap.set(
"n",
"<leader><leader>g",
"<Cmd>Neotree source=git_status position=float<CR>",
{ silent = true, desc = "Open git view" }
)
end,
}

View File

@ -1,68 +1,68 @@
return {
-- fuzzy finder
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
local builtin = require("telescope.builtin")
local actions = require("telescope.actions")
local opts = { silent = true }
-- fuzzy finder
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
local builtin = require("telescope.builtin")
local actions = require("telescope.actions")
local opts = { silent = true }
require("telescope").setup({
defaults = {
mappings = {
i = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- TODO investigate
},
},
},
})
require("telescope").setup({
defaults = {
mappings = {
i = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- TODO investigate
},
},
},
})
opts.desc = "telescope find files"
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
opts.desc = "telescope find files"
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
opts.desc = "telescope live grep"
vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts)
opts.desc = "telescope live grep"
vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts)
opts.desc = "telescope buffers"
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
opts.desc = "telescope buffers"
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
opts.desc = "Show nvim functions"
vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts)
opts.desc = "Show nvim functions"
vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts)
-- Recent Commands
opts.desc = "Show recent commands"
vim.keymap.set('n', '<leader>frc', ':Telescope command_history<CR>', opts)
vim.keymap.set("n", "<leader>frc", ":Telescope command_history<CR>", opts)
-- Recent Searches
opts.desc = "Show recent searches"
vim.keymap.set('n', '<leader>frs', ':Telescope search_history<CR>', opts)
vim.keymap.set("n", "<leader>frs", ":Telescope search_history<CR>", opts)
-- Old Files
opts.desc = "Show recent files"
vim.keymap.set('n', '<leader>frf', ':Telescope oldfiles<CR>', opts)
vim.keymap.set("n", "<leader>frf", ":Telescope oldfiles<CR>", opts)
-- Quickfix Items
opts.desc = "Show quickfix items"
vim.keymap.set('n', '<leader>fq', ':Telescope quickfix<CR>', opts)
vim.keymap.set("n", "<leader>fq", ":Telescope quickfix<CR>", opts)
-- Spell Suggestions
opts.desc = "Show spell suggestions"
vim.keymap.set('n', '<leader>fs', ':Telescope spell_suggest<CR>', opts)
vim.keymap.set("n", "<leader>fs", ":Telescope spell_suggest<CR>", opts)
-- Diagnostics
opts.desc = "Show diagnostics"
vim.keymap.set('n', '<leader>fd', ':Telescope diagnostics<CR>', opts)
vim.keymap.set("n", "<leader>fd", ":Telescope diagnostics<CR>", opts)
-- Notifications
opts.desc = "Show notifications"
vim.keymap.set('n', '<leader>fn', ':Telescope notify<CR>', opts)
vim.keymap.set("n", "<leader>fn", ":Telescope notify<CR>", opts)
-- Implementations
opts.desc = "Show implementations"
vim.keymap.set('n', '<leader>fi', ':Telescope lsp_implementations<CR>', opts)
end,
vim.keymap.set("n", "<leader>fi", ":Telescope lsp_implementations<CR>", opts)
end,
}

View File

@ -1,17 +1,17 @@
return {
-- literally the name, quick term toggle
"akinsho/toggleterm.nvim",
version = "*",
config = function()
require("toggleterm").setup({
insert_mappings = false,
terminal_mappings = false,
open_mapping = "<leader>t",
direction = "float",
float_opts = {
border = "curved",
},
})
vim.keymap.set("t", "<S-Esc>", [[<cmd>ToggleTerm<CR>]], {}) -- close terminal wih esc
end,
-- literally the name, quick term toggle
"akinsho/toggleterm.nvim",
version = "*",
config = function()
require("toggleterm").setup({
insert_mappings = false,
terminal_mappings = false,
open_mapping = "<leader>t",
direction = "float",
float_opts = {
border = "curved",
},
})
vim.keymap.set("t", "<S-Esc>", [[<cmd>ToggleTerm<CR>]], {}) -- close terminal wih esc
end,
}

View File

@ -6,7 +6,5 @@ return {
vim.o.timeout = true
vim.o.timeoutlen = 500
end,
opts = {
}
opts = {},
}

View File

@ -1,9 +1,9 @@
return {
-- colorizes colors in code
'NvChad/nvim-colorizer.lua' ,
"NvChad/nvim-colorizer.lua",
--cmd = 'ColorizerToggle',
config = function ()
require("colorizer").setup {
config = function()
require("colorizer").setup({
filetypes = { "*" },
user_default_options = {
RGB = true, -- #RGB hex codes - #FCE
@ -19,16 +19,16 @@ return {
mode = "background", -- Set the display mode.
-- Available methods are false / true / "normal" / "lsp" / "both"
-- True is same as normal
tailwind = false, -- Enable tailwind colors
tailwind = false, -- Enable tailwind colors
-- parsers can contain values used in |user_default_options|
sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors
sass = { enable = false, parsers = { "css" } }, -- Enable sass colors
virtualtext = "",
-- update color values even if buffer is not focused
-- example use: cmp_menu, cmp_docs
always_update = false
always_update = false,
},
-- all the sub-options of filetypes apply to buftypes
buftypes = {},
}
})
end,
}

View File

@ -13,44 +13,44 @@ return {
functions = "italic",
keywords = "italic",
types = "italic",
}
},
},
palettes = {
all = {
black = Shade.new("#404944", 0.15, -0.15),
gray = Shade.new("#505050", 0.15, -0.15),
white = Shade.new("#dee4df", 0.15, -0.15),
red = Shade.new("#ff6060", 0.15, -0.15),
black = Shade.new("#404944", 0.15, -0.15),
gray = Shade.new("#505050", 0.15, -0.15),
white = Shade.new("#dee4df", 0.15, -0.15),
red = Shade.new("#ff6060", 0.15, -0.15),
darkred = Shade.new("#903030", 0.15, -0.15),
strongred = Shade.new("#bb0000", 0.15, -0.15),
orange = Shade.new("#ce8c14", 0.15, -0.15),
green = Shade.new("#a3d397", 0.10, -0.15),
orange = Shade.new("#ce8c14", 0.15, -0.15),
green = Shade.new("#a3d397", 0.10, -0.15),
darkgreen = Shade.new("#005602", 0.10, -0.15),
darkyellow = Shade.new("#dfd100", 0.10, -0.15),
yellow = Shade.new("#e3c46d", 0.15, -0.15),
yellow = Shade.new("#e3c46d", 0.15, -0.15),
darkblue = Shade.new("#1010cc", 0.15, -0.15),
blue = Shade.new("#7070dd", 0.15, -0.15),
blue = Shade.new("#7070dd", 0.15, -0.15),
magenta = Shade.new("#C02490", 0.30, -0.15),
pink = Shade.new("#ff82c2", 0.15, -0.15),
purple = Shade.new("#761464", 0.15, -0.15),
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
pink = Shade.new("#ff82c2", 0.15, -0.15),
purple = Shade.new("#761464", 0.15, -0.15),
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
lightblue = Shade.new("#5c77ff", 0.15, -0.15),
softblue = Shade.new("#10ddff", 0.15, -0.15),
brown = Shade.new("#553200", 0.15, -0.15),
bg0 = "#0f1512", -- Dark bg (status line and float)
bg1 = "#0f1512", -- Default bg
bg2 = "#1b211e", -- Lighter bg (colorcolm folds)
bg3 = "#252b28", -- Lighter bg (cursor line)
bg4 = "#303633", -- Conceal, border fg
bg0 = "#0f1512", -- Dark bg (status line and float)
bg1 = "#0f1512", -- Default bg
bg2 = "#1b211e", -- Lighter bg (colorcolm folds)
bg3 = "#252b28", -- Lighter bg (cursor line)
bg4 = "#303633", -- Conceal, border fg
fg0 = "#dee4df", -- Lighter fg
fg1 = "#dee4df", -- Default fg
fg2 = "#dee4df", -- Darker fg (status line)
fg3 = "#89938d", -- Darker fg (line numbers, fold colums)
fg0 = "#dee4df", -- Lighter fg
fg1 = "#dee4df", -- Default fg
fg2 = "#dee4df", -- Darker fg (status line)
fg3 = "#89938d", -- Darker fg (line numbers, fold colums)
sel0 = "#404944", -- Popup bg, visual selection
sel1 = "#00513b", -- Popup sel bg, search bg
sel0 = "#404944", -- Popup bg, visual selection
sel1 = "#00513b", -- Popup sel bg, search bg
comment = "#89938d",
},
@ -77,7 +77,7 @@ return {
statement = "magenta",
string = "cyan",
type = "red",
variable = "orange"
variable = "orange",
},
diag = {
error = "darkred",
@ -91,44 +91,44 @@ return {
warn = "#a16b00",
info = "cyan",
hint = "bg3",
ok = "green";
ok = "green",
},
diff = {
add = "darkgreen",
delete = "darkred",
changed = "lightblue",
text = "fg0"
text = "fg0",
},
git = {
add = "darkgreen",
removed = "darkred",
changed = "lightblue",
conflict = "orange",
ignored = "gray"
}
}
ignored = "gray",
},
},
},
groups = {
all = {
Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor
WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
CursorLine = { bg = "palette.bg1" },
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor
WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
CursorLine = { bg = "palette.bg1" },
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" },
NvimTreeFolderName = { fg = "palette.lightblue" },
NvimTreeFolderIcon = { fg = "palette.lightblue" },
NvimTreeOpenedFolderName = { fg = "palette.lightblue" },
NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" },
NvimTreeFolderName = { fg = "palette.lightblue" },
NvimTreeFolderIcon = { fg = "palette.lightblue" },
NvimTreeOpenedFolderName = { fg = "palette.lightblue" },
NvimTreeSymlinkFolderName = { fg = "palette.magenta" },
NvimTreeExecFile = { fg = "palette.red" },
NvimTreeImageFile = { fg = "palette.white" },
NvimTreeSpecialFile = { fg = "palette.yellow" },
NvimTreeSymlink = { fg = "palette.magenta" },
NvimTreeExecFile = { fg = "palette.red" },
NvimTreeImageFile = { fg = "palette.white" },
NvimTreeSpecialFile = { fg = "palette.yellow" },
NvimTreeSymlink = { fg = "palette.magenta" },
},
},
})

View File

@ -45,17 +45,17 @@ return {
local opts = { silent = true }
opts.desc = "comment text box"
vim.keymap.set({"n", "v"}, "<leader>cb", ":CBccbox<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>cb", ":CBccbox<CR>", opts)
opts.desc = "comment text line"
vim.keymap.set({"n", "v"}, "<leader>cl", ":CBllline<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>cl", ":CBllline<CR>", opts)
opts.desc = "comment line"
vim.keymap.set({"n", "v"}, "<leader>ce", ":CBline<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>ce", ":CBline<CR>", opts)
opts.desc = "comment highlight"
vim.keymap.set({"n", "v"}, "<leader>ch", ":CBlcbox18<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>ch", ":CBlcbox18<CR>", opts)
opts.desc = "delete comment box"
vim.keymap.set({"n", "v"}, "<leader>cd", ":CBd<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>cd", ":CBd<CR>", opts)
opts.desc = "yank comment box contents"
vim.keymap.set({"n", "v"}, "<leader>cy", ":CBy<CR>", opts)
vim.keymap.set({ "n", "v" }, "<leader>cy", ":CBy<CR>", opts)
end,
}

View File

@ -1,10 +1,10 @@
return {
-- add comment keybinds
'numToStr/Comment.nvim',
"numToStr/Comment.nvim",
opts = {},
lazy = false,
config = function()
require('Comment').setup()
require('Comment.ft').set('hyprlang', '#%s')
end
require("Comment").setup()
require("Comment.ft").set("hyprlang", "#%s")
end,
}

View File

@ -1,5 +1,5 @@
return {
-- prettier prompts
'stevearc/dressing.nvim',
event = 'VeryLazy',
"stevearc/dressing.nvim",
event = "VeryLazy",
}

View File

@ -1,7 +1,7 @@
return {
-- status line
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local function getWords()
local wc = vim.api.nvim_eval("wordcount()")
@ -11,45 +11,45 @@ return {
return wc["words"]
end
end
require('lualine').setup {
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = { 'neo-tree' },
ignore_focus = { "neo-tree" },
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
},
sections = {
lualine_a = { { 'mode', separator = { left = '', right = '' }, } },
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = { getWords, 'encoding', 'fileformat', 'filetype'},
lualine_y = { { 'progress', left_padding=0 } },
lualine_z = { { 'location', separator = { left = '', right = '' }, padding=0} }
lualine_a = { { "mode", separator = { left = "", right = "" } } },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { getWords, "encoding", "fileformat", "filetype" },
lualine_y = { { "progress", left_padding = 0 } },
lualine_z = { { "location", separator = { left = "", right = "" }, padding = 0 } },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {}
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
extensions = {},
})
end,
}

View File

@ -1,38 +1,38 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = function()
require( 'notify' ).setup( {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = function()
require("notify").setup({
max_width = 80,
minimum_width = 30,
render = 'wrapped-default', -- default, minimal, simple, compact, wrapped-compact or wrapped-default
stages = 'slide', -- fade_in_slide_out, fade, slide, static
} );
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})
end,
render = "wrapped-default", -- default, minimal, simple, compact, wrapped-compact or wrapped-default
stages = "slide", -- fade_in_slide_out, fade, slide, static
})
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})
end,
}

View File

@ -11,39 +11,39 @@ return {
type = "text",
align = "center",
content = {
[[]],
[[]],
[[]],
[[ ]],
[[ ██████ █████ █████ █████ ███ ]],
[[ ░░██████ ░░███ ░░███ ░░███ ░░░ ]],
[[ ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ]],
[[ ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ]],
[[ ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ]],
[[ ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ]],
[[ █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ]],
[[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ]],
[[ ]],
},
[[]],
[[]],
[[]],
[[ ]],
[[ ██████ █████ █████ █████ ███ ]],
[[ ░░██████ ░░███ ░░███ ░░███ ░░░ ]],
[[ ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ]],
[[ ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ]],
[[ ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ]],
[[ ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ]],
[[ █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ]],
[[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ]],
[[ ]],
},
highlight = "String",
default_color = "#010155"
default_color = "#010155",
},
quotes = {
type = "text",
align = "center",
content = function ()
content = function()
local handle = io.popen("pwd")
if handle then
local cwd = handle:read("*l")
handle:close()
return {"Currently in " .. cwd}
return { "Currently in " .. cwd }
else
return {"Error running command"}
return { "Error running command" }
end
end,
highlight = "String",
default_color = "#FFFFFF"
default_color = "#FFFFFF",
},
old = {
@ -58,12 +58,12 @@ return {
},
options = {
mapping_keys = false;
mapping_keys = false,
},
colors = {
background = "#000000",
folded_section = "#100000"
folded_section = "#100000",
},
mappings = {
@ -71,7 +71,7 @@ return {
open_file = "<CR>",
},
parts = {"title", "quotes", "old"}
parts = { "title", "quotes", "old" },
})
end,
}

View File

@ -47,10 +47,16 @@ return {
dapui.close()
end
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DapBreakpoint", linehl = "", numhl = ""})
vim.fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
vim.fn.sign_define("DapLogPoint", { text = "", texthl = "DapLogPoint", linehl = "", numhl = ""})
vim.fn.sign_define('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' })
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DapBreakpoint", linehl = "", numhl = "" })
vim.fn.sign_define(
"DapBreakpointCondition",
{ text = "", texthl = "DapBreakpointCondition", linehl = "", numhl = "" }
)
vim.fn.sign_define("DapLogPoint", { text = "", texthl = "DapLogPoint", linehl = "", numhl = "" })
vim.fn.sign_define(
"DapStopped",
{ text = "", texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" }
)
dap.configurations.python = {
{
@ -91,7 +97,7 @@ return {
else
cb({
type = "executable",
command = vim.fn.stdpath("data") .. '/mason/packages/debugpy/venv/bin/python',
command = vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python",
args = { "-m", "debugpy.adapter" },
options = {
source_filetype = "python",

View File

@ -1,19 +1,19 @@
return {
"aznhe21/actions-preview.nvim",
config = function()
-- Configure actions-preview.nvim
require("actions-preview").setup({
-- Floating window configuration (optional)
max_width = 80, -- Max width of the preview window
max_height = 12, -- Max height of the preview window
min_width = 20, -- Minimum width for the preview window
min_height = 4, -- Minimum height for the preview window
"aznhe21/actions-preview.nvim",
config = function()
-- Configure actions-preview.nvim
require("actions-preview").setup({
-- Floating window configuration (optional)
max_width = 80, -- Max width of the preview window
max_height = 12, -- Max height of the preview window
min_width = 20, -- Minimum width for the preview window
min_height = 4, -- Minimum height for the preview window
-- Keymaps (optional)
keymaps = {
-- Trigger code action preview with a keybinding (example using <leader>a)
{ "n", "<leader>ca", vim.lsp.buf.code_action },
},
})
end,
-- Keymaps (optional)
keymaps = {
-- Trigger code action preview with a keybinding (example using <leader>a)
{ "n", "<leader>ca", vim.lsp.buf.code_action },
},
})
end,
}

View File

@ -1,65 +1,65 @@
return {
-- autoclose brackets and quotes
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup({
fast_wrap = {
map = "<C-e>",
chars = { "{", "[", "(", '"', "'", "`" },
},
})
-- autoclose brackets and quotes
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup({
fast_wrap = {
map = "<C-e>",
chars = { "{", "[", "(", '"', "'", "`" },
},
})
-- add spaces between parentheses
local npairs = require("nvim-autopairs")
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
-- add spaces between parentheses
local npairs = require("nvim-autopairs")
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
local brackets = { { "(", ")" }, { "[", "]" }, { "{", "}" } }
npairs.add_rules({
-- Rule for a pair with left-side ' ' and right side ' '
Rule(" ", " ")
-- Pair will only occur if the conditional function returns true
:with_pair(function(opts)
-- We are checking if we are inserting a space in (), [], or {}
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({
brackets[1][1] .. brackets[1][2],
brackets[2][1] .. brackets[2][2],
brackets[3][1] .. brackets[3][2],
}, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
-- We only want to delete the pair of spaces when the cursor is as such: ( | )
:with_del(
function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({
brackets[1][1] .. " " .. brackets[1][2],
brackets[2][1] .. " " .. brackets[2][2],
brackets[3][1] .. " " .. brackets[3][2],
}, context)
end
),
})
-- For each pair of brackets we will add another rule
for _, bracket in pairs(brackets) do
npairs.add_rules({
-- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type
Rule(bracket[1] .. " ", " " .. bracket[2])
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == bracket[2]
end)
:with_del(cond.none())
:use_key(bracket[2])
-- Removes the trailing whitespace that can occur without this
:replace_map_cr(function(_)
return "<C-c>2xi<CR><C-c>O"
end),
})
end
end,
local brackets = { { "(", ")" }, { "[", "]" }, { "{", "}" } }
npairs.add_rules({
-- Rule for a pair with left-side ' ' and right side ' '
Rule(" ", " ")
-- Pair will only occur if the conditional function returns true
:with_pair(function(opts)
-- We are checking if we are inserting a space in (), [], or {}
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({
brackets[1][1] .. brackets[1][2],
brackets[2][1] .. brackets[2][2],
brackets[3][1] .. brackets[3][2],
}, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
-- We only want to delete the pair of spaces when the cursor is as such: ( | )
:with_del(
function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({
brackets[1][1] .. " " .. brackets[1][2],
brackets[2][1] .. " " .. brackets[2][2],
brackets[3][1] .. " " .. brackets[3][2],
}, context)
end
),
})
-- For each pair of brackets we will add another rule
for _, bracket in pairs(brackets) do
npairs.add_rules({
-- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type
Rule(bracket[1] .. " ", " " .. bracket[2])
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == bracket[2]
end)
:with_del(cond.none())
:use_key(bracket[2])
-- Removes the trailing whitespace that can occur without this
:replace_map_cr(function(_)
return "<C-c>2xi<CR><C-c>O"
end),
})
end
end,
}

View File

@ -1,13 +1,13 @@
return {
"windwp/nvim-ts-autotag",
config = function ()
require('nvim-ts-autotag').setup({
config = function()
require("nvim-ts-autotag").setup({
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = true -- Auto close on trailing </
enable_close_on_slash = true, -- Auto close on trailing </
},
} )
end
})
end,
}

View File

@ -1,16 +1,21 @@
return {
'uga-rosa/ccc.nvim',
config = function ()
local ccc = require( 'ccc' );
vim.opt.termguicolors = true;
ccc.setup( {
"uga-rosa/ccc.nvim",
config = function()
local ccc = require("ccc")
vim.opt.termguicolors = true
ccc.setup({
highlighter = {
auto_enable = false,
lsp = true
}
} )
lsp = true,
},
})
local keymap = vim.keymap
keymap.set( 'n', '<leader>cp', '<cmd>CccPick<CR>', { noremap = true, silent = true, desc = "Toggle colour picker" } )
end
keymap.set(
"n",
"<leader>cp",
"<cmd>CccPick<CR>",
{ noremap = true, silent = true, desc = "Toggle colour picker" }
)
end,
}

View File

@ -6,9 +6,8 @@ return {
notification = {
window = {
winblend = 0,
}
}
},
},
})
end
end,
}

View File

@ -1,9 +1,9 @@
return {
-- indent lines
'lukas-reineke/indent-blankline.nvim',
"lukas-reineke/indent-blankline.nvim",
opts = {},
main = 'ibl',
main = "ibl",
config = function()
require('ibl').setup()
end
require("ibl").setup()
end,
}

View File

@ -4,14 +4,16 @@ return {
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function(plugin)
if vim.fn.executable "npx" then
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
else
vim.cmd [[Lazy load markdown-preview.nvim]]
vim.fn["mkdp#util#install"]()
end
if vim.fn.executable("npx") then
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
else
vim.cmd([[Lazy load markdown-preview.nvim]])
vim.fn["mkdp#util#install"]()
end
end,
init = function()
if vim.fn.executable "npx" then vim.g.mkdp_filetypes = { "markdown" } end
if vim.fn.executable("npx") then
vim.g.mkdp_filetypes = { "markdown" }
end
end,
}

View File

@ -2,16 +2,16 @@ return {
"smoka7/multicursors.nvim",
event = "VeryLazy",
dependencies = {
'nvimtools/hydra.nvim',
"nvimtools/hydra.nvim",
},
opts = {},
cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' },
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
keys = {
{
mode = { 'v', 'n' },
'<leader><leader>c',
'<cmd>MCstart<cr>',
desc = 'Create a selection for selected text or word under the cursor',
},
{
mode = { "v", "n" },
"<leader><leader>c",
"<cmd>MCstart<cr>",
desc = "Create a selection for selected text or word under the cursor",
},
},
}

View File

@ -1,10 +1,10 @@
return {
"danymat/neogen",
config = function ()
config = function()
local opts = { noremap = true, silent = true, desc = "Generate docs" }
vim.api.nvim_set_keymap("n", "<leader>gd", ":lua require('neogen').generate()<CR>", opts)
require( 'neogen' ).setup( {
snippet_engine = "luasnip"
} );
end
require("neogen").setup({
snippet_engine = "luasnip",
})
end,
}

View File

@ -4,5 +4,5 @@ return {
event = "VeryLazy",
config = function()
require("nvim-surround").setup()
end
end,
}

View File

@ -4,7 +4,7 @@ local M = {}
M.opts = function(desc)
if desc then
return { silent = true, desc = desc}
return { silent = true, desc = desc }
else
return { silent = true }
end
@ -24,30 +24,33 @@ M.sudo_exec = function(cmd, print_output)
print(out)
return false
end
if print_output then print("\r\n", out) end
if print_output then
print("\r\n", out)
end
return true
end
M.sudo_write = function(tmpfile, filepath)
if not tmpfile then tmpfile = vim.fn.tempname() end
if not filepath then filepath = vim.fn.expand("%") end
if not tmpfile then
tmpfile = vim.fn.tempname()
end
if not filepath then
filepath = vim.fn.expand("%")
end
if not filepath or #filepath == 0 then
print("E32: No file name")
return
end
-- `bs=1048576` is equivalent to `bs=1M` for GNU dd or `bs=1m` for BSD dd
-- Both `bs=1M` and `bs=1m` are non-POSIX
local cmd = string.format("dd if=%s of=%s bs=1048576",
vim.fn.shellescape(tmpfile),
vim.fn.shellescape(filepath))
local cmd = string.format("dd if=%s of=%s bs=1048576", vim.fn.shellescape(tmpfile), vim.fn.shellescape(filepath))
-- no need to check error as this fails the entire function
vim.api.nvim_exec(string.format("write! %s", tmpfile), true)
if M.sudo_exec(cmd) then
-- refreshes the buffer and prints the "written" message
vim.cmd.checktime()
-- exit command mode
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(
"<Esc>", true, false, true), "n", true)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<Esc>", true, false, true), "n", true)
end
vim.fn.delete(tmpfile)
end