Bug 452813 - [LSP] Add Omnisharp-roslyn C# Language Server to the Default Settings List
Summary: [LSP] Add Omnisharp-roslyn C# Language Server to the Default Settings List
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: scripting (show other bugs)
Version: 21.12.3
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL: https://github.com/OmniSharp/omnishar...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-21 03:08 UTC by nekonexus
Modified: 2022-09-02 04:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nekonexus 2022-04-21 03:08:53 UTC
SUMMARY

I realize that Omisharp-roslyn is... feature-filled with its settings configuration; it would be great if getting at least a default implementation in the settings tab for the language servers (or its own tab if it would be large), so that setting it up with Kate isn't a huge hassle by default. As-is, how to configure it for Kate is a bit confusing to get done right since it's quite complex on its own.


STEPS TO REPRODUCE
1. Install omnisharp-roslyn
2. Attempt to configure for it in Kate
3. Struggle to get it set-up properly as one would following the existing examples

OBSERVED RESULT

Setting up omnisharp-roslyn with Kate is seemingly complex by default.
It accepts the following but doesn't seem to do anything (not to mention there are many other omnisharp values):

{
    "servers": {
        "c-sharp": {
            "command": ["omnisharp", "-lsp", "-e"],
            "commandDebug": ["omnisharp", "--debug", "--verbose"],
            "url": "https://github.com/OmniSharp/omnisharp-roslyn",
            "highlightingModeRegex": "^Cs$"
        }
    }
}

DESIRED RESULT

Having an existing preset configuration for omnisharp (STDIO - as it's to my understanding Kate uses it) to tweak as desired, if needed.

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
N/A
Comment 1 Eric Armbruster 2022-04-22 11:11:25 UTC
The provided config is almost correct. The following works for me:

        "c-sharp": {
            "command": ["omnisharp", "-lsp"],
            "commandDebug": ["omnisharp", "--debug", "--verbose"],
            "url": "https://github.com/OmniSharp/omnisharp-roslyn",
            "highlightingModeRegex": "^C#$"
        },

I get some errors in the Output console, but generally it seems to work. Will submit a patch for this.
Comment 2 Christoph Cullmann 2022-04-23 16:59:39 UTC
Git commit 772a89ac0d2dc957b047cca87fbbb2461de8ef81 by Christoph Cullmann, on behalf of Eric Armbruster.
Committed on 23/04/2022 at 16:21.
Pushed by cullmann into branch 'master'.

Add default config for c-sharp language server

M  +6    -0    addons/lspclient/settings.json

https://invent.kde.org/utilities/kate/commit/772a89ac0d2dc957b047cca87fbbb2461de8ef81