aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-02 21:00:55 +0800
committerGitHub <noreply@github.com>2023-06-02 21:00:55 +0800
commit4b60267f82ef1947f8a583c02eaf502cf1db69ca (patch)
treeb2e181245724b67dd0ed8828537701a3dd6a3c6b /runtime
parent36fd2fcaae757e8ac64c8ff7a66e4f480a075dcf (diff)
downloadrneovim-4b60267f82ef1947f8a583c02eaf502cf1db69ca.tar.gz
rneovim-4b60267f82ef1947f8a583c02eaf502cf1db69ca.tar.bz2
rneovim-4b60267f82ef1947f8a583c02eaf502cf1db69ca.zip
feat(:source): source current ft=lua buffer as Lua code (#23802)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/news.txt3
-rw-r--r--runtime/doc/repeat.txt5
2 files changed, 7 insertions, 1 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 3fd2d4d40e..31f3ff2cd1 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -92,6 +92,9 @@ The following changes to existing APIs or features add new behavior.
• |LspRequest| autocmd callbacks now contain additional information about the LSP
request status update that occurred.
+• `:source` without arguments treats a buffer with its 'filetype' set to "lua"
+ as Lua code regardless of its extension.
+
==============================================================================
REMOVED FEATURES *news-removed*
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index b6cb126c3b..071b062957 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -183,7 +183,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
*:so* *:source* *load-vim-script*
:[range]so[urce] [file] Runs |Ex| commands or Lua code (".lua" files) from
- [file], or current buffer if no [file].
+ [file].
+ If no [file], the current buffer is used, and it is
+ treated as Lua code if its 'filetype' is "lua" or its
+ file name ends with ".lua".
Triggers the |SourcePre| autocommand.
*:source!*
:[range]so[urce]! {file}