Compare commits

...

2 Commits

Author SHA1 Message Date
Matej Straka 5559d801b9
Update treesitter.lua (#210)
2 years ago
christianchiarulli 5b2777816a update
3 years ago

@ -1,9 +1,3 @@
local default_schemas = nil
local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls")
if status_ok then
default_schemas = jsonls_settings.get_default_schemas()
end
local schemas = { local schemas = {
{ {
description = "TypeScript compiler configuration file", description = "TypeScript compiler configuration file",
@ -168,19 +162,10 @@ local schemas = {
}, },
} }
local function extend(tab1, tab2)
for _, value in ipairs(tab2) do
table.insert(tab1, value)
end
return tab1
end
local extended_schemas = extend(schemas, default_schemas)
local opts = { local opts = {
settings = { settings = {
json = { json = {
schemas = extended_schemas, schemas = schemas,
}, },
}, },
setup = { setup = {

@ -74,6 +74,8 @@ return packer.startup(function(use)
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
run = ":TSUpdate", run = ":TSUpdate",
} }
use "p00f/nvim-ts-rainbow"
use "nvim-treesitter/playground"
-- Automatically set up your configuration after cloning packer.nvim -- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins -- Put this at the end after all plugins

@ -1,16 +1,27 @@
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
local configs = require("nvim-treesitter.configs")
configs.setup { configs.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages ensure_installed = "all",
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`) sync_install = false,
ignore_install = { "" }, -- List of parsers to ignore installing ignore_install = { "" }, -- List of parsers to ignore installing
highlight = { highlight = {
enable = true, -- false will disable the whole extension enable = true, -- false will disable the whole extension
disable = { "" }, -- list of language that will be disabled disable = { "" }, -- list of language that will be disabled
additional_vim_regex_highlighting = true, additional_vim_regex_highlighting = true,
}, },
indent = { enable = true, disable = { "yaml" } }, indent = { enable = true, disable = { "yaml" } },
} }

Loading…
Cancel
Save