Hi,
Snippets and keybindings use scope selectors to determine the context in which they should be active.
Both concepts are only configurable globally.
Would it be an idea to add a project specific “scope” configuration option that lets users define an additional base scope like “myproject” which the scope selectors can use, to allow project specific settings of both mentioned entities?
Suggestion: project scope for scope selectors
erazor
#1
0 Likes
kingkeith
#2
keybindings can use settings or even plugin implemented code to control when they apply…
0 Likes
Remi
#3
Under what use case do you imagine a keybinding or code snippet should work in one project of a certain type (or language) and not under another project of that same type or language? What is gained?
There are project specific settings that are applied for customization. Some packages take advantage of this and look for additional settings in this file.
0 Likes
erazor
#4
For example in LSP activated projects I’d like to set key F12 to “lsp_symbol_definition” instead of “goto_definition”.
For a C library with method name prefix and fixed int error return it would make IMHO sense to provide snippets like
int mylib_${1:name}(${2:args) {
$0
return 0;
}
0 Likes