Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

## 0.9.10
- Added indentation-style rules to the lint module with configurable indent size as specified in [example_lint_cfg.json](./example_files/example_lint_cfg.README)
- Configuration changes are now correctly tracked with the pull-model, and the
server should correctly update most settings without a restart on config
change.

## 0.9.9
- Fixed an issue that could cause analysis thread crash when an object was declared both
Expand Down
15 changes: 14 additions & 1 deletion clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ Once you have this basic support in place, the hard work begins:
* Implement [extensions to the protocol](clients.md#extensions-to-the-language-server-protocol)
* Client-side configuration.
- You'll need to send the `workspace/didChangeConfiguration` notification when
configuration changes.
configuration changes. You can either send the entire configuration in the
notification, or send "null" if your client supports pull-style configuration updates
(note that you need to support dynamic registration of
"didChangeConfiguration" and support the "workspace/configuration" request on the client
for pull-style updates)
- For the config options, see [config.rs](./src/config.rs#L99-L111)
* Check for and install the DLS
- Download the latest [binary](https://github.com/intel/dml-language-server/actions/workflows/rust.yml).
Expand Down Expand Up @@ -90,6 +94,7 @@ From Server to client:
* `client/registerCapability`
* `client/unregisterCapability`
* `textDocument/publishDiagnostics`
* `workspace/configuration` (if using pull-style configuration updates)

### Extensions to the Language Server Protocol

Expand Down Expand Up @@ -165,6 +170,14 @@ From Server to Client, these notifcations have a specified data value:
with the title "Analysing" when it starts on any long-term work, and a
'WorkDoneProgressEnd' with the corresponding id when it finishes all such
work.
* `workspace/configuration`
The server sends a single ConfigurationItem with no scope and a
"simics-modeling.dls" section. The client response value should be the
an array containing one element which is an object with the full
configuration structure for the server.
* `client/registerCapability`
The server may try to register on 'DidChangeWatchedFiles' or 'DidChangeConfiguration',
the latter being required for pull-style configuration updates.

## Resources

Expand Down
4 changes: 4 additions & 0 deletions src/actions/analysis_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ impl AnalysisStorage {
self.isolated_analysis.contains_key(path)
}

pub fn has_lint_analysis(&self, path: &CanonPath) -> bool {
self.lint_analysis.contains_key(path)
}

pub fn all_dependencies(&self,
path: &CanonPath,
context: Option<&CanonPath>)
Expand Down
6 changes: 3 additions & 3 deletions src/actions/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};

use crate::actions::InitActionContext;
use crate::lsp_data::*;
use crate::server::ResponseError;
use crate::server::{Output, ResponseError};

#[derive(Debug, Deserialize, Serialize, PartialEq, Eq)]
pub struct Tooltip {
Expand All @@ -16,8 +16,8 @@ pub struct Tooltip {
}

// Build a hover tooltip
pub fn tooltip(
ctx: &mut InitActionContext,
pub fn tooltip<O: Output>(
ctx: &mut InitActionContext<O>,
params: &TextDocumentPositionParams,
) -> Result<Tooltip, ResponseError> {
let hover_file_path = parse_file_path!(&params.text_document.uri, "hover")?;
Expand Down
Loading