Compare commits

..

15 Commits

Author SHA1 Message Date
0021ecd32e Merge branch 'master' of https://github.com/Baipyrus/nvim-config 2024-07-24 08:51:10 +02:00
35ff1656f1 remove unused plugins 2024-07-24 08:50:55 +02:00
ec72cd372a Merge remote-tracking branch 'modular/master' 2024-07-24 08:50:43 +02:00
Damjan 9000
e1d6094136 Merge 'upstream' Neovim 0.10 updates and more
Merged commits from upstream:

Update comment about the toggle inlay hints keymap
lint: fix lsp warning in `vim.lsp.inlay_hint.is_enabled`
Update lazydev config to fix "Undefined field `fs_stat`" LSP error
Neovim 0.10 updates
Fix comment about mini.ai example
Make conform.nvim be lazy-loadable again
Update README.md | %userprofile%\appdata\local -> %localappdata%
Make debug lazy loadable
Remove redundant require
Fix neo-tree keymap description
fix: add required parsers from nvim-treesitter
2024-07-22 20:25:55 +02:00
Richard Macklin
56b9114bf2
Update comment about the toggle inlay hints keymap (#1041) 2024-07-22 13:00:35 -04:00
srdtrk
6f3fe35de3
lint: fix lsp warning in vim.lsp.inlay_hint.is_enabled (#947)
* fix: lsp warning

* review suggestion

Co-authored-by: Tom Kuson <mail@tjkuson.me>

---------

Co-authored-by: Tom Kuson <mail@tjkuson.me>
2024-07-21 22:21:21 -04:00
Richard Macklin
620732789b
Update lazydev config to fix "Undefined field fs_stat" LSP error (#1040)
7513ec8a7d switched from neodev to
lazydev, but in the process it introduced an LSP error in `init.lua`,
which degrades the desired "first timer" experience of kickstart.nvim.

This commit follows the configuration suggested in
6184ebbbc8 (-installation)
which resolves the LSP error.
2024-07-21 22:08:09 -04:00
Vladislav Grechannik
7513ec8a7d
Neovim 0.10 updates (#936)
* Neovim 0.10 updates

Provide the buffer for which to enable inlay hints

Co-authored-by: Matt Mirus <matt@mattmirus.com>

* refactor: replace vim.loop with vim.uv

* Upgrade folke/neodev (sunsetting) to folke/lazydev

* Update checkhealth for 0.10 release

---------

Co-authored-by: Matt Mirus <matt@mattmirus.com>
Co-authored-by: mrr11k <me+github@mrr11k.dev>
Co-authored-by: Seb Tomasini <sebt@qgates.com>
2024-07-21 20:35:07 -04:00
Richard Macklin
07a9f446a3
Fix comment about mini.ai example (#985)
This example wasn't using `'` so this makes more sense
2024-07-21 16:34:51 -04:00
Vladislav Grechannik
b36d84ddf0
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-07-21 16:34:17 -04:00
Artyom
c405d3fd4f
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-07-21 16:33:26 -04:00
Vladislav Grechannik
4bbca64157
Make debug lazy loadable (#978) 2024-07-21 16:24:57 -04:00
Tom Kuson
1cdf6fb377
Remove redundant require (#959) 2024-07-21 16:22:44 -04:00
Damjan 9000
202910d3fa
Fix neo-tree keymap description (#932)
The lazy.nvim keys parameter does not need the `desc` to
be inside a table in the way that vim.keymap.set() does.
With this fix the keymap description will be properly
shown for example in telescope keymap search
2024-07-21 16:22:10 -04:00
TJ DeVries
2df5137e59 fix: add required parsers from nvim-treesitter 2024-07-17 21:37:31 -04:00
11 changed files with 51 additions and 80 deletions

View File

@ -38,8 +38,8 @@ Neovim's configurations are located under the following paths, depending on your
| OS | PATH |
| :- | :--- |
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
| Windows (cmd)| `%localappdata%\nvim\` |
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
### Install this Configuration
@ -58,13 +58,13 @@ git clone https://github.com/Baipyrus/nvim-config.git "${XDG_CONFIG_HOME:-$HOME/
If you're using `cmd.exe`:
```bat
git clone https://github.com/Baipyrus/nvim-config.git %userprofile%\AppData\Local\nvim\
git clone https://github.com/Baipyrus/nvim-config.git %localappdata%\nvim\
```
If you're using `powershell.exe`
```pwsh
git clone https://github.com/Baipyrus/nvim-config.git $env:USERPROFILE\AppData\Local\nvim\
git clone https://github.com/Baipyrus/nvim-config.git $env:LOCALAPPDATA\nvim\
```
</details>

View File

@ -1,52 +0,0 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
},
config = function()
local harpoon = require 'harpoon'
harpoon:setup {}
-- basic telescope configuration
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
},
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
})
:find()
end
-- Open harpoon list window
vim.keymap.set('n', '<leader>ho', function()
toggle_telescope(harpoon:list())
end, { desc = '[H]arpoon [O]pen' })
-- Append to harpoon list
vim.keymap.set('n', '<leader>ha', function()
harpoon:list():append()
end, { desc = '[H]arpoon [A]ppend' })
-- Append to harpoon list
vim.keymap.set('n', '<leader>hr', function()
harpoon:list():remove()
end, { desc = '[H]arpoon [R]emove' })
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-p>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-n>', function()
harpoon:list():next()
end)
end,
}

View File

@ -6,13 +6,13 @@
--]]
local check_version = function()
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
if not vim.version.cmp then
local verstr = tostring(vim.version())
if not vim.version.ge then
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
return
end
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
if vim.version.ge(vim.version(), '0.10-dev') then
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))

View File

@ -127,6 +127,11 @@ return {
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
sources = {
{
name = 'lazydev',
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
},
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },

View File

@ -1,7 +1,8 @@
return {
{ -- Autoformat
'stevearc/conform.nvim',
lazy = false,
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>fb',

View File

@ -17,7 +17,7 @@ return {
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
require('lint').try_lint()
lint.try_lint()
end,
})
end,

View File

@ -11,9 +11,19 @@ return {
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ 'folke/neodev.nvim', opts = {} },
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
},
config = function()
-- Brief aside: **What is LSP?**
@ -107,7 +117,7 @@ return {
--
-- 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)
if client and client.server_capabilities.documentHighlightProvider then
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
@ -130,13 +140,13 @@ return {
})
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
--
-- 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.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
end, '[T]oggle Inlay [H]ints')
end
end,

View File

@ -6,7 +6,7 @@ return {
--
-- Examples:
-- - 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
require('mini.ai').setup { n_lines = 500 }

View File

@ -10,21 +10,29 @@ return {
build = ':TSUpdate',
opts = {
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'python',
'rust',
'javascript',
'typescript',
'vimdoc',
'vim',
'svelte',
'c_sharp',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'javascript',
'typescript',
'svelte',
'php',
'python',
'rust',
'c_sharp',
'gitcommit',
'gitignore',
'html',
'php',
},
-- Autoinstall languages that are not installed
auto_install = true,

View File

@ -1,7 +1,7 @@
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
if not vim.uv.fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system {
'git',

View File

@ -63,7 +63,6 @@ require('lazy').setup({
require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.neo-tree',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.