Skip to content

Commit

Permalink
vim: Update treesitter-playground and auto-install config
Browse files Browse the repository at this point in the history
Ref: #32
  • Loading branch information
wookayin committed Feb 8, 2022
1 parent 173cf6a commit f9b36e3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
47 changes: 18 additions & 29 deletions nvim/lua/config/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,26 @@ require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",

-- List of parsers to ignore installing
ignore_install = { },

highlight = {
-- TODO: There are many annoying issues in treesitter;
-- e.g., conflict with existing filetype-based vim syntax.
-- We disable highlight until it becomes mature enough
enable = false,

-- List of language that will be disabled.
-- For example, some non-programming-language filetypes (e.g., fzf) should be
-- explicitly turned off otherwise it will slow down the window.
disable = { "fzf", "GV", "gitmessengerpopup", "fugitive", "NvimTree" },

-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = { "python" },
ignore_install = {
"phpdoc", -- Not compatible with M1 mac
},

playground = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?',
}
enable = true,
updatetime = 30,
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?',
},
},
}

-- Folding support
Expand Down
2 changes: 1 addition & 1 deletion vim/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ endif
if has('nvim-0.6.2')
" Treesitter (see ~/.config/nvim/lua/config/treesitter.lua)
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'nvim-treesitter/playground'
Plug 'nvim-treesitter/playground', {'as': 'nvim-treesitter-playground'}
endif

" Syntax, Completion, Language Servers, etc.
Expand Down

0 comments on commit f9b36e3

Please sign in to comment.