fix nvim: nvim-treesitter
This commit is contained in:
parent
bba73ba72c
commit
f451e0e0fa
@ -22,3 +22,14 @@ vim.opt.colorcolumn = "80,120" -- 顯示編輯器建議寬度
|
||||
vim.opt.scrolloff = 3 -- 捲動時保留 n 行彈性
|
||||
require("config.listchars") -- 顯示行尾符號
|
||||
vim.opt.list = true
|
||||
|
||||
-- 設定正確的檔案類型對應
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".+%.sh%.tmpl"] = "bash",
|
||||
[".+%.zsh%.tmpl"] = "zsh",
|
||||
[".+%.ps1%.tmpl"] = "powershell",
|
||||
[".+%.py%.tmpl"] = "python",
|
||||
[".+%.go%.tmpl"] = "go",
|
||||
},
|
||||
})
|
||||
|
@ -12,8 +12,16 @@ return {
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "php", "python", "go", "html", "css", "javascript" },
|
||||
-- ensure_installed = { "regex" }, -- 確保安裝 regex 支援
|
||||
ensure_installed = {
|
||||
"regex",
|
||||
"lua",
|
||||
"php",
|
||||
"python",
|
||||
"go",
|
||||
"html",
|
||||
"css",
|
||||
"javascript"
|
||||
},
|
||||
highlight = {
|
||||
enable = true, -- 啟用高亮
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user