@@ -7,47 +7,49 @@ A guide of developing `vscode-clangd` extension.
77* VS Code
88* node.js and npm
99
10- ## Steps
11-
12- 1 . Make sure you disable the installed ` vscode-clangd ` extension in VS Code.
13- 2 . Make sure you have clangd in ` /usr/bin/clangd ` or edit ` src/extension.ts ` to
14- point to the binary.
15- 3 . To start a development instance of VS code extended with this, run:
10+ ## Building and running (command line)
1611
1712``` bash
18- $ cd vscode-clangd
19- $ npm install
20- $ npm run compile # it runs in watch mode, so you can hit ctrl^ c.
21- $ code . --extensionDevelopmentPath=$PWD
13+ cd vscode-clangd
14+ npm install
15+ npm run compile # it runs in watch mode, you can hit ctrl- c.
16+ code --extensionDevelopmentPath=$PWD
2217```
2318
24- # Contributing
19+ ## Building, running, and debugging (VSCode)
2520
26- Please follow the existing code style when contributing to the extension, we
27- recommend to run ` npm run format ` before sending a patch.
21+ - ``` bash
22+ cd vscode-clangd
23+ npm install
24+ code .
25+ ```
26+ - with the ` vscode-clangd ` directory open in VSCode, select
27+ ` Run => Run Without Debugging ` or ` Run => Start Debugging `
2828
29- # Publish to VS Code Marketplace
29+ VSCode will recompile the sources for you before launching.
30+ If you change dependencies in ` package.json ` , you should run ` npm install ` .
3031
31- New changes to ` vscode-clangd ` are not released until a new version is published
32- to the marketplace.
32+ ## Editing and typechecking
3333
34- ## Requirements
34+ ` npm run compile ` does not actually typecheck the TypeScript code!
35+ (It stripts type annotations and bundles it, using ` esbuild ` ).
36+ You can see diagnostics with ` npm run check-ts ` .
3537
36- * Make sure install the ` vsce ` command ( ` npm install -g vsce ` )
37- * ` llvm-vs-code-extensions ` account
38- * Bump the version in ` package.json ` , and commit the change .
38+ Using a Typescript-aware editor will show you diagnostics, provide
39+ go-to-definition etc. VSCode works well, or any LSP-capable editor can use
40+ [ typescript-language-server ] ( https://github.com/typescript-language-server/typescript-language-server ) .
3941
40- The extension is published under ` llvm-vs-code-extensions ` account, which is
41- maintained by clangd developers. If you want to make a new release, please
42- 42+ # Contributing
4343
44- ## Steps
44+ Please follow the existing code style when contributing to the extension, we
45+ recommend to run ` npm run format ` before sending a patch.
4546
46- ``` bash
47- $ cd vscode-clangd
48- # For the first time, you need to login into the account. vsce will ask you
49- for the Personal Access Token and will remember it for future commands.
50- $ vsce login llvm-vs-code-extensions
51- # Publish the extension to the VSCode marketplace.
52- $ npm run publish
53- ```
47+ # Publish to Marketplace
48+
49+ To create a new release, create a commit that:
50+
51+ - increases the version number in ` package.json `
52+ - updates ` CHANGELOG.md ` to cover changes since the last release
53+
54+ Our CI will recognize the commit and publish new versions to the VSCode
55+ Marketplace and the alternative OpenVSX registry.
0 commit comments