aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/cs.vim8
-rw-r--r--runtime/ftplugin/lua.lua7
2 files changed, 11 insertions, 4 deletions
diff --git a/runtime/ftplugin/cs.vim b/runtime/ftplugin/cs.vim
index ada71315e1..d40fe43ebc 100644
--- a/runtime/ftplugin/cs.vim
+++ b/runtime/ftplugin/cs.vim
@@ -2,8 +2,7 @@
" Language: C#
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: 2022-11-16
-" 2024 Jan 14 by Vim Project (browsefilter)
+" Last Change: 2025-03-14
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -21,8 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+setlocal commentstring=//\ %s
-let b:undo_ftplugin = 'setl com< fo<'
+setlocal cinoptions=J1
+
+let b:undo_ftplugin = 'setl com< fo< cino<'
if exists('loaded_matchit') && !exists('b:match_words')
" #if/#endif support included by default
diff --git a/runtime/ftplugin/lua.lua b/runtime/ftplugin/lua.lua
index 75deb6b190..e0f7e95cf6 100644
--- a/runtime/ftplugin/lua.lua
+++ b/runtime/ftplugin/lua.lua
@@ -1,4 +1,9 @@
-- use treesitter over syntax
vim.treesitter.start()
-vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n call v:lua.vim.treesitter.stop()'
+vim.bo.omnifunc = 'v:lua.vim.lua_omnifunc'
+vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+
+vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
+ .. '\n call v:lua.vim.treesitter.stop()'
+ .. '\n setl omnifunc< foldexpr<'