mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
@@ -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*
|
||||
|
||||
|
Reference in New Issue
Block a user