|
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] SublimeUmple LSP for Sublime TextThis guide explains how to set up the Umple Language Server with Sublime Text. Prerequisites
Installation1. Build the LSP serverFrom the umple-lsp directory: npm install npm run compile npm run download-jar 2. Install LSP packageOpen Sublime Text and install the LSP package via Package Control: 1. 3. Add Umple syntax definitionCopy the syntax file to your Sublime cp editors/sublime/Umple.sublime-syntax \ ~/Library/Application\ Support/Sublime\ Text/Packages/User/ Or create %YAML 1.2
---
name: Umple
file_extensions: [ump]
scope: source.umple
contexts:
main:
- match: '\b(class|interface|trait|enum|association|namespace|use)\b'
scope: keyword.control.umple
- match: '\b(isA|singleton|immutable|abstract|lazy|const)\b'
scope: keyword.other.umple
- match: '\b(Integer|String|Boolean|Double|Float|Date|Time)\b'
scope: storage.type.umple
- match: '//.*$'
scope: comment.line.umple
- match: '/\*'
push: block_comment
- match: '"[^"]*"'
scope: string.quoted.double.umple
block_comment:
- meta_scope: comment.block.umple
- match: '\*/'
pop: true
4. Configure LSPOpen LSP settings: Add the Umple client configuration: {
"clients": {
"umple": {
"enabled": true,
"command": ["node", "/path/to/umple-lsp/packages/server/out/server.js", "--stdio"],
"selector": "source.umple",
"initializationOptions": {
"umpleSyncJarPath": "/path/to/umple-lsp/packages/server/umplesync.jar",
"umpleSyncPort": 5558
}
}
}
}
Important: Update 5. Restart Sublime TextClose and reopen Sublime Text for all changes to take effect. Vim keybindings (Vintage mode)If you use Vintage mode, add this to your keybindings ( [
{
"keys": ["g", "d"],
"command": "lsp_symbol_definition",
"context": [
{ "key": "setting.command_mode", "operand": true }
]
}
]
Features
TroubleshootingLSP not starting
No syntax highlighting
Go-to-definition not working
UpdatingAfter pulling updates: cd /path/to/umple-lsp npm run compile Then restart Sublime Text. Original markdown source for this page: https://github.com/umple/umple-lsp/blob/master/editors/sublime/README.md |