add missing and case split for lsp
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* vscode LSP server module.
|
||||
*/
|
||||
|
||||
import { LSP_checkFile, LSP_updateFile, LSP_hoverInfo } from './newt.js'
|
||||
import { LSP_checkFile, LSP_updateFile, LSP_hoverInfo, LSP_codeActionInfo } from './newt.js'
|
||||
|
||||
import {
|
||||
createConnection,
|
||||
@@ -105,14 +105,21 @@ connection.onDefinition((params): Location | null => {
|
||||
return value.location
|
||||
})
|
||||
|
||||
connection.onCodeAction(({textDocument, range}) => {
|
||||
let actions = LSP_codeActionInfo(textDocument.uri, range.start.line, range.start.character);
|
||||
console.log('ACTIONS is ', JSON.stringify(actions,null,' '))
|
||||
return actions
|
||||
})
|
||||
|
||||
connection.onInitialize((_params: InitializeParams): InitializeResult => ({
|
||||
capabilities: {
|
||||
textDocumentSync: TextDocumentSyncKind.Incremental,
|
||||
hoverProvider: true,
|
||||
definitionProvider: true,
|
||||
codeActionProvider: true,
|
||||
},
|
||||
}));
|
||||
|
||||
documents.listen(connection);
|
||||
connection.listen();
|
||||
console.log('STARTED')
|
||||
console.log('STARTED')
|
||||
|
||||
Reference in New Issue
Block a user