Compare commits

..

102 Commits

Author SHA1 Message Date
franchioping 6c9a94e600 nvimnew 2026-08-01 16:39:24 +01:00
orip f0a2108ed5 Follow symlinks in the custom plugins loader
fixes: #2087
2026-06-11 18:55:49 +03:00
orip ac51593f7a Add checkhealth to bug report step 2026-06-11 17:52:24 +03:00
Ori Perry 4e6bf9497f
Merge pull request #2066 from TomJGooding/chore-add-discussions-to-issue-template
chore: add discussions to issue template
2026-06-11 17:31:42 +03:00
Ori Perry 1f320746e4
Merge pull request #2012 from nvim-lua/feature/mini.icons
Switch from nvim-web-devicons to mini.icons
2026-06-11 17:29:12 +03:00
orip ec3f4489c2 Switch from nvim-web-devicons to mini.icons 2026-06-11 17:28:02 +03:00
orip f660e1f897 Follow symlinks for the neovim config picker
Closes: #2078
2026-06-11 16:52:52 +03:00
orip 7031a09bf9 Split the `foundation` section into `options` and `keymaps` 2026-06-11 16:44:01 +03:00
TomJGooding 97b3cbb790 chore: add discussions to issue template
Now that GitHub discussions have been enabled
(see https://github.com/nvim-lua/kickstart.nvim/issues/2026),
add links in the issue template to help redirect help/feature requests
from the bug tracker.
2026-05-28 01:45:20 +01:00
Ori Perry cfdc17be3a
Merge pull request #1982 from nathanzeng/jump-diagnostic
fix: deprecated diagnostic jumping config
2026-05-07 00:10:03 +03:00
Nathan Zeng a5d4d12c8c fix: deprecated diagnostic jumping config 2026-05-07 00:03:18 +03:00
Ori Perry 174b5fa2b1
Merge pull request #2005 from nvim-lua/refactor/vim.pack
Refactor/vim.pack
2026-05-06 23:48:20 +03:00
orip 2fccee4349 Split the vim.pack.add call and move each part to the relevant sections 2026-05-05 01:25:21 +03:00
orip 2e8d5b17cb Split into sections 2026-05-05 01:24:17 +03:00
orip a42ed30a09 Update the explanations and docs 2026-05-05 01:22:42 +03:00
orip 716d7465c0 Enable vim.loader for faster loading time 2026-05-05 01:18:15 +03:00
orip c4605421e5 Migrate to vim.pack 2026-05-05 01:18:15 +03:00
orip cd7adee3ce Refactor and update some of the comments 2026-05-05 01:17:59 +03:00
orip 4b065ad2f7 Fix mini.ai example 2026-04-22 17:59:57 +03:00
orip 9b4fbc5021 Fix conflicts between built-in incremental selection and mini.ai keymaps
closes #1996
closes #1992
2026-04-18 13:30:10 +03:00
Ori Perry f5b0e497c6
Merge pull request #1991 from nvim-lua/refactor/conform
Refactor/conform
2026-04-18 13:11:40 +03:00
orip ce353a9b0e Change format_on_save to a whitelist instead of a blacklist 2026-04-16 22:02:25 +03:00
orip 459b86865e Use stylua as an lsp formatter instead of an external formatter 2026-04-16 22:02:24 +03:00
Stattek 648471c9eb
Fix descriptions of gitsigns keymappings (#1997)
* Fix descriptions of keymappings

* Fix capitalization
2026-04-15 11:49:09 +03:00
orip f27810d1bd Fix treesitter indents
Thanks @jackHerby for the report
fixes #1995
2026-04-15 03:44:17 +03:00
Ori Perry c0cc054155
Merge pull request #1988 from sebastianstudniczek/fix/treesitter-indent-fallback
fix(treesitter): Add indentation fallback
2026-04-12 16:32:28 +03:00
Sebastian Studniczek c7f05a0f47 Add indentation fallback 2026-04-10 20:06:22 +02:00
Ori Perry 16dd8f5007 Add a comment to the line plugin about installing markdownlint 2026-03-31 23:49:19 +03:00
Ori Perry d3168308d4 Update the recommanded gitsigns keybinds
closes #1459
2026-03-31 23:41:40 +03:00
Ori Perry e01e1eb8f8 Auto install treesitter parsers when opening a file
closes #1951
2026-03-20 22:03:32 +02:00
Ori Perry 8ac4b12632 Refactor treesitter attach code 2026-03-20 21:59:19 +02:00
Ori Perry 0619d89884
Merge pull request #1914 from rmacklin/futher-clarify-gitignore-comment
Revise comment for lazy-lock.json in .gitignore
2026-03-20 12:59:54 +02:00
Ori Perry 58170c7ae3 Fix stylua 2026-03-10 22:12:41 +02:00
Richard Macklin 164cedf212 Revise comment for lazy-lock.json in .gitignore
This is a follow-up to df9436c0e5 to
hopefully make things even clearer.

Co-authored-by: Ori Perry <oriori1703@gmail.com>
2026-03-10 11:33:34 -07:00
Ori Perry 431cf2e881 Fix formating of plugins 2026-03-10 19:00:43 +02:00
Ori Perry d132bd3e9f
Merge pull request #1928 from nathanzeng/fix-lsp-blink-dependency
Remove blink from nvim-lspconfig dependencies
2026-03-10 17:34:11 +02:00
Ori Perry f7b74c7b83 Fix typo in the README 2026-03-10 15:18:41 +02:00
Ori Perry b212fdb33f
Merge pull request #1925 from nathanzeng/which-key-gitsigns
Clarify gitsigns keymap for which-key
2026-03-10 15:17:46 +02:00
Nathan Zeng d97de4f0ae Remove blink from nvim-lspconfig dependencies 2026-03-07 20:52:02 -08:00
Nathan Zeng 886f2bc076 Clarify gitsigns keymap for which-key 2026-03-06 19:18:40 -08:00
Ori Perry dabce46993 Add underline for warnings 2026-02-28 13:48:43 +02:00
Ori Perry 7cc245ecaf Format the dap keybinds 2026-02-28 11:32:40 +02:00
Ori Perry 86f1ba26f2 Improve undofile comment 2026-02-28 11:31:21 +02:00
Ori Perry 9a3a2f9678 Update the github actions 2026-02-28 11:29:58 +02:00
Ori Perry 1f4c21f463 Don't extend lsp capabilities because blink does it internally 2026-02-27 23:27:25 +02:00
Ori Perry 4021496050 Add treesitter indentation 2026-02-27 22:56:57 +02:00
Ori Perry a6dcf6874b Attach treesitter using language name instead of filetype 2026-02-27 21:36:39 +02:00
Ori Perry 966d5e94b1 Add installtion instructions for `tree-sitter-cli` to the README.md 2026-02-27 21:21:59 +02:00
Ori Perry a4bbfdc3db
Merge pull request #1896 from giogt/fix-gitignore-lazylock-comment
Clarify comment in .gitignore for lazy-lock.json
2026-02-27 21:09:55 +02:00
Ori Perry 80b1ee1789 Add 'gr' group to which-keys
Adds 'gr' to which-keys documentation, so users can see that LSP actions are grouped after 'gr' key binds.

Co-authored-by: thiago-negri <evohunz@gmail.com>
2026-02-27 21:04:07 +02:00
Ori Perry 09ab9ae265 Fix typo 2026-02-27 20:55:53 +02:00
Ori Perry afc734f993
Merge pull request #1494 from oriori1703/feature/type-hints
Add type hints to plugin options where possible
2026-02-27 20:51:08 +02:00
orip 177ff61483 Add type hints to plugin options where possible
This could help beginners to get autocompletion, catch mistakes earlier,
and allow them to skip the docs for simple configs.

This is not perfect because a lot of the plugins type all of their keys
as required, even though they have defaults, but this is good enough.
2026-02-27 20:43:08 +02:00
Ori Perry b9f3965282 Clean up the lua_ls config 2026-02-27 20:12:40 +02:00
Ori Perry 1ba1789318 Re-add mason-lspconfig 2026-02-27 19:56:55 +02:00
giogt df9436c0e5 Clarify comment in .gitignore for lazy-lock.json
The current comment in .gitignore for lazy-lock.json suggests to
uncomment it yourself, but you actually need to comment it instead.

This change modifies the comment to clarify the recommended approach for
kickstart users.
2026-02-22 23:28:15 +00:00
TJ DeVries e79572c9e6 fix: continue cleaning up docs and config 2026-01-27 12:09:56 -05:00
TJ DeVries 7e54a4c5c8 fix: trimming down config and updating stylua 2026-01-27 12:00:59 -05:00
Francesc Elies 8c6b78c770
feat(grep-string): works with visual selection too (#1605) 2026-01-27 10:55:15 -05:00
Mithrandir2k18 560d9dc894
docs: Document methods to get the latest neovim (#1626) 2026-01-27 10:49:58 -05:00
TJ DeVries 21d5aabc22 fix: simplify diagnostic config 2026-01-27 10:49:00 -05:00
TJ DeVries 318bd3e65c fix: update neovim min required version 2026-01-27 10:42:05 -05:00
TJ DeVries e87b7281ed
feat: move Telescope config to be contained by plugin (#1843)
* move telescope related lsp functions inside the telscope plugin declaration block

* explicitly enable telescope plugin, add some comments explainging why

* update comments with suggestions from @oriori1703

Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com>

* fix formatting in accordance to stylua so that pipeline passes

---------

Co-authored-by: Philipp Szechenyi <philipp.szechenyi@cgm.com>
Co-authored-by: Philipp Szechenyi <45265588+szechp@users.noreply.github.com>
Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com>
Co-authored-by: philipp <philipp@philipps-MacBook-Pro.local>
2026-01-27 10:33:53 -05:00
Cameron Cummings 88c65592ae
chore: Add .DS_Store to .gitignore (#1637) 2026-01-27 10:10:49 -05:00
Derrek b15cca8d31
chore: fix help tag (#1671) 2026-01-27 10:09:58 -05:00
rheia475 8f479db123
feat: add Telescope binding for searching through commands (#1675) 2026-01-27 10:08:09 -05:00
TJ DeVries 35822809e6 fix: remove deprecated methods 2026-01-27 10:07:04 -05:00
TJ DeVries b2af42acb3 fix: call setup on guess indent 2026-01-27 10:01:39 -05:00
Evgeni Chasnovski c8e189ff78
fix: adjust after 'mini.nvim' transfer to 'nvim-mini' org (#1713) 2026-01-27 09:58:30 -05:00
TJ DeVries ad246eb5dd fix: remove mason-lspconfig, we do not need it anymore 2026-01-27 09:55:59 -05:00
TJ DeVries 0c17d320bb maybe: seeing if we can get away without lazydev and just doing simpler setup 2026-01-27 09:52:00 -05:00
TJ DeVries 7ea937dbc5 fix: as far as i can tell i updated to the right tree sitter stuff 2026-01-27 09:29:57 -05:00
Yassine Zouggari 3ddda4a8b8
update: remove client_supports_method (#1810)
Neovim 0.11 is now stable
2026-01-27 09:19:51 -05:00
TJ DeVries 5740ddcf9c note: add info about why we ignore lazy-lock 2026-01-27 09:19:08 -05:00
Advin Suryavanshi 2d541c4140
fix: update main module reference for nvim-treesitter (#1832)
configs -> config in init.lua
2026-01-27 09:17:34 -05:00
Carlos Calla Alarcón 3338d39206
Update remaining Mason's old address (#1530) 2025-05-22 17:10:04 -04:00
Omri Sarig 6ba2408cdf
fix: rename vim.highlight.on_yank to vim.hl.on_yank (#1482)
The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.

Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.

Co-authored-by: Omri Sarig <omri.sarig@prevas.dk>
2025-05-10 20:29:04 -04:00
Damjan 9000 f5a9f9cdc6
README: mention fd-find in requirements (#1477)
Fixes #1476
2025-05-10 20:23:54 -04:00
pynappo fb73617653
don't lazy-load neo-tree so netrw hijacking on startup works (#1489) 2025-05-10 20:18:04 -04:00
Ori Perry c92ea7ca97
Replace vim.opt with vim.o (#1495)
* Replace vim.opt with vim.o

Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)

* Add type hint for vim.opt.rtp

* Add a comment about using vim.opt instead of vim.o
2025-05-10 20:16:03 -04:00
guru245 2b2f0f8364
feat: switch vim-sleuth for guess-indent.nvim (#1512) 2025-05-10 20:11:50 -04:00
guru245 76cb865e4f
Change to Mason's new address (#1516) 2025-05-09 19:41:44 -04:00
Liam Dyer d350db2449
feat: switch nvim-cmp for blink.cmp (#1426) 2025-04-09 17:25:57 -04:00
Dmytro Onypko 9929044f24
Remove Telescope `0.1` branch lock (#1448) 2025-04-09 11:05:40 -04:00
Theo P. 1a5787bc57
Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (#1427)
* refactor: change LSP keybindings to the default gr bindings introduced in 0.11

* refactor: modify existing LSP functions to follow  convention
2025-04-09 11:01:57 -04:00
dasvh 8a5a52f647
fix: minor misspellings (#1450)
* fix: minor misspellings

* revert change for `-Bbuild`
2025-04-09 10:39:17 -04:00
Sander e947649cb0
feat(keymap): move windows without `<C-w>` (#1368) 2025-03-24 15:34:57 -04:00
RulentWave 5e2d7e184b
changed Conform's format_on_save lambda so that buffers that match disable_filetypes return nil. This allows you to enable a formatter for langages in the disable_filetypes table to have a formatter that can be run manually with Leader-f but doesnt enable format_on_save for them (#1395) 2025-03-24 15:33:53 -04:00
Luca Saccarola 2abcb39fae
fix: use correct github abmonition syntax (#1414) 2025-03-20 18:16:35 -04:00
Crypto-Spartan 38f4744e25
feat: add `vim.opt.confirm = true` (#1384) 2025-03-12 17:24:44 -04:00
Chris Patti 34e7d29aa7
Propsed fix for init.lua warnings as per https://github.com/nvim-lua/kickstart.nvim/issues/1305#issuecomment-2657770325 (#1354) 2025-02-19 09:40:16 -05:00
Ari Pollak ea60b2b01f
Remove duplicate cmp-path (#1369) 2025-02-19 09:38:58 -05:00
Jonas Zeltner e64aa51ef2
fix: regression introduced in db78c0b217 (#1367) 2025-02-18 11:15:13 -05:00
Aryan Rajoria 7c49ba1cb7
Fix: fix the cmp-nvim-lsp-signature-help link (#1363) 2025-02-18 00:05:15 -05:00
Rob 282cbb9c82
feat: add basic function signature help (#1358)
* feat: add basic function signature help

* Update init.lua

Co-authored-by: makeworld <25111343+makew0rld@users.noreply.github.com>

---------

Co-authored-by: makeworld <25111343+makew0rld@users.noreply.github.com>
2025-02-17 19:12:06 -05:00
Joaquín Guerra ebca680dea
perf: load tokyonight.nvim in the intended way (#1360)
Fixes #1357
2025-02-17 19:10:48 -05:00
GeloCraft 76e06fec5c
feat(diagnostic): add diagnostic config (#1335)
Co-authored-by: gelocraft <gelocraft@users.noreply.github.com>
2025-02-17 13:01:07 -05:00
Jonas Zeltner db78c0b217
fix: arguments for the `vim.lsp.Client.supports_method` method (#1356) 2025-02-16 22:42:19 -05:00
Chris Patti d2c006819a
Add a blurb about installing missing emoji on Ubuntu
Right next to the nerdfonts blurb as requested.
2025-02-16 22:37:44 -05:00
Erlan Rangel 94f551b803
fix (#1319): gitsigns deprecated functions (#1321)
- This commit change two functions that are marked as deprecated now:
`gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
2025-02-15 00:48:37 -05:00
bleacheda 71ad926ab1
docs: clarify using opts = {} vs config = function() ... require('plu… (#1316)
* docs: clarify using opts = {} vs config = function() ... require('plugin').setup({}) .. end

The current documentation mentioning that using "require" is equivalent to using "opts" without detailing the use in the "config = function()" block seems inaccurate.
Lower in the configuration the "config = function()" block is used without clarifying why it needed and what it does.
This clarification may help new users understand the difference between the two, or how and where to place the "require" statement.

* Update init.lua

* remove whitespace
2025-02-14 22:32:50 -05:00
Ryan Nevius abdbfce0f8
chore(docs): Update README.md (#1344)
Neovim has renamed the "linux64" binary to "linux-x86_64".
2025-02-14 22:23:31 -05:00
30 changed files with 1316 additions and 1835 deletions

View File

@ -10,9 +10,11 @@ assignees: ''
<!-- Any bug report not following this template will be immediately closed. Thanks --> <!-- Any bug report not following this template will be immediately closed. Thanks -->
## Before Reporting an Issue ## Before Reporting an Issue
- I have read the kickstart.nvim README.md. - I have read the kickstart.nvim README.md.
- I have read the appropriate plugin's documentation. - I have read the appropriate plugin's documentation.
- I have searched that this issue has not been reported before. - I have searched that this issue has not been reported before.
- I have ran `:checkhealth` and so no obvious issue.
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.** - [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**

10
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: Help
url: https://github.com/nvim-lua/kickstart.nvim/discussions/categories/q-a
about: Ask the community for help
- name: Ideas
url: https://github.com/nvim-lua/kickstart.nvim/discussions/categories/ideas
about: Share ideas for new features

View File

@ -9,13 +9,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v2 uses: actions/checkout@v6
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Stylua Check - name: Stylua Check
uses: JohnnyMorganz/stylua-action@v3 uses: JohnnyMorganz/stylua-action@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
version: latest version: latest
args: --check . args: --check .

9
.gitignore vendored
View File

@ -4,4 +4,11 @@ test.sh
nvim nvim
spell/ spell/
lazy-lock.json
# In your personal fork, you likely want to comment this, since it's recommended to track
# nvim-pack-lock.json in version control - see :help vim.pack-lockfile
# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded
# merge conflicts.
nvim-pack-lock.json
.DS_Store

View File

@ -4,3 +4,4 @@ indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferSingle" quote_style = "AutoPreferSingle"
call_parentheses = "None" call_parentheses = "None"
collapse_simple_statement = "Always"

200
README.md
View File

@ -1,9 +1,5 @@
# kickstart.nvim # kickstart.nvim
```sh
git clone ssh://git@forgejo.galard.uk:222/franchioping/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
```
## Introduction ## Introduction
A starting point for Neovim that is: A starting point for Neovim that is:
@ -21,29 +17,39 @@ A starting point for Neovim that is:
Kickstart.nvim targets *only* the latest Kickstart.nvim targets *only* the latest
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
If you are experiencing issues, please make sure you have the latest versions. 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 External Dependencies
External Requirements: External Requirements:
* Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
* [ripgrep](https://github.com/BurntSushi/ripgrep#installation) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
* Clipboard tool (xclip/xsel/win32yank or other depending on the platform) [fd-find](https://github.com/sharkdp/fd#installation)
* A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - [tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md#installation)
* if you have it set `vim.g.have_nerd_font` in `init.lua` to true - Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
* Language Setup: - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
* If you want to write Typescript, you need `npm` - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
* If you want to write Golang, you will need `go` - Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
* etc. - Language Setup:
- If you want to write Typescript, you need `npm`
- If you want to write Golang, you will need `go`
- etc.
> **NOTE** > [!NOTE]
> See [Install Recipes](#install-recipes) for additional Windows and Linux specific notes > See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
> and quick install snippets > and quick install snippets
### Install Kickstart ### Install Kickstart
> **NOTE** > [!NOTE]
> [Backup](#faq) your previous configuration (if any exists) > [Backup](#FAQ) your previous configuration (if any exists)
Neovim's configurations are located under the following paths, depending on your OS: Neovim's configurations are located under the following paths, depending on your OS:
@ -59,17 +65,17 @@ Neovim's configurations are located under the following paths, depending on your
so that you have your own copy that you can modify, then install by cloning the 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. fork to your machine using one of the commands below, depending on your OS.
> **NOTE** > [!NOTE]
> Your fork's URL will be something like this: > Your fork's URL will be something like this:
> `https://github.com/<your_github_username>/kickstart.nvim.git` > `https://github.com/<your_github_username>/kickstart.nvim.git`
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file You likely want to remove `nvim-pack-lock.json` from your fork's `.gitignore`
too - it's ignored in the kickstart repo to make maintenance easier, but it's file too - it's ignored in the kickstart repo to make maintenance easier, but
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). it's recommended to track it in version control (see `:help vim.pack-lockfile`).
#### Clone kickstart.nvim #### Clone kickstart.nvim
>
> **NOTE** > [!NOTE]
> If following the recommended step above (i.e., forking the repo), replace > If following the recommended step above (i.e., forking the repo), replace
> `nvim-lua` with `<your_github_username>` in the commands below > `nvim-lua` with `<your_github_username>` in the commands below
@ -105,8 +111,10 @@ Start Neovim
nvim nvim
``` ```
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view That's it! `vim.pack` will install all the plugins from your config. Use
the current plugin status. Hit `q` to close the window. `:lua vim.pack.update(nil, { offline = true })` to inspect plugin state and
`:lua vim.pack.update()` to fetch updates (`:write` applies updates, `:quit`
cancels them).
#### Read The Friendly Documentation #### Read The Friendly Documentation
@ -117,6 +125,7 @@ examples of adding popularly requested plugins.
> [!NOTE] > [!NOTE]
> For more information about a particular plugin check its repository's documentation. > For more information about a particular plugin check its repository's documentation.
### Getting Started ### Getting Started
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) [The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
@ -131,17 +140,16 @@ examples of adding popularly requested plugins.
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` * 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 to maintain multiple configurations. For example, you can install the kickstart
configuration in `~/.config/nvim-kickstart` and create an alias: configuration in `~/.config/nvim-kickstart` and create an alias:
``` ```
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
``` ```
When you run Neovim using `nvim-kickstart` alias it will use the alternative When you run Neovim using `nvim-kickstart` alias it will use the alternative
config directory and the matching local directory config directory and the matching local directory
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
distribution that you would like to try out. distribution that you would like to try out.
* What if I want to "uninstall" this configuration: * What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information * Remove your config directory and local data directory (for example,
`~/.config/nvim` and `~/.local/share/nvim`).
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? * 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 * 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. configuration that someone can easily use to `git clone` as a basis for their own.
@ -162,18 +170,36 @@ After installing all the dependencies continue with the [Install Kickstart](#ins
#### Windows Installation #### Windows Installation
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary> <details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
Installation may require installing build tools and updating the run command for `telescope-fzf-native` Kickstart's default config is make-only for `telescope-fzf-native.nvim`.
If `make` is unavailable, the plugin is skipped.
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) Recommended: install `make` (see the chocolatey section below).
This requires: If you want a CMake-only setup, customize `init.lua` in two places:
* Install CMake and the Microsoft C++ Build Tools on Windows 1. Include `telescope-fzf-native.nvim` when `cmake` is available:
```lua ```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' } if vim.fn.executable 'make' == 1 or vim.fn.executable 'cmake' == 1 then
table.insert(plugins, gh 'nvim-telescope/telescope-fzf-native.nvim')
end
``` ```
2. In the `PackChanged` hook, use CMake when `make` is unavailable:
```lua
if name == 'telescope-fzf-native.nvim' then
if vim.fn.executable 'make' == 1 then
run_build(name, { 'make' }, ev.data.path)
elseif vim.fn.executable 'cmake' == 1 then
run_build(name, { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' }, ev.data.path)
run_build(name, { 'cmake', '--build', 'build', '--config', 'Release', '--target', 'install' }, ev.data.path)
end
return
end
```
See `telescope-fzf-native` documentation for [build details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation).
</details> </details>
<details><summary>Windows with gcc/make using chocolatey</summary> <details><summary>Windows with gcc/make using chocolatey</summary>
Alternatively, one can install gcc and make which don't require changing the config, Alternatively, one can install gcc and make which don't require changing the config,
@ -182,18 +208,15 @@ the easiest way is to use choco:
1. install [chocolatey](https://chocolatey.org/install) 1. install [chocolatey](https://chocolatey.org/install)
either follow the instructions on the page or use winget, either follow the instructions on the page or use winget,
run in cmd as **admin**: run in cmd as **admin**:
``` ```
winget install --accept-source-agreements chocolatey.chocolatey winget install --accept-source-agreements chocolatey.chocolatey
``` ```
2. install all requirements using choco, exit the previous cmd and 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**: 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 choco install -y neovim git ripgrep wget fd unzip gzip mingw make tree-sitter
``` ```
</details> </details>
<details><summary>WSL (Windows Subsystem for Linux)</summary> <details><summary>WSL (Windows Subsystem for Linux)</summary>
@ -202,52 +225,121 @@ wsl --install
wsl wsl
sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo add-apt-repository ppa:neovim-ppa/unstable -y
sudo apt update sudo apt update
sudo apt install make gcc ripgrep unzip git xclip neovim sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim
``` ```
</details> </details>
#### Linux Install #### Linux Install
<details><summary>Ubuntu Install Steps</summary> <details><summary>Ubuntu Install Steps</summary>
``` ```
sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo add-apt-repository ppa:neovim-ppa/unstable -y
sudo apt update sudo apt update
sudo apt install make gcc ripgrep unzip git xclip neovim sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim
``` ```
</details> </details>
<details><summary>Debian Install Steps</summary> <details><summary>Debian Install Steps</summary>
``` ```
sudo apt update sudo apt update
sudo apt install make gcc ripgrep unzip git xclip curl sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip curl
# Now we install nvim # Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux64 sudo rm -rf /opt/nvim-linux-x86_64
sudo mkdir -p /opt/nvim-linux64 sudo mkdir -p /opt/nvim-linux-x86_64
sudo chmod a+rX /opt/nvim-linux64 sudo chmod a+rX /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux64.tar.gz sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
# make it available in /usr/local/bin, distro installs to /usr/bin # make it available in /usr/local/bin, distro installs to /usr/bin
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
``` ```
</details> </details>
<details><summary>Fedora Install Steps</summary> <details><summary>Fedora Install Steps</summary>
``` ```
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim sudo dnf install -y gcc make git ripgrep fd-find tree-sitter-cli unzip neovim
``` ```
</details> </details>
<details><summary>Arch Install Steps</summary> <details><summary>Arch Install Steps</summary>
``` ```
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim sudo pacman -S --noconfirm --needed gcc make git ripgrep fd tree-sitter-cli unzip neovim
```
</details>
### Alternative neovim installation methods
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).
<details><summary>Bob</summary>
[Bob](https://github.com/MordechaiHadad/bob) is a Neovim version manager for
all platforms. 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
``` ```
</details> </details>
<details><summary>Homebrew</summary>
[Homebrew](https://brew.sh) is a package manager popular on Mac and Linux.
Simply install using [`brew install`](https://formulae.brew.sh/formula/neovim).
</details>
<details><summary>Flatpak</summary>
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).
</details>
<details><summary>asdf and mise-en-place</summary>
[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:
<details><summary>mise</summary>
[Install mise](https://mise.jdx.dev/getting-started.html), then run:
```bash
mise plugins install neovim
mise use neovim@stable
```
</details>
<details><summary>asdf</summary>
[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
```
</details>
</details>

View File

@ -1,2 +0,0 @@
vim.opt_local.spell = true
vim.opt_local.spelllang = { 'en_us', 'pt_PT' }

1294
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
{
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "ffe26e8df8115c9665d24231f8a49fadb2d611ce" },
"esp32.nvim": { "branch": "main", "commit": "7b929bd908ba7358b073d1923832cd8d2e682503" },
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"leetcode.nvim": { "branch": "master", "commit": "fdd3f91800b3983e27bc9fcfb99cfa7293d7f11a" },
"luasnip-latex-snippets.nvim": { "branch": "main", "commit": "57e4330f967da6ac64bf9b05b06ecb3c4a120ec3" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0b9bb925c000ae649ff7e7149c8cd00031f4b539" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"mini.nvim": { "branch": "main", "commit": "e27fcecf6cbffd8ed391bdf0eb746fdb5b9bfa44" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-lint": { "branch": "master", "commit": "ebe535956106c60405b02220246e135910f6853d" },
"nvim-lspconfig": { "branch": "master", "commit": "9c923997123ff9071198ea3b594d4c1931fab169" },
"nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"vimtex": { "branch": "master", "commit": "32bcb3922c20588e00de68f73c86312eda2141ad" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@ -1,57 +0,0 @@
return {
-- {
-- 'akinsho/toggleterm.nvim',
-- version = '*',
-- opts = {--[[ things you want to change go here]]
-- },
-- keys = {
-- { '<leader>t', ':ToggleTerm direction=float<CR>', desc = 'Terminal', silent = true },
-- },
-- config = function()
-- local opts = { buffer = 0 }
-- vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
-- vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
-- vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
-- vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
-- vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
-- vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
-- vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
-- end,
-- },
{
'windwp/nvim-ts-autotag',
},
{
'uga-rosa/ccc.nvim',
config = function()
local ccc = require 'ccc'
ccc.setup {
highlighter = {
auto_enable = true,
lsp = true,
},
}
end,
},
{
'kylechui/nvim-surround',
version = '^3.0.0', -- Use for stability; omit to use `main` branch for the latest features
event = 'VeryLazy',
config = function()
require('nvim-surround').setup {
-- Configuration here, or leave empty to use defaults
}
end,
},
{
'Aietes/esp32.nvim',
opts = {
build_dir = 'build',
},
},
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
},
}

View File

@ -0,0 +1,13 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
-- Iterate over all Lua files in the plugins directory and load them
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
for file_name, type in vim.fs.dir(plugins_dir, { follow = true }) do
if (type == 'file' or type == 'link') and file_name:match '%.lua$' and file_name ~= 'init.lua' then
local module = file_name:gsub('%.lua$', '')
require('custom.plugins.' .. module)
end
end

View File

@ -1,3 +1,4 @@
-- local function map(mode, lhs, rhs, opts) -- local function map(mode, lhs, rhs, opts)
-- local options = { noremap = true, silent = true } -- local options = { noremap = true, silent = true }
-- if opts then -- if opts then
@ -15,15 +16,7 @@
vim.keymap.set({ 'x', 'n' }, '<leader>d', '"_d', { remap = false, desc = 'Delete without copying' }) vim.keymap.set({ 'x', 'n' }, '<leader>d', '"_d', { remap = false, desc = 'Delete without copying' })
local operator_rhs = function() vim.keymap.set({'x','n'}, '<leader>/', 'gcc', { remap = true, desc = 'Toggle comment line' })
return require('vim._comment').operator()
end
vim.keymap.set({ 'x' }, '<leader>/', operator_rhs, { expr = true, desc = 'Toggle comment' })
local line_rhs = function()
return require('vim._comment').operator() .. '_'
end
vim.keymap.set('n', '<leader>/', line_rhs, { expr = true, desc = 'Toggle comment line' })
vim.g.tex_flavor = 'latex' vim.g.tex_flavor = 'latex'
@ -50,3 +43,7 @@ local list_all_snips = function()
end end
vim.api.nvim_create_user_command('SnipListAll', list_all_snips, {}) vim.api.nvim_create_user_command('SnipListAll', list_all_snips, {})
vim.keymap.set('n', '<leader>e', function()
require('neo-tree.command').execute({ toggle = true })
end, { desc = 'Explorer', silent = true })

View File

@ -1,39 +0,0 @@
return {
{
'lervag/vimtex',
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
init = function()
-- VimTeX configuration goes here, e.g.
vim.g.vimtex_view_method = 'zathura'
end,
config = function()
vim.g.vimtex_compiler_latexmk = { ['out_dir'] = '/home/flima/Notes/build' }
end,
},
-- {
-- 'franchioping/luasnip-latex-snippets.nvim',
-- dev = true,
-- },
{
'iurimateus/luasnip-latex-snippets.nvim',
-- vimtex isn't required if using treesitter
requires = { 'L3MON4D3/LuaSnip', 'lervag/vimtex' },
config = function()
require('luasnip-latex-snippets').setup()
-- or setup({ use_treesitter = true })
require('luasnip').config.setup { enable_autosnippets = true }
end,
},
-- {
-- 'iurimateus/luasnip-latex-snippets.nvim',
-- -- vimtex isn't required if using treesitter
-- requires = { 'L3MON4D3/LuaSnip', 'lervag/vimtex' },
-- config = function()
-- require('luasnip-latex-snippets').setup()
-- -- or setup({ use_treesitter = true })
-- require('luasnip').config.setup { enable_autosnippets = true }
-- end,
-- },
}

View File

@ -1,22 +0,0 @@
return {
{
'kawre/leetcode.nvim',
build = ':TSUpdate html', -- if you have `nvim-treesitter` installed
dependencies = {
'nvim-telescope/telescope.nvim',
-- "ibhagwan/fzf-lua",
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim',
'nvim-treesitter/nvim-treesitter',
},
opts = {
-- configuration goes here
injector = {
['cpp'] = {
before = { '#include <bits/stdc++.h>', 'using namespace std;' },
after = 'int main() {}',
},
},
},
},
}

View File

@ -1,22 +0,0 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
cmd = 'Neotree',
keys = {
{ '<leader>e', ':Neotree toggle<CR>', desc = 'Explorer', silent = true },
},
},
}

View File

@ -0,0 +1,2 @@
vim.pack.add { 'https://github.com/nvim-tree/nvim-web-devicons' }

View File

@ -1,32 +0,0 @@
return {
'debugloop/telescope-undo.nvim',
dependencies = { -- note how they're inverted to above example
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
},
},
keys = {
{ -- lazy style key map
'<leader>fu',
'<cmd>Telescope undo<cr>',
desc = 'Telescope Undo History',
},
},
opts = {
-- don't use `defaults = { }` here, do this in the main telescope spec
extensions = {
undo = {
-- telescope-undo.nvim config, see below
},
-- no other extensions here, they can have their own spec too
},
},
config = function(_, opts)
-- Calling telescope's setup from multiple specs does not hurt, it will happily merge the
-- configs for us. We won't use data, as everything is in it's own namespace (telescope
-- defaults, as well as each extension).
require('telescope').setup(opts)
require('telescope').load_extension 'undo'
end,
}

View File

@ -0,0 +1,31 @@
vim.pack.add({
"https://github.com/ellisonleao/gruvbox.nvim"
})
require("gruvbox").setup(
{
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
-- inverse = true, -- invert background for search, diffs, statuslines and errors
-- contrast = "", -- can be "hard", "soft" or empty string
-- palette_overrides = {},
-- overrides = {},
dim_inactive = false,
-- transparent_mode = false,
}
)
vim.cmd.colorscheme("gruvbox")

View File

@ -12,7 +12,7 @@ local check_version = function()
return return
end end
if vim.version.ge(vim.version(), '0.10-dev') then if vim.version.ge(vim.version(), '0.12') then
vim.health.ok(string.format("Neovim version is: '%s'", verstr)) vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))

View File

@ -1,16 +1,5 @@
-- autopairs -- autopairs
-- https://github.com/windwp/nvim-autopairs -- https://github.com/windwp/nvim-autopairs
return { vim.pack.add { 'https://github.com/windwp/nvim-autopairs' }
'windwp/nvim-autopairs',
event = 'InsertEnter',
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {} require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
}

View File

@ -6,78 +6,25 @@
-- be extended to other languages as well. That's why it's called -- be extended to other languages as well. That's why it's called
-- kickstart.nvim and not kitchen-sink.nvim ;) -- kickstart.nvim and not kitchen-sink.nvim ;)
return { vim.pack.add {
-- NOTE: Yes, you can install new plugins here! 'https://github.com/mfussenegger/nvim-dap',
'mfussenegger/nvim-dap', 'https://github.com/rcarriga/nvim-dap-ui',
-- NOTE: And you can specify dependencies as well 'https://github.com/nvim-neotest/nvim-nio',
dependencies = { 'https://github.com/mason-org/mason.nvim',
-- Creates a beautiful debugger UI 'https://github.com/jay-babu/mason-nvim-dap.nvim',
'rcarriga/nvim-dap-ui', 'https://github.com/leoluz/nvim-dap-go',
}
-- Required dependency for nvim-dap-ui
'nvim-neotest/nvim-nio',
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
keys = {
-- Basic debugging keymaps, feel free to change to your liking! -- Basic debugging keymaps, feel free to change to your liking!
{ vim.keymap.set('n', '<F5>', function() require('dap').continue() end, { desc = 'Debug: Start/Continue' })
'<F5>', vim.keymap.set('n', '<F1>', function() require('dap').step_into() end, { desc = 'Debug: Step Into' })
function() vim.keymap.set('n', '<F2>', function() require('dap').step_over() end, { desc = 'Debug: Step Over' })
require('dap').continue() vim.keymap.set('n', '<F3>', function() require('dap').step_out() end, { desc = 'Debug: Step Out' })
end, vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end, { desc = 'Debug: Toggle Breakpoint' })
desc = 'Debug: Start/Continue', vim.keymap.set('n', '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, { desc = 'Debug: Set Breakpoint' })
},
{
'<F1>',
function()
require('dap').step_into()
end,
desc = 'Debug: Step Into',
},
{
'<F2>',
function()
require('dap').step_over()
end,
desc = 'Debug: Step Over',
},
{
'<F3>',
function()
require('dap').step_out()
end,
desc = 'Debug: Step Out',
},
{
'<leader>b',
function()
require('dap').toggle_breakpoint()
end,
desc = 'Debug: Toggle Breakpoint',
},
{
'<leader>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. -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
{ vim.keymap.set('n', '<F7>', function() require('dapui').toggle() end, { desc = 'Debug: See last session result.' })
'<F7>',
function()
require('dapui').toggle()
end,
desc = 'Debug: See last session result.',
},
},
config = function()
local dap = require 'dap' local dap = require 'dap'
local dapui = require 'dapui' local dapui = require 'dapui'
@ -100,11 +47,13 @@ return {
-- Dap UI setup -- Dap UI setup
-- For more information, see |:help nvim-dap-ui| -- For more information, see |:help nvim-dap-ui|
---@diagnostic disable-next-line: missing-fields
dapui.setup { dapui.setup {
-- Set icons to characters that are more likely to work in every terminal. -- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :) -- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices. -- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' }, icons = { expanded = '', collapsed = '', current_frame = '*' },
---@diagnostic disable-next-line: missing-fields
controls = { controls = {
icons = { icons = {
pause = '', pause = '',
@ -144,5 +93,3 @@ return {
detached = vim.fn.has 'win32' == 0, detached = vim.fn.has 'win32' == 0,
}, },
} }
end,
}

View File

@ -2,10 +2,9 @@
-- NOTE: gitsigns is already included in init.lua but contains only the base -- NOTE: gitsigns is already included in init.lua but contains only the base
-- config. This will add also the recommended keymaps. -- config. This will add also the recommended keymaps.
return { vim.pack.add { 'https://github.com/lewis6991/gitsigns.nvim' }
{
'lewis6991/gitsigns.nvim', require('gitsigns').setup {
opts = {
on_attach = function(bufnr) on_attach = function(bufnr)
local gitsigns = require 'gitsigns' local gitsigns = require 'gitsigns'
@ -34,28 +33,25 @@ return {
-- Actions -- Actions
-- visual mode -- visual mode
map('v', '<leader>hs', function() map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' })
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' })
end, { desc = 'git [s]tage hunk' })
map('v', '<leader>hr', function()
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
end, { desc = 'git [r]eset hunk' })
-- normal mode -- normal mode
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) map('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' })
map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end, { desc = 'git [b]lame line' })
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
map('n', '<leader>hD', function() map('n', '<leader>hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' })
gitsigns.diffthis '@' map('n', '<leader>hQ', function() gitsigns.setqflist 'all' end, { desc = 'git hunk [Q]uickfix list (all files in repo)' })
end, { desc = 'git [D]iff against last commit' }) map('n', '<leader>hq', gitsigns.setqflist, { desc = 'git hunk [q]uickfix list (all changes in this file)' })
-- Toggles -- Toggles
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' }) map('n', '<leader>tw', gitsigns.toggle_word_diff, { desc = '[T]oggle git intra-line [w]ord diff' })
-- Text object
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
end, end,
},
},
} }

View File

@ -1,9 +1,6 @@
return { -- Add indentation guides even on blank lines
{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl` -- See `:help ibl`
main = 'ibl', vim.pack.add { 'https://github.com/lukas-reineke/indent-blankline.nvim' }
opts = {}, require('ibl').setup {}
},
}

View File

@ -1,12 +1,10 @@
return { -- Linting
vim.pack.add { 'https://github.com/mfussenegger/nvim-lint' }
{ -- Linting
'mfussenegger/nvim-lint',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local lint = require 'lint' local lint = require 'lint'
lint.linters_by_ft = { lint.linters_by_ft = {
markdown = { 'markdownlint' }, markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm
} }
-- To allow other plugins to add linters to require('lint').linters_by_ft, -- To allow other plugins to add linters to require('lint').linters_by_ft,
@ -39,7 +37,7 @@ return {
-- lint.linters_by_ft['rst'] = nil -- lint.linters_by_ft['rst'] = nil
-- lint.linters_by_ft['ruby'] = nil -- lint.linters_by_ft['ruby'] = nil
-- lint.linters_by_ft['terraform'] = nil -- lint.linters_by_ft['terraform'] = nil
lint.linters_by_ft['text'] = nil -- lint.linters_by_ft['text'] = nil
-- Create autocommand which carries out the actual linting -- Create autocommand which carries out the actual linting
-- on the specified events. -- on the specified events.
@ -50,11 +48,6 @@ return {
-- Only run the linter in buffers that you can modify in order to -- Only run the linter in buffers that you can modify in order to
-- avoid superfluous noise, notably within the handy LSP pop-ups that -- avoid superfluous noise, notably within the handy LSP pop-ups that
-- describe the hovered symbol using Markdown. -- describe the hovered symbol using Markdown.
if vim.opt_local.modifiable:get() then if vim.bo.modifiable then lint.try_lint() end
lint.try_lint()
end
end, end,
}) })
end,
},
}

View File

@ -1,19 +1,15 @@
-- Neo-tree is a Neovim plugin to browse the file system -- Neo-tree is a Neovim plugin to browse the file system
-- https://github.com/nvim-neo-tree/neo-tree.nvim -- https://github.com/nvim-neo-tree/neo-tree.nvim
return { vim.pack.add {
'nvim-neo-tree/neo-tree.nvim', { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = vim.version.range '*' },
version = '*', 'https://github.com/nvim-lua/plenary.nvim',
dependencies = { 'https://github.com/MunifTanjim/nui.nvim',
'nvim-lua/plenary.nvim', }
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim', vim.keymap.set('n', '\\', '<Cmd>Neotree reveal<CR>', { desc = 'NeoTree reveal', silent = true })
},
cmd = 'Neotree', require('neo-tree').setup {
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
filesystem = { filesystem = {
window = { window = {
mappings = { mappings = {
@ -21,5 +17,4 @@ return {
}, },
}, },
}, },
},
} }

View File

@ -1,31 +0,0 @@
local ls = require 'luasnip'
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require 'luasnip.util.events'
local ai = require 'luasnip.nodes.absolute_indexer'
local extras = require 'luasnip.extras'
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require('luasnip.extras.fmt').fmt
local fmta = require('luasnip.extras.fmt').fmta
local conds = require 'luasnip.extras.expand_conditions'
local postfix = require('luasnip.extras.postfix').postfix
local types = require 'luasnip.util.types'
local parse = require('luasnip.util.parser').parse_snippet
local ms = ls.multi_snippet
local k = require('luasnip.nodes.key_indexer').new_key
return {
s('date', t(os.date '%Y-%m-%d')),
}

View File

@ -1,49 +0,0 @@
--[
-- LuaSnip Conditions
--]
local M = {}
-- math / not math zones
function M.in_math()
return vim.api.nvim_eval 'vimtex#syntax#in_mathzone()' == 1
end
-- comment detection
function M.in_comment()
return vim.fn['vimtex#syntax#in_comment']() == 1
end
-- document class
function M.in_beamer()
return vim.b.vimtex['documentclass'] == 'beamer'
end
-- general env function
local function env(name)
local is_inside = vim.fn['vimtex#env#is_inside'](name)
return (is_inside[1] > 0 and is_inside[2] > 0)
end
function M.in_preamble()
return not env 'document'
end
function M.in_text()
return env 'document' and not M.in_math()
end
function M.in_tikz()
return env 'tikzpicture'
end
function M.in_bullets()
return env 'itemize' or env 'enumerate'
end
function M.in_align()
return env 'align' or env 'align*' or env 'aligned'
end
return M

View File

@ -1,93 +0,0 @@
local ls = require 'luasnip'
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require 'luasnip.util.events'
local ai = require 'luasnip.nodes.absolute_indexer'
local extras = require 'luasnip.extras'
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require('luasnip.extras.fmt').fmt
local fmta = require('luasnip.extras.fmt').fmta
local conds = require 'luasnip.extras.expand_conditions'
local postfix = require('luasnip.extras.postfix').postfix
local types = require 'luasnip.util.types'
local parse = require('luasnip.util.parser').parse_snippet
local ms = ls.multi_snippet
local k = require('luasnip.nodes.key_indexer').new_key
local conditions = require 'luasnippets.tex.conditions'
local is_math = conditions.is_math
local as = require('luasnip').extend_decorator.apply(s, { snippetType = 'autosnippet' })
local ret = {}
-- dynamic node
-- generally, postfix comes in the form PRE-CAPTURE-POST, so in this case, arg1 is the "pre" text, arg2 the "post" text
local dynamic_postfix = function(_, parent, _, user_arg1, user_arg2)
print(table.concat(parent.snippet, '\n'))
local capture = parent.snippet.env.POSTFIX_MATCH
if #capture > 0 then
return sn(
nil,
fmta(
[[
<><><><>
]],
{ t(user_arg1), t(capture), t(user_arg2), i(0) }
)
)
else
local visual_placeholder = ''
if #parent.snippet.env.SELECT_RAW > 0 then
visual_placeholder = parent.snippet.env.SELECT_RAW
end
return sn(
nil,
fmta(
[[
<><><><>
]],
{ t(user_arg1), i(1, visual_placeholder), t(user_arg2), i(0) }
)
)
end
end
-- local function postfix_std(trig, result_start, result_end)
-- return postfix(
-- { trig = trig, snippetType = 'autosnippet' },
-- { d(1, dynamic_postfix, {}, { user_args = { result_start, result_end } }) },
-- { condition = is_math, show_condition = is_math }
-- )
-- end
-- Helper: creates a regex-triggered snippet that wraps the next character(s)
-- after <prefix> in <before> ... <after>
local function postfix_std(prefix, before, after)
return s(
{ trig = prefix .. '(%a)', regTrig = true, wordTrig = false, snippetType = 'autosnippet' },
f(function(_, snip)
local captured = snip.captures[1]
return before .. captured .. after
end)
)
end
table.insert(ret, postfix_std('vec', '\\vec{', '}'))
table.insert(ret, postfix_std('hat', '\\hat{', '}'))
table.insert(ret, postfix_std('dot', '\\dot{', '}'))
table.insert(ret, postfix_std('bar', '\\bar{', '}'))
return ret

View File

@ -1,87 +0,0 @@
local ls = require 'luasnip'
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require 'luasnip.util.events'
local ai = require 'luasnip.nodes.absolute_indexer'
local extras = require 'luasnip.extras'
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require('luasnip.extras.fmt').fmt
local fmta = require('luasnip.extras.fmt').fmta
local conds = require 'luasnip.extras.expand_conditions'
local postfix = require('luasnip.extras.postfix').postfix
local types = require 'luasnip.util.types'
local parse = require('luasnip.util.parser').parse_snippet
local ms = ls.multi_snippet
local k = require('luasnip.nodes.key_indexer').new_key
local conditions = require 'luasnippets.tex.conditions'
local is_math = conditions.is_math
local as = require('luasnip').extend_decorator.apply(s, { snippetType = 'autosnippet' })
local ret = {}
--
-- table.insert(
-- ret,
-- as(
-- {
-- trig = 'rancc',
-- regTrig = true,
-- name = 'range closed close',
-- dscr = 'ranges typing x_ -> x_{}',
-- },
-- fmta([[ \left[ <> ; <> \right] ]], {
-- i(1),
-- i(2),
-- }),
-- { condition = is_math }
-- )
-- )
local leters = { 'c', 'o' }
for index, value in ipairs(leters) do
for index2, value2 in ipairs(leters) do
local char1
local char2
if index == 1 then
char1 = '['
else
char1 = ']'
end
if index2 == 1 then
char2 = ']'
else
char2 = '['
end
table.insert(
ret,
as(
{
trig = 'ran' .. value .. value2,
regTrig = true,
name = 'range ' .. value .. value2 .. ' - ' .. char1 .. char2,
dscr = 'ranges',
},
fmta('\\left' .. char1 .. ' <> ; <> \\right' .. char2, {
i(1),
i(2),
}),
{ condition = is_math }
)
)
end
end
return ret

View File

@ -1,52 +0,0 @@
local ls = require 'luasnip'
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require 'luasnip.util.events'
local ai = require 'luasnip.nodes.absolute_indexer'
local extras = require 'luasnip.extras'
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require('luasnip.extras.fmt').fmt
local fmta = require('luasnip.extras.fmt').fmta
local conds = require 'luasnip.extras.expand_conditions'
local postfix = require('luasnip.extras.postfix').postfix
local types = require 'luasnip.util.types'
local parse = require('luasnip.util.parser').parse_snippet
local ms = ls.multi_snippet
local k = require('luasnip.nodes.key_indexer').new_key
local conditions = require 'luasnippets.tex.conditions'
local is_math = conditions.is_math
local as = require('luasnip').extend_decorator.apply(s, { snippetType = 'autosnippet' })
local ret = {
as(
{
trig = '(%a)_',
regTrig = true,
name = 'auto subscript underscore',
dscr = 'Auto subscript: typing x_ -> x_{}',
},
fmta([[<>_{<>}]], {
f(function(_, snip)
return snip.captures[1]
end),
i(1),
}),
{ condition = is_math }
),
}
return ret