aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-02-04 09:01:53 +0300
committerA Farzat <a@farzat.xyz>2026-02-04 09:01:53 +0300
commitf9122cd66cebc5384916f4620a387b29c2e816de (patch)
tree0cc8fd19f7178754bf792786262ba514ae258d23
parentd7f7c0586512424b17da314aba60c2875aaf860f (diff)
downloadnvim-f9122cd66cebc5384916f4620a387b29c2e816de.tar.gz
nvim-f9122cd66cebc5384916f4620a387b29c2e816de.zip
Fix error caused by upgrade of nvim-treesitterHEADmaster
-rw-r--r--ftplugin/lua.lua4
-rw-r--r--ftplugin/markdown.lua4
-rw-r--r--ftplugin/rust.lua4
-rw-r--r--plugin-settings/nvim-treesitter.lua14
-rw-r--r--regular.vim6
5 files changed, 14 insertions, 18 deletions
diff --git a/ftplugin/lua.lua b/ftplugin/lua.lua
new file mode 100644
index 0000000..84afdd8
--- /dev/null
+++ b/ftplugin/lua.lua
@@ -0,0 +1,4 @@
+require('nvim-treesitter').install{ 'lua' }
+vim.treesitter.start()
+vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+vim.wo[0][0].foldmethod = 'expr'
diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua
new file mode 100644
index 0000000..82ac243
--- /dev/null
+++ b/ftplugin/markdown.lua
@@ -0,0 +1,4 @@
+require('nvim-treesitter').install{ 'markdown' }
+vim.treesitter.start()
+vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+vim.wo[0][0].foldmethod = 'expr'
diff --git a/ftplugin/rust.lua b/ftplugin/rust.lua
new file mode 100644
index 0000000..7634a86
--- /dev/null
+++ b/ftplugin/rust.lua
@@ -0,0 +1,4 @@
+require('nvim-treesitter').install{ 'rust' }
+vim.treesitter.start()
+vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+vim.wo[0][0].foldmethod = 'expr'
diff --git a/plugin-settings/nvim-treesitter.lua b/plugin-settings/nvim-treesitter.lua
index 4afe91e..2fd60d2 100644
--- a/plugin-settings/nvim-treesitter.lua
+++ b/plugin-settings/nvim-treesitter.lua
@@ -1,13 +1 @@
-require("nvim-treesitter.configs").setup({
- -- A list of parser names, or "all" (the four listed parsers should always be installed)
- ensure_installed = { "c", "lua", "vim" },
- ignore_install = { "org" },
-
- -- Automatically install missing parsers when entering buffer
- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
- auto_install = true,
-
- highlight = {
- enable = true,
- },
-})
+require('nvim-treesitter').install({ 'c', 'lua', 'markdown', 'vim' }):wait(300000) -- wait max. 5 minutes
diff --git a/regular.vim b/regular.vim
index 9f907df..8bd792e 100644
--- a/regular.vim
+++ b/regular.vim
@@ -9,7 +9,7 @@ set number
set relativenumber
" Use the wal colorscheme from the plugin if available.
-colorscheme wal
+colorscheme industry
" Add a red column after textwidth limit.
set colorcolumn=+1
@@ -38,10 +38,6 @@ set noarabicshape
set keymap=arabic
set iminsert=0
-" Folding based on treesitter
-set foldmethod=expr
-set foldexpr=nvim_treesitter#foldexpr()
-
" Disable mouse.
set mouse=