feat(config): add ability to add ensured_installed for treesitter
This commit is contained in:
parent
8dde6a3f09
commit
9ed1d49ae5
3 changed files with 30 additions and 15 deletions
|
@ -8,6 +8,19 @@ config.statusline = {
|
|||
main_icon = '★',
|
||||
}
|
||||
|
||||
config.treesitter = {
|
||||
ensure_installed = {
|
||||
'typescript',
|
||||
'javascript',
|
||||
'tsx',
|
||||
'html',
|
||||
'css',
|
||||
'lua',
|
||||
'json',
|
||||
'scss',
|
||||
},
|
||||
}
|
||||
|
||||
config.lsp = {
|
||||
|
||||
-- true/false or table of filetypes {'.ts', '.js',}
|
||||
|
@ -17,6 +30,7 @@ config.lsp = {
|
|||
rename_notification = false,
|
||||
|
||||
diagnostic = {
|
||||
|
||||
-- disable diagnostic virtual text (see :h vim.diagnostic.config for all options)
|
||||
virtual_text = false,
|
||||
|
||||
|
@ -28,6 +42,7 @@ config.lsp = {
|
|||
|
||||
-- disable underline for diagnostic
|
||||
underline = false,
|
||||
|
||||
},
|
||||
|
||||
servers = {
|
||||
|
@ -36,7 +51,7 @@ config.lsp = {
|
|||
eslint = false,
|
||||
|
||||
-- enable non-default servers, use default lsp config
|
||||
-- check here for configs that will be used: https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers
|
||||
-- check here for configs that will be used by default: https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers
|
||||
rust_analyzer = true,
|
||||
|
||||
tsserver = {
|
||||
|
|
|
@ -15,6 +15,18 @@ local default_config = {
|
|||
statusline = {
|
||||
main_icon = require('cosmic.core.theme.icons').ghost,
|
||||
},
|
||||
treesitter = {
|
||||
ensure_installed = {
|
||||
'typescript',
|
||||
'javascript',
|
||||
'tsx',
|
||||
'html',
|
||||
'css',
|
||||
'lua',
|
||||
'json',
|
||||
'scss',
|
||||
},
|
||||
},
|
||||
lsp = {
|
||||
format_on_save = true, -- true/false or table of filetypes {'.ts', '.js',}
|
||||
rename_notification = true,
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
local config = require('cosmic.config')
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = {
|
||||
'typescript',
|
||||
'javascript',
|
||||
'tsx',
|
||||
'html',
|
||||
'css',
|
||||
'bash',
|
||||
'lua',
|
||||
'json',
|
||||
'python',
|
||||
'php',
|
||||
'scss',
|
||||
'go',
|
||||
},
|
||||
ensure_installed = config.treesitter.ensure_installed,
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
|
|
Loading…
Add table
Reference in a new issue