From e73936f278f15ceeaa6a5d64f31198a0fea57d1a Mon Sep 17 00:00:00 2001 From: Dmitri Date: Sat, 18 Apr 2026 18:11:18 +0200 Subject: [PATCH] ciao --- nvim/init.lua | 4 - nvim/lua/kanopo/autocmds.lua | 40 ------ nvim/lua/kanopo/keymaps.lua | 43 ------ nvim/lua/kanopo/lazy.lua | 18 --- nvim/lua/kanopo/options.lua | 94 -------------- nvim/lua/kanopo/plugins/autopairs.lua | 9 -- nvim/lua/kanopo/plugins/bottom-bar.lua | 12 -- nvim/lua/kanopo/plugins/cmp.lua | 84 ------------ nvim/lua/kanopo/plugins/comments.lua | 12 -- nvim/lua/kanopo/plugins/dressing.lua | 8 -- nvim/lua/kanopo/plugins/format.lua | 41 ------ nvim/lua/kanopo/plugins/git.lua | 16 --- nvim/lua/kanopo/plugins/gitsigns.lua | 6 - nvim/lua/kanopo/plugins/java.lua | 29 ----- nvim/lua/kanopo/plugins/lazy-dev.lua | 13 -- nvim/lua/kanopo/plugins/lsp.lua | 173 ------------------------- nvim/lua/kanopo/plugins/oil.lua | 9 -- nvim/lua/kanopo/plugins/telescope.lua | 112 ---------------- nvim/lua/kanopo/plugins/theme.lua | 9 -- nvim/lua/kanopo/plugins/treesitter.lua | 5 - nvim/lua/kanopo/plugins/whick-key.lua | 52 -------- nvim/nvim-pack-lock.json | 25 ++++ 22 files changed, 25 insertions(+), 789 deletions(-) delete mode 100644 nvim/lua/kanopo/autocmds.lua delete mode 100644 nvim/lua/kanopo/keymaps.lua delete mode 100644 nvim/lua/kanopo/lazy.lua delete mode 100644 nvim/lua/kanopo/options.lua delete mode 100644 nvim/lua/kanopo/plugins/autopairs.lua delete mode 100644 nvim/lua/kanopo/plugins/bottom-bar.lua delete mode 100644 nvim/lua/kanopo/plugins/cmp.lua delete mode 100644 nvim/lua/kanopo/plugins/comments.lua delete mode 100644 nvim/lua/kanopo/plugins/dressing.lua delete mode 100644 nvim/lua/kanopo/plugins/format.lua delete mode 100644 nvim/lua/kanopo/plugins/git.lua delete mode 100644 nvim/lua/kanopo/plugins/gitsigns.lua delete mode 100644 nvim/lua/kanopo/plugins/java.lua delete mode 100644 nvim/lua/kanopo/plugins/lazy-dev.lua delete mode 100644 nvim/lua/kanopo/plugins/lsp.lua delete mode 100644 nvim/lua/kanopo/plugins/oil.lua delete mode 100644 nvim/lua/kanopo/plugins/telescope.lua delete mode 100644 nvim/lua/kanopo/plugins/theme.lua delete mode 100644 nvim/lua/kanopo/plugins/treesitter.lua delete mode 100644 nvim/lua/kanopo/plugins/whick-key.lua create mode 100644 nvim/nvim-pack-lock.json diff --git a/nvim/init.lua b/nvim/init.lua index c32137e..e69de29 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,4 +0,0 @@ -require("kanopo.options") -require("kanopo.keymaps") -require("kanopo.autocmds") -require("kanopo.lazy") diff --git a/nvim/lua/kanopo/autocmds.lua b/nvim/lua/kanopo/autocmds.lua deleted file mode 100644 index be321e9..0000000 --- a/nvim/lua/kanopo/autocmds.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Highlight yanked text -local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank() - end, - group = highlight_group, - pattern = "*", -}) - --- Go to last cursor position when opening a file -vim.api.nvim_create_autocmd("BufReadPost", { - callback = function() - local ft = vim.bo.filetype - if ft ~= "commit" and ft ~= "rebase" then - local last_pos = vim.fn.line("'\"") - if last_pos > 1 and last_pos <= vim.fn.line("$") then - vim.cmd('normal! g`"') - end - end - end, -}) - -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('my.lsp', {}), - callback = function(args) - local client = assert(vim.lsp.get_client_by_id(args.data.client_id)) - -- Usually not needed if server supports "textDocument/willSaveWaitUntil". - if not client:supports_method('textDocument/willSaveWaitUntil') - and client:supports_method('textDocument/formatting') then - vim.api.nvim_create_autocmd('BufWritePre', { - group = vim.api.nvim_create_augroup('my.lsp', { clear = false }), - buffer = args.buf, - callback = function() - vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 }) - end, - }) - end - end, -}) diff --git a/nvim/lua/kanopo/keymaps.lua b/nvim/lua/kanopo/keymaps.lua deleted file mode 100644 index cb64c0b..0000000 --- a/nvim/lua/kanopo/keymaps.lua +++ /dev/null @@ -1,43 +0,0 @@ --- Clear highlights on search when pressing in normal mode --- See `:help hlsearch` -vim.keymap.set("n", "", "nohlsearch") - --- Diagnostic keymaps -vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) - --- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier --- for people to discover. Otherwise, you normally need to press , which --- is not what someone will guess without a bit more experience. --- --- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping --- or just use to exit terminal mode -vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) - --- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') - --- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- --- See `:help wincmd` for a list of all window commands -vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) - --- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes --- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) --- vim.keymap.set("n", "", "L", { desc = "Move window to the right" }) --- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) --- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) - --- DAP keymaps -vim.keymap.set("n", "db", "lua require'dap'.toggle_breakpoint()", { desc = "Toggle [B]reakpoint" }) -vim.keymap.set("n", "dc", "lua require'dap'.continue()", { desc = "[C]ontinue" }) -vim.keymap.set("n", "di", "lua require'dap'.step_into()", { desc = "Step [I]nto" }) -vim.keymap.set("n", "do", "lua require'dap'.step_over()", { desc = "Step [O]ver" }) -vim.keymap.set("n", "dO", "lua require'dap'.step_out()", { desc = "Step [O]ut" }) -vim.keymap.set("n", "dr", "lua require'dap'.repl.open()", { desc = "Open [R]EPL" }) diff --git a/nvim/lua/kanopo/lazy.lua b/nvim/lua/kanopo/lazy.lua deleted file mode 100644 index 69606c2..0000000 --- a/nvim/lua/kanopo/lazy.lua +++ /dev/null @@ -1,18 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end - -vim.opt.rtp:prepend(lazypath) -require("lazy").setup("kanopo.plugins") diff --git a/nvim/lua/kanopo/options.lua b/nvim/lua/kanopo/options.lua deleted file mode 100644 index fc91cb7..0000000 --- a/nvim/lua/kanopo/options.lua +++ /dev/null @@ -1,94 +0,0 @@ --- Leader keys (set early) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - --- UI and appearance -vim.o.termguicolors = true -- 24-bit colors in TUI -vim.o.cursorline = true -- highlight current line -vim.o.number = true -- absolute line numbers -vim.o.relativenumber = true -- relative line numbers -vim.o.signcolumn = "yes" -- always show signcolumn -vim.o.colorcolumn = "100" -- visual column guide -vim.o.winborder = "rounded" -- default floating window border -vim.o.cmdheight = 0 -- minimal command-line height (NVIM 0.10+) -vim.o.conceallevel = 2 -- conceal in Markdown/jsonc when appropriate -vim.o.foldlevel = 0 -- start with folds closed (Treesitter can open) - --- Splits -vim.o.splitright = true -- open vertical splits to the right -vim.o.splitbelow = true -- open horizontal splits below - --- Editing behavior -vim.o.wrap = false -- do not wrap lines by default -vim.o.breakindent = true -- keep indentation on wrapped lines (if wrap is enabled later) --- Sync clipboard between OS and Neovim. --- Schedule the setting after `UiEnter` because it can increase startup-time. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` -vim.schedule(function() - vim.o.clipboard = "unnamedplus" -end) -vim.o.swapfile = false -- no swapfiles -vim.o.undofile = true -- persistent undo -vim.o.writebackup = false -- do not keep backup around - --- Tabs and indentation (2-space default; override per-filetype with autocmds) -vim.o.expandtab = true -vim.o.tabstop = 2 -vim.o.softtabstop = 2 -vim.o.shiftwidth = 2 - --- Search -vim.o.ignorecase = true -- case-insensitive -vim.o.smartcase = true -- unless uppercase is used - --- Completion UX (good defaults for omni and popup behavior) -vim.o.completeopt = "menu,menuone,noinsert,noselect" -vim.o.shortmess = (vim.o.shortmess or "") .. "c" -- reduce completion messages - --- Performance and input timing -vim.o.timeoutlen = 300 -- mapped sequence timeout -vim.o.updatetime = 250 -- faster CursorHold/diagnostic updates -vim.o.scrolloff = 10 -- context lines around cursor - --- Fonts/icons (used by statuslines/UIs) -vim.g.have_nerd_font = true - --- Providers (disable unused for faster startup) -vim.g.loaded_perl_provider = 0 -vim.g.loaded_ruby_provider = 0 --- If you don't use Python providers via :CheckHealth, consider disabling too: --- vim.g.loaded_python_provider = 0 --- vim.g.loaded_python3_provider = 0 - --- Netrw (disable if using an explorer plugin like oil.nvim; enable if you rely on netrw) -vim.g.loaded_netrw = 0 -vim.g.loaded_netrwPlugin = 0 --- If you need netrw again, set both back to nil or 0 and restart: --- vim.g.loaded_netrw = nil; vim.g.loaded_netrwPlugin = nil - --- Filetype-specific indentation overrides (examples) -local ft_augroup = vim.api.nvim_create_augroup("FileTypeSettings", { clear = true }) - --- C-like and web files: 2 spaces (adjust as needed) -vim.api.nvim_create_autocmd("FileType", { - group = ft_augroup, - pattern = { "c", "cpp", "objc", "objcpp", "javascript", "typescript", "tsx", "jsx" }, - callback = function() - vim.bo.tabstop = 2 - vim.bo.shiftwidth = 2 - vim.bo.expandtab = true - end, -}) - -vim.o.mouse = "a" - -vim.o.showmode = false - -vim.o.list = true -vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } - --- Preview substitutions live, as you type! -vim.o.inccommand = "split" - -vim.o.confirm = true diff --git a/nvim/lua/kanopo/plugins/autopairs.lua b/nvim/lua/kanopo/plugins/autopairs.lua deleted file mode 100644 index fbdf5ef..0000000 --- a/nvim/lua/kanopo/plugins/autopairs.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = function() - require("nvim-autopairs").setup({ - disable_filetype = { "TelescopePrompt", "vim" }, - }) - end, -} diff --git a/nvim/lua/kanopo/plugins/bottom-bar.lua b/nvim/lua/kanopo/plugins/bottom-bar.lua deleted file mode 100644 index 5802a58..0000000 --- a/nvim/lua/kanopo/plugins/bottom-bar.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - dependencies = { - "ellisonleao/gruvbox.nvim", - }, - config = function() - local theme = require("gruvbox") - require("lualine").setup({ - theme = theme, - }) - end, -} diff --git a/nvim/lua/kanopo/plugins/cmp.lua b/nvim/lua/kanopo/plugins/cmp.lua deleted file mode 100644 index 87bbbcb..0000000 --- a/nvim/lua/kanopo/plugins/cmp.lua +++ /dev/null @@ -1,84 +0,0 @@ -return { -- Autocompletion - "saghen/blink.cmp", - event = "VimEnter", - version = "1.*", - dependencies = { - { - "L3MON4D3/LuaSnip", - version = "2.*", - build = (function() - if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then - return - end - return "make install_jsregexp" - end)(), - dependencies = { - -- `friendly-snippets` contains a variety of premade snippets. - -- See the README about individual language/framework/plugin snippets: - -- https://github.com/rafamadriz/friendly-snippets - { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - }, - opts = {}, - }, - "folke/lazydev.nvim", - }, - --- @module 'blink.cmp' - --- @type blink.cmp.Config - opts = { - keymap = { - -- set to 'none' to disable the 'default' preset - preset = "none", - - [""] = { "select_prev", "fallback" }, - [""] = { "select_next", "fallback" }, - [""] = { "scroll_documentation_up", "fallback" }, - [""] = { "scroll_documentation_down", "fallback" }, - [""] = { "snippet_forward", "fallback" }, - [""] = { "snippet_backward", "fallback" }, - -- [""] = { "select_prev", "fallback" }, - -- [""] = { "select_next", "fallback" }, - - [""] = { "show", "show_documentation", "hide_documentation" }, - [""] = { "select_and_accept", "fallback" }, - [""] = { "hide", "fallback" }, - - [""] = { "show_signature", "hide_signature", "fallback" }, - }, - - appearance = { - nerd_font_variant = "mono", - }, - - completion = { - -- By default, you may press `` to show the documentation. - -- Optionally, set `auto_show = true` to show the documentation after a delay. - documentation = { auto_show = false, auto_show_delay_ms = 500 }, - }, - - sources = { - default = { "lsp", "path", "snippets", "lazydev" }, - providers = { - lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, - }, - }, - - snippets = { preset = "luasnip" }, - - -- Blink.cmp includes an optional, recommended rust fuzzy matcher, - -- which automatically downloads a prebuilt binary when enabled. - -- - -- By default, we use the Lua implementation instead, but you may enable - -- the rust implementation via `'prefer_rust_with_warning'` - -- - -- See :h blink-cmp-config-fuzzy for more information - fuzzy = { implementation = "lua" }, - - -- Shows a signature help window while you type arguments for a function - signature = { enabled = true }, - }, -} diff --git a/nvim/lua/kanopo/plugins/comments.lua b/nvim/lua/kanopo/plugins/comments.lua deleted file mode 100644 index 20243a9..0000000 --- a/nvim/lua/kanopo/plugins/comments.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - signs = true, - keywords = { - TODO = { icon = "🤨", color = "info" }, - WIP = { icon = "🥵", color = "warning" }, - ERR = { icon = "🤬", color = "error" }, - }, - } -} diff --git a/nvim/lua/kanopo/plugins/dressing.lua b/nvim/lua/kanopo/plugins/dressing.lua deleted file mode 100644 index 6ce1646..0000000 --- a/nvim/lua/kanopo/plugins/dressing.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "stevearc/dressing.nvim", - opts = { - inputs = { - enable = true, - } - }, -} diff --git a/nvim/lua/kanopo/plugins/format.lua b/nvim/lua/kanopo/plugins/format.lua deleted file mode 100644 index dd3782b..0000000 --- a/nvim/lua/kanopo/plugins/format.lua +++ /dev/null @@ -1,41 +0,0 @@ - - return { -- Autoformat - "stevearc/conform.nvim", - event = { "BufWritePre" }, - cmd = { "ConformInfo" }, - keys = { - { - "f", - function() - require("conform").format({ async = true, lsp_format = "fallback" }) - end, - mode = "", - desc = "[F]ormat buffer", - }, - }, - opts = { - notify_on_error = false, - format_on_save = function(bufnr) - -- Disable "format_on_save lsp_fallback" for languages that don't - -- have a well standardized coding style. You can add additional - -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } - if disable_filetypes[vim.bo[bufnr].filetype] then - return nil - else - return { - timeout_ms = 500, - lsp_format = "fallback", - } - end - end, - formatters_by_ft = { - lua = { "stylua" }, - -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, - }, - }, - } diff --git a/nvim/lua/kanopo/plugins/git.lua b/nvim/lua/kanopo/plugins/git.lua deleted file mode 100644 index 24a6eab..0000000 --- a/nvim/lua/kanopo/plugins/git.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "NeogitOrg/neogit", - dependencies = { - "nvim-lua/plenary.nvim", - "sindrets/diffview.nvim", - "nvim-telescope/telescope.nvim", - }, - -- config = function() - -- require("neogit").setup() - -- vim.keymap.set("n", "gg", "Neogit", { desc = "Neogit" }) - -- end, - opts = true, - keys = { - { "gg", "Neogit", desc = "Neogit" }, - }, -} diff --git a/nvim/lua/kanopo/plugins/gitsigns.lua b/nvim/lua/kanopo/plugins/gitsigns.lua deleted file mode 100644 index f6c7690..0000000 --- a/nvim/lua/kanopo/plugins/gitsigns.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - event = "BufRead", - opts = {}, -} - diff --git a/nvim/lua/kanopo/plugins/java.lua b/nvim/lua/kanopo/plugins/java.lua deleted file mode 100644 index c16cc35..0000000 --- a/nvim/lua/kanopo/plugins/java.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "mfussenegger/nvim-jdtls", - ft = "java", - config = function() - local lombok_dir = vim.fn.stdpath("data") .. "/lombok" - local lombok_path = lombok_dir .. "/lombok.jar" - - if not vim.loop.fs_stat(lombok_path) then - vim.fn.mkdir(lombok_dir, "p") - print("Downloading lombok.jar...") - local lombok_url = "https://projectlombok.org/downloads/lombok.jar" - vim.fn.system({ "curl", "-L", "-o", lombok_path, lombok_url }) - print("lombok.jar downloaded to " .. lombok_path) - end - - local capabilities = require("blink.cmp").get_lsp_capabilities() - - local config = { - cmd = { - "jdtls", - "--jvm-arg=-javaagent:" .. lombok_path, - }, - root_dir = vim.fs.root(0, { ".git", "mvnw", "gradlew" }) or vim.fn.getcwd(), - capabilities = capabilities, - } - - require("jdtls").start_or_attach(config) - end, -} \ No newline at end of file diff --git a/nvim/lua/kanopo/plugins/lazy-dev.lua b/nvim/lua/kanopo/plugins/lazy-dev.lua deleted file mode 100644 index 84c49fd..0000000 --- a/nvim/lua/kanopo/plugins/lazy-dev.lua +++ /dev/null @@ -1,13 +0,0 @@ - - return { - -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis - "folke/lazydev.nvim", - ft = "lua", - opts = { - library = { - -- Load luvit types when the `vim.uv` word is found - { path = "${3rd}/luv/library", words = { "vim%.uv" } }, - }, - }, - } diff --git a/nvim/lua/kanopo/plugins/lsp.lua b/nvim/lua/kanopo/plugins/lsp.lua deleted file mode 100644 index 823c3e4..0000000 --- a/nvim/lua/kanopo/plugins/lsp.lua +++ /dev/null @@ -1,173 +0,0 @@ -return { - "neovim/nvim-lspconfig", - dependencies = { - { "mason-org/mason.nvim", opts = {} }, - "mason-org/mason-lspconfig.nvim", - "WhoIsSethDaniel/mason-tool-installer.nvim", - - { "j-hui/fidget.nvim", opts = {} }, - - "saghen/blink.cmp", - }, - config = function() - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }), - callback = function(event) - local map = function(keys, func, desc, mode) - mode = mode or "n" - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) - end - - -- Rename the variable under your cursor. - -- Most Language Servers support renaming across files, etc. - map("rn", vim.lsp.buf.rename, "[R]e[n]ame") - - -- Execute a code action, usually your cursor needs to be on top of an error - -- or a suggestion from your LSP for this to activate. - map("ca", vim.lsp.buf.code_action, "[G]oto Code [A]ction", { "n", "x" }) - - -- Find references for the word under your cursor. - map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") - - -- Jump to the implementation of the word under your cursor. - -- Useful when your language has ways of declaring types without an actual implementation. - map("gi", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") - - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") - - -- WARN: This is not Goto Definition, this is Goto Declaration. - -- For example, in C this would take you to the header. - map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") - - -- -- Fuzzy find all the symbols in your current document. - -- -- Symbols are things like variables, functions, types, etc. - -- map("gO", require("telescope.builtin").lsp_document_symbols, "Open Document Symbols") - -- - -- -- Fuzzy find all the symbols in your current workspace. - -- -- Similar to document symbols, except searches over your entire project. - -- map("gW", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Open Workspace Symbols") - -- - -- -- Jump to the type of the word under your cursor. - -- -- Useful when you're not sure what type a variable is and you want to see - -- -- the definition of its *type*, not where it was *defined*. - -- map("grt", require("telescope.builtin").lsp_type_definitions, "[G]oto [T]ype Definition") - - map("e", vim.diagnostic.open_float, "Line Diagnostics") - - -- The following code creates a keymap to toggle inlay hints in your - -- code, if the language server you are using supports them - -- - -- This may be unwanted, since they displace some of your code - if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then - map("th", function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) - end, "[T]oggle Inlay [H]ints") - end - end, - }) - - -- Diagnostic Config - -- See :help vim.diagnostic.Opts - vim.diagnostic.config({ - severity_sort = true, - float = { border = "rounded", source = "if_many" }, - underline = { severity = vim.diagnostic.severity.ERROR }, - signs = vim.g.have_nerd_font and { - text = { - [vim.diagnostic.severity.ERROR] = "󰅚 ", - [vim.diagnostic.severity.WARN] = "󰀪 ", - [vim.diagnostic.severity.INFO] = "󰋽 ", - [vim.diagnostic.severity.HINT] = "󰌶 ", - }, - } or {}, - virtual_text = { - source = "if_many", - spacing = 2, - format = function(diagnostic) - local diagnostic_message = { - [vim.diagnostic.severity.ERROR] = diagnostic.message, - [vim.diagnostic.severity.WARN] = diagnostic.message, - [vim.diagnostic.severity.INFO] = diagnostic.message, - [vim.diagnostic.severity.HINT] = diagnostic.message, - } - return diagnostic_message[diagnostic.severity] - end, - }, - }) - - -- LSP servers and clients are able to communicate to each other what features they support. - -- By default, Neovim doesn't support everything that is in the LSP specification. - -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers. - local capabilities = require("blink.cmp").get_lsp_capabilities() - - -- Enable the following language servers - -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. - -- - -- Add any additional override configuration in the following tables. Available keys are: - -- - cmd (table): Override the default command used to start the server - -- - filetypes (table): Override the default list of associated filetypes for the server - -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. - -- - settings (table): Override the default settings passed when initializing the server. - -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ - local servers = { - texlab = {}, - rust_analyzer = {}, - cssls = {}, - astro = {}, - tailwindcss = {}, - pylsp = {}, - ts_ls = {}, - gopls = {}, - postgres_lsp = {}, - lua_ls = { - settings = { - Lua = { - completion = { - callSnippet = "Replace", - }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, - }, - }, - }, - } - - -- Ensure the servers and tools above are installed - -- - -- To check the current status of installed tools and/or manually install - -- other tools, you can run - -- :Mason - -- - -- You can press `g?` for help in this menu. - -- - -- `mason` had to be setup earlier: to configure its options see the - -- `dependencies` table for `nvim-lspconfig` above. - -- - -- You can add other tools here that you want Mason to install - -- for you, so that they are available from within Neovim. - local ensure_installed = vim.tbl_keys(servers or {}) - vim.list_extend(ensure_installed, { - "stylua", -- Used to format Lua code - }) - require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) - - require("mason-lspconfig").setup({ - ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) - automatic_installation = true, - handlers = { - function(server_name) - local server = servers[server_name] or {} - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for ts_ls) - server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}) - require("lspconfig")[server_name].setup(server) - end, - }, - }) - end, -} diff --git a/nvim/lua/kanopo/plugins/oil.lua b/nvim/lua/kanopo/plugins/oil.lua deleted file mode 100644 index 6517aeb..0000000 --- a/nvim/lua/kanopo/plugins/oil.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'stevearc/oil.nvim', - opts = {}, - dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons - config = function() - require("oil").setup() - vim.keymap.set('n', 'fe', ":Oil") - end -} diff --git a/nvim/lua/kanopo/plugins/telescope.lua b/nvim/lua/kanopo/plugins/telescope.lua deleted file mode 100644 index 078b58a..0000000 --- a/nvim/lua/kanopo/plugins/telescope.lua +++ /dev/null @@ -1,112 +0,0 @@ -return { -- Fuzzy Finder (files, lsp, etc) - "nvim-telescope/telescope.nvim", - event = "VimEnter", - dependencies = { - "nvim-lua/plenary.nvim", - { -- If encountering errors, see telescope-fzf-native README for installation instructions - "nvim-telescope/telescope-fzf-native.nvim", - - -- `build` is used to run some command when the plugin is installed/updated. - -- This is only run then, not every time Neovim starts up. - build = "make", - - -- `cond` is a condition used to determine whether this plugin should be - -- installed and loaded. - cond = function() - return vim.fn.executable("make") == 1 - end, - }, - { "nvim-telescope/telescope-ui-select.nvim" }, - - -- Useful for getting pretty icons, but requires a Nerd Font. - { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, - }, - config = function() - -- Telescope is a fuzzy finder that comes with a lot of different things that - -- it can fuzzy find! It's more than just a "file finder", it can search - -- many different aspects of Neovim, your workspace, LSP, and more! - -- - -- The easiest way to use Telescope, is to start by doing something like: - -- :Telescope help_tags - -- - -- After running this command, a window will open up and you're able to - -- type in the prompt window. You'll see a list of `help_tags` options and - -- a corresponding preview of the help. - -- - -- Two important keymaps to use while in Telescope are: - -- - Insert mode: - -- - Normal mode: ? - -- - -- This opens a window that shows you all of the keymaps for the current - -- Telescope picker. This is really useful to discover what Telescope can - -- do as well as how to actually do it! - - -- [[ Configure Telescope ]] - -- See `:help telescope` and `:help telescope.setup()` - require("telescope").setup({ - pickers = { - find_files = { - theme = "ivy", - hidden = true, - prompt_prefix = "🔍 ", - }, - live_grep = { - theme = "ivy", - hidden = true, - prompt_prefix = "🔍 ", - }, - }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown(), - }, - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "ignore_case", - }, - }, - }) - - -- Enable Telescope extensions if they are installed - pcall(require("telescope").load_extension, "fzf") - pcall(require("telescope").load_extension, "ui-select") - - -- See `:help telescope.builtin` - local builtin = require("telescope.builtin") - vim.keymap.set("n", "sh", builtin.help_tags, { desc = "[S]earch [H]elp" }) - vim.keymap.set("n", "sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) - vim.keymap.set("n", "sf", builtin.find_files, { desc = "[S]earch [F]iles" }) - vim.keymap.set("n", "ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" }) - vim.keymap.set("n", "sw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) - vim.keymap.set("n", "sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) - vim.keymap.set("n", "sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) - vim.keymap.set("n", "sr", builtin.resume, { desc = "[S]earch [R]esume" }) - vim.keymap.set("n", "s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set("n", "", builtin.buffers, { desc = "[ ] Find existing buffers" }) - - -- Slightly advanced example of overriding default behavior and theme - vim.keymap.set("n", "/", function() - -- You can pass additional configuration to Telescope to change the theme, layout, etc. - builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ - winblend = 10, - previewer = false, - })) - end, { desc = "[/] Fuzzily search in current buffer" }) - - -- It's also possible to pass additional configuration options. - -- See `:help telescope.builtin.live_grep()` for information about particular keys - vim.keymap.set("n", "s/", function() - builtin.live_grep({ - grep_open_files = true, - prompt_title = "Live Grep in Open Files", - }) - end, { desc = "[S]earch [/] in Open Files" }) - - -- Shortcut for searching your Neovim configuration files - vim.keymap.set("n", "sn", function() - builtin.find_files({ cwd = vim.fn.stdpath("config") }) - end, { desc = "[S]earch [N]eovim files" }) - end, -} diff --git a/nvim/lua/kanopo/plugins/theme.lua b/nvim/lua/kanopo/plugins/theme.lua deleted file mode 100644 index f8c6599..0000000 --- a/nvim/lua/kanopo/plugins/theme.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "ellisonleao/gruvbox.nvim", - priority = 1000 , - config = function() - vim.o.background = "dark" -- or "light" for light mode - vim.cmd([[colorscheme gruvbox]]) - end -} - diff --git a/nvim/lua/kanopo/plugins/treesitter.lua b/nvim/lua/kanopo/plugins/treesitter.lua deleted file mode 100644 index e78bd71..0000000 --- a/nvim/lua/kanopo/plugins/treesitter.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - lazy = false, - build = ":TSUpdate", -} diff --git a/nvim/lua/kanopo/plugins/whick-key.lua b/nvim/lua/kanopo/plugins/whick-key.lua deleted file mode 100644 index 3016814..0000000 --- a/nvim/lua/kanopo/plugins/whick-key.lua +++ /dev/null @@ -1,52 +0,0 @@ - return { -- Useful plugin to show you pending keybinds. - "folke/which-key.nvim", - event = "VimEnter", -- Sets the loading event to 'VimEnter' - opts = { - -- delay between pressing a key and opening which-key (milliseconds) - -- this setting is independent of vim.o.timeoutlen - delay = 0, - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default which-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = " ", - Down = " ", - Left = " ", - Right = " ", - C = " ", - M = " ", - D = " ", - S = " ", - CR = " ", - Esc = " ", - ScrollWheelDown = " ", - ScrollWheelUp = " ", - NL = " ", - BS = " ", - Space = " ", - Tab = " ", - F1 = "", - F2 = "", - F3 = "", - F4 = "", - F5 = "", - F6 = "", - F7 = "", - F8 = "", - F9 = "", - F10 = "", - F11 = "", - F12 = "", - }, - }, - - -- Document existing key chains - spec = { - { "s", group = "[S]earch" }, - { "t", group = "[T]oggle" }, - { "h", group = "Git [H]unk", mode = { "n", "v" } }, - }, - }, - } diff --git a/nvim/nvim-pack-lock.json b/nvim/nvim-pack-lock.json new file mode 100644 index 0000000..736e95e --- /dev/null +++ b/nvim/nvim-pack-lock.json @@ -0,0 +1,25 @@ +{ + "plugins": { + "gruvbox.nvim": { + "rev": "154eb5ff5b96d0641307113fa385eaf0d36d9796", + "src": "https://github.com/ellisonleao/gruvbox.nvim" + }, + "mason-tool-installer.nvim": { + "rev": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc", + "src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" + }, + "mason.nvim": { + "rev": "b03fb0f20bc1d43daf558cda981a2be22e73ac42", + "src": "https://github.com/mason-org/mason.nvim" + }, + "nvim-lspconfig": { + "rev": "4b7fbaa239c5db6b36f424a4521ca9f1a401be33", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "nvim-treesitter": { + "rev": "4916d6592ede8c07973490d9322f187e07dfefac", + "src": "https://github.com/nvim-treesitter/nvim-treesitter", + "version": "'main'" + } + } +}