{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab-vscode/issues/122","repository_url":"https://api.github.com/repos/openhab/openhab-vscode","labels_url":"https://api.github.com/repos/openhab/openhab-vscode/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab-vscode/issues/122/comments","events_url":"https://api.github.com/repos/openhab/openhab-vscode/issues/122/events","html_url":"https://github.com/openhab/openhab-vscode/pull/122","id":389026544,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MTMyOTUx","number":122,"title":"[WIP]Local LSP server that improves functionality like item completion","user":{"login":"SamuelBrucksch","id":8776268,"node_id":"MDQ6VXNlcjg3NzYyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/8776268?v=4","gravatar_id":"","url":"https://api.github.com/users/SamuelBrucksch","html_url":"https://github.com/SamuelBrucksch","followers_url":"https://api.github.com/users/SamuelBrucksch/followers","following_url":"https://api.github.com/users/SamuelBrucksch/following{/other_user}","gists_url":"https://api.github.com/users/SamuelBrucksch/gists{/gist_id}","starred_url":"https://api.github.com/users/SamuelBrucksch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamuelBrucksch/subscriptions","organizations_url":"https://api.github.com/users/SamuelBrucksch/orgs","repos_url":"https://api.github.com/users/SamuelBrucksch/repos","events_url":"https://api.github.com/users/SamuelBrucksch/events{/privacy}","received_events_url":"https://api.github.com/users/SamuelBrucksch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-12-09T14:06:17Z","updated_at":"2018-12-21T10:15:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/openhab/openhab-vscode/pulls/122","html_url":"https://github.com/openhab/openhab-vscode/pull/122","diff_url":"https://github.com/openhab/openhab-vscode/pull/122.diff","patch_url":"https://github.com/openhab/openhab-vscode/pull/122.patch"},"body":"Initial LSP impl with example from MS sample LSP:\r\nhttps://github.com/Microsoft/vscode-extension-samples/tree/master/lsp-sample\r\n\r\nTo test:\r\n```\r\nnpm install\r\nnpm compile\r\npress f5 in vscode\r\n```\r\n\r\nOpen a new file, and then select openhab as language or save as *.items/rules/...\r\n\r\nThe current sample will give 2 items for completion and diagnostics for UPPER-CASE-ONLY-TEXT:\r\n![image](https://user-images.githubusercontent.com/8776268/49698410-a9288680-fbc3-11e8-91d7-30f407cef279.png)\r\n\r\nTODO:\r\nThe diagnostics we will get from LSP remote server and forward to vscode later on. The Completions will be taken from REST api as before but will get cached in LSP server. Currently its hard coded just to demonstrate it works.\r\n\r\nThis will fix #95 when all the work is done.\r\n\r\nSigned-off-by: Samuel Brucksch <sasliga@freenet.de>"},"comment":{"url":"https://api.github.com/repos/openhab/openhab-vscode/issues/comments/449346292","html_url":"https://github.com/openhab/openhab-vscode/pull/122#issuecomment-449346292","issue_url":"https://api.github.com/repos/openhab/openhab-vscode/issues/122","id":449346292,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTM0NjI5Mg==","user":{"login":"SamuelBrucksch","id":8776268,"node_id":"MDQ6VXNlcjg3NzYyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/8776268?v=4","gravatar_id":"","url":"https://api.github.com/users/SamuelBrucksch","html_url":"https://github.com/SamuelBrucksch","followers_url":"https://api.github.com/users/SamuelBrucksch/followers","following_url":"https://api.github.com/users/SamuelBrucksch/following{/other_user}","gists_url":"https://api.github.com/users/SamuelBrucksch/gists{/gist_id}","starred_url":"https://api.github.com/users/SamuelBrucksch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamuelBrucksch/subscriptions","organizations_url":"https://api.github.com/users/SamuelBrucksch/orgs","repos_url":"https://api.github.com/users/SamuelBrucksch/repos","events_url":"https://api.github.com/users/SamuelBrucksch/events{/privacy}","received_events_url":"https://api.github.com/users/SamuelBrucksch/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T10:15:05Z","updated_at":"2018-12-21T10:15:05Z","author_association":"CONTRIBUTOR","body":"I think i have all the tests in place more or less...\r\n\r\nUnit:\r\n```\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\nFile                        |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\nAll files                   |      100 |    95.74 |      100 |      100 |                   |\r\n src                        |      100 |      100 |      100 |      100 |                   |\r\n  LSPServer.js              |      100 |      100 |      100 |      100 |                   |\r\n  Server.js                 |      100 |      100 |      100 |      100 |                   |\r\n src/DocumentValidation     |      100 |      100 |      100 |      100 |                   |\r\n  DocumentValidator.js      |      100 |      100 |      100 |      100 |                   |\r\n src/ItemCompletion         |      100 |    94.87 |      100 |      100 |                   |\r\n  Item.js                   |      100 |     87.5 |      100 |      100 |                56 |\r\n  ItemCompletionProvider.js |      100 |    96.77 |      100 |      100 |                31 |\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\n```\r\n\r\nIntegration:\r\n```\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\nFile                        |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\nAll files                   |     62.5 |    51.06 |    53.06 |    65.89 |                   |\r\n src                        |    57.45 |       25 |    27.78 |     67.5 |                   |\r\n  LSPServer.js              |      100 |      100 |      100 |      100 |                   |\r\n  Server.js                 |    53.49 |       25 |    27.78 |    63.89 |... 14,130,139,142 |\r\n src/DocumentValidation     |      100 |      100 |      100 |      100 |                   |\r\n  DocumentValidator.js      |      100 |      100 |      100 |      100 |                   |\r\n src/ItemCompletion         |    63.53 |    56.41 |    66.67 |    63.53 |                   |\r\n  Item.js                   |    52.63 |       25 |    46.67 |    52.63 |... 0,71,82,88,107 |\r\n  ItemCompletionProvider.js |    66.67 |    64.52 |    86.67 |    66.67 |... 8,89,90,92,167 |\r\n----------------------------|----------|----------|----------|----------|-------------------|\r\n```\r\n\r\nIntegration could still be a bit better, for example i have one TODO still left in the code, to create, update, remove items via rest api and check if the events come in. However that is a quite complex test and i will do it later."}}
{"actor":{"display_login":"SamuelBrucksch"}}