Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(settings): move the config of treesitter to core.settings #990

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions lua/core/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,31 @@ settings["dap_deps"] = {
"python", -- Python (debugpy)
}

-- Set here the Treesitter that will be installed and configured during boot.
-- Check the below link for all supported languages:
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
---@type string[]
settings["treesitter_deps"] = {
"bash",
"c",
"cpp",
"css",
"go",
"gomod",
"html",
"javascript",
"json",
"latex",
"lua",
"make",
"markdown",
"markdown_inline",
"python",
"rust",
"typescript",
"vimdoc",
"vue",
"yaml",
}

return require("modules.utils").extend_config(settings, "user.settings")
23 changes: 1 addition & 22 deletions lua/modules/configs/editor/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,7 @@ return vim.schedule_wrap(function()
vim.api.nvim_set_option_value("foldexpr", "nvim_treesitter#foldexpr()", {})

require("modules.utils").load_plugin("nvim-treesitter", {
ensure_installed = {
"bash",
"c",
"cpp",
"css",
"go",
"gomod",
"html",
"javascript",
"json",
"latex",
"lua",
"make",
"markdown",
"markdown_inline",
"python",
"rust",
"typescript",
"vimdoc",
"vue",
"yaml",
},
ensure_installed = require("core.settings")["treesitter_deps"],
highlight = {
enable = true,
disable = function(ft, bufnr)
Expand Down