diff --git a/after/plugin/ccc.lua b/after/plugin/ccc.lua new file mode 100644 index 0000000..cd97e4e --- /dev/null +++ b/after/plugin/ccc.lua @@ -0,0 +1,131 @@ +if not pcall(require, "ccc") then + return +end + +local ccc = require("ccc") +local ColorInput = require("ccc.input") +local convert = require("ccc.utils.convert") + +local RgbHslInput = setmetatable({ + name = "RGB/HSL", + max = { 1, 1, 1, 360, 1, 1, 1, 1, 1, 1 }, + min = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + delta = { 1 / 255, 1 / 255, 1 / 255, 1, 0.01, 0.01, 0.005, 0.005, 0.005, 0.005 }, + bar_name = { "R", "G", "B", "H", "S", "L" }, +}, { __index = ColorInput }) + +function RgbHslInput.format(n, i) + if i <= 3 then + -- RGB + n = n * 255 + elseif i >= 5 then + -- S or L of HSL + n = n * 100 + end + return ("%6d"):format(n) +end + +function RgbHslInput.from_rgb(RGB) + local HSL = convert.rgb2hsl(RGB) + local R, G, B = unpack(RGB) + local H, S, L = unpack(HSL) + return { R, G, B, H, S, L } +end + +function RgbHslInput.to_rgb(value) + return { value[1], value[2], value[3] } +end + +function RgbHslInput:_set_rgb(RGB) + self.value[1] = RGB[1] + self.value[2] = RGB[2] + self.value[3] = RGB[3] +end + +function RgbHslInput:_set_hsl(HSL) + self.value[4] = HSL[1] + self.value[5] = HSL[2] + self.value[6] = HSL[3] +end + +function RgbHslInput:callback(index, new_value) + self.value[index] = new_value + local v = self.value + if index <= 3 then + local RGB = { v[1], v[2], v[3] } + local HSL = convert.rgb2hsl(RGB) + self:_set_hsl(HSL) + else + local HSL = { v[4], v[5], v[6] } + local RGB = convert.hsl2rgb(HSL) + self:_set_rgb(RGB) + end +end + +ccc.setup({ + pickers = { + ccc.picker.custom_entries({ + bg = "#1a1b26", + bg_dark = "#16161e", + bg_float = "#16161e", + bg_highlight = "#292e42", + bg_popup = "#16161e", + bg_search = "#3d59a1", + bg_sidebar = "#16161e", + bg_statusline = "#16161e", + bg_visual = "#283457", + black = "#15161e", + blue = "#7aa2f7", + blue0 = "#3d59a1", + blue1 = "#2ac3de", + blue2 = "#0db9d7", + blue5 = "#89ddff", + blue6 = "#b4f9f8", + blue7 = "#394b70", + border = "#15161e", + border_highlight = "#27a1b9", + comment = "#565f89", + cyan = "#7dcfff", + dark3 = "#545c7e", + dark5 = "#737aa2", + delta_add = "#2c5a66", + delta_delete = "#713137", + diff_add = "#20303b", + diff_change = "#1f2231", + diff_delete = "#37222c", + diff_text = "#394b70", + error = "#db4b4b", + fg = "#c0caf5", + fg_dark = "#a9b1d6", + fg_float = "#c0caf5", + fg_gutter = "#3b4261", + fg_sidebar = "#a9b1d6", + git_add = "#449dab", + git_change = "#6183bb", + git_delete = "#914c54", + git_ignore = "#545c7e", + gitSigns_add = "#266d6a", + gitSigns_change = "#536c9e", + gitSigns_delete = "#b2555b", + green = "#9ece6a", + green1 = "#73daca", + green2 = "#41a6b5", + hint = "#1abc9c", + info = "#0db9d7", + magenta = "#bb9af7", + magenta2 = "#ff007c", + none = "NONE", + orange = "#ff9e64", + purple = "#9d7cd8", + red = "#f7768e", + red1 = "#db4b4b", + teal = "#1abc9c", + terminal_black = "#414868", + warning = "#e0af68", + yellow = "#e0af68", + }), + }, + inputs = { + RgbHslInput, + }, +}) diff --git a/after/plugin/clang-extension.lua b/after/plugin/clang-extension.lua new file mode 100644 index 0000000..fba617b --- /dev/null +++ b/after/plugin/clang-extension.lua @@ -0,0 +1,67 @@ +if not pcall(require, "clangd_extensions") then + return +end + +require("clangd_extensions").setup({ + inlay_hints = { + inline = vim.fn.has("nvim-0.10") == 1, + -- Options other than `highlight' and `priority' only work + -- if `inline' is disabled + -- Only show inlay hints for the current line + only_current_line = false, + -- Event which triggers a refresh of the inlay hints. + -- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but + -- not that this may cause higher CPU usage. + -- This option is only respected when only_current_line and + -- autoSetHints both are true. + only_current_line_autocmd = { "CursorHold" }, + -- whether to show parameter hints with the inlay hints or not + show_parameter_hints = true, + -- prefix for parameter hints + parameter_hints_prefix = "<- ", + -- prefix for all the other hints (type, chaining) + other_hints_prefix = "=> ", + -- whether to align to the length of the longest line in the file + max_len_align = true, + -- padding from the left if max_len_align is true + max_len_align_padding = 1, + -- whether to align to the extreme right or not + right_align = false, + -- padding from the right if right_align is true + right_align_padding = 8, + -- The color of the hints + highlight = "Comment", + -- The highlight group priority for extmark + priority = 100, + }, + ast = { + role_icons = { + type = "", + declaration = "", + expression = "", + specifier = "", + statement = "", + ["template argument"] = "", + }, + kind_icons = { + Compound = "", + Recovery = "", + TranslationUnit = "", + PackExpansion = "", + TemplateTypeParm = "", + TemplateTemplateParm = "", + TemplateParamObject = "", + }, + highlights = { + detail = "Comment", + }, + }, + + memory_usage = { + border = "none", + }, + + symbol_info = { + border = "none", + }, +}) diff --git a/after/plugin/cloak.lua b/after/plugin/cloak.lua new file mode 100644 index 0000000..aca389f --- /dev/null +++ b/after/plugin/cloak.lua @@ -0,0 +1,31 @@ +if not pcall(require, "cloak") then + return +end + +require("cloak").setup({ + enabled = true, + cloak_character = "*", + -- The applied highlight group (colors) on the cloaking, see `:h highlight`. + highlight_group = "Comment", + -- Applies the length of the replacement characters for all matched + -- patterns, defaults to the length of the matched pattern. + cloak_length = nil, -- Provide a number if you want to hide the true length of the value. + -- Wether it should try every pattern to find the best fit or stop after the first. + try_all_patterns = true, + patterns = { + { + -- Match any file starting with '.env'. + -- This can be a table to match multiple file patterns. + file_pattern = { ".env*" }, + -- Match an equals sign and any character after it. + -- This can also be a table of patterns to cloak, + -- example: cloak_pattern = { ':.+', '-.+' } for yaml files. + cloak_pattern = "=.+", + -- A function, table or string to generate the replacement. + -- The actual replacement will contain the 'cloak_character' + -- where it doesn't cover the original text. + -- If left empty the legacy behavior of keeping the first character is retained. + replace = nil, + }, + }, +}) diff --git a/after/plugin/cmake-tools.lua b/after/plugin/cmake-tools.lua new file mode 100644 index 0000000..4ff8771 --- /dev/null +++ b/after/plugin/cmake-tools.lua @@ -0,0 +1,20 @@ +if not pcall(require, "cmake-tools") then + return +end + +require("cmake-tools").setup({ + cmake_command = "cmake", + cmake_build_directory = "target/build/", + cmake_build_directory_prefix = "cmake_build_", -- when cmake_build_directory is "", this option will be activated + cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" }, + cmake_soft_link_compile_commands = true, -- if softlink compile commands json file + cmake_build_options = {}, + cmake_console_size = 15, -- cmake output window height + cmake_console_position = "belowright", -- "belowright", "aboveleft", ... + cmake_show_console = "always", -- "always", "only_on_error" + cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional + cmake_variants_message = { + short = { show = true }, + long = { show = true, max_length = 40 }, + }, +}) diff --git a/after/plugin/colorizer.lua b/after/plugin/colorizer.lua new file mode 100644 index 0000000..18b1789 --- /dev/null +++ b/after/plugin/colorizer.lua @@ -0,0 +1,33 @@ +if not pcall(require, "colorizer") then + return +end + +require("colorizer").setup({ + filetypes = { "html", "css", "javascript", "lua", "yaml", "conf", "toml" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue or blue + RRGGBBAA = true, -- #RRGGBBAA hex codes + AARRGGBB = true, -- 0xAARRGGBB hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = "background", -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = true, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { + enable = true, + parsers = { "css" }, + }, -- Enable sass colors + virtualtext = "■", + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, + html = { names = true }, + css = { names = true }, +}) diff --git a/after/plugin/comment.lua b/after/plugin/comment.lua new file mode 100644 index 0000000..e010efd --- /dev/null +++ b/after/plugin/comment.lua @@ -0,0 +1,61 @@ +if not pcall(require, "Comment") then + return +end + +require("Comment").setup({ + ---Add a space b/w comment and the line + padding = true, + ---Whether the cursor should stay at its position + sticky = true, + ---Lines to be ignored while (un)comment + ignore = nil, + ---LHS of toggle mappings in NORMAL mode + toggler = { + ---Line-comment toggle keymap + line = "gcc", + ---Block-comment toggle keymap + block = "gbb", + }, + -- -LHS of operator-pending mappings in NORMAL and VISUAL mode + opleader = { + ---Line-comment keymap + line = "gc", + ---Block-comment keymap + block = "gb", + }, + ---LHS of extra mappings + extra = { + ---Add comment on the line above + above = "gcO", + ---Add comment on the line below + below = "gco", + ---Add comment at the end of line + eol = "gcA", + }, + --- Enable keybindings + --- NOTE: If given `false` then the plugin won't create any mappings + mappings = { + ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}` + basic = true, + ---Extra mapping; `gco`, `gcO`, `gcA` + extra = true, + ---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}` + extended = true, + }, + ---Function to call before (un)comment + -- pre_hook = function(ctx) + -- local U = require("Comment.utils") + -- + -- local location = nil + -- if ctx.ctype == U.ctype.block then + -- location = require("ts_context_commentstring.utils").get_cursor_location() + -- elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then + -- location = require("ts_context_commentstring.utils").get_visual_start_location() + -- end + -- + -- return require("ts_context_commentstring.internal").calculate_commentstring({ + -- key = ctx.ctype == U.ctype.line and "__default" or "__multiline", + -- location = location, + -- }) + -- end, +}) diff --git a/after/plugin/crates.lua b/after/plugin/crates.lua new file mode 100644 index 0000000..4aec7ee --- /dev/null +++ b/after/plugin/crates.lua @@ -0,0 +1,139 @@ +if not pcall(require, "crates") then + return +end + +require("crates").setup({ + smart_insert = true, + insert_closing_quote = true, + avoid_prerelease = true, + autoload = true, + autoupdate = true, + loading_indicator = true, + date_format = "%d-%m-%Y", + thousands_separator = ".", + notification_title = "Crates", + disable_invalid_feature_diagnostic = false, + text = { + loading = "  Loading", + version = "  %s", + prerelease = "  %s", + yanked = "  %s", + nomatch = "  No match", + upgrade = "  %s", + error = "  Error fetching crate", + }, + highlight = { + loading = "CratesNvimLoading", + version = "CratesNvimVersion", + prerelease = "CratesNvimPreRelease", + yanked = "CratesNvimYanked", + nomatch = "CratesNvimNoMatch", + upgrade = "CratesNvimUpgrade", + error = "CratesNvimError", + }, + popup = { + autofocus = false, + copy_register = '"', + style = "minimal", + border = "none", + show_version_date = false, + show_dependency_version = true, + max_height = 30, + min_width = 20, + padding = 1, + text = { + title = " %s", + pill_left = "", + pill_right = "", + description = "%s", + created_label = " created ", + created = "%s", + updated_label = " updated ", + updated = "%s", + downloads_label = " downloads ", + downloads = "%s", + homepage_label = " homepage ", + homepage = "%s", + repository_label = " repository ", + repository = "%s", + documentation_label = " documentation ", + documentation = "%s", + crates_io_label = " crates.io ", + crates_io = "%s", + categories_label = " categories ", + keywords_label = " keywords ", + version = " %s", + prerelease = " %s", + yanked = " %s", + version_date = " %s", + feature = " %s", + enabled = " %s", + transitive = " %s", + normal_dependencies_title = " Dependencies", + build_dependencies_title = " Build dependencies", + dev_dependencies_title = " Dev dependencies", + dependency = " %s", + optional = " %s", + dependency_version = " %s", + loading = "  ", + }, + highlight = { + title = "CratesNvimPopupTitle", + pill_text = "CratesNvimPopupPillText", + pill_border = "CratesNvimPopupPillBorder", + description = "CratesNvimPopupDescription", + created_label = "CratesNvimPopupLabel", + created = "CratesNvimPopupValue", + updated_label = "CratesNvimPopupLabel", + updated = "CratesNvimPopupValue", + downloads_label = "CratesNvimPopupLabel", + downloads = "CratesNvimPopupValue", + homepage_label = "CratesNvimPopupLabel", + homepage = "CratesNvimPopupUrl", + repository_label = "CratesNvimPopupLabel", + repository = "CratesNvimPopupUrl", + documentation_label = "CratesNvimPopupLabel", + documentation = "CratesNvimPopupUrl", + crates_io_label = "CratesNvimPopupLabel", + crates_io = "CratesNvimPopupUrl", + categories_label = "CratesNvimPopupLabel", + keywords_label = "CratesNvimPopupLabel", + version = "CratesNvimPopupVersion", + prerelease = "CratesNvimPopupPreRelease", + yanked = "CratesNvimPopupYanked", + version_date = "CratesNvimPopupVersionDate", + feature = "CratesNvimPopupFeature", + enabled = "CratesNvimPopupEnabled", + transitive = "CratesNvimPopupTransitive", + normal_dependencies_title = "CratesNvimPopupNormalDependenciesTitle", + build_dependencies_title = "CratesNvimPopupBuildDependenciesTitle", + dev_dependencies_title = "CratesNvimPopupDevDependenciesTitle", + dependency = "CratesNvimPopupDependency", + optional = "CratesNvimPopupOptional", + dependency_version = "CratesNvimPopupDependencyVersion", + loading = "CratesNvimPopupLoading", + }, + keys = { + hide = { "q", "" }, + open_url = { "" }, + select = { "" }, + select_alt = { "s" }, + toggle_feature = { "" }, + copy_value = { "yy" }, + goto_item = { "gd", "K", "" }, + jump_forward = { "" }, + jump_back = { "", "" }, + }, + }, + src = { + insert_closing_quote = true, + text = { + prerelease = "  pre-release ", + yanked = "  yanked ", + }, + }, + null_ls = { + enabled = true, + name = "crates.nvim", + }, +}) diff --git a/after/plugin/dap.lua b/after/plugin/dap.lua index 3c60c67..308cc32 100644 --- a/after/plugin/dap.lua +++ b/after/plugin/dap.lua @@ -1,6 +1,38 @@ +if not pcall(require, "dap") then + return +end + local dap = require("dap") local dapui = require("dapui") +vim.keymap.set("n", "dd", function() + dap.toggle_breakpoint() +end) +vim.keymap.set("n", "dc", function() + dap.continue() +end) +vim.keymap.set("n", "di", function() + dap.step_into() +end) +vim.keymap.set("n", "dp", function() + dap.step_over() +end) +vim.keymap.set("n", "dO", function() + dap.step_out() +end) +vim.keymap.set("n", "dI", function() + dap.repl.open() +end) +vim.keymap.set("n", "dk", function() + dap.terminate() +end) +vim.keymap.set("n", "dl", function() + dap.run_last() +end) +vim.keymap.set("n", "du", function() + dapui.toggle() +end) + vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" }) dap.listeners.after.event_initialized["dapui_config"] = function() diff --git a/after/plugin/git-worktree.lua b/after/plugin/git-worktree.lua new file mode 100644 index 0000000..8b88d9e --- /dev/null +++ b/after/plugin/git-worktree.lua @@ -0,0 +1,15 @@ +vim.keymap.set("n", "wc", function() + require("telescope").extensions.git_worktree.git_worktrees() +end) + +vim.keymap.set("n", "wn", function() + require("telescope").extensions.git_worktree.create_git_worktree() +end) + +local Worktree = require("git-worktree") + +Worktree.on_tree_change(function(op, metadata) + if op == Worktree.Operations.Switch then + print("Switched from " .. metadata.prev_path .. " to " .. metadata.path) + end +end) diff --git a/after/plugin/gitsigns.lua b/after/plugin/gitsigns.lua new file mode 100644 index 0000000..73ea9e6 --- /dev/null +++ b/after/plugin/gitsigns.lua @@ -0,0 +1,37 @@ +if not pcall(require, "gitsigns") then + return +end + +vim.keymap.set("n", "gb", function() + vim.cmd.Gitsigns("blame_line") +end) + +require("gitsigns").setup({ + signs = { + add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + change = { + hl = "GitSignsChange", + text = "▎", + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + delete = { + hl = "GitSignsDelete", + text = "契", + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + topdelete = { + hl = "GitSignsDelete", + text = "契", + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + changedelete = { + hl = "GitSignsChange", + text = "▎", + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + }, +}) diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua new file mode 100644 index 0000000..66a9e7d --- /dev/null +++ b/after/plugin/harpoon.lua @@ -0,0 +1,21 @@ +if not pcall(require, "harpoon") then + return +end + +local mark = require("harpoon.mark") +local ui = require("harpoon.ui") +vim.keymap.set("n", "a", mark.add_file) +vim.keymap.set("n", "", ui.toggle_quick_menu) + +vim.keymap.set("n", "", function() + ui.nav_file(1) +end) +vim.keymap.set("n", "", function() + ui.nav_file(2) +end) +vim.keymap.set("n", "", function() + ui.nav_file(3) +end) +vim.keymap.set("n", "", function() + ui.nav_file(4) +end) diff --git a/after/plugin/illuminate.lua b/after/plugin/illuminate.lua new file mode 100644 index 0000000..8eba237 --- /dev/null +++ b/after/plugin/illuminate.lua @@ -0,0 +1,54 @@ +if not pcall(require, "illuminate") then + return +end + +require("illuminate").configure({ + providers = { + "lsp", + "treesitter", + "regex", + }, + -- delay: delay in milliseconds + delay = 100, + -- filetype_overrides: filetype specific overrides. + -- The keys are strings to represent the filetype while the values are tables that + -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist + filetype_overrides = {}, + -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist + filetypes_denylist = { + "alpha", + "NvimTree", + "dirvish", + "fugitive", + }, + -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist + filetypes_allowlist = {}, + -- modes_denylist: modes to not illuminate, this overrides modes_allowlist + -- See `:help mode()` for possible values + modes_denylist = {}, + -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist + -- See `:help mode()` for possible values + modes_allowlist = {}, + -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist + -- Only applies to the 'regex' provider + -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') + providers_regex_syntax_denylist = {}, + -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist + -- Only applies to the 'regex' provider + -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') + providers_regex_syntax_allowlist = {}, + -- under_cursor: whether or not to illuminate under the cursor + under_cursor = true, + -- large_file_cutoff: number of lines at which to use large_file_config + -- The `under_cursor` option is disabled when this cutoff is hit + large_file_cutoff = nil, + -- large_file_config: config to use for large files (based on large_file_cutoff). + -- Supports the same keys passed to .configure + -- If nil, vim-illuminate will be disabled for large files. + large_file_overrides = nil, + -- min_count_to_highlight: minimum number of matches required to perform highlighting + min_count_to_highlight = 1, +}) +local bind = vim.keymap.set +bind("n", "", "lua require('illuminate').goto_next_reference(wrap)", { noremap = true }) +bind("n", "", "lua require('illuminate').goto_prev_reference(wrap)", { noremap = true }) diff --git a/after/plugin/indent-blankline.lua b/after/plugin/indent-blankline.lua new file mode 100644 index 0000000..1b06eb9 --- /dev/null +++ b/after/plugin/indent-blankline.lua @@ -0,0 +1,30 @@ +if not pcall(require, "indent_blankline") then + return +end + +vim.opt.list = true +vim.opt.listchars:append("space:⋅") +vim.opt.listchars:append("eol:↴") + +require("indent_blankline").setup({ + char = "▎", + show_trailing_blankline_indent = true, + show_first_indent_level = true, + use_treesitter = true, + show_end_of_line = true, + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = false, + buftype_exclude = { "terminal", "nofile" }, + filetype_exclude = { + "NvimTree", + "Trouble", + "alpha", + "dashboard", + "help", + "lazy", + "neogitstatus", + "packer", + "startify", + }, +}) diff --git a/after/plugin/lazygit.lua b/after/plugin/lazygit.lua new file mode 100644 index 0000000..6f8bdf5 --- /dev/null +++ b/after/plugin/lazygit.lua @@ -0,0 +1 @@ +vim.keymap.set("n", "gg", vim.cmd.LazyGit) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index e592a48..8451929 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,3 +1,7 @@ +if not pcall(require, "lsp-zero") then + return +end + local lsp = require("lsp-zero").preset({ float_border = "rounded", call_servers = "local", @@ -5,7 +9,7 @@ local lsp = require("lsp-zero").preset({ setup_servers_on_start = true, set_lsp_keymaps = { preserve_mappings = false, - omit = { "", "" }, + omit = { "", "", "" }, }, manage_nvim_cmp = { set_sources = "recommended", @@ -22,14 +26,22 @@ lsp.on_attach(function(client, bufnr) -- to learn the available actions lsp.default_keymaps({ buffer = bufnr }) local opts = { buffer = bufnr } - local bind = vim.keymap.set - - bind("n", "gD", "lua vim.lsp.buf.declaration()", opts) - bind("n", "gd", "lua require('telescope.builtin').lsp_definitions()", opts) - bind("n", "K", "lua vim.lsp.buf.hover()", opts) - bind("n", "gI", "lua vim.lsp.buf.implementation()", opts) - bind("n", "gr", "lua require('telescope.builtin').lsp_references()", opts) - bind("n", "gl", "lua vim.diagnostic.open_float()", opts) + vim.keymap.set("n", "gd", function() + vim.lsp.buf.definition() + end, opts) + vim.keymap.set("n", "gD", function() + vim.lsp.buf.declaration() + end, opts) + vim.keymap.set("n", "K", function() + vim.lsp.buf.hover() + end, opts) + vim.keymap.set("n", "gi", function() + vim.lsp.buf.implementation() + end, opts) + vim.keymap.set("n", "gr", "lua require('telescope.builtin').lsp_references()", opts) + vim.keymap.set("n", "gl", function() + vim.diagnostic.open_float() + end, opts) end) lsp.ensure_installed({ @@ -43,7 +55,6 @@ lsp.ensure_installed({ "jsonls", "lua_ls", "ruff_lsp", - "rust_analyzer", "sqlls", "tailwindcss", "taplo", @@ -176,10 +187,10 @@ null_ls.setup({ "strict", }, }), - formatting.remark.with({ extra_filetypes = { "vimwiki" } }), + -- formatting.remark.with({ extra_filetypes = { "vimwiki" } }), -- FIX: indentation level formatting.markdown_toc.with({ extra_filetypes = { "vimwiki" } }), - formatting.shellharden.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }), - formatting.shfmt.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }), + -- formatting.shellharden.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }), + -- formatting.shfmt.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }), }, }) @@ -193,7 +204,6 @@ require("mason-null-ls").setup({ "luacheck", "misspell", "mypy", - "beautysh", "cbfmt", "clang_format", "cmake_format", @@ -203,8 +213,6 @@ require("mason-null-ls").setup({ "prettier", "remark", "markdown_toc", - "shellharden", - "shfmt", "stylua", "usort", "yamlfmt", diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua new file mode 100644 index 0000000..07cf023 --- /dev/null +++ b/after/plugin/lualine.lua @@ -0,0 +1,61 @@ +if not pcall(require, "lualine") then + return +end + +require("lualine").setup({ + options = { + icons_enabled = true, + theme = "auto", + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = { + statusline = { "dashboard" }, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = false, + globalstatus = true, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + }, + }, + --[[ Available components + + `branch` (git branch) + `buffers` (shows currently available buffers) + `diagnostics` (diagnostics count from your preferred source) + `diff` (git diff status) + `encoding` (file encoding) + `fileformat` (file format) + `filename` + `filesize` + `filetype` + `hostname` + `location` (location in file in line:column format) + `mode` (vim mode) + `progress` (%progress in file) + `searchcount` (number of search matches when hlsearch is active) + `selectioncount` (number of selected characters or lines) + `tabs` (shows currently available tabs) + `windows` (shows currently available windows) ]] + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch" }, + lualine_c = { "filename", "diff" }, + lualine_x = { "diagnostics", "encoding", "filetype", "filesize" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = {}, +}) diff --git a/after/plugin/luasnip.lua b/after/plugin/luasnip.lua index 45429bf..4695a08 100644 --- a/after/plugin/luasnip.lua +++ b/after/plugin/luasnip.lua @@ -1,3 +1,7 @@ +if not pcall(require, "luasnip") then + return +end + local ls = require("luasnip") require("luasnip/loaders/from_vscode").lazy_load() diff --git a/after/plugin/obsidian.lua b/after/plugin/obsidian.lua new file mode 100644 index 0000000..3d78bee --- /dev/null +++ b/after/plugin/obsidian.lua @@ -0,0 +1,37 @@ +if not pcall(require, "obsidian") then + return +end + +require("obsidian").setup({ + dir = "~/obsidian", + notes_subdir = "university", + + completion = { + nvim_cmp = true, + min_chars = 2, + new_notes_location = "current_dir", + prepend_note_id = true, + }, + + mappings = { + ["gf"] = require("obsidian.mapping").gf_passthrough(), + }, + + templates = { + subdir = "university/templates", + date_format = "%Y.%m.%d", + time_format = "%H:%M:%S", + }, + + backlinks = { + height = 10, + wrap = true, + }, + + follow_url_func = function(url) + vim.fn.jobstart({ "xdg-open", url }) + end, + use_advanced_uri = true, + open_app_foreground = false, + open_notes_in = "current", +}) diff --git a/after/plugin/project.lua b/after/plugin/project.lua new file mode 100644 index 0000000..fea6206 --- /dev/null +++ b/after/plugin/project.lua @@ -0,0 +1,12 @@ +if not pcall(require, "project_nvim") then + return +end + +require("project_nvim").setup({ + detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project + -- detection_methods = { "pattern" }, + -- patterns used to detect root dir, when **"pattern"** is in detection_methods + patterns = { ".git", "package.json", ".venv", "Cargo.toml", "requirements.txt", "CMakeLists.txt" }, +}) +local telescope = require("telescope") +telescope.load_extension("projects") diff --git a/after/plugin/rust-tools.lua b/after/plugin/rust-tools.lua new file mode 100644 index 0000000..139094b --- /dev/null +++ b/after/plugin/rust-tools.lua @@ -0,0 +1,170 @@ +if not pcall(require, "rust-tools") then + return +end + +require("rust-tools").setup({ + tools = { + -- how to execute terminal commands + -- options right now: termopen / quickfix + -- executor = require("rust-tools.executors").termopen, + + -- callback to execute once rust-analyzer is done initializing the workspace + -- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error" + on_initialized = function() + vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave", "BufWritePost" }, { + group = vim.api.nvim_create_augroup("InitializeRustAnalyzer", { clear = true }), + pattern = { "*.rs" }, + callback = function() + vim.lsp.codelens.refresh() + end, + }) + end, + + -- automatically call RustReloadWorkspace when writing to a Cargo.toml file. + reload_workspace_from_cargo_toml = true, + + -- These apply to the default RustSetInlayHints command + inlay_hints = { + -- automatically set inlay hints (type hints) + -- default: true + auto = true, + -- Only show inlay hints for the current line + only_current_line = false, + -- whether to show parameter hints with the inlay hints or not + -- default: true + show_parameter_hints = true, + -- prefix for parameter hints + -- default: "<-" + parameter_hints_prefix = " <- ", + -- prefix for all the other hints (type, chaining) + -- default: "=>" + other_hints_prefix = " => ", + -- whether to align to the length of the longest line in the file + max_len_align = false, + -- padding from the left if max_len_align is true + max_len_align_padding = 1, + -- whether to align to the extreme right or not + right_align = false, + -- padding from the right if right_align is true + right_align_padding = 7, + -- The color of the hints + highlight = "Comment", + }, + -- options same as lsp hover / vim.lsp.util.open_floating_preview() + hover_actions = { + -- the border that is used for the hover window + -- see vim.api.nvim_open_win() + border = { + { "╭", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╮", "FloatBorder" }, + { "│", "FloatBorder" }, + { "╯", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╰", "FloatBorder" }, + { "│", "FloatBorder" }, + }, + -- Maximal width of the hover window. Nil means no max. + max_width = nil, + -- Maximal height of the hover window. Nil means no max. + max_height = nil, + -- whether the hover action window gets automatically focused + -- default: false + auto_focus = false, + }, + -- settings for showing the crate graph based on graphviz and the dot + -- command + crate_graph = { + -- Backend used for displaying the graph + -- see: https://graphviz.org/docs/outputs/ + -- default: x11 + backend = "x11", + -- where to store the output, nil for no output stored (relative + -- path from pwd) + -- default: nil + output = nil, + -- true for all crates.io and external crates, false only the local + -- crates + -- default: true + full = true, + + -- List of backends found on: https://graphviz.org/docs/outputs/ + -- Is used for input validation and autocompletion + -- Last updated: 2021-08-26 + enabled_graphviz_backends = { + "bmp", + "cgimage", + "canon", + "dot", + "gv", + "xdot", + "xdot1.2", + "xdot1.4", + "eps", + "exr", + "fig", + "gd", + "gd2", + "gif", + "gtk", + "ico", + "cmap", + "ismap", + "imap", + "cmapx", + "imap_np", + "cmapx_np", + "jpg", + "jpeg", + "jpe", + "jp2", + "json", + "json0", + "dot_json", + "xdot_json", + "pdf", + "pic", + "pct", + "pict", + "plain", + "plain-ext", + "png", + "pov", + "ps", + "ps2", + "psd", + "sgi", + "svg", + "svgz", + "tga", + "tiff", + "tif", + "tk", + "vml", + "vmlz", + "wbmp", + "webp", + "xlib", + "x11", + }, + }, + + -- all the opts to send to nvim-lspconfig + -- these override the defaults set by rust-tools.nvim + -- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer + server = { + -- standalone file support + -- setting it to false may improve startup time + standalone = true, + }, -- rust-analyzer options + + -- debugging stuff + dap = { + adapter = { + type = "executable", + command = "codelldb", + name = "rt_lldb", + }, + }, + }, +}) diff --git a/after/plugin/tagbar.lua b/after/plugin/tagbar.lua new file mode 100644 index 0000000..94cb64c --- /dev/null +++ b/after/plugin/tagbar.lua @@ -0,0 +1 @@ +vim.keymap.set("n", "t", vim.cmd.TagbarToggle) diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua new file mode 100644 index 0000000..3360124 --- /dev/null +++ b/after/plugin/telescope.lua @@ -0,0 +1,100 @@ +if not pcall(require, "telescope") then + return +end + +local builtin = require("telescope.builtin") +local themes = require("telescope.themes") + +vim.keymap.set("n", "f", function() + builtin.find_files(themes.get_dropdown({ previewer = false })) +end, {}) +vim.keymap.set("n", "", builtin.git_files, {}) +vim.keymap.set("n", "t", "Telescope live_grep") +vim.keymap.set("n", "qf", "Telescope quickfix") +vim.keymap.set("n", "d", "Telescope diagnostics") + +local telescope = require("telescope") +local actions = require("telescope.actions") +telescope.setup({ + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + "--hidden", + }, + prompt_prefix = " ", + selection_caret = " ", + path_display = { "smart" }, + file_ignore_patterns = { ".git/", "node_modules", ".venv/" }, + mappings = { + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + }, + }, + }, + pickers = { + find_files = { + hidden = true, + follow = true, + }, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + }, + media_files = { + -- filetypes whitelist + filetypes = { "png", "webp", "jpg", "jpeg", "mp4", "webm" }, + find_cmd = "rg", + }, + emoji = { + action = function(emoji) + -- argument emoji is a table. + -- {name="", value="", cagegory="", description=""} + + vim.fn.setreg("*", emoji.value) + print([[Press p or "*p to paste this emoji]] .. emoji.value) + + -- insert emoji when picked + -- vim.api.nvim_put({ emoji.value }, 'c', false, true) + end, + }, + ["ui-select"] = { + require("telescope.themes").get_dropdown({ + -- even more opts + }), + + -- pseudo code / specification for writing custom displays, like the one + -- for "codeactions" + -- specific_opts = { + -- [kind] = { + -- make_indexed = function(items) -> indexed_items, width, + -- make_displayer = function(widths) -> displayer + -- make_display = function(displayer) -> function(e) + -- make_ordinal = function(e) -> string + -- }, + -- -- for example to disable the custom builtin "codeactions" display + -- do the following + -- codeactions = false, + -- } + }, + }, +}) +telescope.load_extension("fzf") +telescope.load_extension("media_files") +telescope.load_extension("emoji") +telescope.load_extension("ui-select") +telescope.load_extension("color_names") +telescope.load_extension("git_worktree") +telescope.load_extension("lazygit") diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua new file mode 100644 index 0000000..8434316 --- /dev/null +++ b/after/plugin/treesitter.lua @@ -0,0 +1,59 @@ +if not pcall(require, "nvim-treesitter") then + return +end + +require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" (the five listed parsers should always be installed) + ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "markdown_inline" }, -- one of "all" or a list of languages + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + -- List of parsers to ignore installing (for "all") + -- ignore_install = { "" }, + + highlight = { + enable = true, + disable = {}, + -- 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 = { "markdown" }, + }, + autopairs = { + enable = true, + }, + autotag = { + enable = true, + filetypes = { + "html", + "htmldjango", + "javascript", + "typescript", + "javascriptreact", + "typescriptreact", + "svelte", + "vue", + "tsx", + "jsx", + "rescript", + "xml", + "php", + "markdown", + "glimmer", + "handlebars", + "hbs", + }, + }, + indent = { enable = true, disable = { "" } }, + rainbow = { + enable = true, + -- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for + extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean + max_file_lines = nil, -- Do not enable for files with more than n lines, int + -- colors = {}, -- table of hex strings + -- termcolors = {}, -- table of colour name strings + }, +}) diff --git a/after/plugin/undotree.lua b/after/plugin/undotree.lua new file mode 100644 index 0000000..b6b9276 --- /dev/null +++ b/after/plugin/undotree.lua @@ -0,0 +1 @@ +vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) diff --git a/after/plugin/whichkey.lua b/after/plugin/whichkey.lua deleted file mode 100644 index e884078..0000000 --- a/after/plugin/whichkey.lua +++ /dev/null @@ -1,213 +0,0 @@ -local which_key = require("which-key") - -local setup = { - plugins = { - marks = true, -- shows a list of your marks on " and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - spelling = { - enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions - suggestions = 20, -- how many suggestions should be shown in the list? - }, - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - presets = { - operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion - motions = true, -- adds help for motions - text_objects = true, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true, -- bindings for prefixed with g - }, - }, - -- add operators that will trigger motion and text object completion - -- to enable all native operators, set the preset / operators plugin above - -- operators = { gc = "Comments" }, - key_labels = { - -- override the label used to display some keys. It doesn"t effect WK in any other way. - -- For example: - -- [""] = "SPC", - -- [""] = "RET", - -- [""] = "TAB", - }, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it"s label - group = "+", -- symbol prepended to a group - }, - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup - }, - window = { - border = "rounded", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] - winblend = 0, - }, - layout = { - height = { min = 4, max = 25 }, -- min and max height of the columns - width = { min = 20, max = 50 }, -- min and max width of the columns - spacing = 3, -- spacing between columns - align = "left", -- align columns left, center or right - }, - ignore_missing = true, -- enable this to hide mappings for which you didn"t specify a label - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate - show_help = true, -- show help message on the command line when the popup is visible - triggers = "auto", -- automatically setup triggers - -- triggers = {""} -- or specify a list manually - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - -- this is mostly relevant for key maps that start with a native binding - -- most people should not need to change this - i = { "j", "k" }, - v = { "j", "k" }, - }, -} - -local opts = { - mode = "n", -- NORMAL mode - prefix = "", - buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - silent = true, -- use `silent` when creating keymaps - noremap = true, -- use `noremap` when creating keymaps - nowait = true, -- use `nowait` when creating keymaps -} -local vopts = { - mode = "v", -- VISUAL mode - prefix = "", - buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - silent = true, -- use `silent` when creating keymaps - noremap = true, -- use `noremap` when creating keymaps - nowait = true, -- use `nowait` when creating keymaps -} --- NOTE: Prefer using : over as the latter avoids going back in normal-mode. --- see https://neovim.io/doc/user/map.html#:map-cmd -local vmappings = { - ["/"] = { "(comment_toggle_linewise_visual)", "Comment toggle linewise (visual)" }, -} - -local mappings = { - [";"] = { vim.cmd.Alpha, "Dashboard" }, - ["/"] = { "(comment_toggle_linewise_current)", "Comment toggle current line" }, - c = { vim.cmd.bdelete, "Close Buffer" }, - f = { - "lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown({previewer = false}))", - "Find files", - }, - e = { vim.cmd.NvimTreeToggle, "Explorer" }, - F = { "Telescope live_grep theme=ivy", "Find Text" }, - P = { "lua require('telescope').extensions.projects.projects()", "Projects" }, - b = { "Telescope buffers", "Find Buffers" }, - u = { vim.cmd.UndotreeToggle, "UndotreeToggle" }, - t = { vim.cmd.TagbarToggle, "Toggle Tagbar" }, - m = { require("harpoon.mark").add_file, "Add file to harpoon" }, - h = { require("harpoon.ui").toggle_quick_menu, "Open harpoon menu" }, - n = { vim.cmd.Oil, "Open Oil" }, - g = { - name = "Git", - g = { "lua _LAZYGIT_TOGGLE()", "Lazygit" }, - l = { "lua require('gitsigns').blame_line()", "Blame" }, - }, - l = { - name = "LSP", - a = { "lua vim.lsp.buf.code_action()", "Code Action" }, - d = { "Telescope diagnostics bufnr=0 theme=get_ivy", "Buffer Diagnostics" }, - w = { - "Telescope diagnostics", - "Workspace Diagnostics", - }, - j = { "lua vim.diagnostic.goto_next()", "Next Diagnostic" }, - k = { - "lua vim.diagnostic.goto_prev()", - "Prev Diagnostic", - }, - r = { "lua vim.lsp.buf.rename()", "Rename" }, - s = { "Telescope lsp_document_symbols", "Document Symbols" }, - S = { - "Telescope lsp_dynamic_workspace_symbols", - "Workspace Symbols", - }, - e = { "Telescope quickfix", "Telescope Quickfix" }, - }, - s = { - name = "Search", - b = { "Telescope git_branches", "Checkout branch" }, - c = { "Telescope colorscheme", "Colorscheme" }, - f = { "Telescope find_files", "Find File" }, - h = { "Telescope help_tags", "Find Help" }, - H = { "Telescope highlights", "Find highlight groups" }, - M = { "Telescope man_pages", "Man Pages" }, - r = { "Telescope oldfiles", "Open Recent File" }, - R = { "Telescope registers", "Registers" }, - t = { "Telescope live_grep", "Text" }, - k = { "Telescope keymaps", "Keymaps" }, - C = { "Telescope commands", "Commands" }, - T = { "TodoTelescope", "Todo" }, - m = { "lua require('telescope').extensions.media_files.media_files()", "Media" }, - p = { - "lua require('telescope.builtin').colorscheme({enable_preview = true})", - "Colorscheme with Preview", - }, - }, - r = { - name = "Rust", - e = { vim.cmd.RustExpandMacro, "Expand macro" }, - c = { vim.cmd.RustOpenCargo, "Open cargo.toml" }, - p = { vim.cmd.RustParentModule, "Parent module" }, - h = { vim.cmd.RustHoverActions, "Hover actions" }, - g = { vim.cmd.RustViewCrateGraph, "View create graph" }, - d = { vim.cmd.RustOpenExternalDocs, "Open external docs" }, - R = { vim.cmd.RustRunnables, "Open runnables" }, - a = { vim.cmd.RustCodeAction, "Code action groups" }, - }, - T = { - name = "Terminal", - n = { "lua _NODE_TOGGLE()", "Node" }, - u = { "lua _NCDU_TOGGLE()", "NCDU" }, - b = { "lua _BTOP_TOGGLE()", "Btop" }, - p = { "lua _PYTHON_TOGGLE()", "Python" }, - c = { "lua _CARGO_RUN()", "Cargo run" }, - f = { "ToggleTerm direction=float", "Float" }, - h = { "ToggleTerm size=10 direction=horizontal", "Horizontal" }, - v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, - }, - L = { - name = "Language settings", - c = { "setlocal formatoptions-=cro", "Disable autocomment" }, - C = { "setlocal formatoptions=cro", "Enable autocomment" }, - s = { "setlocal spell!", "Toggle spellchecker" }, - e = { "setlocal spell spelllang=en_us", "Enable English spellchecker" }, - l = { "setlocal spell spelllang=lv_LV", "Enable Lavian spellchecker" }, - I = { "setlocal autoindent", "Enable autoindent" }, - i = { "setlocal noautoindent", "Disable autoindent" }, - }, - d = { - name = "DAP", - d = { "lua require('dap').toggle_breakpoint()", "Set breakpoint" }, - t = { "lua require('dapui').toggle()", "Toggle DAP-UI" }, - c = { "lua require('dap').continue()", "Launch debug sessions and resume execution" }, - i = { "lua require('dap').step_into()", "Step into code" }, - o = { "lua require('dap').step_over()", "Step over code" }, - O = { "lua require('dap').step_out()", "Step out of code" }, - r = { "lua require('dap').repl.open()", "Inspect state" }, - T = { "lua require('dap').terminate()", "Terminate" }, - l = { "lua require('dap').run_last()", "Run last" }, - }, - w = { - name = "VimWiki", - w = { "VimwikiIndex", "Open index file" }, - t = { "VimwikiTabIndex", "Open index file in new tab" }, - s = { "VimwikiUISelect", "Display list of wikis" }, - i = { "VimwikiDiaryIndex", "Open diary index" }, - h = { "Vimwiki2HTML", "Convert file to HTML" }, - H = { "Vimwiki2HTMLBrowse", "Convert file to HTML and open in browser" }, - n = { "VimwikiGoto", "Goto link provided by an argument" }, - d = { "VimwikiDeleteFile", "Rename file" }, - r = { "VimwikiRenameFile", "Delete file" }, - }, -} - -which_key.setup(setup) -which_key.register(mappings, opts, vopts, vmappings) diff --git a/lazy-lock.json b/lazy-lock.json index 2023c81..6bcac25 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,89 +1,69 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "DAPInstall.nvim": { "branch": "main", "commit": "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }, - "LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" }, - "alpha-nvim": { "branch": "main", "commit": "e4fc5e29b731bdf55d204c5c6a11dc3be70f3b65" }, + "LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" }, "ccc.nvim": { "branch": "main", "commit": "4a0ddaf787cc82796e84ab8a7f70d086f250aeb6" }, - "clangd_extensions.nvim": { "branch": "main", "commit": "5c8a7d6311ae6b0ed1e1fc66569fe67278a418fc" }, - "cmake-tools.nvim": { "branch": "master", "commit": "b19d166dc01e047c6dfdeb2da5df50eb4985ad64" }, + "cellular-automaton.nvim": { "branch": "main", "commit": "679943b8e1e5ef79aaeeaf4b00782c52eb4e928f" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "323b00de2ee18cad1ac45eb95e680386c4ff4366" }, + "cloak.nvim": { "branch": "main", "commit": "ff5e746e787de14675396beb642bf5010b8bc96d" }, + "cmake-tools.nvim": { "branch": "master", "commit": "011c2641e39fba67260b1af56cb7328d43438133" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" }, - "darkplus.nvim": { "branch": "master", "commit": "7c236649f0617809db05cd30fb10fed7fb01b83b" }, "distant.nvim": { "branch": "v0.3", "commit": "17bcd37f8d91dcb987456be456d8a95db1a772ba" }, - "dracula.nvim": { "branch": "main", "commit": "9fe831e685a76e1a1898a694623b33247c4d036c" }, - "friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" }, - "gitsigns.nvim": { "branch": "main", "commit": "bae45ef449d8811061cc940459e70e883a3aa83a" }, + "friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" }, + "git-worktree.nvim": { "branch": "master", "commit": "d7f4e2584e81670154f07ca9fa5dd791d9c1b458" }, + "gitsigns.nvim": { "branch": "main", "commit": "d8590288417fef2430f85bc8b312fae8b1cf2c40" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, - "hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, - "kanagawa.nvim": { "branch": "master", "commit": "1749cea392acb7d1548a946fcee1e6f1304cd3cb" }, - "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" }, - "lsp-zero.nvim": { "branch": "v2.x", "commit": "96974fe970c37bd3879ad8b6be4fe7ddfad75680" }, - "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, + "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, + "lazygit.nvim": { "branch": "main", "commit": "22e51e03268fabe068a77e2bd316ac25ff2084f9" }, + "lsp-zero.nvim": { "branch": "v2.x", "commit": "f084f4a6a716f55bf9c4026e73027bb24a0325a3" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, - "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "e4d56b400e9757b1dc77d620fd3069396e92d5fc" }, - "mason.nvim": { "branch": "main", "commit": "74eac861b013786bf231b204b4ba9a7d380f4bd9" }, - "melange-nvim": { "branch": "master", "commit": "11f35df3e091f35e966a335ed90b0d8a03851ffd" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" }, + "mason.nvim": { "branch": "main", "commit": "c811fbf09c7642eebb37d6694f1a016a043f6ed3" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, - "nightfly": { "branch": "master", "commit": "e5638253af9bc27b81a129690cd9a9a7fcf79f4d" }, - "nightfox.nvim": { "branch": "main", "commit": "a48f6d9a0273101df76eb25d2f5477baa277f935" }, - "noice.nvim": { "branch": "main", "commit": "894db25ec726d32047799d4d0a982b701bec453b" }, - "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, - "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, - "nvim": { "branch": "main", "commit": "490078b1593c6609e6a50ad5001e7902ea601824" }, + "nightfly": { "branch": "master", "commit": "06eaaaa8717538a7ce96b13c137da8c9eaa84ec8" }, + "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, - "nvim-cmp": { "branch": "main", "commit": "3b9f28061a67b19cadc13946de981426a6425e4a" }, + "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "1c63f37f95cd4fb54512898168138d9a75d1516a" }, + "nvim-dap": { "branch": "master", "commit": "4377a05b9476587b7b485d6a9d9745768c4e4b37" }, "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, - "nvim-lspconfig": { "branch": "master", "commit": "a981d4447b92c54a4d464eb1a76b799bc3f9a771" }, - "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, - "nvim-tree.lua": { "branch": "master", "commit": "904f95cd9db31d1800998fa428e78e418a50181d" }, - "nvim-treesitter": { "branch": "master", "commit": "15129f6d70a4d7adc380abe57a64af93478f72e5" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" }, + "nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, + "nvim-treesitter": { "branch": "master", "commit": "d94e1ad9575cc211b5726f09b28ca9454aba22fe" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "9bff161dfece6ecf3459e6e46ca42e49f9ed939f" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, - "nvim-ufo": { "branch": "main", "commit": "5be5b800b4f3512bca128f345e9c98574b5637c0" }, - "nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" }, - "obsidian.nvim": { "branch": "main", "commit": "8f1c896c4f084facddb235696a0dcc940411f3d5" }, - "oil.nvim": { "branch": "master", "commit": "0e5fca35cdc743cf3a448cea1a6251cf25cebafa" }, - "onedark.nvim": { "branch": "master", "commit": "09b71d84bd2524438e48c0aa5b54d855cc72af32" }, - "persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" }, - "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, - "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, + "obsidian.nvim": { "branch": "main", "commit": "6b17ee6cbd81f5f091712a59473b4257007ae336" }, + "playground": { "branch": "master", "commit": "429f3e76cbb1c59fe000b690f7a5bea617b890c0" }, + "plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" }, "rainbow_csv": { "branch": "master", "commit": "7453a3f9679f0c753ec9d77f9ea8588778f35aeb" }, - "refactoring.nvim": { "branch": "master", "commit": "5359e74291164fcaeaaecdea9ba753ad54eb53d0" }, - "rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "sqls.nvim": { "branch": "main", "commit": "4b1274b5b44c48ce784aac23747192f5d9d26207" }, - "tagbar": { "branch": "master", "commit": "be563539754b7af22bbe842ef217d4463f73468c" }, + "tagbar": { "branch": "master", "commit": "402e3e117fc7b47e43dbb87c51064daae3bc3bf3" }, "telescope-color-names.nvim": { "branch": "main", "commit": "95b372b9a8ba0fc7cf6a67be637ee37453f322da" }, "telescope-emoji.nvim": { "branch": "master", "commit": "86248d97be84a1ce83f0541500ef9edc99ea2aa1" }, - "telescope-frecency.nvim": { "branch": "master", "commit": "1acb245b01294715684ed1322b6031cefd6c5132" }, + "telescope-frecency.nvim": { "branch": "master", "commit": "fbda5d91d6e787f5977787fa4a81da5c8e22160a" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-media-files.nvim": { "branch": "master", "commit": "0826c7a730bc4d36068f7c85cf4c5b3fd9fb570a" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "2d92125620417fbea82ec30303823e3cd69e90e8" }, + "telescope.nvim": { "branch": "master", "commit": "1dfa66b845673effc8771f9ebe511bb36a09f560" }, "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, - "toggleterm.nvim": { "branch": "main", "commit": "12cba0a1967b4f3f31903484dec72a6100dcf515" }, "tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" }, "undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" }, "vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" }, "vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" }, - "vim-illuminate": { "branch": "master", "commit": "5ed17582a8e97bf0a0c617c3cf762e98f87b9859" }, + "vim-fugitive": { "branch": "master", "commit": "572c8510123cbde02e8a1dafcd376c98e1e13f43" }, + "vim-illuminate": { "branch": "master", "commit": "76f28e858f1caae87bfa45fb4fd09e4b053fc45b" }, "vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" }, - "vim-markdown": { "branch": "master", "commit": "cc82d88e2a791f54d2b6e2b26e41f743351ac947" }, - "vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" }, - "vimwiki": { "branch": "dev", "commit": "f0fe154ede6b11e3db9b058b930005a056a3d1c6" }, - "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" } + "vim-tmux-navigator": { "branch": "master", "commit": "addb64a772cb4a3ae1f1363583012b2cada2cd66" }, + "vimwiki": { "branch": "dev", "commit": "f0fe154ede6b11e3db9b058b930005a056a3d1c6" } } \ No newline at end of file diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua deleted file mode 100644 index 5d3dc71..0000000 --- a/lua/plugins/colorizer.lua +++ /dev/null @@ -1,167 +0,0 @@ -return { - { - "NvChad/nvim-colorizer.lua", - opts = { - filetypes = { "html", "css", "javascript", "lua", "yaml", "conf", "toml" }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue or blue - RRGGBBAA = true, -- #RRGGBBAA hex codes - AARRGGBB = true, -- 0xAARRGGBB hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes for `mode`: foreground, background, virtualtext - mode = "background", -- Set the display mode. - -- Available methods are false / true / "normal" / "lsp" / "both" - -- True is same as normal - tailwind = true, -- Enable tailwind colors - -- parsers can contain values used in |user_default_options| - sass = { - enable = true, - parsers = { "css" }, - }, -- Enable sass colors - virtualtext = "■", - }, - -- all the sub-options of filetypes apply to buftypes - buftypes = {}, - html = { names = true }, - css = { names = true }, - }, - }, - { - "uga-rosa/ccc.nvim", - event = "VeryLazy", - config = function() - local ccc = require("ccc") - local ColorInput = require("ccc.input") - local convert = require("ccc.utils.convert") - - local RgbHslInput = setmetatable({ - name = "RGB/HSL", - max = { 1, 1, 1, 360, 1, 1, 1, 1, 1, 1 }, - min = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - delta = { 1 / 255, 1 / 255, 1 / 255, 1, 0.01, 0.01, 0.005, 0.005, 0.005, 0.005 }, - bar_name = { "R", "G", "B", "H", "S", "L" }, - }, { __index = ColorInput }) - - function RgbHslInput.format(n, i) - if i <= 3 then - -- RGB - n = n * 255 - elseif i >= 5 then - -- S or L of HSL - n = n * 100 - end - return ("%6d"):format(n) - end - - function RgbHslInput.from_rgb(RGB) - local HSL = convert.rgb2hsl(RGB) - local R, G, B = unpack(RGB) - local H, S, L = unpack(HSL) - return { R, G, B, H, S, L } - end - - function RgbHslInput.to_rgb(value) - return { value[1], value[2], value[3] } - end - - function RgbHslInput:_set_rgb(RGB) - self.value[1] = RGB[1] - self.value[2] = RGB[2] - self.value[3] = RGB[3] - end - - function RgbHslInput:_set_hsl(HSL) - self.value[4] = HSL[1] - self.value[5] = HSL[2] - self.value[6] = HSL[3] - end - - function RgbHslInput:callback(index, new_value) - self.value[index] = new_value - local v = self.value - if index <= 3 then - local RGB = { v[1], v[2], v[3] } - local HSL = convert.rgb2hsl(RGB) - self:_set_hsl(HSL) - else - local HSL = { v[4], v[5], v[6] } - local RGB = convert.hsl2rgb(HSL) - self:_set_rgb(RGB) - end - end - - ccc.setup({ - pickers = { - ccc.picker.custom_entries({ - bg = "#1a1b26", - bg_dark = "#16161e", - bg_float = "#16161e", - bg_highlight = "#292e42", - bg_popup = "#16161e", - bg_search = "#3d59a1", - bg_sidebar = "#16161e", - bg_statusline = "#16161e", - bg_visual = "#283457", - black = "#15161e", - blue = "#7aa2f7", - blue0 = "#3d59a1", - blue1 = "#2ac3de", - blue2 = "#0db9d7", - blue5 = "#89ddff", - blue6 = "#b4f9f8", - blue7 = "#394b70", - border = "#15161e", - border_highlight = "#27a1b9", - comment = "#565f89", - cyan = "#7dcfff", - dark3 = "#545c7e", - dark5 = "#737aa2", - delta_add = "#2c5a66", - delta_delete = "#713137", - diff_add = "#20303b", - diff_change = "#1f2231", - diff_delete = "#37222c", - diff_text = "#394b70", - error = "#db4b4b", - fg = "#c0caf5", - fg_dark = "#a9b1d6", - fg_float = "#c0caf5", - fg_gutter = "#3b4261", - fg_sidebar = "#a9b1d6", - git_add = "#449dab", - git_change = "#6183bb", - git_delete = "#914c54", - git_ignore = "#545c7e", - gitSigns_add = "#266d6a", - gitSigns_change = "#536c9e", - gitSigns_delete = "#b2555b", - green = "#9ece6a", - green1 = "#73daca", - green2 = "#41a6b5", - hint = "#1abc9c", - info = "#0db9d7", - magenta = "#bb9af7", - magenta2 = "#ff007c", - none = "NONE", - orange = "#ff9e64", - purple = "#9d7cd8", - red = "#f7768e", - red1 = "#db4b4b", - teal = "#1abc9c", - terminal_black = "#414868", - warning = "#e0af68", - yellow = "#e0af68", - }), - }, - inputs = { - RgbHslInput, - }, - }) - end, - }, -} diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua deleted file mode 100644 index 6ccd741..0000000 --- a/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,51 +0,0 @@ -return { - { "lunarvim/darkplus.nvim" }, - { - "catppuccin/nvim", - lazy = false, - priority = 1000, - config = function() - require("catppuccin").setup({ - flavour = "frappe", - transparent_background = true, - term_colors = true, - }) - -- vim.cmd.colorscheme("catppuccin") - end, - }, - { - "Mofiqul/dracula.nvim", - lazy = false, - priority = 1000, - config = function() - require("dracula").setup({ - transparent_bg = true, - italic_comment = true, - }) - -- vim.cmd.colorscheme("dracula") - end, - }, - { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - config = function() - require("tokyonight").setup({ - style = "night", - transparent = true, - styles = { - keywords = { italic = false }, - sidebars = "transparent", - floats = "transparent", - }, - lualine_bold = true, - }) - vim.cmd.colorscheme("tokyonight") - end, - }, - { "rebelot/kanagawa.nvim" }, - { "EdenEast/nightfox.nvim" }, - { "navarasu/onedark.nvim" }, - { "savq/melange-nvim" }, - { "bluz71/vim-nightfly-colors", name = "nightfly" }, -} diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua deleted file mode 100644 index e3e2335..0000000 --- a/lua/plugins/comment.lua +++ /dev/null @@ -1,64 +0,0 @@ -return { - { - "numToStr/Comment.nvim", - lazy = false, - opts = { - - ---Add a space b/w comment and the line - padding = true, - ---Whether the cursor should stay at its position - sticky = true, - ---Lines to be ignored while (un)comment - ignore = nil, - ---LHS of toggle mappings in NORMAL mode - toggler = { - ---Line-comment toggle keymap - line = "gcc", - ---Block-comment toggle keymap - block = "gbb", - }, - -- -LHS of operator-pending mappings in NORMAL and VISUAL mode - opleader = { - ---Line-comment keymap - line = "gc", - ---Block-comment keymap - block = "gb", - }, - ---LHS of extra mappings - extra = { - ---Add comment on the line above - above = "gcO", - ---Add comment on the line below - below = "gco", - ---Add comment at the end of line - eol = "gcA", - }, - --- Enable keybindings - --- NOTE: If given `false` then the plugin won't create any mappings - mappings = { - ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}` - basic = true, - ---Extra mapping; `gco`, `gcO`, `gcA` - extra = true, - ---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}` - extended = true, - }, - ---Function to call before (un)comment - -- pre_hook = function(ctx) - -- local U = require("Comment.utils") - -- - -- local location = nil - -- if ctx.ctype == U.ctype.block then - -- location = require("ts_context_commentstring.utils").get_cursor_location() - -- elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then - -- location = require("ts_context_commentstring.utils").get_visual_start_location() - -- end - -- - -- return require("ts_context_commentstring.internal").calculate_commentstring({ - -- key = ctx.ctype == U.ctype.line and "__default" or "__multiline", - -- location = location, - -- }) - -- end, - }, - }, -} diff --git a/lua/plugins/cpp.lua b/lua/plugins/cpp.lua deleted file mode 100644 index f98dce9..0000000 --- a/lua/plugins/cpp.lua +++ /dev/null @@ -1,91 +0,0 @@ -return { - { - "p00f/clangd_extensions.nvim", - opts = { - inlay_hints = { - inline = vim.fn.has("nvim-0.10") == 1, - -- Options other than `highlight' and `priority' only work - -- if `inline' is disabled - -- Only show inlay hints for the current line - only_current_line = false, - -- Event which triggers a refresh of the inlay hints. - -- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but - -- not that this may cause higher CPU usage. - -- This option is only respected when only_current_line and - -- autoSetHints both are true. - only_current_line_autocmd = { "CursorHold" }, - -- whether to show parameter hints with the inlay hints or not - show_parameter_hints = true, - -- prefix for parameter hints - parameter_hints_prefix = "<- ", - -- prefix for all the other hints (type, chaining) - other_hints_prefix = "=> ", - -- whether to align to the length of the longest line in the file - max_len_align = true, - -- padding from the left if max_len_align is true - max_len_align_padding = 1, - -- whether to align to the extreme right or not - right_align = false, - -- padding from the right if right_align is true - right_align_padding = 8, - -- The color of the hints - highlight = "Comment", - -- The highlight group priority for extmark - priority = 100, - }, - ast = { - role_icons = { - type = "", - declaration = "", - expression = "", - specifier = "", - statement = "", - ["template argument"] = "", - }, - kind_icons = { - Compound = "", - Recovery = "", - TranslationUnit = "", - PackExpansion = "", - TemplateTypeParm = "", - TemplateTemplateParm = "", - TemplateParamObject = "", - }, - highlights = { - detail = "Comment", - }, - }, - - memory_usage = { - border = "none", - }, - - symbol_info = { - border = "none", - }, - }, - }, - { - "Civitasv/cmake-tools.nvim", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - }, - opts = { - cmake_command = "cmake", - cmake_build_directory = "target/build/", - cmake_build_directory_prefix = "cmake_build_", -- when cmake_build_directory is "", this option will be activated - cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" }, - cmake_soft_link_compile_commands = true, -- if softlink compile commands json file - cmake_build_options = {}, - cmake_console_size = 15, -- cmake output window height - cmake_console_position = "belowright", -- "belowright", "aboveleft", ... - cmake_show_console = "always", -- "always", "only_on_error" - cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional - cmake_variants_message = { - short = { show = true }, - long = { show = true, max_length = 40 }, - }, - }, - }, -} diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua deleted file mode 100644 index 4949347..0000000 --- a/lua/plugins/dap.lua +++ /dev/null @@ -1,58 +0,0 @@ -return { - { - "rcarriga/nvim-dap-ui", - event = "VeryLazy", - dependencies = { "jayp0521/mason-nvim-dap.nvim" }, - opts = { - layouts = { - { - elements = { - "scopes", - "breakpoints", - "stacs", - "watches", - }, - size = 40, - position = "left", - }, - { - elements = { - "repl", - "console", - }, - size = 10, - position = "bottom", - }, - }, - -- sidebar = { - -- elements = { - -- { - -- id = "scopes", - -- size = 0.25, -- Can be float or integer > 1 - -- }, - -- { id = "breakpoints", size = 0.25 }, - -- }, - -- size = 40, - -- position = "right", -- Can be "left", "right", "top", "bottom" - -- }, - -- tray = { - -- elements = {}, - -- }, - }, - }, - { - "jayp0521/mason-nvim-dap.nvim", - event = "VeryLazy", - dependencies = { - { - "williamboman/mason.nvim", - opts = { - automatic_installation = true, - automatic_setup = true, - }, - }, - "mfussenegger/nvim-dap", - }, - }, - { "ravenxrz/DAPInstall.nvim", lazy = true }, -} diff --git a/lua/plugins/general.lua b/lua/plugins/general.lua deleted file mode 100644 index 6a51f24..0000000 --- a/lua/plugins/general.lua +++ /dev/null @@ -1,76 +0,0 @@ -return { - { "folke/lazy.nvim" }, - { "nvim-lua/plenary.nvim" }, -- Useful lua functions used by lots of plugins - - { "goolord/alpha-nvim", lazy = true }, - -- TODO: replace alphh with veil - -- { "willothy/veil.nvim", lazy = true }, - - { - "andweeb/presence.nvim", - opts = { - auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`) - neovim_image_text = "The Only True Text Editor", -- Text displayed when hovered over the Neovim image - main_image = "neovim", -- Main image display (either "neovim" or "file") - -- client_id = "", -- Use your own Discord application client id (not recommended) - log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") - debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) - enable_line_number = false, -- Displays the current line number instead of the current project - blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches - buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "