Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --"
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[workspace]
members = [
"crates/*",
"xtask/"
]

[workspace.package]
rust-version = "1.71"

[workspace.dependencies]
parser = { path = "./crates/parser", version = "0.0.0" }
triomphe = { version = "0.1.8", default-features = false, features = ["std"] }


23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ This is a proof of concept for building both a concrete syntax tree and an abstr

## Installation

```diff
- This is not ready for production use. Only install this if you want to help with development. -
```
> [!WARNING]
> This is not ready for production use. Only install this if you want to help with development.

### Neovim

Expand All @@ -83,6 +82,24 @@ require('lspconfig.configs').postgres_lsp = {
lsp.configure("postgres_lsp", {force_setup = true})
```

### Building from source

You'll need Cargo, Node, and npm installed.

If you are using VS Code, you can install both the server and the client extension by running:

``` sh
cargo xtask install
```

If you're not using VS Code, you can install the server by running:

``` sh
cargo xtask install --server
```

The server binary will be installed in `.cargo/bin`. Make sure that `.cargo/bin` is in `$PATH`.

## Contributors

- [psteinroe](https://github.com/psteinroe) (Maintainer)
Expand Down
2 changes: 2 additions & 0 deletions editors/code/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.eslintrc.js
46 changes: 46 additions & 0 deletions editors/code/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
env: {
es6: true,
node: true,
},
extends: ["prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
sourceType: "module",
},
plugins: ["@typescript-eslint"],
rules: {
camelcase: ["error"],
eqeqeq: ["error", "always", { null: "ignore" }],
curly: ["error", "multi-line"],
"no-console": ["error", { allow: ["warn", "error"] }],
"prefer-const": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "semi",
requireLast: true,
},
singleline: {
delimiter: "semi",
requireLast: false,
},
},
],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",

"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-import-type-side-effects": "error",
},
};
7 changes: 7 additions & 0 deletions editors/code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
out
node_modules
server
.vscode-test/
*.vsix
bundle
vscode.proposed.d.ts
3 changes: 3 additions & 0 deletions editors/code/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vscode-test
out
5 changes: 5 additions & 0 deletions editors/code/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
// use 100 because it's Rustfmt's default
// https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#max_width
printWidth: 100,
};
14 changes: 14 additions & 0 deletions editors/code/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**
!icon.png
!language-configuration.json
!LICENSE
!node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm
!node_modules/@hpcc-js/wasm/dist/index.min.js
!node_modules/d3-graphviz/build/d3-graphviz.min.js
!node_modules/d3/dist/d3.min.js
!out/main.js
!package-lock.json
!package.json
!ra_syntax_tree.tmGrammar.json
!server
!README.md
21 changes: 21 additions & 0 deletions editors/code/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Philipp Steinrötter

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions editors/code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# postgres_lsp for VSCode

This extension provides VSCode support for `postgres_lsp`.
Loading