Compare commits

..

26 Commits

Author SHA1 Message Date
faca7b63ce better telescope.builtin.oldfiles configuration 2024-10-17 11:58:51 +02:00
d45de7ce83 suppress errors on switch to alt-file when deleting buffer 2024-10-17 11:45:26 +02:00
cbb6693cbf add lazy-lock.json to versioning as recommended by kickstart.nvim 2024-10-17 11:45:23 +02:00
f19ae0487b specify conditions to re-enable diagnostics after git conflict 2024-10-17 11:45:20 +02:00
5febea0f8a group conflict-marker.vim autocmds in one 2024-10-17 11:44:14 +02:00
5795aa73ef use alt-file when deleting current buffer 2024-10-17 11:44:08 +02:00
444b87fd8b Merge remote-tracking branch 'modular/master' 2024-10-17 11:43:59 +02:00
Damjan 9000
c0a254f0b8 Merge 'upstream' fix: update lazy uninstall information link 2024-09-24 17:48:44 +02:00
Bastien Traverse
4120893b8a
fix: update lazy uninstall information link (#1148) 2024-09-24 11:06:14 -04:00
Damjan 9000
1695a1d3fc Merge 'upstream' feat: update references of tsserver to ts_ls 2024-09-10 22:34:43 +02:00
Nicolás Baquero
7201dc4801
feat: update references of tsserver to ts_ls (#1131) 2024-09-10 16:27:24 -04:00
Damjan 9000
3a01797417 Merge 'upstream' Fix the which-key spec issue caused by recent cleanup 2024-08-26 22:50:44 +02:00
Damjan 9000
a22976111e
Fix the which-key spec issue caused by recent cleanup (#1113)
The recent cleanup accidentally broke the leader key specs
because the spec block was in the wrong level of braces.
That resulted in which-key no longer showing the description
of the <leader> key chains such as [S]earch and others.
2024-08-26 16:43:59 -04:00
Damjan 9000
7e11e8a26b Merge 'upstream' cleanup: refactor which-key configuration 2024-08-26 22:15:38 +02:00
Ihsan Tonuzi
24d368f9ff
cleanup: refactor which-key configuration for cleaner setup (#1102)
- Moved `which-key` configuration from inline `config` to `opts` for better organization.
- Updated the key mappings setup to use `spec` for defining existing key chains.
- Removed deprecated or unnecessary comments and code.

This change aligns with updated `which-key` configuration practices, improving readability and maintainability as recommended by @VlaDexa in #1068.
2024-08-26 12:17:22 -04:00
Damjan 9000
7d83a27e60 Merge 'upstream' conform, readme, neo-tree silent
fix: remove deprecated opt for conform.nvim
Fix: updated the windows installation commands
Enable silent option for default neo-tree plugin keybinding
2024-08-26 14:52:02 +02:00
Ihsan Tonuzi
c76c323a7c
fix: remove deprecated opt for conform.nvim (#1070)
- changed lsp_fallback -> lsp_format
- updated format_on_save function to reflect change above
2024-08-25 23:28:26 -04:00
Harshit Pant
e4a5300bdb
Fix: updated the windows installation commands (#1101)
* Update README.md

* Update README.md

* Fix: updated the windows installation commands
2024-08-25 23:27:46 -04:00
Bayram Kazik
f49cc6c935
Enable silent option for default neo-tree plugin keybinding (#1108) 2024-08-25 23:23:17 -04:00
Damjan 9000
06929799f0 Merge 'upstream' Include visual mode in LSP code action keymap 2024-08-25 11:03:03 +02:00
Bayram Kazik
d452633b35
Include visual mode in LSP code action keymap (#1060) (#1064) 2024-08-24 17:31:43 -04:00
Damjan 9000
e9213469ba Merge 'upstream' refactor treesitter, which-key, uv/loop, update README
*  Ihsan Tonuzi refactor: update treesitter and which-key config
*  Michael L. Check for loop or uv for lazypath
*  Matt Gallagher Add note in README about lazy-lock.json
*  theoboldalex Update README.md
2024-08-23 14:22:13 +02:00
Ihsan Tonuzi
ac78e7d9e7
refactor: update treesitter and which-key config (#1068) 2024-08-22 21:00:39 -04:00
Michael L.
ce0c7340ff
Check for loop or uv for lazypath (#1095) 2024-08-22 16:56:33 -04:00
Matt Gallagher
554a054bf9
Add note in README about lazy-lock.json (#1090) 2024-08-22 16:53:57 -04:00
theoboldalex
c1ae9092cb
Update README.md (#1091) 2024-08-22 16:49:25 -04:00
11 changed files with 117 additions and 34 deletions

1
.gitignore vendored
View File

@ -4,4 +4,3 @@ test.sh
nvim
spell/
lazy-lock.json

View File

@ -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 %localappdata%\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:LOCALAPPDATA\nvim\
git clone https://github.com/Baipyrus/nvim-config.git "${env:LOCALAPPDATA}\nvim"
```
</details>
@ -103,7 +103,7 @@ current plugin status. Hit `q` to close the window.
You can apply both of these approaches to any Neovim
distribution that you would like to try out.
* What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
### Install Recipes

44
lazy-lock.json Normal file
View File

@ -0,0 +1,44 @@
{
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" },
"conform.nvim": { "branch": "master", "commit": "f5bd8419f8a29451e20bdb1061a54fe13d5c8de3" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "d4ce7d025f9c7bb4d55ebc4fd88987651e632893" },
"nvim": { "branch": "main", "commit": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-lint": { "branch": "master", "commit": "b3ab4ba88845893663d0b7122ee82921adf28358" },
"nvim-lspconfig": { "branch": "master", "commit": "541f3a2781de481bb84883889e4d9f0904250a56" },
"nvim-treesitter": { "branch": "master", "commit": "03452942dfbd998701d4123ccad2090e1bc7e9f1" },
"nvim-treesitter-context": { "branch": "master", "commit": "78a81c7494e7d1a08dd1200b556933e513fd9f29" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"oil.nvim": { "branch": "master", "commit": "39dbf875861449cf09e936fa80073f3413e9439c" },
"overseer.nvim": { "branch": "master", "commit": "6f8bc37eb729a00e185cdf38b1ed3309a05bfeef" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"vim-flog": { "branch": "master", "commit": "6f80c1ffa7068ca8cc0e29af7af4f6ed0717e65e" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" },
"vim-merginal": { "branch": "develop", "commit": "3dca10fd8bce10edbc2024651db4ffb6dd2d89de" },
"vim-processing": { "branch": "master", "commit": "91aaa18a54f8e507e48353ba87b1eb4ecd82a17c" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
}

View File

@ -24,23 +24,19 @@ return {
local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin)
local ending = vim.fn.match(lines, vim.g.conflict_marker_end)
local enabled = vim.diagnostic.is_enabled()
if (beginning > -1 or ending > -1) and enabled then
local conflict = beginning > -1 or ending > -1
if conflict and enabled then
vim.diagnostic.enable(false)
elseif not enabled then
elseif not conflict and not enabled then
vim.diagnostic.enable(true)
end
end
-- Autocommand to disable diagnostics on buffer enter
vim.api.nvim_create_autocmd('BufRead', {
vim.api.nvim_create_autocmd({ 'BufRead', 'BufWritePre' }, {
group = vim.api.nvim_create_augroup('git-conflict-lsp-disable', { clear = true }),
callback = git_conflict_detection,
})
-- Autocommand to disable diagnostics on save
vim.api.nvim_create_autocmd('BufWritePre', {
group = vim.api.nvim_create_augroup('git-conflict-lsp-disable', { clear = false }),
callback = git_conflict_detection,
})
end,
},
}

View File

@ -47,7 +47,7 @@ vim.keymap.set('n', '<leader>bd', function()
-- Get current buffer
local buf = vim.api.nvim_get_current_buf()
-- Switch to different buffer
vim.cmd 'bp'
vim.cmd 'silent! :exe "norm \\<C-6>"'
-- Delete saved buffer
vim.api.nvim_buf_delete(buf, {})
end, { desc = '[B]uffer [D]elete' })

View File

@ -7,7 +7,7 @@ return {
{
'<leader>fb',
function()
require('conform').format { async = true, lsp_fallback = true }
require('conform').format { async = true, lsp_format = 'fallback' }
end,
mode = '',
desc = '[F]ormat [B]uffer',
@ -20,9 +20,15 @@ return {
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true, php = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never'
else
lsp_format_opt = 'fallback'
end
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
lsp_format = lsp_format_opt,
}
end,
formatters_by_ft = {

View File

@ -67,8 +67,9 @@ return {
--
-- In this case, we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time.
local map = function(keys, func, desc)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
local map = function(keys, func, desc, mode)
mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end
-- Jump to the definition of the word under your cursor.
@ -105,7 +106,7 @@ return {
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
-- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap.
@ -179,9 +180,9 @@ return {
rust_analyzer = {},
tailwindcss = {},
omnisharp = {},
tsserver = {},
pyright = {},
svelte = {},
ts_ls = {},
gopls = {},
intelephense = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@ -233,7 +234,7 @@ return {
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,

View File

@ -111,8 +111,12 @@ return {
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
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>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader>sr', function()
builtin.oldfiles {
only_cwd = true,
}
end, { desc = '[S]earch [R]ecent Files in CWD' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Global Files' })
vim.keymap.set('n', '<leader>sc', builtin.command_history, { desc = '[S]earch [C]ommand History' })
vim.keymap.set('n', '<leader><leader>', function()
builtin.buffers {

View File

@ -6,6 +6,8 @@ return {
'nvim-treesitter/nvim-treesitter-textobjects',
},
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = {
-- kickstart
@ -103,12 +105,6 @@ return {
},
},
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts)
end,
},
}
-- vim: ts=2 sts=2 sw=2 et

View File

@ -17,11 +17,48 @@ return {
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require('which-key').setup()
opts = {
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
-- Document existing key chains
require('which-key').add {
spec = {
{ '<leader>c', group = '[C]ode-/[C]hange' },
{ '<leader>c', group = '[C]ode', mode = { 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
@ -34,8 +71,8 @@ return {
{ '<leader>l', group = '[L]ist', mode = { 'n', 'v' } },
{ '<leader>f', group = '[F]ormat/[F]ile', mode = { 'n', 'v' } },
{ '<leader>o', group = '[O]verseer', mode = { 'n', 'v' } },
}
end,
},
},
},
}
-- vim: ts=2 sts=2 sw=2 et

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.uv.fs_stat(lazypath) then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system {
'git',