diff --git a/README.md b/README.md deleted file mode 100644 index 8ace8b9..0000000 --- a/README.md +++ /dev/null @@ -1,240 +0,0 @@ -# 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. - -## 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 the latest versions. - -### Install External Dependencies - -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) -- [ripgrep](https://github.com/BurntSushi/ripgrep#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 - -### Install Kickstart - -> [!NOTE] -> [Backup](#FAQ) your previous configuration (if any exists) - -Neovim's configurations are located under the following paths, depending on your OS: - -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | - -#### 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 -``` - -
- -
Windows - -If you're using `cmd.exe`: - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` - -If you're using `powershell.exe` - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" -``` - -
- -### Post Installation - -Start Neovim - -```sh -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? - * 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) - -### Install Recipes - -Below you can find OS specific install instructions for Neovim and dependencies. - -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. - -#### 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` - -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) - -This requires: - -- Install CMake and the Microsoft C++ Build Tools on Windows - -```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 -``` - -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) - -``` -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 - -``` -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 - -``` -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 - -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
- -
Arch Install Steps - -``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
- diff --git a/init.lua b/init.lua index 641a2de..d4fb9ae 100644 --- a/init.lua +++ b/init.lua @@ -268,14 +268,16 @@ vim.opt.rtp:prepend(lazypath) -- All actual plugin specs are imported from lua/plugins/ -- Icons are set based on Nerd Font status above for best compatibility. require('lazy').setup({ - { import = 'plugins' }, + { + import = 'plugins', + }, }, { checker = { enabled = true, -- Enable automatic plugin update checks notify = false, }, change_detection = { - notify = false, -- Don't show notification when plugin settings change + notify = true, -- Don't show notification when plugin settings change }, ui = { icons = { diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua index 36c80df..159465c 100644 --- a/lsp/lua_ls.lua +++ b/lsp/lua_ls.lua @@ -7,8 +7,23 @@ return { completion = { callSnippet = 'Replace', }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - diagnostics = { disable = { 'missing-fields' } }, + codeLens = { + enable = true, + }, + hint = { + enable = true, + setType = true, + }, + telemetry = { + enable = false, + }, + + -- https://luals.github.io/wiki/settings/#diagnosticsseverity + diagnostics = { + severity = { + ['missing-fields'] = 'Hint', + }, + }, }, }, } diff --git a/lsp/powershell_es.lua b/lsp/powershell_es.lua deleted file mode 100644 index e05ca21..0000000 --- a/lsp/powershell_es.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - cmd = function(dispatchers) - local temp_path = vim.fn.stdpath 'cache' - local bundle_path = vim.lsp.config.powershell_es.bundle_path - - local command_fmt = - [[& '%s/PowerShellEditorServices/Start-EditorServices.ps1' -BundledModulesPath '%s' -LogPath '%s/powershell_es.log' -SessionDetailsPath '%s/powershell_es.session.json' -FeatureFlags @() -AdditionalModules @() -HostName nvim -HostProfileId 0 -HostVersion 1.0.0 -Stdio -LogLevel Normal]] - local command = command_fmt:format(bundle_path, bundle_path, temp_path, temp_path) - vim.api.nvim_echo({ { '[powershell_es] ' .. command, 'None' } }, true, {}) - - local cmd = { 'pwsh', '-NoLogo', '-NoProfile', '-Command', command } - - return vim.lsp.rpc.start(cmd, dispatchers) - end, - bundle_path = vim.fn.stdpath 'data' .. '/mason/packages/powershell-editor-services', - filetypes = { 'ps1', 'psm1', 'psd1' }, - settings = { powershell = { codeFormatting = { Preset = 'OTBS' } } }, -} diff --git a/lua/plugins/auto-save.lua b/lua/plugins/auto-save.lua index 54c0cab..5e9ec3d 100644 --- a/lua/plugins/auto-save.lua +++ b/lua/plugins/auto-save.lua @@ -1,3 +1,4 @@ +--- @type LazySpec return { 'Pocco81/auto-save.nvim', event = { 'InsertLeave', 'TextChanged', 'VeryLazy' }, diff --git a/lua/plugins/auto-session.lua b/lua/plugins/auto-session.lua index 443ec9b..d2b084a 100644 --- a/lua/plugins/auto-session.lua +++ b/lua/plugins/auto-session.lua @@ -1,6 +1,6 @@ -- Recommended session options vim.o.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions' - +--- @type LazySpec return { 'rmagatti/auto-session', enabled = false, diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 8ab1739..eca64ae 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -91,6 +91,7 @@ function really_cool() -- Do something here AI: end +--- @type LazySpec return { 'yetone/avante.nvim', -- Build function diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index 498ae85..87870ae 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'catppuccin/nvim', diff --git a/lua/plugins/chezmoi.lua b/lua/plugins/chezmoi.lua index f88c877..e50d7ad 100644 --- a/lua/plugins/chezmoi.lua +++ b/lua/plugins/chezmoi.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'xvzc/chezmoi.nvim', diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index ae37bc5..e212f97 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Autoformat 'stevearc/conform.nvim', event = { 'BufWritePre' }, diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index fc00a77..5cb2a4c 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -14,6 +14,7 @@ local function toggle_copilot() end end +--- @type LazySpec | LazySpec[] return { { 'zbirenbaum/copilot.lua', diff --git a/lua/plugins/csvview.lua b/lua/plugins/csvview.lua index fff5459..3cae7ce 100644 --- a/lua/plugins/csvview.lua +++ b/lua/plugins/csvview.lua @@ -10,6 +10,7 @@ vim.api.nvim_create_autocmd('BufReadPost', { end, }) +--- @type LazySpec | LazySpec[] return { 'hat0uma/csvview.nvim', ---@module "csvview" diff --git a/lua/plugins/fugative.lua b/lua/plugins/fugative.lua index aa8a845..dbd3fad 100644 --- a/lua/plugins/fugative.lua +++ b/lua/plugins/fugative.lua @@ -1,4 +1,6 @@ +--- @type LazySpec | LazySpec[] return { + { enabled = false, 'tpope/vim-fugitive', diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index b6f5e48..01db795 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', config = function() diff --git a/lua/plugins/hover.lua b/lua/plugins/hover.lua index b01bc6f..3f107fd 100644 --- a/lua/plugins/hover.lua +++ b/lua/plugins/hover.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'lewis6991/hover.nvim', config = function() diff --git a/lua/plugins/k8s-crd.lua b/lua/plugins/k8s-crd.lua index 0b7978b..427a1d4 100644 --- a/lua/plugins/k8s-crd.lua +++ b/lua/plugins/k8s-crd.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'anasinnyk/nvim-k8s-crd', event = { 'BufReadPre', 'BufNewFile' }, diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index d42b51e..ff3e3b5 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return -- LSP Plugins { @@ -9,6 +10,9 @@ return library = { -- Load luvit types when the `vim.uv` word is found { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + -- Lazy PluginSpec + 'lazy.nvim', + 'LazyVim', }, }, } diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index d7c61a1..da2dae7 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -105,6 +105,7 @@ local function my_fileinfo() return string.format('%s%s %s', ft_icon, filetype, sizeOut) end +--- @type LazySpec | LazySpec[] return { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', config = function() diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 4e4eea1..44601c0 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,6 +1,7 @@ -- Neo-tree is a Neovim plugin to browse the file system -- https://github.com/nvim-neo-tree/neo-tree.nvim +--- @type LazySpec | LazySpec[] return { 'nvim-neo-tree/neo-tree.nvim', version = '*', diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 4da4d9b..87eef4c 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'NeogitOrg/neogit', diff --git a/lua/plugins/ng.lua b/lua/plugins/ng.lua index 7357000..fdb90f7 100644 --- a/lua/plugins/ng.lua +++ b/lua/plugins/ng.lua @@ -1,6 +1,7 @@ -- https://github.com/joeveiga/ng.nvim -- Angular JS support +--- @type LazySpec | LazySpec[] return { { 'joeveiga/ng.nvim', diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua index 8cf4bc4..75463e0 100644 --- a/lua/plugins/noice.lua +++ b/lua/plugins/noice.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'folke/noice.nvim', event = 'VeryLazy', diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua index f2c5c45..74a3f4d 100644 --- a/lua/plugins/nvim-cmp.lua +++ b/lua/plugins/nvim-cmp.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Autocompletion 'hrsh7th/nvim-cmp', event = 'InsertEnter', diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua index d52fb0e..88b045d 100644 --- a/lua/plugins/nvim-lspconfig.lua +++ b/lua/plugins/nvim-lspconfig.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Main LSP Configuration 'neovim/nvim-lspconfig', diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index dc81996..466cac5 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', @@ -10,9 +11,8 @@ return { -- Highlight, edit, and navigate code -- load configs module local configs = require 'nvim-treesitter.configs' - ---@diagnostic disable-next-line: missing-fields configs.setup { - ensure_installed = { 'c', 'diff', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = {}, auto_install = true, -- Modules highlight = { diff --git a/lua/plugins/powershell.lua b/lua/plugins/powershell.lua index 7ec52e9..d5704a0 100644 --- a/lua/plugins/powershell.lua +++ b/lua/plugins/powershell.lua @@ -1,11 +1,10 @@ +--- @type LazySpec | LazySpec[] return { enabled = true, + ft = { 'ps1' }, 'TheLeoP/powershell.nvim', - config = function() - ---@type powershell.user_config - local opts = { - bundle_path = vim.fn.stdpath 'data' .. '/mason/packages/powershell-editor-services', - } - require('powershell').setup(opts) - end, + ---@type powershell.user_config + opts = { + bundle_path = vim.fn.stdpath 'data' .. '/mason/packages/powershell-editor-services', + }, } diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 8a1a47b..d49fe13 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'folke/snacks.nvim', diff --git a/lua/plugins/tabby.lua b/lua/plugins/tabby.lua index 585dfff..5287761 100644 --- a/lua/plugins/tabby.lua +++ b/lua/plugins/tabby.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'nanozuki/tabby.nvim', event = 'VeryLazy', diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index da428cd..79dfbda 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -42,6 +42,7 @@ local function code_files_picker(opts) }, opts)) end +--- @type LazySpec | LazySpec[] return { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 86682e9..5e0b567 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } } diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 4faf8d0..a93ff35 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'akinsho/toggleterm.nvim', diff --git a/lua/plugins/typst-preview.lua b/lua/plugins/typst-preview.lua index 5f5d3c5..2e334cb 100644 --- a/lua/plugins/typst-preview.lua +++ b/lua/plugins/typst-preview.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'chomosuke/typst-preview.nvim', lazy = false, -- or ft = 'typst' diff --git a/lua/plugins/venv-selector.lua b/lua/plugins/venv-selector.lua index 2916576..772358c 100644 --- a/lua/plugins/venv-selector.lua +++ b/lua/plugins/venv-selector.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { { 'linux-cultist/venv-selector.nvim', diff --git a/lua/plugins/vim-sleuth.lua b/lua/plugins/vim-sleuth.lua index 7f814c5..d64dde7 100644 --- a/lua/plugins/vim-sleuth.lua +++ b/lua/plugins/vim-sleuth.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically } diff --git a/lua/plugins/vimtex.lua b/lua/plugins/vimtex.lua index 0f7f615..a5aa313 100644 --- a/lua/plugins/vimtex.lua +++ b/lua/plugins/vimtex.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { 'lervag/vimtex', lazy = false, -- we don't want to lazy load VimTeX diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 72581cf..fccd0cd 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -1,3 +1,4 @@ +--- @type LazySpec | LazySpec[] return { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VeryLazy', -- Sets the loading event to 'VimEnter'