Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Added support for user configuration#1079

Open
colbyn wants to merge5 commits intohaskell:master
base:master
Choose a base branch
Loading
fromcolbyn:new-hie-yaml-config

Conversation

colbyn
Copy link

This is something I added a little while ago and thought others may find this useful (includes a doc file./docs/hie-yaml-file.md).

The primary feature is to just simply disable interactive (as you type) analysis, as mentioned in the./docs/hie-yaml-file.md file. For a reference the RLS project has a similar option calledbuild_on_save (https://github.com/rust-lang/rls#configuration).

Copy link
Collaborator

@lukel97lukel97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could these options be added to the LSP configuration settings, instead of creating a new file/format?

dataConfig=
Config
{hlintOn::Bool
,maxNumberOfProblems::Int
,diagnosticsDebounceDuration::Int
,liquidOn::Bool
,completionSnippetsOn::Bool
,formatOnImportOn::Bool
}deriving (Show,Eq)

@colbyn
Copy link
Author

Certainly.

I’ve just implemented the necessary changes for using the preexisting settings format, and updated theREADME.md file. I’m not sure how it’s supposed to work in general. Perhaps it’s editor specific, yet for the life of me I couldn’t figure out how the json value/file is exchanged (from looking at thegetConfigFromNotification function)…

So as a workaround if the value isn’t available it defaults to checking for asettings.json file that then defaults to theDefault instance, i.e.configVal (onSaveOnly configFile) onSaveOnly >>= \case.

I suppose the name of this branch doesn’t make any sense now. I wasn’t sure what to rename it to so I left it as is.

@alanz
Copy link
Collaborator

@colbyn

Thesettings.json format is described so that LSP clients can know what options to provide when sending the configuration message through. So strictly speaking managing settings is a client issue, not a server issue.

It is also not clear to my whether theonSaveOnly mechanism is the right one to use for this, the flag makes sense, but I am not sure whether it should rather be implemented via theTextDocumentSyncKind setting forTextDocumentSyncOptions from the server, to switch it from incremental to full.

@lukel97
Copy link
Collaborator

@colbyn The settings.json location depends on the client, for LanguageClient-neovim it should be in.vim/settings.json. For VS Code you need to expose it via the extension, which is done in javascript.I recently created a PR to add a new option to it here

@alanzalanz modified the milestones:2019-02,2019-03Mar 2, 2019
@alanzalanz modified the milestones:2019-03,2019-04Apr 6, 2019
@alanzalanz modified the milestones:2019-04,2019-05May 4, 2019
@alanzalanz modified the milestones:2019-05,2019-06Jun 1, 2019
@alanzalanz modified the milestones:2019-06,Some timeJul 7, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@lukel97lukel97lukel97 left review comments

@alanzalanzAwaiting requested review from alanz

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
Some time
Development

Successfully merging this pull request may close these issues.

3 participants
@colbyn@alanz@lukel97

[8]ページ先頭

©2009-2025 Movatter.jp