diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-22 16:34:18 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-22 16:34:18 +0100 |
commit | c22beb43a4526372abbd6c3dab48051e6b4e2a20 (patch) | |
tree | d112b307a253cfb292bcd124774bb1d301eeb114 | |
parent | 6a97ba66fe9f7da4c2eccb001c3e325a8b9f060b (diff) |
Add treesitter playground
-rw-r--r-- | lua/config/treesitter.lua | 9 | ||||
-rw-r--r-- | lua/config/whichkey.lua | 5 | ||||
-rw-r--r-- | lua/plugins.lua | 8 |
3 files changed, 19 insertions, 3 deletions
diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua index 0e1fe07..c0881e9 100644 --- a/lua/config/treesitter.lua +++ b/lua/config/treesitter.lua @@ -18,5 +18,12 @@ treesitter.setup({ disable = { "" }, -- list of language that will be disabled additional_vim_regex_highlighting = true, }, - indent = { enable = true, disable = { "yaml" } }, + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + indent = { enable = true, disable = { "yaml", "python", "css" } }, + playground = { + enable = true + } }) diff --git a/lua/config/whichkey.lua b/lua/config/whichkey.lua index 143ed61..44c7074 100644 --- a/lua/config/whichkey.lua +++ b/lua/config/whichkey.lua @@ -181,6 +181,11 @@ local mappings = { w = { "<cmd>lua require('spectre').open_visual({select_word=true})<cr>", "Replace Word" }, f = { "<cmd>lua require('spectre').open_file_search()<cr>", "Replace Buffer" }, }, + + T = { + name = "Treesitter", + p = { "<cmd>TSPlaygroundToggle<cr>", "Playground" }, + }, } local vopts = { diff --git a/lua/plugins.lua b/lua/plugins.lua index 3de5d73..47e75c0 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -30,14 +30,18 @@ return { { "nvim-telescope/telescope-fzf-native.nvim", run = "make" }, { "nvim-telescope/telescope-file-browser.nvim" }, - -- Miscellaneous plugins + -- Treesitter { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate", }, + { "JoosepAlviste/nvim-ts-context-commentstring" }, + { "nvim-treesitter/playground" }, + + + -- Miscellaneous plugins { "windwp/nvim-autopairs" }, { "numToStr/Comment.nvim" }, - { "JoosepAlviste/nvim-ts-context-commentstring" }, { "lewis6991/gitsigns.nvim" }, { "kyazdani42/nvim-web-devicons" }, { "kyazdani42/nvim-tree.lua" }, |