Bug 454247 - Cannot override / add to lsp settings in .kateproject
Summary: Cannot override / add to lsp settings in .kateproject
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.12.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-23 01:33 UTC by Robert Roland
Modified: 2024-01-17 20:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Roland 2022-05-23 01:33:40 UTC
SUMMARY

I've added the Ada Language Server to my User Server Settings:

```
{
    "servers": {
        "ada": {
            "command": ["ada_language_server"],
            "root": "",
            "url": "https://github.com/AdaCore/ada_language_server",
            "highlightingModeRegex": "^Ada$"
        }
    }
}
```

But when I attempt to set the projectFile setting in the .kateproject, nothing seems to happen:

```
{
    "name": "my project",
    "lspclient": {
        "ada": {
            "settings": {
                "ada": {
                    "projectFile": "plaidcl.gpr",
                    "enableIndexing": true
                }
            }
        }
    }
}
```

If I place that `settings` object inside the User Server Settings, it uses projectFile and sends it via a `workspace/didChangeConfiguration` message.

STEPS TO REPRODUCE

See above configuration snippets. 

OBSERVED RESULT

`workspace/didChangeConfiguration` message does not fire upon opening a source file within the project.

EXPECTED RESULT

`workspace/didChangeConfiguration` should fire, sending the settings from the .kateproject file.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 36
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.8-300.fc36.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics

ADDITIONAL INFORMATION
Comment 1 Robert Roland 2024-01-17 20:18:19 UTC
Marking as resolved - it's more a matter of me not knowing the proper configuration.

In .kateproject:

```
{
    "name": "my project",
    "lspclient": {
        "servers": {
            "ada": {
                "settings": {
                    "ada": {
                        "projectFile": "plaid.gpr",
                        "enableIndexing": true
                    }
                }
            }
        }
    }
}
```

It was missing the "servers" key

And in my user LSP settings, in case someone else wants to use the Ada language server:

```
{
    "servers": {
        "ada": {
            "command": ["ada_language_server"],
            "rootIndicationFilePatterns": ["*.gpr"],
            "url": "https://github.com/AdaCore/ada_language_server",
            "highlightingModeRegex": "^Ada$"
        }
    }
}
```

note the addition of rootIndicationFilePatterns