Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit ffadea0

Browse files
authored
Refactor repository to contain server code (#1)
* Refactor repository to contain server code * Update directory to contain server code only * Remove client code * Update depedencies * Update build steps * add credits in readme
1 parent d79cf7f commit ffadea0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+193
-5258
lines changed

Diff for: .vscode/launch.json

+5-26
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,18 @@
55
{
66
"version": "0.2.0",
77
"configurations": [
8-
{
9-
"name": "Launch Extension (quick)", // does not use webpack
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"runtimeExecutable": "${execPath}",
13-
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14-
"outFiles": ["${workspaceFolder}/client/out/**/*.js"],
15-
"preLaunchTask": "npm: watch"
16-
},
17-
{
18-
"name": "Launch Extension",
19-
"type": "extensionHost",
20-
"request": "launch",
21-
"runtimeExecutable": "${execPath}",
22-
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
23-
"outFiles": ["${workspaceFolder}/client/out/**/*.js"],
24-
"preLaunchTask": "Webpack Watch"
25-
},
8+
// An attach configuration that attaches the debugger to a running server
269
{
2710
"name": "Attach to Server",
2811
"type": "node",
2912
"request": "attach",
3013
"timeout": 30000,
3114
"port": 6009,
3215
"restart": true,
33-
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
16+
"sourceMaps": true,
17+
"outFiles": ["${workspaceRoot}/out/**/*.js"],
18+
"protocol": "inspector",
19+
"trace": true
3420
}
3521
// {
3622
// "name": "Language Server E2E Test",
@@ -45,11 +31,4 @@
4531
// "outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
4632
// }
4733
],
48-
"compounds": [
49-
{
50-
"name": "Client + Server",
51-
"stopAll": true,
52-
"configurations": ["Launch Extension (quick)", "Attach to Server"]
53-
}
54-
]
5534
}

Diff for: .vscode/tasks.json

+1-17
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,11 @@
5656
},
5757
"problemMatcher": "$ts-webpack-watch"
5858
},
59-
{
60-
"label": "Client Watch",
61-
"type": "npm",
62-
"script": "webpack:watch:client",
63-
"isBackground": true,
64-
"group": {
65-
"kind": "build",
66-
"isDefault": true
67-
},
68-
"presentation": {
69-
"panel": "dedicated",
70-
"reveal": "never",
71-
"group": "Build"
72-
},
73-
"problemMatcher": "$ts-webpack-watch"
74-
},
7559
{
7660
// this requires manually closing terminal windows with watch processes
7761
// running, before the task can be launched again
7862
"label": "Webpack Watch",
79-
"dependsOn": ["Client Watch", "Server Watch"]
63+
"dependsOn": ["Server Watch"]
8064
},
8165
{
8266
"label": "Clean & Webpack Watch",

Diff for: CHANGELOG.md

+2-18
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,5 @@ All notable changes to the Ansible VS Code extension will be documented in this
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.3] - 2021-07-27
9-
### Changed
10-
- Error handling in case output from Ansible Lint can't be parsed is now more
11-
informative. Contextual information is now logged in `Ansible Server` output.
12-
13-
## [1.0.2] - 2021-07-19
14-
### Fixed
15-
- Modules from pre-installed Ansible collections will now be resolved when using
16-
the extension in an environment that also has Python 2 installed.
17-
- The cause of the `invalid syntax` error shown on startup has been removed.
18-
19-
## [1.0.1] - 2021-07-15
20-
### Fixed
21-
- Documentation fragments are now also correctly processed in case only one is
22-
provided, using YAML flow style. The `file` module is a prominent example.
23-
24-
## [1.0.0] - 2021-07-14
25-
- Initial release
8+
## [0.1.0] - 2021-07-28
9+
- Initial ansible language server release. Based on the vscode-ansible plugin developed by [Tomasz Maciążek](https://github.com/tomaciazek)

Diff for: LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

33
Copyright (c) 2021 Tomasz Maciążek
4+
Copyright (c) 2021 Red Hat Inc.
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# Ansible VS Code Extension
22
This extension adds language support for Ansible to VS Code.
33

4+
### Getting started
5+
6+
1. Install prerequisites:
7+
- latest [Visual Studio Code](https://code.visualstudio.com/)
8+
- [Node.js](https://nodejs.org/) v12.0.0 or higher
9+
2. Fork and clone this repository
10+
3. Install the dependencies
11+
```bash
12+
cd ansible-language-server
13+
$ yarn install
14+
```
15+
4. Build the language server
16+
```bash
17+
$ yarn run build
18+
```
19+
5. The new built server is now located in ./out/server/src/server.js.
20+
```bash
21+
node (Ansible Language Server Location)/out/server/src/server.js [--stdio]
22+
```
23+
424
## Features
525

626
### Syntax highlighting
@@ -102,3 +122,7 @@ any level (User, Remote, Workspace and/or Folder).
102122
have syntax highlighting of Jinja template files, you'll need to install other
103123
extension.
104124
- Jinja *blocks* (inside Ansible YAML files) are not supported yet.
125+
126+
## Credit
127+
128+
Based on the good work done by [Tomasz Maciążek](https://github.com/tomaciazek/vscode-ansible)

0 commit comments

Comments
 (0)