Browse Source

Initial commit

VHDL Tool 2 years ago
commit
3932a50f32
5 changed files with 149 additions and 0 deletions
  1. 2 0
      CHANGELOG.md
  2. 20 0
      LICENSE.md
  3. 50 0
      README.md
  4. 18 0
      lib/vhdl-tool.js
  5. 59 0
      package.json

+ 2 - 0
CHANGELOG.md

@@ -0,0 +1,2 @@
1
+## 0.1.0 - First Release
2
+* VHDL-Tool for Atom

+ 20 - 0
LICENSE.md

@@ -0,0 +1,20 @@
1
+Copyright (c) 2017 vhdl-tool
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining
4
+a copy of this software and associated documentation files (the
5
+"Software"), to deal in the Software without restriction, including
6
+without limitation the rights to use, copy, modify, merge, publish,
7
+distribute, sublicense, and/or sell copies of the Software, and to
8
+permit persons to whom the Software is furnished to do so, subject to
9
+the following conditions:
10
+
11
+The above copyright notice and this permission notice shall be
12
+included in all copies or substantial portions of the Software.
13
+
14
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 50 - 0
README.md

@@ -0,0 +1,50 @@
1
+# VHDL-Tool
2
+
3
+[VHDL-Tool](https://www.vhdltool.com/) provides a [language server](https://github.com/Microsoft/language-server-protocol) for the VHDL hardware description language. This plugin makes VHDL-Tool's language server interface available from within Atom.
4
+
5
+**This is beta quality code. Report bugs here: https://git.vhdltool.com/vhdl-tool/vhdltool-atom.**
6
+
7
+To use this plugin, you must first [download](https://www.vhdltool.com/download) VHDL-Tool. See the requirements section.
8
+
9
+For now, only Linux is supported.
10
+
11
+## Features
12
+
13
+* Syntax checking
14
+* Go to definition
15
+* Find references
16
+* Browse file symbols
17
+* Basic autocompletion
18
+
19
+## Screenshots
20
+![Syntax check and autocompletion](https://git.vhdltool.com/vhdl-tool/vhdltool-vscode/raw/master/images/autocompl-syntax.png)
21
+![File symbols and hover](https://git.vhdltool.com/vhdl-tool/vhdltool-vscode/raw/master/images/symbols-hover.png)
22
+
23
+## Usage
24
+* F12 - go to definition
25
+* Ctrl-Shift-F10 - peek definition
26
+* Shift-F12 - find references
27
+* Ctrl-Shift-o - find symbol in current file
28
+* Syntax checking occurs on save and the first time a file is opened
29
+* Autocompletion happens automatically when you type 
30
+
31
+## Requirements
32
+
33
+Before using this plugin, you must ensure that the `vhdl-tool` binary is installed on your system. To install `vhdl-tool` and setup your environment, do the following:
34
+
35
+1. Install this plugin.
36
+2. Download the `vhdl-tool` binary from [here](https://www.vhdltool.com/download), make sure it has execute permissions, and put it somewhere in your $PATH.
37
+3. Create a vhdltool-config.yaml configuration file for your project by following the instructions [here](https://www.vhdltool.com/configuration).
38
+4. Install one of the other VHDL plugins available in the marketplace for syntax highlighting. Search for VHDL in the extensions sidebar. **This step is compulsory as these plugins define the VHDL language and if VSCode does not know about VHDL it cannot launch the language server**.
39
+5. Launch VSCode and open the folder containing the configuration file created in the previous step.
40
+
41
+## Known Limitations
42
+* The go to definition and find references commands are not accurate in the presence of overloading. In the case of multiple overloaded identifiers with the same name, the type correct one may not be chosen.
43
+* No VHDL 2008 support yet.
44
+
45
+## Release Notes
46
+
47
+### 0.0.1
48
+
49
+Initial beta release of VHDL-Tool.
50
+

+ 18 - 0
lib/vhdl-tool.js

@@ -0,0 +1,18 @@
1
+const cp = require("child_process");
2
+const {AutoLanguageClient} = require('atom-languageclient')
3
+
4
+class VHDLLanguageClient extends AutoLanguageClient {
5
+  getGrammarScopes () { return [ 'source.vhdl' ] }
6
+  getLanguageName () { return 'VHDL' }
7
+  getServerName () { return 'vhdl-tool' }
8
+
9
+  startServerProcess() {
10
+    const command = "vhdl-tool"
11
+    const args = ["lsp"];
12
+
13
+    return cp.spawn(command, args);
14
+  }
15
+
16
+}
17
+
18
+module.exports = new VHDLLanguageClient()

+ 59 - 0
package.json

@@ -0,0 +1,59 @@
1
+{
2
+  "name": "vhdl-tool",
3
+  "main": "./lib/vhdl-tool",
4
+  "version": "0.0.0",
5
+  "description": "A VHDL language server",
6
+  "keywords": [],
7
+  "repository": "https://git.vhdltool.com/vhdl-tool/vhdltool-atom",
8
+  "license": "MIT",
9
+  "engines": {
10
+    "atom": ">=1.0.0 <2.0.0"
11
+  },
12
+  "dependencies": {
13
+    "atom-languageclient": "^0.4.0"
14
+  },
15
+  "consumedServices": {
16
+    "linter-indie": {
17
+      "versions": {
18
+        "2.0.0": "consumeLinterV2"
19
+      }
20
+    },
21
+    "datatip": {
22
+      "versions": {
23
+        "0.1.0": "consumeDatatip"
24
+      }
25
+    }
26
+  },
27
+  "providedServices": {
28
+    "autocomplete.provider": {
29
+      "versions": {
30
+        "2.0.0": "provideAutocomplete"
31
+      }
32
+    },
33
+    "code-format.range": {
34
+      "versions": {
35
+        "0.1.0": "provideCodeFormat"
36
+      }
37
+    },
38
+    "code-highlight": {
39
+      "versions": {
40
+        "0.1.0": "provideCodeHighlight"
41
+      }
42
+    },
43
+    "definitions": {
44
+      "versions": {
45
+        "0.1.0": "provideDefinitions"
46
+      }
47
+    },
48
+    "find-references": {
49
+      "versions": {
50
+        "0.1.0": "provideFindReferences"
51
+      }
52
+    },
53
+    "outline-view": {
54
+      "versions": {
55
+        "0.1.0": "provideOutlines"
56
+      }
57
+    }
58
+  }
59
+}