Closed marcinjahn closed 5 months ago
Where is your ]c
mapping coming from (:verbose map <buffer> ]c
)? OmniSharp-vim doesn't define this mapping.
If you're referring to :OmniSharpNavigateDown
, that behaviour is specified by the server, so would have to be changed on the OmniSharp-roslyn side. However, testing it quickly just now, while you're right that it does skip record definitions, it still navigates to record properties, and struct definitions and properties. So here:
public struct MyStruct {
private int structVar;
public string StructProp { get; }
}
public record MyRecord {
private int recordVar = 9;
public string RecordProp { get; }
}
Navigating through with :OmniSharpNavigateDown
/:OmniSharpNavigateUp
we stop on MyStruct
, structVar
, StructProp
, recordVar
and RecordProp
. The only place it doesn't stop is on MyRecord
.
I'm using neovim, more specifically lazyvim. I just checked and it actually installs https://github.com/Hoffs/omnisharp-extended-lsp.nvim, so I suppose I should rather create this issue in that repo instead. Am I right?
Not sure if :OmniSharpNavigateDown
is the same thing, probably not. The action I'm referring to (no idea how it's called internally) is displayed as follows in the UI:
I realized that the proper place to submit the issue is https://github.com/nvim-treesitter/nvim-treesitter-textobjects. Closing.
The command
]c
should jump to the next type definition in a file. It properly navigates betweenclass
es. However, unfortunately, it skipsrecord
s andstruct
s entirely.Is it by design? I think it'd make sense to make it work for classes, structs and records.