lazy loading : treesitter
This commit is contained in:
parent
7464358bbf
commit
922089fc07
1
init.lua
1
init.lua
|
@ -36,7 +36,6 @@ g.indent_blankline_buftype_exclude = {"terminal"}
|
||||||
g.indent_blankline_show_trailing_blankline_indent = false
|
g.indent_blankline_show_trailing_blankline_indent = false
|
||||||
g.indent_blankline_show_first_indent_level = false
|
g.indent_blankline_show_first_indent_level = false
|
||||||
|
|
||||||
require "treesitter-nvim"
|
|
||||||
require "mappings"
|
require "mappings"
|
||||||
|
|
||||||
require "telescope-nvim"
|
require "telescope-nvim"
|
||||||
|
|
|
@ -11,7 +11,14 @@ return packer.startup(
|
||||||
use "norcalli/nvim-colorizer.lua"
|
use "norcalli/nvim-colorizer.lua"
|
||||||
|
|
||||||
-- lang stuff
|
-- lang stuff
|
||||||
use "nvim-treesitter/nvim-treesitter"
|
use {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
event = "BufRead",
|
||||||
|
config = function()
|
||||||
|
require("treesitter-nvim").config()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
use "neovim/nvim-lspconfig"
|
use "neovim/nvim-lspconfig"
|
||||||
|
|
||||||
-- load compe in insert mode only
|
-- load compe in insert mode only
|
||||||
|
@ -35,9 +42,9 @@ return packer.startup(
|
||||||
-- use "alvan/vim-closetag" -- for html
|
-- use "alvan/vim-closetag" -- for html
|
||||||
|
|
||||||
-- Comment
|
-- Comment
|
||||||
use "terrortylor/nvim-comment"
|
use "terrortylor/nvim-comment" -- snippet support
|
||||||
|
|
||||||
-- snippet support
|
-- snippet
|
||||||
use {
|
use {
|
||||||
"hrsh7th/vim-vsnip",
|
"hrsh7th/vim-vsnip",
|
||||||
event = "InsertCharPre"
|
event = "InsertCharPre"
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
local ts_config = require("nvim-treesitter.configs")
|
local M = {}
|
||||||
|
|
||||||
ts_config.setup {
|
M.config = function()
|
||||||
ensure_installed = {
|
local ts_config = require("nvim-treesitter.configs")
|
||||||
"javascript",
|
|
||||||
"html",
|
ts_config.setup {
|
||||||
"css",
|
ensure_installed = {
|
||||||
"bash",
|
"javascript",
|
||||||
"lua",
|
"html",
|
||||||
"json",
|
"css",
|
||||||
"python"
|
"bash",
|
||||||
-- "rust",
|
"lua",
|
||||||
-- "go"
|
"json",
|
||||||
},
|
"python"
|
||||||
highlight = {
|
-- "rust",
|
||||||
enable = true,
|
-- "go"
|
||||||
use_languagetree = true
|
},
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
use_languagetree = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
Loading…
Reference in New Issue