diff --git a/.gitignore b/.gitignore index d12a5c881ff..aee26bdf2ad 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ spell/ lazy-lock.json .DS_Store + +# Nix +result +result-* diff --git a/README.md b/README.md index 2b9e52dad85..4f55d4e7f6c 100644 --- a/README.md +++ b/README.md @@ -1,322 +1,334 @@ -# kickstart.nvim +# nvim -## Introduction +Personal Neovim configuration based on [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim). +Single-file, fully documented, no magic. -A starting point for Neovim that is: +--- -* Small -* Single-file -* Completely Documented +## Requirements -**NOT** a Neovim distribution, but instead a starting point for your configuration. +| Dependency | Purpose | +|---|---| +| Neovim `>= 0.10` (latest stable recommended) | Runtime | +| `git`, `make`, `gcc` / `clang` | Plugin builds | +| [ripgrep](https://github.com/BurntSushi/ripgrep) | Live grep in Telescope | +| [fd-find](https://github.com/sharkdp/fd) | File finder | +| `claude` CLI (Claude Code) | AI agent ([99](#ai-agent--99)) | +| Clipboard tool (`xclip`, `xsel`, `win32yank`) | System clipboard sync | -## Installation - -### Install Neovim - -Kickstart.nvim targets *only* the latest -['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest -['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. -If you are experiencing issues, please make sure you have at least the latest -stable version. Most likely, you want to install neovim via a [package -manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package). -To check your neovim version, run `nvim --version` and make sure it is not -below the latest -['stable'](https://github.com/neovim/neovim/releases/tag/stable) version. If -your chosen install method only gives you an outdated version of neovim, find -alternative [installation methods below](#alternative-neovim-installation-methods). - -### Install External Dependencies +Install Neovim on WSL (Ubuntu/Debian): -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) -- [ripgrep](https://github.com/BurntSushi/ripgrep#installation), - [fd-find](https://github.com/sharkdp/fd#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) -- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - - if you have it set `vim.g.have_nerd_font` in `init.lua` to true -- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` -- Language Setup: - - If you want to write Typescript, you need `npm` - - If you want to write Golang, you will need `go` - - etc. - -> [!NOTE] -> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes -> and quick install snippets +```sh +sudo add-apt-repository ppa:neovim-ppa/unstable -y +sudo apt update +sudo apt install make gcc ripgrep unzip git xclip neovim +``` -### Install Kickstart +--- -> [!NOTE] -> [Backup](#FAQ) your previous configuration (if any exists) +## Installation -Neovim's configurations are located under the following paths, depending on your OS: +```sh +# Back up any existing config first +mv ~/.config/nvim ~/.config/nvim.bak -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | +# Clone this repo +git clone https://github.com/0xWheatyz/kickstart.nvim.git ~/.config/nvim -#### Recommended Step +# Launch — Lazy will bootstrap and install all plugins automatically +nvim +``` -[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. +Run `:Lazy` to check plugin status. Run `:checkhealth` if anything looks wrong. -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` +### Nix Flake (Alternative Installation) -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). +If you use Nix with flakes, you can install this configuration via the flake: -#### Clone kickstart.nvim +```sh +# Try it out without installing +nix run github:0xWheatyz/kickstart.nvim -> [!NOTE] -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below +# Test locally with development shell (includes nvim + dependencies) +nix develop +nix develop -c nvim # Or run nvim directly -
Linux and Mac +# Or add to your home-manager configuration +{ + inputs.kickstart-nvim.url = "github:0xWheatyz/kickstart.nvim"; -```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim + # In your home-manager configuration: + programs.neovim-kickstart.enable = true; +} ``` -
- -
Windows +The home-manager module automatically installs Neovim with this configuration +and recommended dependencies (ripgrep, fd, gcc, make, git). -If you're using `cmd.exe`: +--- -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` +## Structure -If you're using `powershell.exe` +Everything lives in a single file: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +~/.config/nvim/ +├── init.lua ← entire config (options, keymaps, plugins) +└── lua/ + ├── custom/plugins/ ← drop extra plugin files here (optional) + └── kickstart/plugins/ ← optional bundled extras (debug, neo-tree, etc.) ``` -
- -### Post Installation - -Start Neovim +The config is intentionally kept in one file so every line is readable +top-to-bottom without jumping between modules. + +--- + +## Plugins + +| Plugin | Purpose | +|---|---| +| `folke/lazy.nvim` | Plugin manager | +| `NMAC427/guess-indent.nvim` | Auto-detect indentation | +| `lewis6991/gitsigns.nvim` | Git gutter signs | +| `folke/which-key.nvim` | Keymap hints popup | +| `nvim-telescope/telescope.nvim` | Fuzzy finder | +| `neovim/nvim-lspconfig` + `mason-org/mason.nvim` | LSP + auto-install | +| `stevearc/conform.nvim` | Formatting on save | +| `saghen/blink.cmp` + `L3MON4D3/LuaSnip` | Completion + snippets | +| `folke/tokyonight.nvim` | Colorscheme (tokyonight-night) | +| `folke/todo-comments.nvim` | Highlight TODO/FIXME/NOTE | +| `nvim-mini/mini.nvim` | Text objects, surround, statusline | +| `nvim-treesitter/nvim-treesitter` | Syntax highlighting | +| `ThePrimeagen/99` | AI agent | + +--- + +## Keymaps + +`` is ``. + +### General + +| Key | Action | +|---|---| +| `` | Clear search highlight | +| `` | Move between splits | +| `q` | Open diagnostic quickfix list | +| `f` | Format buffer | +| `th` | Toggle inlay hints (when LSP supports it) | + +### Telescope (Search) + +| Key | Action | +|---|---| +| `sf` | Find files | +| `sg` | Live grep | +| `sw` | Grep word under cursor (or selection) | +| `sh` | Search help tags | +| `sk` | Search keymaps | +| `sd` | Search diagnostics | +| `sr` | Resume last search | +| `s.` | Recent files | +| `sc` | Search commands | +| `sn` | Search Neovim config files | +| `/` | Fuzzy search current buffer | +| `s/` | Live grep in open files | +| `` | Open buffer list | + +### LSP (active when a language server is attached) + +| Key | Action | +|---|---| +| `grn` | Rename symbol | +| `gra` | Code action | +| `grD` | Go to declaration | +| `grd` | Go to definition | +| `grr` | Find references | +| `gri` | Go to implementation | +| `grt` | Go to type definition | +| `gO` | Document symbols | +| `gW` | Workspace symbols | + +### AI Agent (99) + +| Key | Mode | Action | +|---|---|---| +| `9v` | visual | Send selection as AI request | +| `9s` | normal | Open search / ask AI | +| `9x` | normal | Cancel all in-flight requests | + +In the 99 prompt: +- `@` — fuzzy-attach a project file as context +- `#` — autocomplete and attach a rule/skill file + +--- + +## AI Agent — 99 + +[ThePrimeagen/99](https://github.com/ThePrimeagen/99) is a Neovim-native AI +agent that delegates to a CLI backend. This config uses **Claude Code** +(`claude` CLI) as the provider. + +### Prerequisites + +Claude Code must be installed and authenticated: ```sh -nvim +npm install -g @anthropic-ai/claude-code +claude login ``` -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. +### How it works -#### Read The Friendly Documentation +1. Open any file and make a visual selection (or just use `9s` for a + free-form prompt). +2. Press `9v` (visual) or `9s` (normal) to open the prompt. +3. Describe what you want. Use `@file` to attach context, `#rule` to attach a + skill/rule doc. +4. 99 streams the response back into the buffer as virtual text, then applies + replacements inline. +5. Press `9x` at any time to abort. -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. +### Debugging -> [!NOTE] -> For more information about a particular plugin check its repository's documentation. +```vim +:lua require("99").view_logs() +``` +Navigate log history with `_99.prev_request_logs()` / `_99.next_request_logs()`. -### Getting Started +### AGENT.md (optional) -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) +Drop an `AGENT.md` file in any directory (or project root) to give 99 +project-specific context. It is automatically injected into every request +made from files under that directory. -### FAQ +``` +project-root/ +└── AGENT.md ← describes conventions, architecture, rules +``` -* What should I do if I already have a pre-existing Neovim configuration? - * You should back it up and then delete all associated files. - * This includes your existing init.lua and the Neovim files in `~/.local` - which can be deleted with `rm -rf ~/.local/share/nvim/` -* Can I keep my existing configuration in parallel to kickstart? - * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` - to maintain multiple configurations. For example, you can install the kickstart - configuration in `~/.config/nvim-kickstart` and create an alias: - ``` - alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' - ``` - When you run Neovim using `nvim-kickstart` alias it will use the alternative - config directory and the matching local directory - `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim - distribution that you would like to try out. -* What if I want to "uninstall" this configuration: - * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information -* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? - * The main purpose of kickstart is to serve as a teaching tool and a reference - configuration that someone can easily use to `git clone` as a basis for their own. - As you progress in learning Neovim and Lua, you might consider splitting `init.lua` - into smaller parts. A fork of kickstart that does this while maintaining the - same functionality is available here: - * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) - * Discussions on this topic can be found here: - * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) - * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) +### Skill files (optional) -### Install Recipes +Custom rule files enable `#` autocompletion in the prompt. Each skill +is a folder with a `SKILL.md` inside: -Below you can find OS specific install instructions for Neovim and dependencies. +``` +~/.config/nvim/skills/ +└── my-rule/ + └── SKILL.md +``` -After installing all the dependencies continue with the [Install Kickstart](#install-kickstart) step. +Point 99 at them by adding to `completion.custom_rules` in the setup call +inside `init.lua`. -#### Windows Installation +--- -
Windows with Microsoft C++ Build Tools and CMake -Installation may require installing build tools and updating the run command for `telescope-fzf-native` +## Maintaining the Config -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) +All changes happen in `~/.config/nvim/init.lua`. The file is organized in this order: -This requires: +1. **Options** — `vim.o.*` / `vim.opt.*` settings +2. **Keymaps** — `vim.keymap.set(...)` for built-in bindings +3. **Autocommands** — `vim.api.nvim_create_autocmd(...)` +4. **Plugin specs** — passed to `require('lazy').setup({...})` -- Install CMake and the Microsoft C++ Build Tools on Windows +### Adding a plugin + +Add an entry anywhere inside the `require('lazy').setup({ ... })` table: ```lua -{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -``` -
-
Windows with gcc/make using chocolatey -Alternatively, one can install gcc and make which don't require changing the config, -the easiest way is to use choco: - -1. install [chocolatey](https://chocolatey.org/install) -either follow the instructions on the page or use winget, -run in cmd as **admin**: -``` -winget install --accept-source-agreements chocolatey.chocolatey +{ 'author/plugin-name', opts = {} }, ``` -2. install all requirements using choco, exit the previous cmd and -open a new one so that choco path is set, and run in cmd as **admin**: -``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make -``` -
-
WSL (Windows Subsystem for Linux) +For plugins that need configuration: +```lua +{ + 'author/plugin-name', + event = 'VimEnter', -- optional: defer loading + config = function() + require('plugin-name').setup { + -- options here + } + vim.keymap.set('n', 'x', ...) + end, +}, ``` -wsl --install -wsl -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-#### Linux Install -
Ubuntu Install Steps +Then run `:Lazy sync` (or restart Neovim) to install. -``` -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-
Debian Install Steps +### Updating plugins +```vim +:Lazy update ``` -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl - -# Now we install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim-linux-x86_64 -sudo mkdir -p /opt/nvim-linux-x86_64 -sudo chmod a+rX /opt/nvim-linux-x86_64 -sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz -# make it available in /usr/local/bin, distro installs to /usr/bin -sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ -``` -
-
Fedora Install Steps +This updates all plugins and refreshes `lazy-lock.json`. -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
+### Adding a language server -
Arch Install Steps +Inside the `servers` table in the `nvim-lspconfig` config block: +```lua +local servers = { + gopls = {}, + pyright = {}, + ts_ls = {}, +} ``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
-### Alternative neovim installation methods +Mason will auto-install it. Run `:Mason` to check status. -For some systems it is not unexpected that the [package manager installation -method](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package) -recommended by neovim is significantly behind. If that is the case for you, -pick one of the following methods that are known to deliver fresh neovim versions very quickly. -They have been picked for their popularity and because they make installing and updating -neovim to the latest versions easy. You can also find more detail about the -available methods being discussed -[here](https://github.com/nvim-lua/kickstart.nvim/issues/1583). +### Adding a formatter +Inside the `conform.nvim` `opts.formatters_by_ft` table: -
Bob - -[Bob](https://github.com/MordechaiHadad/bob) is a Neovim version manager for -all plattforms. Simply install -[rustup](https://rust-lang.github.io/rustup/installation/other.html), -and run the following commands: - -```bash -rustup default stable -rustup update stable -cargo install bob-nvim -bob use stable +```lua +formatters_by_ft = { + lua = { 'stylua' }, + python = { 'black' }, + javascript = { 'prettierd', 'prettier', stop_after_first = true }, +}, ``` -
- -
Homebrew +Make sure the formatter binary is installed via Mason or your system package +manager. -[Homebrew](https://brew.sh) is a package manager popular on Mac and Linux. -Simply install using [`brew install`](https://formulae.brew.sh/formula/neovim). +### Switching the colorscheme -
+Replace the `folke/tokyonight.nvim` plugin entry with any other colorscheme, +and update `vim.cmd.colorscheme 'theme-name'` in its `config` function. -
Flatpak +### Checking health -Flatpak is a package manager for applications that allows developers to package their applications -just once to make it available on all Linux systems. Simply [install flatpak](https://flatpak.org/setup/) -and setup [flathub](https://flathub.org/setup) to [install neovim](https://flathub.org/apps/io.neovim.nvim). - -
+```vim +:checkhealth +``` -
asdf and mise-en-place +Covers LSP, Treesitter, Telescope, and plugin-specific diagnostics. -[asdf](https://asdf-vm.com/) and [mise](https://mise.jdx.dev/) are tool version managers, -mostly aimed towards project-specific tool versioning. However both support managing tools -globally in the user-space as well: +--- -
mise +## Optional Extras -[Install mise](https://mise.jdx.dev/getting-started.html), then run: +Uncomment any of these lines near the bottom of `init.lua` to enable bundled +extras: -```bash -mise plugins install neovim -mise use neovim@stable +```lua +require 'kickstart.plugins.debug', -- DAP debugger UI +require 'kickstart.plugins.indent_line', -- indent guides +require 'kickstart.plugins.lint', -- async linting +require 'kickstart.plugins.autopairs', -- bracket auto-close +require 'kickstart.plugins.neo-tree', -- file tree +require 'kickstart.plugins.gitsigns', -- extra git keymaps ``` -
- -
asdf +Drop additional plugin files under `lua/custom/plugins/` and uncomment: -[Install asdf](https://asdf-vm.com/guide/getting-started.html), then run: - -```bash -asdf plugin add neovim -asdf install neovim stable -asdf set neovim stable --home -asdf reshim neovim +```lua +{ import = 'custom.plugins' }, ``` -
- -
+at the bottom of the lazy setup call. diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000000..af8f58fa010 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0182a361324364ae3f436a63005877674cf45efb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..28c3113d043 --- /dev/null +++ b/flake.nix @@ -0,0 +1,93 @@ +{ + description = "Personal Neovim configuration based on kickstart.nvim"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + let + # Home Manager module + homeManagerModule = { config, lib, pkgs, ... }: { + options.programs.neovim-kickstart = { + enable = lib.mkEnableOption "kickstart.nvim configuration"; + }; + + config = lib.mkIf config.programs.neovim-kickstart.enable { + home.file.".config/nvim" = { + source = self; + recursive = true; + }; + + # Install Neovim package and recommended dependencies + home.packages = [ self.packages.${pkgs.system}.default ] ++ (with pkgs; [ + ripgrep + fd + gcc + gnumake + git + ]); + }; + }; + in + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + + # Custom Neovim package with this configuration + neovimConfig = pkgs.stdenv.mkDerivation { + name = "kickstart-nvim-config"; + src = self; + + installPhase = '' + mkdir -p $out + cp -r init.lua $out/ + cp -r lua $out/ + cp -r doc $out/ + ${pkgs.lib.optionalString (builtins.pathExists ./AGENT.md) "cp AGENT.md $out/"} + ''; + }; + + neovim-kickstart = pkgs.neovim.override { + configure = { + customRC = '' + lua << EOF + -- Set XDG_CONFIG_HOME to point to our config + vim.env.NVIM_APPNAME = vim.env.NVIM_APPNAME or "nvim-kickstart" + + -- Load the kickstart configuration + dofile("${neovimConfig}/init.lua") + EOF + ''; + }; + }; + in + { + packages = { + default = neovim-kickstart; + neovim = neovim-kickstart; + }; + + devShells.default = pkgs.mkShell { + buildInputs = [ + neovim-kickstart + pkgs.ripgrep + pkgs.fd + pkgs.gcc + pkgs.gnumake + pkgs.git + ]; + + shellHook = '' + echo "Neovim kickstart development environment" + echo "Run 'nvim' to start Neovim with the kickstart configuration" + ''; + }; + } + ) // { + # Home Manager module (not system-specific) + homeManagerModules.default = homeManagerModule; + homeManagerModules.neovim-kickstart = homeManagerModule; + }; +} diff --git a/init.lua b/init.lua index d5ae6dc9b2a..20840c30599 100644 --- a/init.lua +++ b/init.lua @@ -180,7 +180,7 @@ vim.diagnostic.config { underline = { severity = vim.diagnostic.severity.ERROR }, -- Can switch between these as you prefer - virtual_text = true, -- Text shows up at the end of the line + virtual_text = true, -- Text shows up at the end of the line virtual_lines = false, -- Teest shows up underneath the line, with virtual lines -- Auto open the float, so you can easily read the errors when jumping with `[d` and `]d` @@ -310,7 +310,7 @@ require('lazy').setup({ -- Document existing key chains spec = { - { 's', group = '[S]earch', mode = { 'n', 'v' } }, + { 's', group = '[S]earch', mode = { 'n', 'v' } }, { 't', group = '[T]oggle' }, { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, }, @@ -353,7 +353,7 @@ require('lazy').setup({ { 'nvim-telescope/telescope-ui-select.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -435,7 +435,8 @@ require('lazy').setup({ -- Fuzzy find all the symbols in your current workspace. -- Similar to document symbols, except searches over your entire project. - vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' }) + vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, + { buffer = buf, desc = 'Open Workspace Symbols' }) -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see @@ -468,7 +469,8 @@ require('lazy').setup({ ) -- Shortcut for searching your Neovim configuration files - vim.keymap.set('n', 'sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, { desc = '[S]earch [N]eovim files' }) + vim.keymap.set('n', 'sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, + { desc = '[S]earch [N]eovim files' }) end, }, @@ -484,7 +486,7 @@ require('lazy').setup({ 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp 'saghen/blink.cmp', @@ -578,7 +580,9 @@ require('lazy').setup({ -- -- This may be unwanted, since they displace some of your code if client and client:supports_method('textDocument/inlayHint', event.buf) then - map('th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints') + map('th', + function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, + '[T]oggle Inlay [H]ints') end end, }) @@ -614,8 +618,8 @@ require('lazy').setup({ -- You can press `g?` for help in this menu. local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { - 'lua_ls', -- Lua Language server - 'stylua', -- Used to format Lua code + 'lua-language-server', -- Lua Language server (Mason package name) + 'stylua', -- Used to format Lua code -- You can add other tools here that you want Mason to install }) @@ -811,7 +815,7 @@ require('lazy').setup({ }, -- Highlight todo, notes, etc in comments - { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, { -- Collection of various small independent plugins/modules 'nvim-mini/mini.nvim', @@ -852,7 +856,8 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', config = function() - local filetypes = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } + local filetypes = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', + 'vimdoc' } require('nvim-treesitter').install(filetypes) vim.api.nvim_create_autocmd('FileType', { pattern = filetypes, @@ -861,6 +866,24 @@ require('lazy').setup({ end, }, + { -- AI agent done right + 'ThePrimeagen/99', + dependencies = { { 'saghen/blink.compat', version = '2.*' } }, + config = function() + local _99 = require '99' + _99.setup { + provider = _99.Providers.ClaudeCodeProvider, + completion = { + source = 'blink', + }, + } + + vim.keymap.set('v', '9v', function() _99.visual() end, { desc = '[9]9 [V]isual request' }) + vim.keymap.set('n', '9x', function() _99.stop_all_requests() end, { desc = '[9]9 Stop all requests' }) + vim.keymap.set('n', '9s', function() _99.search() end, { desc = '[9]9 [S]earch' }) + end, + }, + { 'norcalli/nvim-colorizer.lua', opts = {} }, -- 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.