Compare commits

..

10 commits

Author SHA1 Message Date
a51ae13b83
doc(readme): document personal notes 2024-08-19 17:54:03 +02:00
jstrot
a5c94554a9
Add explicit dependency of nvim-lspconfig on cmp-nvim-lsp (#1042) 2024-08-19 17:44:33 +02:00
jstrot
250ead9387
Remove treesitter prefer_git option (#1061)
- It's not safe and can corrupt other git repos
- nvim-treesiter maintainers consider `prefer_git` as deprecated and no
  longer needed.

See nvim-treesitter PR for details: https://github.com/nvim-treesitter/nvim-treesitter/pull/6959
2024-08-19 17:42:33 +02:00
abeldekat
eb8592f29f
performance: defer clipboard because xsel and pbcopy can be slow (#1049) 2024-08-19 17:42:16 +02:00
Brandon Clark
57bd41433e
Modify conform comments to prevent deprecation warning when used (#1057) 2024-08-19 17:40:26 +02:00
Arvin Verain
367b0f5020
Remove redundant hlsearch option (#1058) 2024-08-19 17:40:03 +02:00
Richard Macklin
74d389060b
Update comment about the toggle inlay hints keymap (#1041) 2024-08-19 17:28:40 +02:00
Richard Macklin
dd4004d48a
Fix comment about mini.ai example (#985)
This example wasn't using `'` so this makes more sense
2024-08-19 17:24:38 +02:00
Vladislav Grechannik
78a82a80e4
Make conform.nvim be lazy-loadable again (#977)
The PR that disabled lazy loading (#818) was to fix plugin not being
loaded before write. This sets up lazy to load conform before write.
2024-08-19 17:24:11 +02:00
Artyom
42a7c1afde
Update README.md | %userprofile%\appdata\local -> %localappdata% (#963)
- Replace `%userprofile%\AppData\Local\nvim\` and `$env:USERPROFILE\AppData\Local\nvim` to `%localappdata%\nvim` and `$env:LOCALAPPDATA\nvim respectfully`
2024-08-19 17:23:09 +02:00
2 changed files with 46 additions and 16 deletions

View file

@ -10,6 +10,28 @@ A starting point for Neovim that is:
**NOT** a Neovim distribution, but instead a starting point for your configuration. **NOT** a Neovim distribution, but instead a starting point for your configuration.
## Renken's notes
### Divergence from upstream
I try to stay as up-to-date as possible with upstream. However certain commits
that I deliberately skipped cherry-picking because they can be problematic. I
will try to document all of them below.
* [nvim-lua/kickstart@7513ec8](https://github.com/nvim-lua/kickstart.nvim/commit/7513ec8a7dd579957ce2d9b44e05c1da18d7d0e3)
deletes `numToStr/Comment.nvim` without justification. Possibly this feature
was merged in `neovim-v0.10.0`? The changes to use `vim.uv` instead of
`vim.loop` were not included as a result. I also want to take the time to
understand what `neodev` and `lazydev` do before integrating the latter. Future
commits related to it will not be included here either, such as.
* [nvim-lua/kickstart@fd66454](https://github.com/nvim-lua/kickstart.nvim/commit/fd66454c4a02abb44568159e7447060b962e1b5d).
* Debian GNU/Linux packages
[`markdownlint`](https://packages.debian.org/bookworm-backports/markdownlint).
However, the binary is installed under `/bin/mdl` which breaks
`lua/kickstart/plugins/lint.lua`. Make sure to execute `ln -s /bin/mdl
~/.local/bin/markdownlint` or something similar.
## Installation ## Installation
### Install Neovim ### Install Neovim
@ -46,8 +68,8 @@ Neovim's configurations are located under the following paths, depending on your
| OS | PATH | | OS | PATH |
| :- | :--- | | :- | :--- |
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | | Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` | | Windows (cmd)| `%localappdata%\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` | | Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
#### Recommended Step #### Recommended Step
@ -77,13 +99,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
If you're using `cmd.exe`: If you're using `cmd.exe`:
``` ```
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ git clone https://github.com/nvim-lua/kickstart.nvim.git %localappdata%\nvim\
``` ```
If you're using `powershell.exe` If you're using `powershell.exe`
``` ```
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ git clone https://github.com/nvim-lua/kickstart.nvim.git $env:LOCALAPPDATA\nvim\
``` ```
</details> </details>
@ -226,4 +248,3 @@ sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
``` ```
</details> </details>

View file

@ -126,9 +126,12 @@ vim.opt.spell = true
vim.opt.showmode = false vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
@ -172,8 +175,8 @@ vim.opt.scrolloff = 10
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Set highlight on search, but clear on pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
vim.opt.hlsearch = true -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
@ -503,6 +506,13 @@ require('lazy').setup({
pin = true, pin = true,
opts = {}, opts = {},
}, },
-- Allows extra capabilities provided by nvim-cmp
{
'hrsh7th/cmp-nvim-lsp',
-- XXX: No releases, looks unmaintained?
commit = '39e2eda76828d88b773cc27a3f61d2ad782c922d',
}
}, },
config = function() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**
@ -616,7 +626,7 @@ require('lazy').setup({
}) })
end end
-- The following autocommand is used to enable inlay hints in your -- The following code creates a keymap to toggle inlay hints in your
-- code, if the language server you are using supports them -- code, if the language server you are using supports them
-- --
-- This may be unwanted, since they displace some of your code -- This may be unwanted, since they displace some of your code
@ -742,6 +752,8 @@ require('lazy').setup({
tag = 'v7.1.0', tag = 'v7.1.0',
pin = true, pin = true,
lazy = false, lazy = false,
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = { keys = {
{ {
'<leader>f', '<leader>f',
@ -769,9 +781,8 @@ require('lazy').setup({
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use 'stop_after_first' to run the first available formatter from the list
-- is found. -- javascript = { "prettierd", "prettier", stop_after_first = true },
-- javascript = { { "prettierd", "prettier" } },
}, },
}, },
}, },
@ -968,7 +979,7 @@ require('lazy').setup({
-- --
-- Examples: -- Examples:
-- - va) - [V]isually select [A]round [)]paren -- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [']quote -- - yinq - [Y]ank [I]nside [N]ext [Q]uote
-- - ci' - [C]hange [I]nside [']quote -- - ci' - [C]hange [I]nside [']quote
require('mini.ai').setup { n_lines = 500 } require('mini.ai').setup { n_lines = 500 }
@ -1024,8 +1035,6 @@ require('lazy').setup({
config = function(_, opts) config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
-- Prefer git instead of curl in order to improve connectivity in some environments
require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts) require('nvim-treesitter.configs').setup(opts)