Skip to content

Commit 5a58b8b

Browse files
Merge branch 'nvim-lua:master' into master
2 parents 52b838a + a229761 commit 5a58b8b

File tree

3 files changed

+50
-46
lines changed

3 files changed

+50
-46
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
8181
If you're using `cmd.exe`:
8282

8383
```
84-
git clone https://github.com/nvim-lua/kickstart.nvim.git %localappdata%\nvim\
84+
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
8585
```
8686

8787
If you're using `powershell.exe`
8888

8989
```
90-
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:LOCALAPPDATA\nvim\
90+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
9191
```
9292

9393
</details>

init.lua

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -274,57 +274,55 @@ require('lazy').setup({
274274
{ -- Useful plugin to show you pending keybinds.
275275
'folke/which-key.nvim',
276276
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
277-
config = function() -- This is the function that runs, AFTER loading
278-
require('which-key').setup {
279-
icons = {
280-
-- set icon mappings to true if you have a Nerd Font
281-
mappings = vim.g.have_nerd_font,
282-
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
283-
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
284-
keys = vim.g.have_nerd_font and {} or {
285-
Up = '<Up> ',
286-
Down = '<Down> ',
287-
Left = '<Left> ',
288-
Right = '<Right> ',
289-
C = '<C-…> ',
290-
M = '<M-…> ',
291-
D = '<D-…> ',
292-
S = '<S-…> ',
293-
CR = '<CR> ',
294-
Esc = '<Esc> ',
295-
ScrollWheelDown = '<ScrollWheelDown> ',
296-
ScrollWheelUp = '<ScrollWheelUp> ',
297-
NL = '<NL> ',
298-
BS = '<BS> ',
299-
Space = '<Space> ',
300-
Tab = '<Tab> ',
301-
F1 = '<F1>',
302-
F2 = '<F2>',
303-
F3 = '<F3>',
304-
F4 = '<F4>',
305-
F5 = '<F5>',
306-
F6 = '<F6>',
307-
F7 = '<F7>',
308-
F8 = '<F8>',
309-
F9 = '<F9>',
310-
F10 = '<F10>',
311-
F11 = '<F11>',
312-
F12 = '<F12>',
313-
},
277+
opts = {
278+
icons = {
279+
-- set icon mappings to true if you have a Nerd Font
280+
mappings = vim.g.have_nerd_font,
281+
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
282+
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
283+
keys = vim.g.have_nerd_font and {} or {
284+
Up = '<Up> ',
285+
Down = '<Down> ',
286+
Left = '<Left> ',
287+
Right = '<Right> ',
288+
C = '<C-…> ',
289+
M = '<M-…> ',
290+
D = '<D-…> ',
291+
S = '<S-…> ',
292+
CR = '<CR> ',
293+
Esc = '<Esc> ',
294+
ScrollWheelDown = '<ScrollWheelDown> ',
295+
ScrollWheelUp = '<ScrollWheelUp> ',
296+
NL = '<NL> ',
297+
BS = '<BS> ',
298+
Space = '<Space> ',
299+
Tab = '<Tab> ',
300+
F1 = '<F1>',
301+
F2 = '<F2>',
302+
F3 = '<F3>',
303+
F4 = '<F4>',
304+
F5 = '<F5>',
305+
F6 = '<F6>',
306+
F7 = '<F7>',
307+
F8 = '<F8>',
308+
F9 = '<F9>',
309+
F10 = '<F10>',
310+
F11 = '<F11>',
311+
F12 = '<F12>',
314312
},
315-
}
313+
},
316314

317315
-- Document existing key chains
318-
require('which-key').add {
316+
spec = {
319317
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
320318
{ '<leader>d', group = '[D]ocument' },
321319
{ '<leader>r', group = '[R]ename' },
322320
{ '<leader>s', group = '[S]earch' },
323321
{ '<leader>w', group = '[W]orkspace' },
324322
{ '<leader>t', group = '[T]oggle' },
325323
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
326-
}
327-
end,
324+
},
325+
},
328326
},
329327

330328
-- NOTE: Plugins can specify dependencies.
@@ -675,7 +673,7 @@ require('lazy').setup({
675673
{
676674
'<leader>f',
677675
function()
678-
require('conform').format { async = true, lsp_fallback = true }
676+
require('conform').format { async = true, lsp_format = 'fallback' }
679677
end,
680678
mode = '',
681679
desc = '[F]ormat buffer',
@@ -688,9 +686,15 @@ require('lazy').setup({
688686
-- have a well standardized coding style. You can add additional
689687
-- languages here or re-enable it for the disabled ones.
690688
local disable_filetypes = { c = true, cpp = true }
689+
local lsp_format_opt
690+
if disable_filetypes[vim.bo[bufnr].filetype] then
691+
lsp_format_opt = 'never'
692+
else
693+
lsp_format_opt = 'fallback'
694+
end
691695
return {
692696
timeout_ms = 500,
693-
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
697+
lsp_format = lsp_format_opt,
694698
}
695699
end,
696700
formatters_by_ft = {

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ return {
1111
},
1212
cmd = 'Neotree',
1313
keys = {
14-
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal' },
14+
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
1515
},
1616
opts = {
1717
filesystem = {

0 commit comments

Comments
 (0)