Haskero, a Haskell IDE
Haskero is a full featured haskell IDE using Intero backend
Key features
- Code Highlight and snippets (automatic dependency on Haskell Syntax Highlighting)
- Compilation errors and warnings
- Insert type signature + yellow bulb help
- Goto definition
- Find all references
- Identifiers types on hover
- Code completion
- Rename identifier
- Switching cabal targets
- Hoogle integration (automatic dependency on Hoogle vscode)
Installation instructions
See installation instructions
Features
GHC Warnings and errors (on save)
Errors on save
Warnings on save
Identifier type definition
Type definition on hover (or ctr+k,ctr+i)
Goto definition
Goto Identifier definition (or F12)
Find all references
Find all references of a symbol in the same module (shift+F12)
Automatic types insertion
Insert identifier type
Haskero can insert any identifier type one live above.
taxe m =
foldl calculate (0,m) (bounds2 0 bounds)
with ctrl+shift+p > haskell: Instert Type
it becomes
taxe :: Double -> (Double, Double)
taxe m =
foldl calculate (0,m) (bounds2 0 bounds)
You can associate a short cut (eg: here ctrl+k t):
keybindings.json (File > Preferences > Keyboard Shortcuts)
{
"key": "ctrl+k t",
"command": "haskero.insertType",
"when": "editorTextFocus"
}
An automatique code action is available for inserting types above. Set the cursor on the function definition, a small bulb appears. You can click to see all available actions.
Switching cabal targers
Support for chosing the cabal targets used in the IDE. Thereby, intellisense is working on test projects.
To change the current target, use the status bar button "Default targets" at the bottom right.
Rich autocompletion
Automatic completion of imports, variables, types, etc. with type and module information.
Rename
Rename function identifier in the module and definition site.
Rename doesn't work on Types, Class or data.
To rename, press F2
, or right click / rename.
Settings
Haskero settings to change the default behavior or customizing intero startup parameters.
{
"haskero.intero.ignoreDotGhci": {
"type": "boolean",
"default": true,
"description": "Ignore '.ghci' config files when launching intero ghci"
},
"haskero.intero.startupParams": {
"type": "array",
"default": [
"--no-build",
"--no-load"
],
"description": "(Warning, can break Haskero behavior) Parameters sent to intero ghci"
},
"haskero.intero.stackPath": {
"type": "string",
"default": "stack",
"description": "(Warning, can break Haskero behavior) path to the stack executable."
},
"haskero.intero.ghciOptions": {
"type": "array",
"default": [
"-Wall"
],
"description": "(Warning, can break Haskero behavior) Parameters sent to intero ghci via --ghci-options"
},
"haskero.maxAutoCompletionDetails": {
"type": "number",
"default": 100,
"description": "Maximum autocompletion information requests sent to get type info/module in the autocompletion flow. Set to 0 to disable details info in autocompletion."
},
"haskero.debugMode": {
"type": "boolean",
"default": false,
"description": "Active debug mode. Can slow down haskero."
}
}
Incoming improvements
- [x] Support switching cabal targets
- [x] Better auto completion (support dot notation for qualified imports, ...)
- [x] Insert identifier type one line above
- [ ] Goto definition in hackage
- [ ] Live evaluation of random haskell code in the current module scope
Dependencies
Feedback
Bugs
To fill a bug, go to my gitlab repository, open an issue and use the following pattern:
Bug description :
Observed behaviour :
Expected behaviour :
OS: windows | linux | macos
Plugin (ghc, stack, intero and haskero) version and VSCode version used :
Steps to reproduce:
- If the issue is hard to repeat on an empty haskell project, a link to a repository containing a sample repeating the issue
Features
To ask for a feature, check if the feature is already requested (features on the gitlab repository).
If not, create a new issue with the feature requested label.
How it works ?
For technical information, please refer to the server project readme
License
CeCILL