nvim: c# ts
This commit is contained in:
parent
04e11a2ba7
commit
c2763819f0
3 changed files with 121 additions and 25 deletions
90
dot_config/nvim/after/queries/c_sharp/indents.scm
Normal file
90
dot_config/nvim/after/queries/c_sharp/indents.scm
Normal file
|
@ -0,0 +1,90 @@
|
|||
[
|
||||
(property_declaration)
|
||||
(field_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)
|
||||
(if_statement)
|
||||
(switch_expression)
|
||||
(switch_section)
|
||||
(switch_statement)
|
||||
(while_statement)
|
||||
(lambda_expression)
|
||||
(do_statement)
|
||||
(checked_statement)
|
||||
(try_statement)
|
||||
(using_statement)
|
||||
|
||||
] @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)
|
||||
|
||||
(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))
|
||||
|
||||
(for_each_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
|
||||
|
||||
[
|
||||
(if_directive)
|
||||
(else_directive)
|
||||
(elif_directive)
|
||||
(endif_directive)
|
||||
(nullable_directive)
|
||||
(pragma_directive)
|
||||
(undef_directive)
|
||||
] @align.zero
|
|
@ -24,7 +24,7 @@ function M.config()
|
|||
enable_git_status = true,
|
||||
enable_diagnostics = false,
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
|
@ -40,28 +40,34 @@ function M.config()
|
|||
end,
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
'filesystem',
|
||||
'buffers',
|
||||
'git_status',
|
||||
'document_symbols',
|
||||
},
|
||||
renderers = {
|
||||
directory = {
|
||||
{ "indent" },
|
||||
{ "icon" },
|
||||
{ "current_filter" },
|
||||
{ "name" },
|
||||
{ "clipboard" },
|
||||
{ "diagnostics", errors_only = true },
|
||||
{ 'indent' },
|
||||
{ 'icon' },
|
||||
{ 'current_filter' },
|
||||
{ 'name' },
|
||||
{ 'clipboard' },
|
||||
{ 'diagnostics', errors_only = true },
|
||||
},
|
||||
file = {
|
||||
{ "indent" },
|
||||
{ "icon" },
|
||||
{ "diagnostics" },
|
||||
{ "modified" },
|
||||
{ "git_status" },
|
||||
{ 'indent' },
|
||||
{ 'icon' },
|
||||
{ 'diagnostics' },
|
||||
{ 'modified' },
|
||||
{ 'git_status' },
|
||||
{
|
||||
"name",
|
||||
'name',
|
||||
use_git_status_colors = true,
|
||||
zindex = 10
|
||||
zindex = 10,
|
||||
},
|
||||
{ "clipboard" },
|
||||
{ "bufnr" },
|
||||
{ 'clipboard' },
|
||||
{ 'bufnr' },
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
|
@ -103,9 +109,9 @@ function M.config()
|
|||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = '', -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = '', -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = '', -- this can only be used in the git_status source
|
||||
added = '', -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = '', -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = '', -- this can only be used in the git_status source
|
||||
renamed = '', -- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = '',
|
||||
|
@ -198,9 +204,9 @@ function M.config()
|
|||
'.null-ls_*',
|
||||
},
|
||||
},
|
||||
follow_current_file = false, -- This will find and focus the file in the active buffer every
|
||||
follow_current_file = false, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = 'open_default', -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
|
@ -225,7 +231,7 @@ function M.config()
|
|||
buffers = {
|
||||
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
|
|
|
@ -7,7 +7,7 @@ local M = {
|
|||
-- { dir = '/home/sogun/devel/nvim-yati/', }
|
||||
},
|
||||
event = 'BufRead',
|
||||
-- cmd {{{
|
||||
-- cmd {{{
|
||||
cmd = {
|
||||
'TSBufDisable',
|
||||
'TSBufEnable',
|
||||
|
@ -83,8 +83,8 @@ function M.config()
|
|||
},
|
||||
},
|
||||
indent = {
|
||||
-- disable = { "php" },-- php indent SUCKS A LOT
|
||||
enable = { 'xml' },
|
||||
disable = { "php" },-- php indent SUCKS A LOT
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
swap = {
|
||||
|
|
Loading…
Add table
Reference in a new issue