From 14db991cc0d4e039b9be57a1cd7ff35d86ead319 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 Jan 2026 23:53:11 -0500 Subject: [PATCH] update --- .config/nvim/.nfnl.fnl | 1 + .config/nvim/CLAUDE.md | 78 +++++++++ .config/nvim/doc/kickstart.txt | 24 --- .config/nvim/doc/tags | 3 - .config/nvim/fnl/config/init.fnl | 139 ++++++++++++++++ .config/nvim/fnl/plugins/init.fnl | 70 +++++++++ .config/nvim/lua/.gitignore | 1 - .config/nvim/lua/.ignore | 1 - .config/nvim/lua/bootstrap.lua | 54 +++++++ .config/nvim/lua/custom/plugins/init.lua | 5 - .config/nvim/lua/kickstart/health.lua | 52 ------ .../nvim/lua/kickstart/plugins/autopairs.lua | 8 - .config/nvim/lua/kickstart/plugins/debug.lua | 148 ------------------ .../nvim/lua/kickstart/plugins/gitsigns.lua | 61 -------- .../lua/kickstart/plugins/indent_line.lua | 9 -- .config/nvim/lua/kickstart/plugins/lint.lua | 60 ------- .../nvim/lua/kickstart/plugins/neo-tree.lua | 25 --- 17 files changed, 342 insertions(+), 397 deletions(-) create mode 100644 .config/nvim/.nfnl.fnl create mode 100644 .config/nvim/CLAUDE.md delete mode 100644 .config/nvim/doc/kickstart.txt delete mode 100644 .config/nvim/doc/tags create mode 100644 .config/nvim/fnl/config/init.fnl create mode 100644 .config/nvim/fnl/plugins/init.fnl delete mode 100644 .config/nvim/lua/.gitignore delete mode 100644 .config/nvim/lua/.ignore create mode 100644 .config/nvim/lua/bootstrap.lua delete mode 100644 .config/nvim/lua/custom/plugins/init.lua delete mode 100644 .config/nvim/lua/kickstart/health.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/autopairs.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/debug.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/gitsigns.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/indent_line.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/lint.lua delete mode 100644 .config/nvim/lua/kickstart/plugins/neo-tree.lua diff --git a/.config/nvim/.nfnl.fnl b/.config/nvim/.nfnl.fnl new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.config/nvim/.nfnl.fnl @@ -0,0 +1 @@ +{} diff --git a/.config/nvim/CLAUDE.md b/.config/nvim/CLAUDE.md new file mode 100644 index 0000000..1e4d331 --- /dev/null +++ b/.config/nvim/CLAUDE.md @@ -0,0 +1,78 @@ +# Claude Code Context + +This is a Neovim configuration using Fennel (a Lisp that compiles to Lua) via nfnl. + +## Key Concepts + +- **nfnl** compiles `.fnl` files to `.lua` on save +- **lazy.nvim** is the plugin manager +- Bootstrap files are in Lua; user config is in Fennel + +## File Structure + +``` +init.lua - Entry point (Lua, do not convert to Fennel) +lua/bootstrap.lua - Core plugins in Lua (nfnl, treesitter, telescope) +lua/config/ - AUTO-GENERATED from fnl/config/ - do not edit +lua/plugins/ - AUTO-GENERATED from fnl/plugins/ - do not edit +fnl/config/ - User config in Fennel (options, keymaps, autocmds) +fnl/plugins/ - Plugin specs in Fennel +.nfnl.fnl - nfnl configuration +``` + +## Editing Rules + +1. **Never edit files in `lua/config/` or `lua/plugins/`** - they are auto-generated +2. **Edit Fennel files in `fnl/`** - they compile to `lua/` on save +3. **`init.lua` and `lua/bootstrap.lua` stay as Lua** - they bootstrap nfnl + +**IMPORTANT FOR CLAUDE:** After editing any `.fnl` file, compile all Fennel files to Lua: +```bash +cd ~/.config/nvim && nvim --headless -c "NfnlCompileAllFiles" -c "qa" +``` + +## Fennel Syntax Quick Reference + +```fennel +;; Set vim option +(set vim.opt.number true) + +;; Define keymap +(vim.keymap.set :n "x" ":cmd" {:desc "Description"}) + +;; Local variable +(local foo (require :foo)) + +;; Let binding +(let [x 1 y 2] (+ x y)) + +;; Function +(fn my-func [arg] (print arg)) + +;; Lambda +(fn [x] (* x 2)) + +;; Plugin spec (lazy.nvim format) +{:1 "author/plugin" + :ft ["fennel" "lua"] + :config (fn [] (setup-code))} +``` + +## Common Tasks + +### Add a plugin +Edit `fnl/plugins/init.fnl`, add spec to the vector, save. + +### Add a keymap +Edit `fnl/config/init.fnl`, add `(vim.keymap.set ...)`, save. + +### Add an option +Edit `fnl/config/init.fnl`, add `(set vim.opt.foo value)`, save. + +### Force recompile all Fennel +Run `:NfnlCompileAllFiles` in Neovim. + +## Leader Keys + +- Leader: `` +- Local leader: `` (same as leader, used by Conjure and paredit) diff --git a/.config/nvim/doc/kickstart.txt b/.config/nvim/doc/kickstart.txt deleted file mode 100644 index cb87ac3..0000000 --- a/.config/nvim/doc/kickstart.txt +++ /dev/null @@ -1,24 +0,0 @@ -================================================================================ -INTRODUCTION *kickstart.nvim* - -Kickstart.nvim is a project to help you get started on your neovim journey. - - *kickstart-is-not* -It is not: -- Complete framework for every plugin under the sun -- Place to add every plugin that could ever be useful - - *kickstart-is* -It is: -- Somewhere that has a good start for the most common "IDE" type features: - - autocompletion - - goto-definition - - find references - - fuzzy finding - - and hinting at what more can be done :) -- A place to _kickstart_ your journey. - - You should fork this project and use/modify it so that it matches your - style and preferences. If you don't want to do that, there are probably - other projects that would fit much better for you (and that's great!)! - - vim:tw=78:ts=8:ft=help:norl: diff --git a/.config/nvim/doc/tags b/.config/nvim/doc/tags deleted file mode 100644 index 687ae77..0000000 --- a/.config/nvim/doc/tags +++ /dev/null @@ -1,3 +0,0 @@ -kickstart-is kickstart.txt /*kickstart-is* -kickstart-is-not kickstart.txt /*kickstart-is-not* -kickstart.nvim kickstart.txt /*kickstart.nvim* diff --git a/.config/nvim/fnl/config/init.fnl b/.config/nvim/fnl/config/init.fnl new file mode 100644 index 0000000..1dc7071 --- /dev/null +++ b/.config/nvim/fnl/config/init.fnl @@ -0,0 +1,139 @@ +;; Main Fennel configuration +;; This file is compiled to lua/config/init.lua by nfnl + +;; Options +(set vim.opt.number true) +(set vim.opt.relativenumber true) +(set vim.opt.tabstop 2) +(set vim.opt.shiftwidth 2) +(set vim.opt.expandtab true) +(set vim.opt.smartindent true) +(set vim.opt.wrap false) +(set vim.opt.ignorecase true) +(set vim.opt.smartcase true) +(set vim.opt.termguicolors true) +(set vim.opt.signcolumn "yes") +(set vim.opt.updatetime 250) +(set vim.opt.undofile true) +(set vim.opt.clipboard "unnamedplus") + +;; Keymaps +(local keymap vim.keymap.set) + +;; Window navigation +(keymap :n "" "h" {:desc "Move to left window" + :silent true}) +(keymap :n "" "j" {:desc "Move to lower window" + :silent true}) +(keymap :n "" "k" {:desc "Move to upper window" + :silent true}) +(keymap :n "" "l" {:desc "Move to right window" + :silent true}) + +;; Buffer navigation +(keymap :n "bn" ":bnext" {:desc "Next buffer"}) +(keymap :n "bp" ":bprevious" {:desc "Previous buffer"}) +(keymap :n "bd" ":bdelete" {:desc "Delete buffer"}) + +;; Clear search highlight +(keymap :n "" ":noh" {:desc "Clear search highlight"}) + +;; Better escape +(keymap :i "jk" "" {:desc "Escape insert mode"}) + +;; Save file +(keymap :n "w" ":w" {:desc "Save file"}) +(keymap :n "fs" ":wa" {:desc "Save all files" :silent true}) + +;; Quit +(keymap :n "q" ":q" {:desc "Quit"}) + +;; Autocommands +(local augroup vim.api.nvim_create_augroup) +(local autocmd vim.api.nvim_create_autocmd) + +;; Highlight on yank +(let [yank-group (augroup "YankHighlight" {:clear true})] + (autocmd "TextYankPost" {:group yank-group + :callback (fn [] (vim.highlight.on_yank))})) + +;; Remove trailing whitespace on save +(let [whitespace-group (augroup "TrimWhitespace" {:clear true})] + (autocmd "BufWritePre" {:group whitespace-group + :pattern "*" + :command "%s/\\s\\+$//e"})) + +;; LSP Configuration (Neovim 0.11+ built-in) +;; Configure servers using vim.lsp.config +(vim.lsp.config :clojure_lsp + {:cmd [:clojure-lsp] + :filetypes [:clojure :edn] + :root_markers [:deps.edn :project.clj :build.boot :shadow-cljs.edn :.git]}) + +(vim.lsp.config :lua_ls + {:cmd [:lua-language-server] + :filetypes [:lua] + :root_markers [:.luarc.json :.luarc.jsonc :.git] + :settings {:Lua {:runtime {:version :LuaJIT} + :workspace {:library (vim.api.nvim_get_runtime_file "" true)}}}}) + +(vim.lsp.config :fennel_language_server + {:cmd [:fennel-language-server] + :filetypes [:fennel] + :root_markers [:.nfnl.fnl :fnl :.git] + :settings {:fennel {:workspace {:library (vim.api.nvim_get_runtime_file "" true)} + :diagnostics {:globals [:vim]}}}}) + +;; Enable the configured LSP servers +(vim.lsp.enable [:clojure_lsp :lua_ls :fennel_language_server]) + +;; LSP keymaps (set on attach) +(autocmd "LspAttach" + {:callback (fn [ev] + (local opts {:buffer ev.buf}) + (keymap :n "gd" vim.lsp.buf.definition opts) + (keymap :n "gD" vim.lsp.buf.declaration opts) + (keymap :n "gr" vim.lsp.buf.references opts) + (keymap :n "gi" vim.lsp.buf.implementation opts) + (keymap :n "K" vim.lsp.buf.hover opts) + (keymap :n "rn" vim.lsp.buf.rename opts) + (keymap :n "ca" vim.lsp.buf.code_action opts) + (keymap :n "[d" (fn [] (vim.diagnostic.jump {:count -1})) opts) + (keymap :n "]d" (fn [] (vim.diagnostic.jump {:count 1})) opts) + (keymap :n "e" vim.diagnostic.open_float opts) + (keymap :n "F" vim.lsp.buf.format opts))}) + +;; LSP commands (lspconfig-style) +(local usercmd vim.api.nvim_create_user_command) + +(usercmd "LspInfo" + (fn [] (vim.cmd "checkhealth vim.lsp")) + {:desc "Show LSP info"}) + +(usercmd "LspStart" + (fn [opts] + (if (and opts.args (> (length opts.args) 0)) + (vim.lsp.enable opts.args) + (vim.lsp.enable [:clojure_lsp :lua_ls :fennel_language_server]))) + {:nargs "?" + :complete (fn [] [:clojure_lsp :lua_ls :fennel_language_server]) + :desc "Start LSP server"}) + +(usercmd "LspStop" + (fn [] + (each [_ client (ipairs (vim.lsp.get_clients))] + (vim.lsp.stop_client client.id))) + {:desc "Stop all LSP clients"}) + +(usercmd "LspRestart" + (fn [] + (each [_ client (ipairs (vim.lsp.get_clients))] + (vim.lsp.stop_client client.id)) + (vim.defer_fn (fn [] (vim.cmd "edit")) 100)) + {:desc "Restart LSP clients"}) + +(usercmd "LspLog" + (fn [] (vim.cmd (.. "edit " (vim.lsp.get_log_path)))) + {:desc "Open LSP log file"}) + +{} diff --git a/.config/nvim/fnl/plugins/init.fnl b/.config/nvim/fnl/plugins/init.fnl new file mode 100644 index 0000000..3b7754e --- /dev/null +++ b/.config/nvim/fnl/plugins/init.fnl @@ -0,0 +1,70 @@ +;; Plugin specs in Fennel +;; This file is compiled to lua/plugins/init.lua by nfnl + +[;; Tokyonight - Colorscheme + {1 "folke/tokyonight.nvim" + :lazy false + :priority 1000 + :config (fn [] + (let [tokyonight (require :tokyonight)] + (tokyonight.setup + {:style "night" ; storm, moon, night, or day + :transparent false + :terminal_colors true})) + (vim.cmd.colorscheme "tokyonight"))} + + ;; Conjure - Interactive REPL for Fennel, Clojure, Lisp, etc. + {1 "Olical/conjure" + :ft ["fennel" "clojure" "lisp" "scheme" "racket" "lua"] + :config (fn [] + ;; Enable HUD floating window + (set vim.g.conjure#log#hud#enabled true))} + + ;; nvim-paredit - Structural editing for Lisp + ;; Default keybindings: >)/<) slurp/barf forward, <(/>( slurp/barf backward + ;; >e/f/), <), <(, >(, etc.) + (paredit.setup {}) + + ;; Additional vim-sexp compatible bindings + (local keymap vim.keymap.set) + (local api paredit.api) + + ;; dsf - Splice (delete surrounding form) + (keymap :n "dsf" api.unwrap_form_under_cursor {:desc "Splice (delete surrounding form)"}) + + ;; cse( cse) - Wrap in parens + (keymap :n "cse(" #(api.wrap_element_under_cursor "(" ")") {:desc "Wrap element in ()"}) + (keymap :n "cse)" #(api.wrap_element_under_cursor "(" ")") {:desc "Wrap element in ()"}) + + ;; cse[ cse] - Wrap in brackets + (keymap :n "cse[" #(api.wrap_element_under_cursor "[" "]") {:desc "Wrap element in []"}) + (keymap :n "cse]" #(api.wrap_element_under_cursor "[" "]") {:desc "Wrap element in []"}) + + ;; cse{ cse} - Wrap in braces + (keymap :n "cse{" #(api.wrap_element_under_cursor "{" "}") {:desc "Wrap element in {}"}) + (keymap :n "cse}" #(api.wrap_element_under_cursor "{" "}") {:desc "Wrap element in {}"}))} + + ;; Mason - Package manager for LSP servers, DAP servers, linters, formatters + ;; Run :MasonInstall clojure_lsp lua_ls to install servers + {1 "williamboman/mason.nvim" + :cmd ["Mason" "MasonInstall" "MasonUpdate"] + :build ":MasonUpdate" + :opts {:ui {:border "rounded"}}} + + ;; which-key - Shows keybinding hints + {1 "folke/which-key.nvim" + :event "VeryLazy" + :opts {} + :config (fn [_ opts] + (local wk (require :which-key)) + (wk.setup opts) + (wk.add + [{1 "f" :group "find"} + {1 "b" :group "buffer"} + {1 "r" :group "refactor"} + {1 "c" :group "code"}]))}] diff --git a/.config/nvim/lua/.gitignore b/.config/nvim/lua/.gitignore deleted file mode 100644 index 1d085ca..0000000 --- a/.config/nvim/lua/.gitignore +++ /dev/null @@ -1 +0,0 @@ -** diff --git a/.config/nvim/lua/.ignore b/.config/nvim/lua/.ignore deleted file mode 100644 index 1d085ca..0000000 --- a/.config/nvim/lua/.ignore +++ /dev/null @@ -1 +0,0 @@ -** diff --git a/.config/nvim/lua/bootstrap.lua b/.config/nvim/lua/bootstrap.lua new file mode 100644 index 0000000..f0c89d4 --- /dev/null +++ b/.config/nvim/lua/bootstrap.lua @@ -0,0 +1,54 @@ +-- Core plugins that must be in Lua (nfnl compiles Fennel, so it can't be in Fennel) +return { + { + "Olical/nfnl", + lazy = false, + config = function() + -- Create global commands that work without opening a fennel file first + local api = require("nfnl.api") + vim.api.nvim_create_user_command("NfnlCompileAllFiles", function(opts) + api["compile-all-files"](opts.args ~= "" and opts.args or nil) + end, { desc = "Compile all Fennel files", nargs = "?", complete = "dir" }) + vim.api.nvim_create_user_command("NfnlCompileFile", function(opts) + api["compile-file"]({ path = opts.args ~= "" and opts.args or nil }) + end, { desc = "Compile current or specified Fennel file", nargs = "?", complete = "file" }) + end, + }, + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local langs = { "clojure", "fennel", "lua", "vim", "vimdoc", "query" } + + -- Install parsers asynchronously on first load + vim.schedule(function() + local installed = require("nvim-treesitter").get_installed() + for _, lang in ipairs(langs) do + if not vim.list_contains(installed, lang) then + require("nvim-treesitter").install(lang) + end + end + end) + + -- Enable treesitter highlighting for supported filetypes + -- This is required for nvim-paredit to work (needs vim.treesitter.get_node()) + vim.api.nvim_create_autocmd("FileType", { + pattern = { "clojure", "fennel", "lua", "vim", "query", "scheme", "lisp" }, + callback = function() + pcall(vim.treesitter.start) + end, + }) + end, + }, + { + "nvim-telescope/telescope.nvim", + tag = "0.1.8", + dependencies = { "nvim-lua/plenary.nvim" }, + keys = { + { "ff", "Telescope find_files", desc = "Find files" }, + { "fg", "Telescope live_grep", desc = "Live grep" }, + { "fb", "Telescope buffers", desc = "Buffers" }, + { "fh", "Telescope help_tags", desc = "Help tags" }, + }, + }, +} diff --git a/.config/nvim/lua/custom/plugins/init.lua b/.config/nvim/lua/custom/plugins/init.lua deleted file mode 100644 index be0eb9d..0000000 --- a/.config/nvim/lua/custom/plugins/init.lua +++ /dev/null @@ -1,5 +0,0 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return {} diff --git a/.config/nvim/lua/kickstart/health.lua b/.config/nvim/lua/kickstart/health.lua deleted file mode 100644 index b59d086..0000000 --- a/.config/nvim/lua/kickstart/health.lua +++ /dev/null @@ -1,52 +0,0 @@ ---[[ --- --- This file is not required for your own configuration, --- but helps people determine if their system is setup correctly. --- ---]] - -local check_version = function() - local verstr = tostring(vim.version()) - if not vim.version.ge then - vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) - return - end - - if vim.version.ge(vim.version(), '0.10-dev') then - vim.health.ok(string.format("Neovim version is: '%s'", verstr)) - else - vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) - end -end - -local check_external_reqs = function() - -- Basic utils: `git`, `make`, `unzip` - for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do - local is_executable = vim.fn.executable(exe) == 1 - if is_executable then - vim.health.ok(string.format("Found executable: '%s'", exe)) - else - vim.health.warn(string.format("Could not find executable: '%s'", exe)) - end - end - - return true -end - -return { - check = function() - vim.health.start 'kickstart.nvim' - - vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` - - Fix only warnings for plugins and languages you intend to use. - Mason will give warnings for languages that are not installed. - You do not need to install, unless you want to use those languages!]] - - local uv = vim.uv or vim.loop - vim.health.info('System Information: ' .. vim.inspect(uv.os_uname())) - - check_version() - check_external_reqs() - end, -} diff --git a/.config/nvim/lua/kickstart/plugins/autopairs.lua b/.config/nvim/lua/kickstart/plugins/autopairs.lua deleted file mode 100644 index 386d392..0000000 --- a/.config/nvim/lua/kickstart/plugins/autopairs.lua +++ /dev/null @@ -1,8 +0,0 @@ --- autopairs --- https://github.com/windwp/nvim-autopairs - -return { - 'windwp/nvim-autopairs', - event = 'InsertEnter', - opts = {}, -} diff --git a/.config/nvim/lua/kickstart/plugins/debug.lua b/.config/nvim/lua/kickstart/plugins/debug.lua deleted file mode 100644 index 8e332bf..0000000 --- a/.config/nvim/lua/kickstart/plugins/debug.lua +++ /dev/null @@ -1,148 +0,0 @@ --- debug.lua --- --- Shows how to use the DAP plugin to debug your code. --- --- Primarily focused on configuring the debugger for Go, but can --- be extended to other languages as well. That's why it's called --- kickstart.nvim and not kitchen-sink.nvim ;) - -return { - -- NOTE: Yes, you can install new plugins here! - 'mfussenegger/nvim-dap', - -- NOTE: And you can specify dependencies as well - dependencies = { - -- Creates a beautiful debugger UI - 'rcarriga/nvim-dap-ui', - - -- Required dependency for nvim-dap-ui - 'nvim-neotest/nvim-nio', - - -- Installs the debug adapters for you - 'mason-org/mason.nvim', - 'jay-babu/mason-nvim-dap.nvim', - - -- Add your own debuggers here - 'leoluz/nvim-dap-go', - }, - keys = { - -- Basic debugging keymaps, feel free to change to your liking! - { - '', - function() - require('dap').continue() - end, - desc = 'Debug: Start/Continue', - }, - { - '', - function() - require('dap').step_into() - end, - desc = 'Debug: Step Into', - }, - { - '', - function() - require('dap').step_over() - end, - desc = 'Debug: Step Over', - }, - { - '', - function() - require('dap').step_out() - end, - desc = 'Debug: Step Out', - }, - { - 'b', - function() - require('dap').toggle_breakpoint() - end, - desc = 'Debug: Toggle Breakpoint', - }, - { - 'B', - function() - require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end, - desc = 'Debug: Set Breakpoint', - }, - -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. - { - '', - function() - require('dapui').toggle() - end, - desc = 'Debug: See last session result.', - }, - }, - config = function() - local dap = require 'dap' - local dapui = require 'dapui' - - require('mason-nvim-dap').setup { - -- Makes a best effort to setup the various debuggers with - -- reasonable debug configurations - automatic_installation = true, - - -- You can provide additional configuration to the handlers, - -- see mason-nvim-dap README for more information - handlers = {}, - - -- You'll need to check that you have the required things installed - -- online, please don't ask me how to install them :) - ensure_installed = { - -- Update this to ensure that you have the debuggers for the langs you want - 'delve', - }, - } - - -- Dap UI setup - -- For more information, see |:help nvim-dap-ui| - dapui.setup { - -- Set icons to characters that are more likely to work in every terminal. - -- Feel free to remove or use ones that you like more! :) - -- Don't feel like these are good choices. - icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, - controls = { - icons = { - pause = '⏸', - play = '▶', - step_into = '⏎', - step_over = '⏭', - step_out = '⏮', - step_back = 'b', - run_last = '▶▶', - terminate = '⏹', - disconnect = '⏏', - }, - }, - } - - -- Change breakpoint icons - -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) - -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) - -- local breakpoint_icons = vim.g.have_nerd_font - -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } - -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } - -- for type, icon in pairs(breakpoint_icons) do - -- local tp = 'Dap' .. type - -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' - -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) - -- end - - dap.listeners.after.event_initialized['dapui_config'] = dapui.open - dap.listeners.before.event_terminated['dapui_config'] = dapui.close - dap.listeners.before.event_exited['dapui_config'] = dapui.close - - -- Install golang specific config - require('dap-go').setup { - delve = { - -- On Windows delve must be run attached or it crashes. - -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring - detached = vim.fn.has 'win32' == 0, - }, - } - end, -} diff --git a/.config/nvim/lua/kickstart/plugins/gitsigns.lua b/.config/nvim/lua/kickstart/plugins/gitsigns.lua deleted file mode 100644 index cbbd22d..0000000 --- a/.config/nvim/lua/kickstart/plugins/gitsigns.lua +++ /dev/null @@ -1,61 +0,0 @@ --- Adds git related signs to the gutter, as well as utilities for managing changes --- NOTE: gitsigns is already included in init.lua but contains only the base --- config. This will add also the recommended keymaps. - -return { - { - 'lewis6991/gitsigns.nvim', - opts = { - on_attach = function(bufnr) - local gitsigns = require 'gitsigns' - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - -- Navigation - map('n', ']c', function() - if vim.wo.diff then - vim.cmd.normal { ']c', bang = true } - else - gitsigns.nav_hunk 'next' - end - end, { desc = 'Jump to next git [c]hange' }) - - map('n', '[c', function() - if vim.wo.diff then - vim.cmd.normal { '[c', bang = true } - else - gitsigns.nav_hunk 'prev' - end - end, { desc = 'Jump to previous git [c]hange' }) - - -- Actions - -- visual mode - map('v', 'hs', function() - gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'git [s]tage hunk' }) - map('v', 'hr', function() - gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'git [r]eset hunk' }) - -- normal mode - map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) - map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) - map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) - map('n', 'hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) - map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) - map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) - map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) - map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) - map('n', 'hD', function() - gitsigns.diffthis '@' - end, { desc = 'git [D]iff against last commit' }) - -- Toggles - map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) - map('n', 'tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) - end, - }, - }, -} diff --git a/.config/nvim/lua/kickstart/plugins/indent_line.lua b/.config/nvim/lua/kickstart/plugins/indent_line.lua deleted file mode 100644 index ed7f269..0000000 --- a/.config/nvim/lua/kickstart/plugins/indent_line.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help ibl` - main = 'ibl', - opts = {}, - }, -} diff --git a/.config/nvim/lua/kickstart/plugins/lint.lua b/.config/nvim/lua/kickstart/plugins/lint.lua deleted file mode 100644 index dec42f0..0000000 --- a/.config/nvim/lua/kickstart/plugins/lint.lua +++ /dev/null @@ -1,60 +0,0 @@ -return { - - { -- Linting - 'mfussenegger/nvim-lint', - event = { 'BufReadPre', 'BufNewFile' }, - config = function() - local lint = require 'lint' - lint.linters_by_ft = { - markdown = { 'markdownlint' }, - } - - -- To allow other plugins to add linters to require('lint').linters_by_ft, - -- instead set linters_by_ft like this: - -- lint.linters_by_ft = lint.linters_by_ft or {} - -- lint.linters_by_ft['markdown'] = { 'markdownlint' } - -- - -- However, note that this will enable a set of default linters, - -- which will cause errors unless these tools are available: - -- { - -- clojure = { "clj-kondo" }, - -- dockerfile = { "hadolint" }, - -- inko = { "inko" }, - -- janet = { "janet" }, - -- json = { "jsonlint" }, - -- markdown = { "vale" }, - -- rst = { "vale" }, - -- ruby = { "ruby" }, - -- terraform = { "tflint" }, - -- text = { "vale" } - -- } - -- - -- You can disable the default linters by setting their filetypes to nil: - -- lint.linters_by_ft['clojure'] = nil - -- lint.linters_by_ft['dockerfile'] = nil - -- lint.linters_by_ft['inko'] = nil - -- lint.linters_by_ft['janet'] = nil - -- lint.linters_by_ft['json'] = nil - -- lint.linters_by_ft['markdown'] = nil - -- lint.linters_by_ft['rst'] = nil - -- lint.linters_by_ft['ruby'] = nil - -- lint.linters_by_ft['terraform'] = nil - -- lint.linters_by_ft['text'] = nil - - -- Create autocommand which carries out the actual linting - -- on the specified events. - local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) - vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { - group = lint_augroup, - callback = function() - -- Only run the linter in buffers that you can modify in order to - -- avoid superfluous noise, notably within the handy LSP pop-ups that - -- describe the hovered symbol using Markdown. - if vim.bo.modifiable then - lint.try_lint() - end - end, - }) - end, - }, -} diff --git a/.config/nvim/lua/kickstart/plugins/neo-tree.lua b/.config/nvim/lua/kickstart/plugins/neo-tree.lua deleted file mode 100644 index c706789..0000000 --- a/.config/nvim/lua/kickstart/plugins/neo-tree.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Neo-tree is a Neovim plugin to browse the file system --- https://github.com/nvim-neo-tree/neo-tree.nvim - -return { - 'nvim-neo-tree/neo-tree.nvim', - version = '*', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended - 'MunifTanjim/nui.nvim', - }, - lazy = false, - keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, - }, -}