diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-03-15 23:30:14 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-03-20 10:00:52 +0000 |
commit | e1db0e35e4d5859b96e6aff882df62d6c714b569 (patch) | |
tree | 8f6356c6a7cf6975c7bf26ad81fb3436ce1f90ae /runtime | |
parent | 84027f7515b8ee6f818462f105882fc0052783c4 (diff) | |
download | rneovim-e1db0e35e4d5859b96e6aff882df62d6c714b569.tar.gz rneovim-e1db0e35e4d5859b96e6aff882df62d6c714b569.tar.bz2 rneovim-e1db0e35e4d5859b96e6aff882df62d6c714b569.zip |
feat(api): add filetype option nvim_get_option_value
- Also adjust the expr-mapping behaviour so normal commands and text
changes are allowed in internal dummy buffers.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 4 | ||||
-rw-r--r-- | runtime/doc/news.txt | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index b8590026c8..04825381ff 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1969,6 +1969,10 @@ nvim_get_option_value({name}, {*opts}) *nvim_get_option_value()* • win: |window-ID|. Used for getting window local options. • buf: Buffer number. Used for getting buffer local options. Implies {scope} is "local". + • filetype: |filetype|. Used to get the default option for a + specific filetype. Cannot be used with any other option. + Note: this is expensive, it is recommended to cache this + value. Return: ~ Option value diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 64cf5d78ba..b7d5694802 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -210,6 +210,9 @@ The following new APIs or features were added. https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection . Support for the previous format will be removed in a future release. +• |nvim_get_option_value()| now has a `filetype` option so it can return the + default option for a specific filetype. + ============================================================================== CHANGED FEATURES *news-changes* |