Compare commits
2 commits
124de2356c
...
b9e5cfef5f
Author | SHA1 | Date | |
---|---|---|---|
b9e5cfef5f | |||
61deb05ce8 |
3 changed files with 123 additions and 0 deletions
|
@ -34,6 +34,9 @@ return {
|
|||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
},
|
||||
cmdline = {
|
||||
enabled = false
|
||||
},
|
||||
},
|
||||
opts_extend = { "sources.default" }
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ local server_configs = function()
|
|||
jedi_language_server = {},
|
||||
kcl = {},
|
||||
terraformls = {}
|
||||
jedi_language_server = {}
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -404,7 +405,9 @@ return {
|
|||
lazy = true,
|
||||
config = function()
|
||||
require('schema-companion').setup({
|
||||
schemas = {},
|
||||
enable_telescope = true,
|
||||
log_level = vim.log.levels.INFO,
|
||||
matchers = {
|
||||
require('schema-companion.matchers.kubernetes').setup({ version = 'master' }),
|
||||
},
|
||||
|
|
117
dot_config/nvim/queries/c_sharp/indents.scm
Normal file
117
dot_config/nvim/queries/c_sharp/indents.scm
Normal file
|
@ -0,0 +1,117 @@
|
|||
[
|
||||
(property_declaration)
|
||||
; (field_declaration)
|
||||
(variable_declaration)
|
||||
(accessor_declaration)
|
||||
|
||||
; (declaration_list)
|
||||
|
||||
(parameter_list)
|
||||
(type_parameter_list)
|
||||
(accessor_list)
|
||||
(attribute_argument_list)
|
||||
(base_list)
|
||||
(argument_list)
|
||||
|
||||
(binary_expression)
|
||||
(expression_statement)
|
||||
(return_statement)
|
||||
(local_declaration_statement)
|
||||
(local_function_statement)
|
||||
(yield_statement)
|
||||
(fixed_statement)
|
||||
(unsafe_statement)
|
||||
(labeled_statement)
|
||||
(for_each_statement)
|
||||
(for_statement)
|
||||
(if_statement)
|
||||
(switch_expression)
|
||||
(switch_section)
|
||||
(switch_statement)
|
||||
(while_statement)
|
||||
(lambda_expression)
|
||||
(do_statement)
|
||||
(checked_statement)
|
||||
(try_statement)
|
||||
(using_statement)
|
||||
(local_function_statement)
|
||||
(object_creation_expression)
|
||||
(array_creation_expression)
|
||||
(implicit_object_creation_expression)
|
||||
|
||||
] @indent.begin
|
||||
|
||||
(method_declaration body: _ @indent.begin)
|
||||
(namespace_declaration body: _ @indent.begin)
|
||||
(record_declaration body: _ @indent.begin)
|
||||
(class_declaration body: _ @indent.begin)
|
||||
(struct_declaration body: _ @indent.begin)
|
||||
(constructor_declaration body: _ @indent.begin)
|
||||
(interface_declaration body: _ @indent.begin)
|
||||
(enum_declaration body: _ @indent.begin)
|
||||
|
||||
(property_declaration (accessor_list "{" @indent.branch) @indent.dedent)
|
||||
|
||||
(switch_section
|
||||
(case_switch_label) (case_switch_label) @indent.branch)
|
||||
|
||||
|
||||
(if_statement (block "{" @indent.branch))
|
||||
(if_statement alternative: (if_statement) @indent.dedent)
|
||||
|
||||
(while_statement
|
||||
(block "{" @indent.branch))
|
||||
|
||||
(array_creation_expression
|
||||
(initializer_expression "{" @indent.branch))
|
||||
(object_creation_expression
|
||||
(initializer_expression "{" @indent.branch))
|
||||
(implicit_object_creation_expression
|
||||
(initializer_expression "{" @indent.branch))
|
||||
|
||||
(for_each_statement
|
||||
body: (block "{" @indent.branch))
|
||||
|
||||
(lambda_expression
|
||||
body: (block "{" @indent.branch))
|
||||
|
||||
(for_statement
|
||||
body: (block "{" @indent.branch))
|
||||
|
||||
(switch_expression "{" @indent.branch)
|
||||
|
||||
(switch_statement
|
||||
(switch_body "{" @indent.branch))
|
||||
|
||||
(try_statement
|
||||
body: (block "{" @indent.branch))
|
||||
(catch_clause
|
||||
body: (block "{" @indent.branch))
|
||||
(finally_clause
|
||||
(block "{" @indent.branch))
|
||||
|
||||
(fixed_statement
|
||||
(block "{" @indent.branch))
|
||||
|
||||
(using_statement
|
||||
body: (block "{" @indent.branch))
|
||||
|
||||
["catch" "finally" "else" "}" "]" ")" ] @indent.branch
|
||||
|
||||
["}" ")" "]" ] @indent.end
|
||||
|
||||
(expression_statement ";" @indent.end)
|
||||
|
||||
(local_function_statement ";" @indent.end)
|
||||
(local_declaration_statement ";" @indent.end)
|
||||
|
||||
; this is fucked up, because grammer doesn't match # as part of the token
|
||||
[
|
||||
(if_directive)
|
||||
(else_directive)
|
||||
(elif_directive)
|
||||
(endif_directive)
|
||||
(nullable_directive)
|
||||
(pragma_directive)
|
||||
(undef_directive)
|
||||
] @indent.zero
|
Loading…
Add table
Reference in a new issue