Skip to content

Commit e921346

Browse files
committed
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
2 parents 198460c + ac78e7d commit e921346

4 files changed

Lines changed: 53 additions & 17 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ External Requirements:
3030
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
3131
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
3232
- Language Setup:
33-
- If want to write Typescript, you need `npm`
34-
- If want to write Golang, you will need `go`
33+
- If you want to write Typescript, you need `npm`
34+
- If you want to write Golang, you will need `go`
3535
- etc.
3636

3737
> **NOTE**
@@ -61,6 +61,10 @@ fork to your machine using one of the commands below, depending on your OS.
6161
> Your fork's url will be something like this:
6262
> `https://github.com/<your_github_username>/kickstart-modular.nvim.git`
6363
64+
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
65+
too - it's ignored in the kickstart repo to make maintenance easier, but it's
66+
[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile).
67+
6468
#### Clone kickstart.nvim
6569
> **NOTE**
6670
> If following the recommended step above (i.e., forking the repo), replace

lua/kickstart/plugins/treesitter.lua

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ return {
22
{ -- Highlight, edit, and navigate code
33
'nvim-treesitter/nvim-treesitter',
44
build = ':TSUpdate',
5+
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
6+
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
57
opts = {
68
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
79
-- Autoinstall languages that are not installed
@@ -15,19 +17,12 @@ return {
1517
},
1618
indent = { enable = true, disable = { 'ruby' } },
1719
},
18-
config = function(_, opts)
19-
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
20-
21-
---@diagnostic disable-next-line: missing-fields
22-
require('nvim-treesitter.configs').setup(opts)
23-
24-
-- There are additional nvim-treesitter modules that you can use to interact
25-
-- with nvim-treesitter. You should go explore a few and see what interests you:
26-
--
27-
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
28-
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
29-
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
30-
end,
20+
-- There are additional nvim-treesitter modules that you can use to interact
21+
-- with nvim-treesitter. You should go explore a few and see what interests you:
22+
--
23+
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
24+
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
25+
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
3126
},
3227
}
3328
-- vim: ts=2 sts=2 sw=2 et

lua/kickstart/plugins/which-key.lua

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,44 @@ return {
1818
'folke/which-key.nvim',
1919
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
2020
config = function() -- This is the function that runs, AFTER loading
21-
require('which-key').setup()
21+
require('which-key').setup {
22+
icons = {
23+
-- set icon mappings to true if you have a Nerd Font
24+
mappings = vim.g.have_nerd_font,
25+
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
26+
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
27+
keys = vim.g.have_nerd_font and {} or {
28+
Up = '<Up> ',
29+
Down = '<Down> ',
30+
Left = '<Left> ',
31+
Right = '<Right> ',
32+
C = '<C-…> ',
33+
M = '<M-…> ',
34+
D = '<D-…> ',
35+
S = '<S-…> ',
36+
CR = '<CR> ',
37+
Esc = '<Esc> ',
38+
ScrollWheelDown = '<ScrollWheelDown> ',
39+
ScrollWheelUp = '<ScrollWheelUp> ',
40+
NL = '<NL> ',
41+
BS = '<BS> ',
42+
Space = '<Space> ',
43+
Tab = '<Tab> ',
44+
F1 = '<F1>',
45+
F2 = '<F2>',
46+
F3 = '<F3>',
47+
F4 = '<F4>',
48+
F5 = '<F5>',
49+
F6 = '<F6>',
50+
F7 = '<F7>',
51+
F8 = '<F8>',
52+
F9 = '<F9>',
53+
F10 = '<F10>',
54+
F11 = '<F11>',
55+
F12 = '<F12>',
56+
},
57+
},
58+
}
2259

2360
-- Document existing key chains
2461
require('which-key').add {

lua/lazy-bootstrap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- [[ Install `lazy.nvim` plugin manager ]]
22
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
33
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
4-
if not vim.uv.fs_stat(lazypath) then
4+
if not (vim.uv or vim.loop).fs_stat(lazypath) then
55
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
66
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
77
if vim.v.shell_error ~= 0 then

0 commit comments

Comments
 (0)