Skip to content

Commit e2c2014

Browse files
committed
Refactor and remove a load of unused stuff
This removes the show type command, the insert type command, the HaRe commands and the case split command – none of them have existed in HIE for a while now, and none of them are in ghcide/hls either
1 parent 4ccae6b commit e2c2014

File tree

8 files changed

+217
-622
lines changed

8 files changed

+217
-622
lines changed

package.json

Lines changed: 7 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"scope": "resource",
7777
"type": "number",
7878
"default": 100,
79-
"description": "Controls the maximum number of problems produced by the server."
79+
"description": "Controls the maximum number of problems produced by the server"
8080
},
8181
"languageServerHaskell.diagnosticsOnChange": {
8282
"scope": "resource",
@@ -114,23 +114,7 @@
114114
"none"
115115
],
116116
"default": "brittany",
117-
"description": "The tool to use for formatting requests."
118-
},
119-
"languageServerHaskell.showTypeForSelection.onHover": {
120-
"scope": "resource",
121-
"type": "boolean",
122-
"default": true,
123-
"description": "If true, when an expression is selected, the hover tooltip will attempt to display the type of the entire expression - rather than just the term under the cursor."
124-
},
125-
"languageServerHaskell.showTypeForSelection.command.location": {
126-
"scope": "resource",
127-
"type": "string",
128-
"enum": [
129-
"dropdown",
130-
"channel"
131-
],
132-
"default": "dropdown",
133-
"description": "Determines where the type information for selected text will be shown when the `showType` command is triggered (distinct from automatically showing this information when hover is triggered).\ndropdown: in a dropdown\nchannel: will be revealed in an output channel"
117+
"description": "The tool to use for formatting requests"
134118
},
135119
"languageServerHaskell.trace.server": {
136120
"scope": "resource",
@@ -140,7 +124,7 @@
140124
"messages"
141125
],
142126
"default": "off",
143-
"description": "Traces the communication between VSCode and the languageServerHaskell service."
127+
"description": "Traces the communication between VS Code and the language server."
144128
},
145129
"languageServerHaskell.logFile": {
146130
"scope": "resource",
@@ -157,63 +141,23 @@
157141
"ghcide"
158142
],
159143
"default": "haskell-ide-engine",
160-
"description": "Which haskell language server to use."
144+
"description": "Which language server to use."
161145
},
162146
"languageServerHaskell.hieExecutablePath": {
163147
"scope": "resource",
164148
"type": "string",
165149
"default": "",
166-
"description": "Set the path to your hie executable, if it's not already on your $PATH. Works with ~, ${HOME} and ${workspaceFolder}."
150+
"description": "Set the path to your language server executable, if it's not already on your $PATH. Works with ~, ${HOME} and ${workspaceFolder}."
167151
},
168152
"languageServerHaskell.enableHIE": {
169153
"scope": "resource",
170154
"type": "boolean",
171155
"default": true,
172-
"description": "Enable/disable HIE (useful for multi-root workspaces)."
156+
"description": "Enable/disable the language server (useful for multi-root workspaces)."
173157
}
174158
}
175159
},
176160
"commands": [
177-
{
178-
"command": "hie.commands.demoteDef",
179-
"title": "Haskell: Demote Definition",
180-
"description": "Move a definition one level down"
181-
},
182-
{
183-
"command": "hie.commands.liftOneLevel",
184-
"title": "Haskell: Lift One Level",
185-
"description": "Move definition one level up from where it is now"
186-
},
187-
{
188-
"command": "hie.commands.liftTopLevel",
189-
"title": "Haskell: Lift to Top Level",
190-
"description": "Move a definition to the top level"
191-
},
192-
{
193-
"command": "hie.commands.genApplicative",
194-
"title": "Haskell: Generalize Applicative",
195-
"description": "Generalize a monadic function to use applicative"
196-
},
197-
{
198-
"command": "hie.commands.deleteDef",
199-
"title": "Haskell: Delete Definition",
200-
"description": "Deletes a definition"
201-
},
202-
{
203-
"command": "hie.commands.insertType",
204-
"title": "Haskell: Insert type",
205-
"description": "Insert type for the expression"
206-
},
207-
{
208-
"command": "hie.commands.showType",
209-
"title": "Haskell: Show type",
210-
"description": "Show type for the expression"
211-
},
212-
{
213-
"command": "hie.commands.caseSplit",
214-
"title": "Haskell: Split case",
215-
"description": "Generate pattern matches for the identifier under the cursor"
216-
},
217161
{
218162
"command": "hie.commands.importIdentifier",
219163
"title": "Haskell: Import identifier",
@@ -224,30 +168,7 @@
224168
"title": "Haskell: Restart Haskell LSP server",
225169
"description": "Restart the Haskell LSP server"
226170
}
227-
],
228-
"keybindings": [
229-
{
230-
"command": "hie.commands.showType",
231-
"key": "ctrl+alt+t",
232-
"mac": "cmd+alt+t",
233-
"when": "editorTextFocus"
234-
}
235-
],
236-
"menus": {
237-
"editor/title": [
238-
{
239-
"when": "resourceLangId == haskell",
240-
"command": "hie.commands.demoteDef"
241-
}
242-
],
243-
"editor/context": [
244-
{
245-
"when": "resourceLangId == haskell",
246-
"command": "hie.commands.demoteDef",
247-
"group": "HaRe@1"
248-
}
249-
]
250-
}
171+
]
251172
},
252173
"scripts": {
253174
"vscode:prepublish": "webpack --mode production",

src/commands/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
export namespace CommandNames {
2-
export const InsertTypeCommandName = 'hie.commands.insertType';
3-
export const ShowTypeCommandName = 'hie.commands.showType';
42
export const ImportIdentifierCommandName = 'hie.commands.importIdentifier';
53
export const RestartHieCommandName = 'hie.commands.restartHie';
64
}

src/commands/insertType.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)