From 220f89ca334e48a37090d0ce852c9b0943d5c007 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Wed, 5 Nov 2025 20:07:40 +0100 Subject: [PATCH 01/16] update config --- .github/ISSUE_TEMPLATE/bug_report.md | 35 -------------------- .github/pull_request_template.md | 8 ----- .gitignore | 1 - README.md | 48 +++------------------------- doc/kickstart.txt | 24 -------------- doc/tags | 3 -- init.lua | 15 +++++---- lazy-lock.json | 24 ++++++++++++++ 8 files changed, 36 insertions(+), 122 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/pull_request_template.md delete mode 100644 doc/kickstart.txt delete mode 100644 doc/tags create mode 100644 lazy-lock.json diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 86598b8dc98..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - - - -## Before Reporting an Issue -- I have read the kickstart.nvim README.md. -- I have read the appropriate plugin's documentation. -- I have searched that this issue has not been reported before. - -- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.** - -## Describe the bug - - -## To Reproduce - -1. ... - -## Desktop - -- OS: -- Terminal: - -## Neovim Version - - -``` -``` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index f401c9ffd9c..00000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,8 +0,0 @@ -*************************************************************************** -**NOTE** -Please verify that the `base repository` above has the intended destination! -Github by default opens Pull Requests against the parent of a forked repository. -If this is your personal fork and you didn't intend to open a PR for contribution -to the original project then adjust the `base repository` accordingly. -************************************************************************** - diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/README.md b/README.md index 4113950550d..fae43af8378 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,4 @@ -# kickstart.nvim - -## Introduction - -A starting point for Neovim that is: - -* Small -* Single-file -* Completely Documented - -**NOT** a Neovim distribution, but instead a starting point for your configuration. +# Florian Teichs fork of kickstart.nvim ## Installation @@ -53,28 +43,12 @@ Neovim's configurations are located under the following paths, depending on your #### Recommended Step -[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo -so that you have your own copy that you can modify, then install by cloning the -fork to your machine using one of the commands below, depending on your OS. - -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` - -You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file -too - it's ignored in the kickstart repo to make maintenance easier, but it's -[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). - #### Clone kickstart.nvim -> [!NOTE] -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below -
Linux and Mac ```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com/FlorianTeich/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -84,13 +58,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO If you're using `cmd.exe`: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" +git clone https://github.com/FlorianTeich/kickstart.nvim.git "%localappdata%\nvim" ``` If you're using `powershell.exe` ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +git clone https://github.com/FlorianTeich/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" ``` @@ -106,20 +80,6 @@ nvim That's it! Lazy will install all the plugins you have. Use `:Lazy` to view the current plugin status. Hit `q` to close the window. -#### Read The Friendly Documentation - -Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That also includes -examples of adding popularly requested plugins. - -> [!NOTE] -> For more information about a particular plugin check its repository's documentation. - - -### Getting Started - -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) - ### FAQ * What should I do if I already have a pre-existing Neovim configuration? diff --git a/doc/kickstart.txt b/doc/kickstart.txt deleted file mode 100644 index cb87ac3f1de..00000000000 --- a/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/doc/tags b/doc/tags deleted file mode 100644 index 687ae7721d9..00000000000 --- a/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/init.lua b/init.lua index b98ffc6198a..679a49df9e9 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -185,10 +185,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn 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!!"') +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 @@ -781,6 +781,7 @@ require('lazy').setup({ 'saghen/blink.cmp', event = 'VimEnter', version = '1.*', + build = 'cargo build --release', dependencies = { -- Snippet Engine { @@ -869,7 +870,7 @@ require('lazy').setup({ -- the rust implementation via `'prefer_rust_with_warning'` -- -- See :h blink-cmp-config-fuzzy for more information - fuzzy = { implementation = 'lua' }, + fuzzy = { implementation = 'prefer_rust_with_warning' }, -- Shows a signature help window while you type arguments for a function signature = { enabled = true }, diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..821fb91b093 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,24 @@ +{ + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, + "conform.nvim": { "branch": "master", "commit": "26c02e1155a4980900bdccabca4516f4c712aae9" }, + "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, + "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "lazy.nvim": { "branch": "main", "commit": "202d8e92b3a74ac88eb3a7f1e40fb59b4c2a6535" }, + "lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, + "mini.nvim": { "branch": "main", "commit": "f545dcc3831ffcf1f15c708bbc63bac29fcef2d5" }, + "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9" }, + "todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" }, + "tokyonight.nvim": { "branch": "main", "commit": "b13cfc1286d2aa8bda6ce137b79e857d5a3d5739" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} From 1c40a98a2f1f298f08b427021c92b32d70971059 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Thu, 20 Nov 2025 21:08:12 +0100 Subject: [PATCH 02/16] add debug.py --- init.lua | 4 +- lazy-lock.json | 35 ++++++++++------- lua/kickstart/plugins/debug.lua | 68 ++++++++++++++++++++++++++------- 3 files changed, 77 insertions(+), 30 deletions(-) diff --git a/init.lua b/init.lua index 679a49df9e9..22f70d6a4a1 100644 --- a/init.lua +++ b/init.lua @@ -974,11 +974,11 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` diff --git a/lazy-lock.json b/lazy-lock.json index 821fb91b093..fcbeb3b81a1 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,24 +1,31 @@ { - "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, - "conform.nvim": { "branch": "master", "commit": "26c02e1155a4980900bdccabca4516f4c712aae9" }, + "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" }, "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, - "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, + "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "lazy.nvim": { "branch": "main", "commit": "202d8e92b3a74ac88eb3a7f1e40fb59b4c2a6535" }, - "lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, - "mini.nvim": { "branch": "main", "commit": "f545dcc3831ffcf1f15c708bbc63bac29fcef2d5" }, - "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "mini.nvim": { "branch": "main", "commit": "6e885e4c27743ae6bf5957ea78ce86c032835f09" }, + "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" }, + "nvim-dap-python": { "branch": "master", "commit": "64652d1ae1db80870d9aac7132d76e37acd86a26" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lspconfig": { "branch": "master", "commit": "b7c48a7111534b66bee077da8035ac7208a294ff" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9" }, - "todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" }, - "tokyonight.nvim": { "branch": "main", "commit": "b13cfc1286d2aa8bda6ce137b79e857d5a3d5739" }, + "telescope.nvim": { "branch": "master", "commit": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 8e332bf2ff9..ea11bd5f3b2 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -2,9 +2,8 @@ -- -- 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 ;) +-- Configured for Python debugging with debugpy. +-- Can be extended to other languages as well. return { -- NOTE: Yes, you can install new plugins here! @@ -21,8 +20,8 @@ return { 'mason-org/mason.nvim', 'jay-babu/mason-nvim-dap.nvim', - -- Add your own debuggers here - 'leoluz/nvim-dap-go', + -- Python debugging support + 'mfussenegger/nvim-dap-python', }, keys = { -- Basic debugging keymaps, feel free to change to your liking! @@ -94,7 +93,7 @@ return { -- 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', + 'debugpy', }, } @@ -136,13 +135,54 @@ return { 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, - }, - } + -- Install Python specific config + -- Function to find the best Python executable with debugpy + local function find_python_with_debugpy() + local python_candidates = { + '~/.config/nvim/.venv/bin/python', -- nvim config venv + vim.fn.exepath('python3'), -- system python3 + vim.fn.exepath('python'), -- system python + } + + for _, python_path in ipairs(python_candidates) do + if python_path and python_path ~= '' and vim.fn.executable(python_path) == 1 then + -- Test if this python has debugpy + local handle = io.popen(python_path .. ' -c "import debugpy; print(debugpy.__file__)" 2>/dev/null') + if handle then + local result = handle:read('*a') + handle:close() + if result and result:match('debugpy') then + return python_path + end + end + end + end + + -- Fallback to the nvim config venv (we just installed debugpy there) + return '~/.config/nvim/.venv/bin/python' + end + + require('dap-python').setup(find_python_with_debugpy()) + + -- Add Python debugging configurations + table.insert(dap.configurations.python, { + type = 'python', + request = 'launch', + name = 'Launch file', + program = '${file}', + pythonPath = function() + -- debugpy supports launching an application with a different interpreter + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/usr/bin/python' + end + end, + }) end, } From 42fcaf144d2319150d5919749af2b2d67afe6b53 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 21 Nov 2025 18:45:14 +0100 Subject: [PATCH 03/16] add scala --- init.lua | 3 +- .../plugins/{debug.lua => debug_python.lua} | 61 ++------- lua/kickstart/plugins/debug_scala.lua | 129 ++++++++++++++++++ 3 files changed, 141 insertions(+), 52 deletions(-) rename lua/kickstart/plugins/{debug.lua => debug_python.lua} (81%) create mode 100644 lua/kickstart/plugins/debug_scala.lua diff --git a/init.lua b/init.lua index 22f70d6a4a1..d9af5f141d6 100644 --- a/init.lua +++ b/init.lua @@ -974,7 +974,8 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - require 'kickstart.plugins.debug', + require 'kickstart.plugins.debug_python', + require 'kickstart.plugins.debug_scala', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug_python.lua similarity index 81% rename from lua/kickstart/plugins/debug.lua rename to lua/kickstart/plugins/debug_python.lua index ea11bd5f3b2..f9d242cbdb9 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug_python.lua @@ -24,57 +24,16 @@ return { 'mfussenegger/nvim-dap-python', }, 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.', - }, + -- Keymaps aligned with debug_scala.lua + { 'dc', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, + { 'dr', function() require('dap').repl.toggle() end, desc = 'Debug: Toggle REPL' }, + { 'dK', function() require('dap.ui.widgets').hover() end, desc = 'Debug: Hover Widget' }, + { 'dt', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, + { 'dso', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, + { 'dsi', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, + { 'dl', function() require('dap').run_last() end, desc = 'Debug: Run Last' }, + { 'du', function() require('dapui').toggle() end, desc = 'Debug: Toggle DAP UI' }, + { 'dB', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Conditional Breakpoint' }, }, config = function() local dap = require 'dap' diff --git a/lua/kickstart/plugins/debug_scala.lua b/lua/kickstart/plugins/debug_scala.lua new file mode 100644 index 00000000000..405326379cd --- /dev/null +++ b/lua/kickstart/plugins/debug_scala.lua @@ -0,0 +1,129 @@ +return { + 'scalameta/nvim-metals', + dependencies = { + { + 'j-hui/fidget.nvim', + opts = {}, + }, + { + 'mfussenegger/nvim-dap', + config = function(self, opts) + -- Debug settings if you're using nvim-dap + local dap = require 'dap' + + dap.configurations.scala = { + { + type = 'scala', + request = 'launch', + name = 'RunOrTest', + metals = { + runType = 'runOrTestFile', + --args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example + }, + }, + { + type = 'scala', + request = 'launch', + name = 'Test Target', + metals = { + runType = 'testTarget', + }, + }, + } + end, + }, + }, + ft = { 'scala', 'sbt', 'java' }, + opts = function() + local metals_config = require('metals').bare_config() + + -- Example of settings + metals_config.settings = { + showImplicitArguments = true, + gradleScript = vim.fn.getcwd() .. '/gradlew', + customProjectRoot = vim.fn.getcwd(), + excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, + } + + -- *READ THIS* + -- I *highly* recommend setting statusBarProvider to either "off" or "on" + -- + -- "off" will enable LSP progress notifications by Metals and you'll need + -- to ensure you have a plugin like fidget.nvim installed to handle them. + -- + -- "on" will enable the custom Metals status extension and you *have* to have + -- a have settings to capture this in your statusline or else you'll not see + -- any messages from metals. There is more info in the help docs about this + metals_config.init_options.statusBarProvider = 'off' + + -- Example if you are using cmp how to make sure the correct capabilities for snippets are set + metals_config.capabilities = require('cmp_nvim_lsp').default_capabilities() + + metals_config.on_attach = function(client, bufnr) + require('metals').setup_dap() + + -- LSP mappings + map('n', 'gD', vim.lsp.buf.definition) + map('n', 'K', vim.lsp.buf.hover) + map('n', 'gi', vim.lsp.buf.implementation) + map('n', 'gr', vim.lsp.buf.references) + map('n', 'gds', vim.lsp.buf.document_symbol) + map('n', 'gws', vim.lsp.buf.workspace_symbol) + map('n', 'cl', vim.lsp.codelens.run) + map('n', 'sh', vim.lsp.buf.signature_help) + map('n', 'rn', vim.lsp.buf.rename) + map('n', 'f', vim.lsp.buf.format) + map('n', 'ca', vim.lsp.buf.code_action) + + map('n', 'ws', function() + require('metals').hover_worksheet() + end) + + -- all workspace diagnostics + map('n', 'aa', vim.diagnostic.setqflist) + + -- all workspace errors + map('n', 'ae', function() + vim.diagnostic.setqflist { severity = 'E' } + end) + + -- all workspace warnings + map('n', 'aw', function() + vim.diagnostic.setqflist { severity = 'W' } + end) + + -- buffer diagnostics only + map('n', 'd', vim.diagnostic.setloclist) + + map('n', '[c', function() + vim.diagnostic.goto_prev { wrap = false } + end) + + map('n', ']c', function() + vim.diagnostic.goto_next { wrap = false } + end) + + -- Example mappings for usage with nvim-dap. If you don't use that, you can + -- skip these + map('n', 'dc', function() require('dap').continue() end, { desc = 'Debug: Start/Continue' }) + map('n', 'dr', function() require('dap').repl.toggle() end, { desc = 'Debug: Toggle REPL' }) + map('n', 'dK', function() require('dap.ui.widgets').hover() end, { desc = 'Debug: Hover Widget' }) + map('n', 'dt', function() require('dap').toggle_breakpoint() end, { desc = 'Debug: Toggle Breakpoint' }) + map('n', 'dso', function() require('dap').step_over() end, { desc = 'Debug: Step Over' }) + map('n', 'dsi', function() require('dap').step_into() end, { desc = 'Debug: Step Into' }) + map('n', 'dl', function() require('dap').run_last() end, { desc = 'Debug: Run Last' }) + end + + return metals_config + end, + config = function(self, metals_config) + local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) + vim.api.nvim_create_autocmd('FileType', { + pattern = self.ft, + callback = function() + require('metals').initialize_or_attach(metals_config) + end, + group = nvim_metals_group, + }) + end, +} From 9b74963a6a6e8962fcb07a1e4f16fad5ec58235d Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 21 Nov 2025 21:58:52 +0100 Subject: [PATCH 04/16] update debug --- init.lua | 3 +- lazy-lock.json | 3 +- lua/kickstart/plugins/debug.lua | 232 +++++++++++++++++++++++++ lua/kickstart/plugins/debug_python.lua | 147 ---------------- lua/kickstart/plugins/debug_scala.lua | 129 -------------- 5 files changed, 235 insertions(+), 279 deletions(-) create mode 100644 lua/kickstart/plugins/debug.lua delete mode 100644 lua/kickstart/plugins/debug_python.lua delete mode 100644 lua/kickstart/plugins/debug_scala.lua diff --git a/init.lua b/init.lua index d9af5f141d6..22f70d6a4a1 100644 --- a/init.lua +++ b/init.lua @@ -974,8 +974,7 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - require 'kickstart.plugins.debug_python', - require 'kickstart.plugins.debug_scala', + require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', diff --git a/lazy-lock.json b/lazy-lock.json index fcbeb3b81a1..16560ac98c1 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -17,7 +17,8 @@ "nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" }, "nvim-dap-python": { "branch": "master", "commit": "64652d1ae1db80870d9aac7132d76e37acd86a26" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lspconfig": { "branch": "master", "commit": "b7c48a7111534b66bee077da8035ac7208a294ff" }, + "nvim-lspconfig": { "branch": "master", "commit": "e0fae251f8459940331960106d4bd9457cec23de" }, + "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua new file mode 100644 index 00000000000..c84d66f507e --- /dev/null +++ b/lua/kickstart/plugins/debug.lua @@ -0,0 +1,232 @@ +-- debug.lua +-- +-- Unified debugging configuration for multiple languages. +-- Supports Python (with debugpy) and Scala (with nvim-metals). +-- Can be extended to other languages as well. + +return { + -- Main DAP plugin + 'mfussenegger/nvim-dap', + 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', + + -- Python debugging support + 'mfussenegger/nvim-dap-python', + + -- Scala debugging and LSP support + { + 'scalameta/nvim-metals', + ft = { 'scala', 'sbt', 'java' }, + }, + + -- Fidget for LSP progress notifications + { + 'j-hui/fidget.nvim', + opts = {}, + }, + }, + keys = { + -- Unified keymaps for debugging (works for both Python and Scala) + { 'dc', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, + { 'dr', function() require('dap').repl.toggle() end, desc = 'Debug: Toggle REPL' }, + { 'dK', function() require('dap.ui.widgets').hover() end, desc = 'Debug: Hover Widget' }, + { 'dt', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, + { 'dso', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, + { 'dsi', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, + { 'dl', function() require('dap').run_last() end, desc = 'Debug: Run Last' }, + { 'du', function() require('dapui').toggle() end, desc = 'Debug: Toggle DAP UI' }, + { 'dB', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Conditional Breakpoint' }, + }, + config = function() + local dap = require 'dap' + local dapui = require 'dapui' + + -- Mason DAP setup for automatic debugger installation + require('mason-nvim-dap').setup { + automatic_installation = true, + handlers = {}, + ensure_installed = { + 'debugpy', -- Python debugger + }, + } + + -- DAP UI setup + dapui.setup { + icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, + controls = { + icons = { + pause = '⏸', + play = '▶', + step_into = '⏎', + step_over = '⏭', + step_out = '⏮', + step_back = 'b', + run_last = '▶▶', + terminate = '⏹', + disconnect = '⏏', + }, + }, + } + + -- Auto-open/close DAP UI + 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 + + -- === PYTHON DEBUGGING SETUP === + local function setup_python_debugging() + -- Function to find the best Python executable with debugpy + local function find_python_with_debugpy() + local python_candidates = { + '~/.config/nvim/.venv/bin/python', -- nvim config venv + vim.fn.exepath('python3'), -- system python3 + vim.fn.exepath('python'), -- system python + } + + for _, python_path in ipairs(python_candidates) do + if python_path and python_path ~= '' and vim.fn.executable(python_path) == 1 then + -- Test if this python has debugpy + local handle = io.popen(python_path .. ' -c "import debugpy; print(debugpy.__file__)" 2>/dev/null') + if handle then + local result = handle:read('*a') + handle:close() + if result and result:match('debugpy') then + return python_path + end + end + end + end + + -- Fallback to the nvim config venv + return '~/.config/nvim/.venv/bin/python' + end + + require('dap-python').setup(find_python_with_debugpy()) + + -- Add Python debugging configurations + table.insert(dap.configurations.python, { + type = 'python', + request = 'launch', + name = 'Launch file', + program = '${file}', + pythonPath = function() + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/usr/bin/python' + end + end, + }) + end + + -- === SCALA DEBUGGING SETUP === + local function setup_scala_debugging() + -- Scala DAP configurations + dap.configurations.scala = { + { + type = 'scala', + request = 'launch', + name = 'RunOrTest', + metals = { + runType = 'runOrTestFile', + }, + }, + { + type = 'scala', + request = 'launch', + name = 'Test Target', + metals = { + runType = 'testTarget', + }, + }, + } + end + + -- === METALS (SCALA LSP) SETUP === + local function setup_metals() + local metals_config = require('metals').bare_config() + + metals_config.settings = { + showImplicitArguments = true, + gradleScript = vim.fn.getcwd() .. '/gradlew', + customProjectRoot = vim.fn.getcwd(), + excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, + } + + metals_config.init_options.statusBarProvider = 'off' + -- metals_config.capabilities = require('cmp_nvim_lsp').default_capabilities() + + metals_config.on_attach = function(client, bufnr) + require('metals').setup_dap() + + -- Helper function for buffer-local keymaps + local function map(mode, lhs, rhs, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, lhs, rhs, opts) + end + + -- LSP mappings (Scala-specific) + map('n', 'gD', vim.lsp.buf.definition) + map('n', 'K', vim.lsp.buf.hover) + map('n', 'gi', vim.lsp.buf.implementation) + map('n', 'gr', vim.lsp.buf.references) + map('n', 'gds', vim.lsp.buf.document_symbol) + map('n', 'gws', vim.lsp.buf.workspace_symbol) + map('n', 'cl', vim.lsp.codelens.run) + map('n', 'sh', vim.lsp.buf.signature_help) + map('n', 'rn', vim.lsp.buf.rename) + map('n', 'f', vim.lsp.buf.format) + map('n', 'ca', vim.lsp.buf.code_action) + + -- Scala worksheet support + map('n', 'ws', function() + require('metals').hover_worksheet() + end) + + -- Diagnostic mappings + map('n', 'aa', vim.diagnostic.setqflist) -- all workspace diagnostics + map('n', 'ae', function() -- all workspace errors + vim.diagnostic.setqflist { severity = 'E' } + end) + map('n', 'aw', function() -- all workspace warnings + vim.diagnostic.setqflist { severity = 'W' } + end) + map('n', 'd', vim.diagnostic.setloclist) -- buffer diagnostics only + + map('n', '[c', function() + vim.diagnostic.goto_prev { wrap = false } + end) + map('n', ']c', function() + vim.diagnostic.goto_next { wrap = false } + end) + end + + -- Auto-attach Metals for Scala files + local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) + vim.api.nvim_create_autocmd('FileType', { + pattern = { 'scala', 'sbt', 'java' }, + callback = function() + require('metals').initialize_or_attach(metals_config) + end, + group = nvim_metals_group, + }) + end + + -- Initialize debugging support for all languages + setup_python_debugging() + setup_scala_debugging() + setup_metals() + end, +} \ No newline at end of file diff --git a/lua/kickstart/plugins/debug_python.lua b/lua/kickstart/plugins/debug_python.lua deleted file mode 100644 index f9d242cbdb9..00000000000 --- a/lua/kickstart/plugins/debug_python.lua +++ /dev/null @@ -1,147 +0,0 @@ --- debug.lua --- --- Shows how to use the DAP plugin to debug your code. --- --- Configured for Python debugging with debugpy. --- Can be extended to other languages as well. - -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', - - -- Python debugging support - 'mfussenegger/nvim-dap-python', - }, - keys = { - -- Keymaps aligned with debug_scala.lua - { 'dc', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, - { 'dr', function() require('dap').repl.toggle() end, desc = 'Debug: Toggle REPL' }, - { 'dK', function() require('dap.ui.widgets').hover() end, desc = 'Debug: Hover Widget' }, - { 'dt', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, - { 'dso', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, - { 'dsi', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, - { 'dl', function() require('dap').run_last() end, desc = 'Debug: Run Last' }, - { 'du', function() require('dapui').toggle() end, desc = 'Debug: Toggle DAP UI' }, - { 'dB', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Conditional Breakpoint' }, - }, - 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 - 'debugpy', - }, - } - - -- 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 Python specific config - -- Function to find the best Python executable with debugpy - local function find_python_with_debugpy() - local python_candidates = { - '~/.config/nvim/.venv/bin/python', -- nvim config venv - vim.fn.exepath('python3'), -- system python3 - vim.fn.exepath('python'), -- system python - } - - for _, python_path in ipairs(python_candidates) do - if python_path and python_path ~= '' and vim.fn.executable(python_path) == 1 then - -- Test if this python has debugpy - local handle = io.popen(python_path .. ' -c "import debugpy; print(debugpy.__file__)" 2>/dev/null') - if handle then - local result = handle:read('*a') - handle:close() - if result and result:match('debugpy') then - return python_path - end - end - end - end - - -- Fallback to the nvim config venv (we just installed debugpy there) - return '~/.config/nvim/.venv/bin/python' - end - - require('dap-python').setup(find_python_with_debugpy()) - - -- Add Python debugging configurations - table.insert(dap.configurations.python, { - type = 'python', - request = 'launch', - name = 'Launch file', - program = '${file}', - pythonPath = function() - -- debugpy supports launching an application with a different interpreter - -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. - -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then - return cwd .. '/venv/bin/python' - elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then - return cwd .. '/.venv/bin/python' - else - return '/usr/bin/python' - end - end, - }) - end, -} diff --git a/lua/kickstart/plugins/debug_scala.lua b/lua/kickstart/plugins/debug_scala.lua deleted file mode 100644 index 405326379cd..00000000000 --- a/lua/kickstart/plugins/debug_scala.lua +++ /dev/null @@ -1,129 +0,0 @@ -return { - 'scalameta/nvim-metals', - dependencies = { - { - 'j-hui/fidget.nvim', - opts = {}, - }, - { - 'mfussenegger/nvim-dap', - config = function(self, opts) - -- Debug settings if you're using nvim-dap - local dap = require 'dap' - - dap.configurations.scala = { - { - type = 'scala', - request = 'launch', - name = 'RunOrTest', - metals = { - runType = 'runOrTestFile', - --args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example - }, - }, - { - type = 'scala', - request = 'launch', - name = 'Test Target', - metals = { - runType = 'testTarget', - }, - }, - } - end, - }, - }, - ft = { 'scala', 'sbt', 'java' }, - opts = function() - local metals_config = require('metals').bare_config() - - -- Example of settings - metals_config.settings = { - showImplicitArguments = true, - gradleScript = vim.fn.getcwd() .. '/gradlew', - customProjectRoot = vim.fn.getcwd(), - excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, - } - - -- *READ THIS* - -- I *highly* recommend setting statusBarProvider to either "off" or "on" - -- - -- "off" will enable LSP progress notifications by Metals and you'll need - -- to ensure you have a plugin like fidget.nvim installed to handle them. - -- - -- "on" will enable the custom Metals status extension and you *have* to have - -- a have settings to capture this in your statusline or else you'll not see - -- any messages from metals. There is more info in the help docs about this - metals_config.init_options.statusBarProvider = 'off' - - -- Example if you are using cmp how to make sure the correct capabilities for snippets are set - metals_config.capabilities = require('cmp_nvim_lsp').default_capabilities() - - metals_config.on_attach = function(client, bufnr) - require('metals').setup_dap() - - -- LSP mappings - map('n', 'gD', vim.lsp.buf.definition) - map('n', 'K', vim.lsp.buf.hover) - map('n', 'gi', vim.lsp.buf.implementation) - map('n', 'gr', vim.lsp.buf.references) - map('n', 'gds', vim.lsp.buf.document_symbol) - map('n', 'gws', vim.lsp.buf.workspace_symbol) - map('n', 'cl', vim.lsp.codelens.run) - map('n', 'sh', vim.lsp.buf.signature_help) - map('n', 'rn', vim.lsp.buf.rename) - map('n', 'f', vim.lsp.buf.format) - map('n', 'ca', vim.lsp.buf.code_action) - - map('n', 'ws', function() - require('metals').hover_worksheet() - end) - - -- all workspace diagnostics - map('n', 'aa', vim.diagnostic.setqflist) - - -- all workspace errors - map('n', 'ae', function() - vim.diagnostic.setqflist { severity = 'E' } - end) - - -- all workspace warnings - map('n', 'aw', function() - vim.diagnostic.setqflist { severity = 'W' } - end) - - -- buffer diagnostics only - map('n', 'd', vim.diagnostic.setloclist) - - map('n', '[c', function() - vim.diagnostic.goto_prev { wrap = false } - end) - - map('n', ']c', function() - vim.diagnostic.goto_next { wrap = false } - end) - - -- Example mappings for usage with nvim-dap. If you don't use that, you can - -- skip these - map('n', 'dc', function() require('dap').continue() end, { desc = 'Debug: Start/Continue' }) - map('n', 'dr', function() require('dap').repl.toggle() end, { desc = 'Debug: Toggle REPL' }) - map('n', 'dK', function() require('dap.ui.widgets').hover() end, { desc = 'Debug: Hover Widget' }) - map('n', 'dt', function() require('dap').toggle_breakpoint() end, { desc = 'Debug: Toggle Breakpoint' }) - map('n', 'dso', function() require('dap').step_over() end, { desc = 'Debug: Step Over' }) - map('n', 'dsi', function() require('dap').step_into() end, { desc = 'Debug: Step Into' }) - map('n', 'dl', function() require('dap').run_last() end, { desc = 'Debug: Run Last' }) - end - - return metals_config - end, - config = function(self, metals_config) - local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) - vim.api.nvim_create_autocmd('FileType', { - pattern = self.ft, - callback = function() - require('metals').initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - end, -} From 5e60af908f135325f30d0136ed78a042b95dddc9 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 21 Nov 2025 22:31:56 +0100 Subject: [PATCH 05/16] use pyright --- init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 22f70d6a4a1..8ee40f784e1 100644 --- a/init.lua +++ b/init.lua @@ -673,7 +673,17 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = { + settings = { + python = { + analysis = { + autoSearchPaths = true, + diagnosticMode = 'workspace', + useLibraryCodeForTypes = true, + }, + }, + }, + }, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- From 76a4b6a392e6096e0e2b64631ab1ccfbcda547a0 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 21 Nov 2025 22:42:16 +0100 Subject: [PATCH 06/16] add lsp config --- .gitignore | 1 + init.lua | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8a192cab54d..f0cd91ecf9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.metals tags test.sh .luarc.json diff --git a/init.lua b/init.lua index 8ee40f784e1..4c5d8f47615 100644 --- a/init.lua +++ b/init.lua @@ -671,7 +671,10 @@ require('lazy').setup({ -- - 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 = { - -- clangd = {}, + clangd = { + cmd = { 'clangd', '--background-index', '--clang-tidy', '--completion-style=bundled' }, + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, + }, -- gopls = {}, pyright = { settings = { @@ -684,7 +687,44 @@ require('lazy').setup({ }, }, }, - -- rust_analyzer = {}, + rust_analyzer = { + settings = { + ['rust-analyzer'] = { + cargo = { + allFeatures = true, + }, + checkOnSave = { + command = 'clippy', + }, + }, + }, + }, + jdtls = { + settings = { + java = { + configuration = { + updateBuildConfiguration = 'interactive', + }, + completion = { + favoriteStaticMembers = { + 'org.hamcrest.MatcherAssert.assertThat', + 'org.hamcrest.Matchers.*', + 'org.hamcrest.CoreMatchers.*', + 'java.util.Objects.requireNonNull', + 'java.util.Objects.requireNonNullElse', + 'org.mockito.Mockito.*', + }, + }, + sources = { + organizeImports = { + starThreshold = 9999, + staticStarThreshold = 9999, + }, + }, + }, + }, + }, + -- Note: Scala is handled by nvim-metals plugin, not through Mason/lspconfig -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -778,6 +818,11 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + cpp = { 'clang-format' }, + c = { 'clang-format' }, + rust = { 'rustfmt' }, + java = { 'google-java-format' }, + scala = { 'scalafmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -991,6 +1036,35 @@ require('lazy').setup({ require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + -- Scala language support + { + 'scalameta/nvim-metals', + dependencies = { + 'nvim-lua/plenary.nvim', + }, + ft = { 'scala', 'sbt' }, + opts = function() + local metals_config = require('metals').bare_config() + metals_config.settings = { + showImplicitArguments = true, + showInferredType = true, + excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, + } + metals_config.capabilities = require('blink.cmp').get_lsp_capabilities() + return metals_config + end, + config = function(self, metals_config) + local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) + vim.api.nvim_create_autocmd('FileType', { + pattern = self.ft, + callback = function() + require('metals').initialize_or_attach(metals_config) + end, + group = nvim_metals_group, + }) + end, + }, + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- From de3adc05d3d233a380b1f973aa974358ae1a89b3 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Sat, 22 Nov 2025 09:53:10 +0100 Subject: [PATCH 07/16] update readme --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index fae43af8378..68ff33b33b2 100644 --- a/README.md +++ b/README.md @@ -199,3 +199,48 @@ sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim ``` +## Keymaps + +| Mode | Keys | Action | Description | +| ------------ | ------------ | --------------------------- | ----------------------------- | +| **Normal** | `` | `:nohlsearch` | Clear search highlights | +| **Normal** | `q` | `vim.diagnostic.setloclist` | Open diagnostic quickfix list | +| **Terminal** | `` | `` | Exit terminal mode | +| **Normal** | `` | `` | Move focus to left split | +| **Normal** | `` | `` | Move focus to right split | +| **Normal** | `` | `` | Move focus to lower split | +| **Normal** | `` | `` | Move focus to upper split | + + +| Mode | Keys | Telescope Action | Description | +| ---------- | ------------------ | ---------------------------- | ------------------------------ | +| **Normal** | `sh` | `help_tags` | Search help | +| **Normal** | `sk` | `keymaps` | Search keymaps | +| **Normal** | `sf` | `find_files` | Search files | +| **Normal** | `ss` | `builtin` | Search Telescope pickers | +| **Normal** | `sw` | `grep_string` | Search word under cursor | +| **Normal** | `sg` | `live_grep` | Grep search | +| **Normal** | `sd` | `diagnostics` | Search diagnostics | +| **Normal** | `sr` | `resume` | Resume last Telescope search | +| **Normal** | `s.` | `oldfiles` | Search recent files | +| **Normal** | `` | `buffers` | Find buffers | +| **Normal** | `/` | `current_buffer_fuzzy_find` | Fuzzy find in current buffer | +| **Normal** | `s/` | Live grep open files | Grep through open files only | +| **Normal** | `sn` | `find_files` (Neovim config) | Search Neovim config directory | + +| Mode | Keys | Action | Description | +| ------------------- | ------------ | ------------------------------- | --------------------------------------- | +| **Normal** | `grn` | `vim.lsp.buf.rename` | Rename symbol | +| **Normal / Visual** | `gra` | `vim.lsp.buf.code_action` | Code actions | +| **Normal** | `grr` | `lsp_references` | Find references | +| **Normal** | `gri` | `lsp_implementations` | Go to implementation | +| **Normal** | `grd` | `lsp_definitions` | Go to definition | +| **Normal** | `grD` | `vim.lsp.buf.declaration` | Go to declaration | +| **Normal** | `gO` | `lsp_document_symbols` | Document symbols | +| **Normal** | `gW` | `lsp_dynamic_workspace_symbols` | Workspace symbols | +| **Normal** | `grt` | `lsp_type_definitions` | Go to type definition | +| **Normal** | `th` | Toggle inlay hints | Toggle LSP inlay hints (when supported) | + +| Mode | Keys | Action | Description | +| --------------------------- | ----------- | ---------------- | --------------------- | +| **All modes (`mode = ''`)** | `f` | `conform.format` | Format current buffer | From b7a58b63140bfaaa94410a267cc5ef5cb9e3b8eb Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Sat, 22 Nov 2025 10:52:51 +0100 Subject: [PATCH 08/16] adding copilot and codecompanion --- init.lua | 1 + lazy-lock.json | 2 ++ lua/kickstart/plugins/copilot.lua | 10 ++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lua/kickstart/plugins/copilot.lua diff --git a/init.lua b/init.lua index 4c5d8f47615..e9d3ee4d953 100644 --- a/init.lua +++ b/init.lua @@ -1030,6 +1030,7 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.copilot', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', diff --git a/lazy-lock.json b/lazy-lock.json index 16560ac98c1..20802956d2a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,9 @@ { "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "codecompanion.nvim": { "branch": "main", "commit": "b7dc2b19371fa20913b4cc5f7867741b35d3467e" }, "conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" }, + "copilot.vim": { "branch": "release", "commit": "f89e977c87180519ba3b942200e3d05b17b1e2fc" }, "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, diff --git a/lua/kickstart/plugins/copilot.lua b/lua/kickstart/plugins/copilot.lua new file mode 100644 index 00000000000..319813bfeca --- /dev/null +++ b/lua/kickstart/plugins/copilot.lua @@ -0,0 +1,10 @@ +return { + 'github/copilot.vim', + { + 'olimorris/codecompanion.nvim', + opts = {}, + dependencies = { + 'nvim-lua/plenary.nvim', + }, + }, +} \ No newline at end of file From f823a67f7321c2d6a3d53e926f556418bc9932ad Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Mon, 24 Nov 2025 19:05:12 +0100 Subject: [PATCH 09/16] adding keymaps --- init.lua | 60 +++++++++++++++++++++++++++++++++++++++++++++++++- lazy-lock.json | 1 + 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e9d3ee4d953..db34dcaeb6a 100644 --- a/init.lua +++ b/init.lua @@ -205,6 +205,8 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) -- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) +vim.keymap.set('n', '', ':tabnew', { noremap = true, silent = true }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -999,8 +1001,33 @@ require('lazy').setup({ build = ':TSUpdate', main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + }, opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { + 'bash', + 'c', + 'diff', + 'html', + 'lua', + 'luadoc', + 'markdown', + 'markdown_inline', + 'query', + 'vim', + 'vimdoc', + 'yaml', + 'java', + 'javascript', + 'json', + 'python', + 'rust', + 'scala', + 'typescript', + 'go', + 'cpp', + }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -1011,6 +1038,18 @@ require('lazy').setup({ additional_vim_regex_highlighting = { 'ruby' }, }, indent = { enable = true, disable = { 'ruby' } }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, + }, + }, }, -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: @@ -1098,5 +1137,24 @@ require('lazy').setup({ }, }) +vim.keymap.set('n', 'uc', function() + local start = vim.fn.line '.' + local finish = start + + -- extend upward + while start > 1 and vim.fn.getline(start - 1):match '^#' do + start = start - 1 + end + + -- extend downward + local last = vim.fn.line '$' + while finish < last and vim.fn.getline(finish + 1):match '^#' do + finish = finish + 1 + end + + -- Run Comment.nvim operator in normal mode over the range + vim.cmd(string.format('%d,%dnormal gc', start, finish)) +end, { desc = 'Toggle comment on contiguous # block' }) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json index 20802956d2a..fdb46020ae0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -23,6 +23,7 @@ "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, From d7e405283fd8829d5f5a905948b32fd174c814ea Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Mon, 24 Nov 2025 19:39:21 +0100 Subject: [PATCH 10/16] addingiron --- init.lua | 1 + lazy-lock.json | 1 + lua/kickstart/plugins/iron.lua | 51 ++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 lua/kickstart/plugins/iron.lua diff --git a/init.lua b/init.lua index db34dcaeb6a..584d0cf6982 100644 --- a/init.lua +++ b/init.lua @@ -1074,6 +1074,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.iron', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- Scala language support diff --git a/lazy-lock.json b/lazy-lock.json index fdb46020ae0..316651b1e0b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -7,6 +7,7 @@ "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "iron.nvim": { "branch": "master", "commit": "746414e67adcd3ad2ad5dbe6262543b55ac3f3cd" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" }, diff --git a/lua/kickstart/plugins/iron.lua b/lua/kickstart/plugins/iron.lua new file mode 100644 index 00000000000..ba2d75ac916 --- /dev/null +++ b/lua/kickstart/plugins/iron.lua @@ -0,0 +1,51 @@ +return { + "Vigemus/iron.nvim", + config = function() + local iron = require("iron.core") + local view = require("iron.view") + local common = require("iron.fts.common") + + iron.setup({ + config = { + scratch_repl = true, + -- How the repl window will be displayed + repl_open_cmd = view.bottom(40), + -- Choose your preferred REPL for each language: + repl_definition = { + sh = { + command = {"zsh"} + }, + python = { + command = {"python3"}, + format = common.bracketed_paste_python, + }, + }, + }, + + keymaps = { + send_motion = "rs", + visual_send = "rs", + send_file = "rf", + send_line = "rl", + send_mark = "rm", + mark_motion = "rm", + mark_visual = "rm", + remove_mark = "rd", + cr = "r", + interrupt = "r", + exit = "rq", + clear = "rc", + }, + + highlight = { italic = true }, + ignore_blank_lines = true, + }) + + -- Optional: automatically open the REPL on first send + vim.keymap.set("n", "ro", function() + local ft = vim.bo.filetype + require("iron.core").repl_for(ft) + require("iron.core").focus_on(ft) + end) + end, +} From 51440c1371218eccee23b31403c4bf598d7c1ebe Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Mon, 24 Nov 2025 20:45:57 +0100 Subject: [PATCH 11/16] update iron --- lua/kickstart/plugins/iron.lua | 38 +++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/lua/kickstart/plugins/iron.lua b/lua/kickstart/plugins/iron.lua index ba2d75ac916..71ab485dd7a 100644 --- a/lua/kickstart/plugins/iron.lua +++ b/lua/kickstart/plugins/iron.lua @@ -10,6 +10,8 @@ return { scratch_repl = true, -- How the repl window will be displayed repl_open_cmd = view.bottom(40), + -- Send selections to the DAP repl if an nvim-dap session is running. + dap_integration = true, -- Choose your preferred REPL for each language: repl_definition = { sh = { @@ -18,23 +20,35 @@ return { python = { command = {"python3"}, format = common.bracketed_paste_python, + block_dividers = { "# %%", "#%%" }, + env = {PYTHON_BASIC_REPL = "1"} }, }, }, keymaps = { - send_motion = "rs", - visual_send = "rs", - send_file = "rf", - send_line = "rl", - send_mark = "rm", - mark_motion = "rm", - mark_visual = "rm", - remove_mark = "rd", - cr = "r", - interrupt = "r", - exit = "rq", - clear = "rc", + toggle_repl = "rr", -- toggles the repl open and closed. + -- If repl_open_command is a table as above, then the following keymaps are + -- available + -- toggle_repl_with_cmd_1 = "rv", + -- toggle_repl_with_cmd_2 = "rh", + restart_repl = "rR", -- calls `IronRestart` to restart the repl + send_motion = "sc", + visual_send = "sc", + send_file = "sf", + send_line = "sl", + send_paragraph = "sp", + send_until_cursor = "su", + send_mark = "sm", + send_code_block = "sb", + send_code_block_and_move = "sn", + mark_motion = "mc", + mark_visual = "mc", + remove_mark = "md", + cr = "s", + interrupt = "s", + exit = "sq", + clear = "cl", }, highlight = { italic = true }, From f15807f288512d7c26759980c658bcff98f33bb5 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Tue, 25 Nov 2025 21:08:13 +0100 Subject: [PATCH 12/16] adding diffview --- init.lua | 36 ++++++++++++++++++++++++++++++++++++ lazy-lock.json | 11 ++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 584d0cf6982..015afbb11ef 100644 --- a/init.lua +++ b/init.lua @@ -236,6 +236,14 @@ end local rtp = vim.opt.rtp rtp:prepend(lazypath) +local function toggle_diffview(cmd) + if next(require("diffview.lib").views) == nil then + vim.cmd(cmd) + else + vim.cmd("DiffviewClose") + end +end + -- [[ Configure and install plugins ]] -- -- To check the current status of your plugins, run @@ -996,6 +1004,34 @@ require('lazy').setup({ -- Check out: https://github.com/echasnovski/mini.nvim end, }, + { + "sindrets/diffview.nvim", + command = "DiffviewOpen", + cond = is_git_root, + keys = { + { + "gd", + function() + toggle_diffview("DiffviewOpen") + end, + desc = "Diff Index", + }, + { + "gD", + function() + toggle_diffview("DiffviewOpen origin/main...HEAD") + end, + desc = "Diff main", + }, + { + "gf", + function() + toggle_diffview("DiffviewFileHistory %") + end, + desc = "Open diffs for current File", + }, + } + }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', diff --git a/lazy-lock.json b/lazy-lock.json index 316651b1e0b..057b6779536 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,9 +1,10 @@ { "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "codecompanion.nvim": { "branch": "main", "commit": "b7dc2b19371fa20913b4cc5f7867741b35d3467e" }, - "conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" }, + "codecompanion.nvim": { "branch": "main", "commit": "e7762c68daf24c3e356401f5223eeb5217047754" }, + "conform.nvim": { "branch": "master", "commit": "4993e07fac6679d0a5005aa7499e0bad2bd39f19" }, "copilot.vim": { "branch": "release", "commit": "f89e977c87180519ba3b942200e3d05b17b1e2fc" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, @@ -14,13 +15,13 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, - "mini.nvim": { "branch": "main", "commit": "6e885e4c27743ae6bf5957ea78ce86c032835f09" }, + "mini.nvim": { "branch": "main", "commit": "72b0194c56c984476c5975b62eb340fd1aa1686a" }, "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" }, "nvim-dap-python": { "branch": "master", "commit": "64652d1ae1db80870d9aac7132d76e37acd86a26" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lspconfig": { "branch": "master", "commit": "e0fae251f8459940331960106d4bd9457cec23de" }, + "nvim-lspconfig": { "branch": "master", "commit": "30a2b191bccf541ce1797946324c9329e90ec448" }, "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, @@ -29,7 +30,7 @@ "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8" }, + "telescope.nvim": { "branch": "master", "commit": "1f8a534a320dca8d73f6de58c2e8eea4dd4ced89" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } From df597acb325cf72ef94c7914cb62ceb35e314add Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Wed, 26 Nov 2025 20:40:31 +0100 Subject: [PATCH 13/16] adjust iron repl --- lua/kickstart/plugins/iron.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/iron.lua b/lua/kickstart/plugins/iron.lua index 71ab485dd7a..24fbd848420 100644 --- a/lua/kickstart/plugins/iron.lua +++ b/lua/kickstart/plugins/iron.lua @@ -9,7 +9,7 @@ return { config = { scratch_repl = true, -- How the repl window will be displayed - repl_open_cmd = view.bottom(40), + repl_open_cmd = "botright 12 new | setlocal buftype=nofile", -- Send selections to the DAP repl if an nvim-dap session is running. dap_integration = true, -- Choose your preferred REPL for each language: From 7de2e678fd7b96b7631724182f1e4f9d9c11ceb3 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 28 Nov 2025 20:12:36 +0100 Subject: [PATCH 14/16] adding gradle support --- .gitignore | 1 + init.lua | 169 +++++++++++++++++++++++++++----- lazy-lock.json | 37 ------- lua/kickstart/plugins/debug.lua | 164 ++++++++----------------------- 4 files changed, 186 insertions(+), 185 deletions(-) delete mode 100644 lazy-lock.json diff --git a/.gitignore b/.gitignore index f0cd91ecf9a..0bf768187c1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ test.sh nvim spell/ +.DS_Store \ No newline at end of file diff --git a/init.lua b/init.lua index 015afbb11ef..ad2829e0ea0 100644 --- a/init.lua +++ b/init.lua @@ -796,6 +796,93 @@ require('lazy').setup({ end, }, + { + 'j-hui/fidget.nvim', + opts = {}, + }, + + { + "olimorris/codecompanion.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + -- Optional but nice: + --"hrsh7th/nvim-cmp", -- for chat buffer completion + "nvim-telescope/telescope.nvim", -- for action palette + }, + opts = { + -- Global plugin options + opts = { + -- set to "DEBUG" or "TRACE" if you want verbose logs: + -- log_level = "DEBUG", + }, + + ---------------------------------------------------------------- + -- Use Ollama as default adapter + ---------------------------------------------------------------- + -- Ollama is supported out-of-the-box as an HTTP adapter. + -- This assumes `ollama serve` is running on 127.0.0.1:11434. + strategies = { + chat = { + adapter = "litellm", + }, + inline = { + adapter = "litellm", + }, + cmd = { + adapter = "litellm", + }, + }, + + -- Optional: customize the built-in Ollama adapter (e.g. default model) + adapters = { + http = { + litellm = function() + -- `openai_compatible` is meant exactly for gateways like LiteLLM + return require("codecompanion.adapters").extend("openai_compatible", { + env = { + -- URL of your LiteLLM proxy / gateway + -- (default Quickstart is http://0.0.0.0:4000) :contentReference[oaicite:0]{index=0} + url = "http://127.0.0.1:4000", + + -- Name of the ENV VAR that holds your LiteLLM API key + -- If your proxy accepts any key, you can do: + -- export LITELLM_API_KEY='anything' + api_key = "sk-1234", + + -- LiteLLM’s OpenAI-style chat endpoint + -- (by default it exposes `/chat/completions` for chat) :contentReference[oaicite:1]{index=1} + chat_url = "/chat/completions", + }, + + headers = { + ["Content-Type"] = "application/json", + -- `${api_key}` gets replaced with the resolved env value + ["Authorization"] = "Bearer ${api_key}", + }, + + -- Default model LiteLLM should route to + -- Must match the *model_name* you configured in litellm_config.yaml + -- e.g. "ollama/qwen2.5-coder" or "gpt-4o", etc. + schema = { + model = { + default = "ollama/gemma3:4b", + --default = "eu.anthropic.claude-3-7-sonnet-20250219-v1:0", + }, + }, + + -- Optional, but nice: force streaming + parameters = { + stream = true, + }, + }) + end, + }, + }, + }, + }, + + { -- Autoformat 'stevearc/conform.nvim', event = { 'BufWritePre' }, @@ -1095,6 +1182,8 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, + + -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. @@ -1115,32 +1204,64 @@ require('lazy').setup({ -- Scala language support { - 'scalameta/nvim-metals', - dependencies = { - 'nvim-lua/plenary.nvim', + 'scalameta/nvim-metals', + dependencies = { + { + 'j-hui/fidget.nvim', + opts = {}, }, - ft = { 'scala', 'sbt' }, - opts = function() - local metals_config = require('metals').bare_config() - metals_config.settings = { - showImplicitArguments = true, - showInferredType = true, - excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, - } - metals_config.capabilities = require('blink.cmp').get_lsp_capabilities() - return metals_config - end, - config = function(self, metals_config) - local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) - vim.api.nvim_create_autocmd('FileType', { - pattern = self.ft, - callback = function() - require('metals').initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - end, + --{ 'hrsh7th/cmp-nvim-lsp' }, + -- IMPORTANT: no need to depend on nvim-dap here anymore }, + ft = { 'scala', 'sbt', 'java' }, + opts = function() + local metals_config = require('metals').bare_config() + + metals_config.settings = { + showImplicitArguments = true, + gradleScript = vim.fn.getcwd() .. '/gradlew', + customProjectRoot = vim.fn.getcwd(), + excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, + } + + metals_config.init_options.statusBarProvider = 'off' + local capabilities = vim.lsp.protocol.make_client_capabilities() + local ok, cmp_lsp = pcall(require, 'cmp_nvim_lsp') + if ok then + capabilities = cmp_lsp.default_capabilities(capabilities) + end + metals_config.capabilities = capabilities + + metals_config.on_attach = function(client, bufnr) + ------------------------------------------------------------------- + -- THIS LINE IS CRITICAL FOR DEBUGGING: + ------------------------------------------------------------------- + require('metals').setup_dap() + + -- your LSP mappings ... + local map = vim.keymap.set + map('n', 'gD', vim.lsp.buf.definition) + map('n', 'K', vim.lsp.buf.hover) + -- (rest of your mappings: gi, gr, gds, gws, etc…) + + -- you can now drop the old dap keymaps here, + -- since they live in your unified nvim-dap config + end + + return metals_config + end, + config = function(self, metals_config) + local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) + vim.api.nvim_create_autocmd('FileType', { + pattern = self.ft, + callback = function() + require('metals').initialize_or_attach(metals_config) + end, + group = nvim_metals_group, + }) + end, +} + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index 057b6779536..00000000000 --- a/lazy-lock.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "codecompanion.nvim": { "branch": "main", "commit": "e7762c68daf24c3e356401f5223eeb5217047754" }, - "conform.nvim": { "branch": "master", "commit": "4993e07fac6679d0a5005aa7499e0bad2bd39f19" }, - "copilot.vim": { "branch": "release", "commit": "f89e977c87180519ba3b942200e3d05b17b1e2fc" }, - "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, - "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, - "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "iron.nvim": { "branch": "master", "commit": "746414e67adcd3ad2ad5dbe6262543b55ac3f3cd" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, - "mini.nvim": { "branch": "main", "commit": "72b0194c56c984476c5975b62eb340fd1aa1686a" }, - "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" }, - "nvim-dap-python": { "branch": "master", "commit": "64652d1ae1db80870d9aac7132d76e37acd86a26" }, - "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lspconfig": { "branch": "master", "commit": "30a2b191bccf541ce1797946324c9329e90ec448" }, - "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, - "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "1f8a534a320dca8d73f6de58c2e8eea4dd4ced89" }, - "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } -} diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index c84d66f507e..1f547fd6933 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -1,14 +1,8 @@ --- debug.lua --- --- Unified debugging configuration for multiple languages. --- Supports Python (with debugpy) and Scala (with nvim-metals). --- Can be extended to other languages as well. - return { -- Main DAP plugin 'mfussenegger/nvim-dap', dependencies = { - -- Creates a beautiful debugger UI + -- DAP UI 'rcarriga/nvim-dap-ui', -- Required dependency for nvim-dap-ui @@ -20,21 +14,9 @@ return { -- Python debugging support 'mfussenegger/nvim-dap-python', - - -- Scala debugging and LSP support - { - 'scalameta/nvim-metals', - ft = { 'scala', 'sbt', 'java' }, - }, - - -- Fidget for LSP progress notifications - { - 'j-hui/fidget.nvim', - opts = {}, - }, }, keys = { - -- Unified keymaps for debugging (works for both Python and Scala) + -- Unified keymaps for debugging (works for both Python & Scala) { 'dc', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, { 'dr', function() require('dap').repl.toggle() end, desc = 'Debug: Toggle REPL' }, { 'dK', function() require('dap.ui.widgets').hover() end, desc = 'Debug: Hover Widget' }, @@ -43,7 +25,11 @@ return { { 'dsi', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, { 'dl', function() require('dap').run_last() end, desc = 'Debug: Run Last' }, { 'du', function() require('dapui').toggle() end, desc = 'Debug: Toggle DAP UI' }, - { 'dB', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Conditional Breakpoint' }, + { 'dB', function() + require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') + end, + desc = 'Debug: Set Conditional Breakpoint', + }, }, config = function() local dap = require 'dap' @@ -81,16 +67,18 @@ return { dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close - -- === PYTHON DEBUGGING SETUP === + --------------------------------------------------------------------------- + -- PYTHON DEBUGGING SETUP + --------------------------------------------------------------------------- local function setup_python_debugging() -- Function to find the best Python executable with debugpy local function find_python_with_debugpy() local python_candidates = { '~/.config/nvim/.venv/bin/python', -- nvim config venv - vim.fn.exepath('python3'), -- system python3 - vim.fn.exepath('python'), -- system python + vim.fn.exepath('python3'), -- system python3 + vim.fn.exepath('python'), -- system python } - + for _, python_path in ipairs(python_candidates) do if python_path and python_path ~= '' and vim.fn.executable(python_path) == 1 then -- Test if this python has debugpy @@ -104,14 +92,15 @@ return { end end end - + -- Fallback to the nvim config venv return '~/.config/nvim/.venv/bin/python' end - + require('dap-python').setup(find_python_with_debugpy()) - - -- Add Python debugging configurations + + -- Add Python debugging configuration + dap.configurations.python = dap.configurations.python or {} table.insert(dap.configurations.python, { type = 'python', request = 'launch', @@ -130,103 +119,30 @@ return { }) end - -- === SCALA DEBUGGING SETUP === - local function setup_scala_debugging() - -- Scala DAP configurations - dap.configurations.scala = { - { - type = 'scala', - request = 'launch', - name = 'RunOrTest', - metals = { - runType = 'runOrTestFile', - }, + --------------------------------------------------------------------------- + -- SCALA DEBUGGING SETUP (from your Metals config) + --------------------------------------------------------------------------- + dap.configurations.scala = { + { + type = 'scala', + request = 'launch', + name = 'RunOrTest', + metals = { + runType = 'runOrTestFile', + -- args = { "firstArg", "secondArg", "thirdArg" }, -- example }, - { - type = 'scala', - request = 'launch', - name = 'Test Target', - metals = { - runType = 'testTarget', - }, + }, + { + type = 'scala', + request = 'launch', + name = 'Test Target', + metals = { + runType = 'testTarget', }, - } - end - - -- === METALS (SCALA LSP) SETUP === - local function setup_metals() - local metals_config = require('metals').bare_config() - - metals_config.settings = { - showImplicitArguments = true, - gradleScript = vim.fn.getcwd() .. '/gradlew', - customProjectRoot = vim.fn.getcwd(), - excludedPackages = { 'akka.actor.typed.javadsl', 'com.github.swagger.akka.javadsl' }, - } - - metals_config.init_options.statusBarProvider = 'off' - -- metals_config.capabilities = require('cmp_nvim_lsp').default_capabilities() - - metals_config.on_attach = function(client, bufnr) - require('metals').setup_dap() - - -- Helper function for buffer-local keymaps - local function map(mode, lhs, rhs, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, lhs, rhs, opts) - end - - -- LSP mappings (Scala-specific) - map('n', 'gD', vim.lsp.buf.definition) - map('n', 'K', vim.lsp.buf.hover) - map('n', 'gi', vim.lsp.buf.implementation) - map('n', 'gr', vim.lsp.buf.references) - map('n', 'gds', vim.lsp.buf.document_symbol) - map('n', 'gws', vim.lsp.buf.workspace_symbol) - map('n', 'cl', vim.lsp.codelens.run) - map('n', 'sh', vim.lsp.buf.signature_help) - map('n', 'rn', vim.lsp.buf.rename) - map('n', 'f', vim.lsp.buf.format) - map('n', 'ca', vim.lsp.buf.code_action) - - -- Scala worksheet support - map('n', 'ws', function() - require('metals').hover_worksheet() - end) - - -- Diagnostic mappings - map('n', 'aa', vim.diagnostic.setqflist) -- all workspace diagnostics - map('n', 'ae', function() -- all workspace errors - vim.diagnostic.setqflist { severity = 'E' } - end) - map('n', 'aw', function() -- all workspace warnings - vim.diagnostic.setqflist { severity = 'W' } - end) - map('n', 'd', vim.diagnostic.setloclist) -- buffer diagnostics only - - map('n', '[c', function() - vim.diagnostic.goto_prev { wrap = false } - end) - map('n', ']c', function() - vim.diagnostic.goto_next { wrap = false } - end) - end - - -- Auto-attach Metals for Scala files - local nvim_metals_group = vim.api.nvim_create_augroup('nvim-metals', { clear = true }) - vim.api.nvim_create_autocmd('FileType', { - pattern = { 'scala', 'sbt', 'java' }, - callback = function() - require('metals').initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - end + }, + } - -- Initialize debugging support for all languages + -- Initialize debugging support setup_python_debugging() - setup_scala_debugging() - setup_metals() end, -} \ No newline at end of file +} From 66d77c3009db381a38226db3049fe07c00ab6cf2 Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Fri, 28 Nov 2025 21:59:39 +0100 Subject: [PATCH 15/16] ff --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ad2829e0ea0..d831c75ee2d 100644 --- a/init.lua +++ b/init.lua @@ -438,7 +438,7 @@ require('lazy').setup({ 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', 'ff', 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' }) From 58f3f9795de6ac29aba9d5b5852bf050eb7ddafa Mon Sep 17 00:00:00 2001 From: Florian Teich Date: Thu, 18 Dec 2025 08:45:56 +0100 Subject: [PATCH 16/16] adding ty --- init.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index d831c75ee2d..f5d9dd6545b 100644 --- a/init.lua +++ b/init.lua @@ -686,17 +686,6 @@ require('lazy').setup({ filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, }, -- gopls = {}, - pyright = { - settings = { - python = { - analysis = { - autoSearchPaths = true, - diagnosticMode = 'workspace', - useLibraryCodeForTypes = true, - }, - }, - }, - }, rust_analyzer = { settings = { ['rust-analyzer'] = { @@ -1295,6 +1284,8 @@ require('lazy').setup({ }, }) +vim.lsp.enable('ty') + vim.keymap.set('n', 'uc', function() local start = vim.fn.line '.' local finish = start