From 03f3fba7982c12b54202aa64ca77f13ca5ab0fd2 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Thu, 23 Apr 2026 11:23:17 +0200 Subject: [PATCH] feat: remove Telescope, fzf etc. --- README.md | 149 +++++++++++------- init.lua | 14 +- lazy-lock.json | 2 - lua/weeheavy/plugins/telescope-fzf-native.lua | 19 --- lua/weeheavy/plugins/telescope.lua | 56 ------- lua/weeheavy/remap.lua | 3 +- 6 files changed, 91 insertions(+), 152 deletions(-) delete mode 100644 lua/weeheavy/plugins/telescope-fzf-native.lua delete mode 100644 lua/weeheavy/plugins/telescope.lua diff --git a/README.md b/README.md index 20410b4..0e5f726 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,35 @@ After doing my first steps with , I decided to roll my own, custom, "lightweight" Neovim configuration in order to better understand Neovim and its configuration/customization, package managers, -plugins etc. and have "my own" config that only includes things I really need. +plugins etc. and have my own config that only includes parts I need. More on the "why's" are explained [in my blog post](https://lugh.ch/neovim-lessons-learned.html). ## Installation -1. Install Neovim 0.10. or newer +1. Install Neovim 0.12 or newer 1. Install the dependencies documented in `init.lua` 1. Clone this Git repository to 1. `~/.config/nvim` on macOS or Linux - 1. `c:\Users\foobar\AppData\Local\nvim` when on Windows + 1. `c:\Users\foobar\AppData\Local\nvim` on Windows ### Finishing touches - Create a `$HOME/.ignore` file and add big, useless directories to it, so - Telescope/ripgrep/fd can ignore those. My current list of files/directories is - available in `lua/weeheavy/plugins/telescope-fzf-native.lua` + ripgrep, fd can ignore those. Ideas: + ``` + Pictures/ + Music/ + Applications/ + dotnet/ + opt/miniconda3/ + Library/ + .cache/ + .vscode/ + .git/ + .local/ + .m2/ + .npm/ + ``` - Install Mason LSP/linter/formatters from the table down below ## Speed @@ -29,52 +42,55 @@ It's not too important. Still, I try to balance increasing startup time with the usefullness of a plugin. Output from lazy.nvim profiling (`:Lazy profile`) on a MacBook Pro M2 Max, -macOS 15 on Neovim 0.11.0. +macOS 15 on Neovim 0.12.0. ### Start and open init.lua Around 15% of the plugins are lazy-loaded. ```bash -LazyStart 18.67ms -LazyDone 43.52ms (+24.85ms) -UIEnter 110.71ms (+67.19ms) +LazyStart 12.28ms +LazyDone 61.96ms (+49.68ms) +UIEnter 122.07ms (+60.11ms) ``` -### Starting with an empty file +### Starting without a file -Around 50% of the plugins are lazy-loaded. +Around 45% of the plugins are lazy-loaded. ```bash -LazyStart 18.15ms -LazyDone 46.91ms (+28.76ms) -UIEnter 59.08ms (+12.17ms) +LazyStart 13.51ms +LazyDone 64.8ms (+51.29ms) +UIEnter 84.97ms (+20.17ms) ``` ## Plugins -| Name | Purpose | URL | -| ------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------- | -| **lazy.nvim** | Package manager | | -| **telescope.nvim** | Find, Filter, Preview, Pick | | -| **telescope-fzf-native.nvim** | Fuzzy finder for Telescope | | -| **nvim-treesitter** | Parser/syntax highlighting | | -| **nvim-treesitter-context** | Shows current line context | | -| **nvim-treesitter-textobjects** | ? | | -| **oil.nvim** | file explorer, (bulk file creation/rename) | | -| **rose-pine** | Theme | | -| **lualine.nvim** | Status line | | -| **gitsigns.nvim** | Git change indicator | | -| **which-key.nvim** | Shows contextual key bindings | | -| **conform.nvim** | Formatter configuration, replacement for `null-ls` | | -| **mason.nvim** | Install/manage LSP/DAP servers, linters and formatters | | -| **todo-comments.nvim** | Highlights `NOTE:`, `FIXME:` etc. and makes them findable via Telescope | | -| **mini.nvim** | I use the icons | | -| **flash.nvim** | Navigation and Treesitter selection w/ search labels | | -| **nvim-lint** | Narrow-scope linter plugin to use via Neovim diagnostic framework | | -| **snipe.nvim** | Buffer navigation | | -| **blink.cmp** | Fuzzy code completion | | -| **diffview.nvim** | Git diff viewer/stager | | +| Name | Purpose | URL | +| ------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------- | +| **SchemaStore.nvim** | JSON schemas | | +| **aerial.nvim** | Code outline | | +| **blink.cmp** | Fuzzy code completion | | +| **ccc.nvim** | Color picker/color highlight | | +| **conform.nvim** | Formatter configuration, replacement for `null-ls` | | +| **diffview.nvim** | Git diff viewer/stager | | +| **flash.nvim** | Navigation and Treesitter selection w/ search labels | | +| **gitsigns.nvim** | Git change indicator | | +| **kanso** | Theme | | +| **lazy.nvim** | Package manager | | +| **lualine.nvim** | Status line | | +| **mason.nvim** | Install/manage LSP/DAP servers, linters and formatters | | +| **mini.nvim** | Picker, icons, show trailing whitespace, textobject nav | | +| **nvim-lint** | Narrow-scope linter plugin to use via Neovim diagnostic framework | | +| **nvim-treesitter** | Parser/syntax highlighting | | +| **nvim-treesitter-context** | Shows current line context | | +| **nvim-treesitter-textobjects** | ? | | +| **oil.nvim** | file explorer, (bulk file creation/rename) | | +| **rose-pine** | Theme | | +| **snipe.nvim** | Buffer navigation | | +| **todo-comments.nvim** | Highlight `NOTE:`, `FIXME:` inline and via `trouble.nvim` | | +| **trouble.nvim** | pretty diagnostics, references, quickfix and location list | | +| **which-key.nvim** | Shows contextual key bindings | | ## Looks @@ -85,32 +101,42 @@ This is how it looks like: ## Mason essentials This lists the LSPs/linter/formatters I consider ok for my use cases. Tools may -support many more languages than I document in the "Language" column. The -formatters installed here are used via `conform.nvim`. +support more languages than I document in the "Language" column. The formatters +installed through Mason are then configured in `conform.nvim`. -| Type | Language | Name | Benefits | Issues | -| --------- | ------------------ | --------------------------- | ------------------------------------------------ | ----------------------------------------------------- | -| LSP | Markdown | **marksman** | Autocompletes links | | -| LSP | Go | **gopls** | | n/a | -| LSP | Terraform/OpenTofu | **terraform-ls** | | n/a | -| LSP | Terraform/OpenTofu | **tflint** | | n/a | -| LSP | Ansible | **ansible-language-server** | Ansible knowhow | Search _yaml.ansible_ in `prefs.lua` | -| LSP | Bash | **bash-language-server** | Incorporates ShellCheck | n/a | -| LSP | YAML | **yaml-language-server** | | n/a | -| Linter | Ansible | **ansible-lint** | | yamllint vs. ansible-lint | -| Linter | YAML | **yamllint** | | yamllint vs. ansible-lint | -| Linter | Terraform/OpenTofu | **tflint** | | | -| Linter | any | **woke** | Makes you aware of woke language | | -| Linter | Git commits | **commitlint** | Ensure to adhere to _Conventional Commit_ format | | -| Linter | JSON | **jsonlint** | | | -| Linter | Text | **proselint** | See [source][prose] | | -| Linter | Text | **write-good** | See [source][writegood] | | -| Formatter | Markdown, YAML | **prettier** | Markdown table formatting | n/a | -| Formatter | Lua | **stylua** | Formats Lua | n/a | -| Formatter | Bash | **shfmt** | Formats Bash scripts | n/a | -| Formatter | HCL | **hclfmt** | For HashiCorp configuration language | | -| Formatter | many | **prettier** | See [docs][prettier] | | -| Formatter | YAML | **yamlfmt** | | | +| Type | Language | Name | Benefits | Issues | +| --------- | ------------------ | ----------------------------------- | ----------------------- | --------------------------------- | +| Formatter | YAML | **yamlfmt** | | | +| Formatter | many | **prettier** | See [docs][prettier] | | +| Formatter | Python | **isort** | Sorts imports | | +| Formatter | Python | **ruff** | | | +| Formatter | TOML | **taplo** | | | +| Formatter | Lua | **stylua** | | | +| LSP | Ansible | **ansible-language-server** | Ansible knowhow | See _yaml.ansible_ in `prefs.lua` | +| LSP | Bash | **bash-language-server** | Incorporates ShellCheck | | +| LSP | Go | **gopls** | | | +| LSP | Markdown | **marksman** | Autocompletes links | [issues/327][marksmanbug] | +| LSP | Docker Compose | **docker-compose-language-service** | | | +| LSP | Docker | **dockerfile-language-server** | | | +| LSP | HTML | **html-lsp** | | | +| LSP | JSON | **json-lsp** | | | +| LSP | Python | **ruff** | | | +| LSP | Lua | **stylua** | | | +| LSP | CSS | **tailwindcss-language-server** | | | +| LSP | TOML | **taplo** | | | +| LSP | Terraform/OpenTofu | **tflint** | | | +| LSP | Terraform/OpenTofu | **terraform-ls** | HashiCorp | | +| LSP | YAML | **yaml-language-server** | | | +| Linter | Ansible | **ansible-lint** | | yamllint vs. ansible-lint | +| Linter | Git commits | **commitlint** | _Conventional Commits_ | | +| Linter | JSON | **jsonlint** | | | +| Linter | Terraform/OpenTofu | **tflint** | | | +| Linter | Text | **proselint** | See [source][prose] | | +| Linter | Text | **write-good** | See [source][writegood] | | +| Linter | YAML | **yamllint** | | yamllint vs. ansible-lint | +| Linter | many | **gitleaks** | | | +| Linter | Python | **ruff** | | | +| Linter | Bash | **shellcheck** | | | ## Key bindings @@ -127,3 +153,4 @@ See [CHEATSHEET](CHEATSHEET.md) [prettier]: https://prettier.io/docs/ [prose]: https://github.com/amperser/proselint [writegood]: https://github.com/btford/write-good?tab=readme-ov-file#checks +[marksmanbug]: https://github.com/artempyanykh/marksman/issues/327 diff --git a/init.lua b/init.lua index 6fd7216..6d54614 100644 --- a/init.lua +++ b/init.lua @@ -5,31 +5,21 @@ Later on, switched to native LSP setup with the help of https://gpanders.com/blog/whats-new-in-neovim-0-11/ NOTE: EXTERNAL DEPENDENCIES MACOS -- ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) -- fd (https://github.com/sharkdp/fd, used by telescope) - A Nerd font (https://www.nerdfonts.com/, used by various plugins) +- tree-sitter-cli (brew install ) NOTE: EXTERNAL DEPENDENCIES FREEBSD -- cmake, ripgrep (pkg install ) +- cmake, tree-sitter-cli, ripgrep (pkg install ) NOTE: EXTERNAL DEPENDENCIES LINUX (Arch) - cmake, tree-sitter-cli, nodejs (pacman -S ) -Make fzf work: -1. Go to ~/.local/share/nvim/lazy/telescope-fzf-native.nvim -2. Run `make` - NOTE: EXTERNAL DEPENDENCIES WINDOWS See https://blog.nikfp.com/how-to-install-and-set-up-neovim-on-windows -- ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) -- fd (https://github.com/sharkdp/fd, used by telescope) - A Nerd font (https://www.nerdfonts.com/, used by various plugins) - nodejs-lts (used for npm to install prettier) - then run "npm i -g npm" - zig, wget, unzip, git, fzf -- make, mingw (MartinStorsjo.LLVM-MinGW.MSVCRT), cmake (https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) -Then run "mingw32-make.exe" in your users telescope-fzf-native plugin directory: -C:\Users\foobar\AppData\Local\nvim-data\lazy\telescope-fzf-native.nvim --]] -- Include my custom configuration diff --git a/lazy-lock.json b/lazy-lock.json index 62f55f3..3428b0d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -25,8 +25,6 @@ "pomo.nvim": { "branch": "main", "commit": "7e06e5221d8d1e596a0ab29dd4d7fcee5f3cd05a" }, "rose-pine": { "branch": "main", "commit": "9504524e5ed0e326534698f637f9d038ba4cd0ee" }, "snipe.nvim": { "branch": "main", "commit": "d2d196c335919767803f905d573ce66340e33ee6" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } diff --git a/lua/weeheavy/plugins/telescope-fzf-native.lua b/lua/weeheavy/plugins/telescope-fzf-native.lua deleted file mode 100644 index ecad5b2..0000000 --- a/lua/weeheavy/plugins/telescope-fzf-native.lua +++ /dev/null @@ -1,19 +0,0 @@ ---[[ -Fuzzy finder -Docs: https://github.com/nvim-telescope/telescope-fzf-native.nvim - -Performance depends on installation of ripgrep and fd (both available in Homebrew) -If you have huge amounts of files, consider adding some to `$HOME/.ignore`: - Pictures/ - Music/ - Applications/ - dotnet/ - opt/miniconda3/ - Library/ - .cache/ - .git/ -]]-- -return { - "nvim-telescope/telescope-fzf-native.nvim", - build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' -} diff --git a/lua/weeheavy/plugins/telescope.lua b/lua/weeheavy/plugins/telescope.lua deleted file mode 100644 index c7a93d5..0000000 --- a/lua/weeheavy/plugins/telescope.lua +++ /dev/null @@ -1,56 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - lazy = true, - --event = "VeryLazy", - cmd = "Telescope", - tag = "0.1.8", - dependencies = { - "nvim-lua/plenary.nvim", - }, - --config = function(lazy, opts) - config = function() - local telescope = require("telescope") - telescope.load_extension("fzf") - --telescope.load_extension("file_browser") - telescope.setup({ - defaults = { - border = false, - sorting_strategy = "ascending", - wrap_result = true, - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.45, - width = 0.90, - height = 0.75, - preview_cutoff = 90, - }, - }, - }, - pickers = { - colorscheme = { - enable_preview = true, - }, - find_files = { - hidden = true, - wrap_results = false, -- this is not about the preview - }, - live_grep = { - additional_args = function() - return { "--hidden", "--glob", "!**/.git/*" } - end, - }, - grep_string = { - additional_args = function() - return { "--hidden", "--glob", "!**/.git/*" } - end, - }, - ["lsp_references"] = { wrap_results = true }, - ["lsp_definitions"] = { wrap_results = true }, - ["diagnostics"] = { wrap_results = true }, - ["buffers"] = { sort_mru = true, sort_lastused = true, ignore_current_buffer = false }, - }, - }) - end, -} diff --git a/lua/weeheavy/remap.lua b/lua/weeheavy/remap.lua index 15f1f58..c675c6c 100644 --- a/lua/weeheavy/remap.lua +++ b/lua/weeheavy/remap.lua @@ -32,8 +32,7 @@ vim.keymap.set( ) -- todo-comments.nvim --- NOTE: this one is a bit hard to migrate away from Telescope to mini.nvim -vim.keymap.set("n", "ft", ":TodoTelescope", { noremap = true, desc = "Find TODOs" }) +vim.keymap.set("n", "ft", ":Trouble todo", { noremap = true, desc = "Find TODOs" }) -- Git things vim.keymap.set("n", "gla", ":Pick git_commits", { noremap = true, desc = "Git log (all files)" })