Skip to content

Commit bb7c671

Browse files
committed
Merge 'upstream' timeoutlen, cmp scroll, friendly snippets, luasnip, ruby
Merged: - fix: disable ts indenting for Ruby - doc: add note about advanced luasnip features - Move friendly snippets to dependencies of LuaSnip (nvim-lua#759) - Add <C-b>/<C-f> cmp mapping to scroll cmp docs (nvim-lua#750) - doc: add info about timeoutlen (nvim-lua#691)
2 parents 9e78a50 + 13f5e60 commit bb7c671

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

lua/kickstart/plugins/cmp.lua

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ return {
1515
end
1616
return 'make install_jsregexp'
1717
end)(),
18+
dependencies = {
19+
-- `friendly-snippets` contains a variety of premade snippets.
20+
-- See the README about individual language/framework/plugin snippets:
21+
-- https://github.com/rafamadriz/friendly-snippets
22+
-- {
23+
-- 'rafamadriz/friendly-snippets',
24+
-- config = function()
25+
-- require('luasnip.loaders.from_vscode').lazy_load()
26+
-- end,
27+
-- },
28+
},
1829
},
1930
'saadparwaiz1/cmp_luasnip',
2031

@@ -23,12 +34,6 @@ return {
2334
-- into multiple repos for maintenance purposes.
2435
'hrsh7th/cmp-nvim-lsp',
2536
'hrsh7th/cmp-path',
26-
27-
-- If you want to add a bunch of pre-configured snippets,
28-
-- you can use this plugin to help you. It even has snippets
29-
-- for various frameworks/libraries/etc. but you will have to
30-
-- set up the ones that are useful for you.
31-
-- 'rafamadriz/friendly-snippets',
3237
},
3338
config = function()
3439
-- See `:help cmp`
@@ -54,6 +59,10 @@ return {
5459
-- Select the [p]revious item
5560
['<C-p>'] = cmp.mapping.select_prev_item(),
5661

62+
-- scroll the documentation window [b]ack / [f]orward
63+
['<C-b>'] = cmp.mapping.scroll_docs(-4),
64+
['<C-f>'] = cmp.mapping.scroll_docs(4),
65+
5766
-- Accept ([y]es) the completion.
5867
-- This will auto-import if your LSP supports it.
5968
-- This will expand snippets if the LSP sent a snippet.
@@ -82,6 +91,9 @@ return {
8291
luasnip.jump(-1)
8392
end
8493
end, { 'i', 's' }),
94+
95+
-- For more advanced luasnip keymaps (e.g. selecting choice nodes, expansion) see:
96+
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
8597
},
8698
sources = {
8799
{ name = 'nvim_lsp' },

lua/kickstart/plugins/treesitter.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ return {
66
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
77
-- Autoinstall languages that are not installed
88
auto_install = true,
9-
highlight = { enable = true },
10-
indent = { enable = true },
9+
highlight = {
10+
enable = true,
11+
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
12+
-- If you are experiencing weird indenting issues, add the language to
13+
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
14+
additional_vim_regex_highlighting = { 'ruby' },
15+
},
16+
indent = { enable = true, disable = { 'ruby' } },
1117
},
1218
config = function(_, opts)
1319
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`

lua/options.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ vim.opt.signcolumn = 'yes'
3535

3636
-- Decrease update time
3737
vim.opt.updatetime = 250
38+
39+
-- Decrease mapped sequence wait time
40+
-- Displays which-key popup sooner
3841
vim.opt.timeoutlen = 300
3942

4043
-- Configure how new splits should be opened

0 commit comments

Comments
 (0)