mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
Compare commits
11 Commits
40d22e9971
...
741e2bc207
Author | SHA1 | Date | |
---|---|---|---|
741e2bc207 | |||
d5adb82437 | |||
|
60d893f8c5 | ||
|
b7d5cc8f42 | ||
|
77dbcfaaf7 | ||
|
8df3deb6fe | ||
|
942b26184c | ||
|
b939e2f5a1 | ||
|
81f270a704 | ||
|
74136a1db7 | ||
|
f92fb11d68 |
@ -18,6 +18,7 @@ If you are experiencing issues, please make sure you have the latest versions.
|
|||||||
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 platform)
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/): provides various icons
|
- A [Nerd Font](https://www.nerdfonts.com/): provides various icons
|
||||||
- Language utils: `rustup`, `npm`, `dotnet`, `python`
|
- Language utils: `rustup`, `npm`, `dotnet`, `python`
|
||||||
- Optionally, install [Alacritty](https://github.com/alacritty/alacritty#installation)
|
- Optionally, install [Alacritty](https://github.com/alacritty/alacritty#installation)
|
||||||
@ -152,7 +153,7 @@ 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 neovim
|
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -162,14 +163,14 @@ sudo apt install make gcc ripgrep unzip neovim
|
|||||||
```
|
```
|
||||||
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 neovim
|
sudo apt install make gcc ripgrep 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 curl
|
sudo apt install make gcc ripgrep 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-linux64.tar.gz
|
||||||
|
@ -108,13 +108,16 @@ return {
|
|||||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
if client and client.server_capabilities.documentHighlightProvider then
|
if client and client.server_capabilities.documentHighlightProvider then
|
||||||
|
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.document_highlight,
|
callback = vim.lsp.buf.document_highlight,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -125,12 +128,20 @@ return {
|
|||||||
-- This may be unwanted, since they displace some of your code
|
-- This may be unwanted, since they displace some of your code
|
||||||
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||||
map('<leader>th', function()
|
map('<leader>th', function()
|
||||||
vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
end, '[T]oggle Inlay [H]ints')
|
end, '[T]oggle Inlay [H]ints')
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspDetach', {
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
|
@ -113,6 +113,7 @@ return {
|
|||||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
|
vim.keymap.set('n', '<leader>sc', builtin.command_history, { desc = '[S]earch [C]ommand History' })
|
||||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
|
||||||
-- Telescope live_grep in git root
|
-- Telescope live_grep in git root
|
||||||
|
Loading…
Reference in New Issue
Block a user