Skip to content

Commit

Permalink
Merge pull request #276 from KxSystems/ecmel-ls
Browse files Browse the repository at this point in the history
[WIP] KXI-34828: LS Refactoring and QLint Integration
  • Loading branch information
ecmel authored Apr 29, 2024
2 parents c0c311b + c4f986a commit 96ac54d
Show file tree
Hide file tree
Showing 40 changed files with 1,712 additions and 20,509 deletions.
2 changes: 1 addition & 1 deletion language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
"blockComment": ["/", "\\"],
"lineComment": "//"
},
"wordPattern": "(?:\\.[A-Za-z][A-Za-z_0-9.]*(?<!\\.)|[A-Za-z][A-Za-z_0-9]*|(?<=`)[.:\\w]+)"
"wordPattern": "\\.?[a-zA-Z][a-zA-Z0-9_]*(?:\\.[a-zA-Z0-9_]+)*\\b"
}
69 changes: 52 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,13 @@
"kdb.linting": {
"type": "boolean",
"description": "Enable linting for q files",
"default": true
"default": false
}
}
},
"commands": [
{
"category": "KX",
"command": "kdb.refreshServerObjects",
"title": "Refresh server objects",
"icon": {
Expand All @@ -201,22 +202,27 @@
}
},
{
"category": "KX",
"command": "kdb.startLocalProcess",
"title": "Start q process"
},
{
"category": "KX",
"command": "kdb.stopLocalProcess",
"title": "Stop q process"
},
{
"category": "KX",
"command": "kdb.addConnection",
"title": "Add new connection"
},
{
"category": "KX",
"command": "kdb.removeConnection",
"title": "Remove connection"
},
{
"category": "KX",
"command": "kdb.connect",
"title": "Connect server"
},
Expand All @@ -230,101 +236,130 @@
"position": "end"
},
{
"category": "KX",
"command": "kdb.enableTLS",
"title": "Enable TLS"
},
{
"category": "KX",
"command": "kdb.insightsConnect",
"title": "Connect to Insights"
},
{
"category": "KX",
"command": "kdb.insightsRemove",
"title": "Remove connection"
},
{
"category": "KX",
"command": "kdb.disconnect",
"title": "Disconnect"
},
{
"category": "KX",
"command": "kdb.queryHistory.rerun",
"title": "Rerun query"
},
{
"category": "KX",
"command": "kdb.queryHistory.clear",
"title": "Clear query history"
},
{
"category": "KX",
"command": "kdb.dataSource.addDataSource",
"title": "Add new DataSource"
},
{
"category": "KX",
"command": "kdb.dataSource.populateScratchpad",
"title": "Populate a new scratchpad"
},
{
"category": "KX",
"command": "kdb.dataSource.saveDataSource",
"title": "Save changes in the DataSource"
},
{
"category": "KX",
"command": "kdb.dataSource.runDataSource",
"title": "Execute DataSource at Inisghts Instance"
},
{
"category": "KX",
"command": "kdb.dataSource.renameDataSource",
"title": "Rename DataSource"
},
{
"category": "KX",
"command": "kdb.dataSource.deleteDataSource",
"title": "Delete DataSource"
},
{
"category": "KX",
"command": "kdb.dataSource.openDataSource",
"title": "Open DataSource"
},
{
"category": "KX",
"command": "kdb.resultsPanel.update",
"title": "Update Results View"
},
{
"category": "KX",
"command": "kdb.resultsPanel.clear",
"title": "Clear Results View"
},
{
"category": "KX",
"command": "kdb.resultsPanel.export.csv",
"title": "Export to CSV"
},
{
"category": "KX",
"command": "kdb.terminal.run",
"title": "Run q file in a new q instance",
"when": "kdb.QHOME || config.kdb.qHomeDirectory"
"icon": "$(run)",
"enablement": "(kdb.QHOME || config.kdb.qHomeDirectory)"
},
{
"category": "KX",
"command": "kdb.terminal.start",
"title": "q: Start REPL"
"title": "Start REPL"
},
{
"category": "KX",
"command": "kdb.execute.selectedQuery",
"title": "Execute Current Selection",
"when": "kdb.connected"
"title": "Execute Current Selection"
},
{
"category": "KX",
"command": "kdb.execute.fileQuery",
"title": "Execute Entire File",
"when": "kdb.connected"
"icon": "$(run)",
"enablement": "kdb.connected && editorFocus"
},
{
"category": "KX",
"command": "kdb.execute.pythonScratchpadQuery",
"title": "Execute Current Selection in Insights Scratchpad",
"when": "kdb.connected"
"title": "Execute Current Selection in Insights Scratchpad"
},
{
"category": "KX",
"command": "kdb.execute.pythonFileScratchpadQuery",
"title": "Execute Entire File in Insights Scratchpad",
"when": "kdb.connected"
"icon": "$(run)",
"enablement": "kdb.insightsConnected"
},
{
"category": "KX",
"command": "kdb.execute.entireFile",
"title": "Execute Entire File"
},
{
"category": "KX",
"command": "kdb.qlint",
"title": "Lint q source file"
}
],
"keybindings": [
Expand Down Expand Up @@ -607,20 +642,20 @@
"group": "dataSourceFiles"
}
],
"editor/title": [
"editor/title/run": [
{
"command": "kdb.terminal.run",
"when": "resourceLangId == q && (kdb.QHOME || config.kdb.qHomeDirectory)",
"group": "navigation"
"command": "kdb.execute.fileQuery",
"group": "q@0",
"when": "resourceLangId == q"
},
{
"command": "kdb.execute.fileQuery",
"when": "resourceLangId == q && kdb.connected && editorFocus",
"group": "navigation"
"command": "kdb.terminal.run",
"group": "q@1",
"when": "resourceLangId == q"
},
{
"command": "kdb.execute.pythonFileScratchpadQuery",
"group": "navigation",
"group": "q@0",
"when": "editorLangId == python && kdb.insightsConnected"
}
],
Expand Down
103 changes: 0 additions & 103 deletions server/src/linter/assign.ts

This file was deleted.

51 changes: 0 additions & 51 deletions server/src/linter/index.ts

This file was deleted.

Loading

0 comments on commit 96ac54d

Please sign in to comment.