From 492718f2b6592f19d06d1a66fecd24eee0b8826c Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Fri, 22 Sep 2023 10:12:42 +0400 Subject: [PATCH] A bunch of small updates --- .vscode/launch.json | 41 +++++++++++++++++++++--------- README.md | 2 +- example.tl | 6 ++--- flake.nix | 4 +-- package.json | 7 ++--- src/extension.ts | 2 +- tale-tale.cabal => tales-lsp.cabal | 2 +- 7 files changed, 41 insertions(+), 23 deletions(-) rename tale-tale.cabal => tales-lsp.cabal (97%) diff --git a/.vscode/launch.json b/.vscode/launch.json index fb3718a..d4df9e9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,18 +1,35 @@ -// A launch configuration that launches the extension inside a new window +// A launch configuration that compiles the extension and then opens it inside a new window // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 { "version": "0.2.0", - "configurations": [ - { - "name": "Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}"], - "outFiles": ["${workspaceRoot}/out/**/*.js"], - "preLaunchTask": "npm: webpack" - } - ] + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ], + "outFiles": [ + "${workspaceFolder}/dist/**/*.js" + ], + "preLaunchTask": "${defaultBuildTask}" + }, + { + "name": "Extension Tests", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" + ], + "outFiles": [ + "${workspaceFolder}/out/**/*.js", + "${workspaceFolder}/dist/**/*.js" + ], + "preLaunchTask": "tasks: watch-tests" + } + ] } diff --git a/README.md b/README.md index 029651d..f7143c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tales language server -This is language server and vscode extension for very simple human-readable description language with file cross-linking. +This is a language server and a vscode extension for very simple human-readable description language with file cross-linking. See `example.tl` for more information about syntax. diff --git a/example.tl b/example.tl index 00fb966..7e59a22 100644 --- a/example.tl +++ b/example.tl @@ -1,6 +1,6 @@ > this is highlighted -# this is seams like a comment +# this seams like a comment keys: are: @@ -8,7 +8,7 @@ keys: are: /src/extension.ts -- link from the project root -./src/extension.ts -- link relative from the file +./src/extension.ts -- link relatively from the current's file folder !keys.are.highlighted -- link to the local key !keys..highlighted -- link to the local key with wildcard -!.are -- yet another example +!.are -- yet another example with wildcards diff --git a/flake.nix b/flake.nix index 978a2b5..5e020af 100644 --- a/flake.nix +++ b/flake.nix @@ -20,8 +20,7 @@ jailbreakUnbreak = pkg: pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; })); - # DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw` - packageName = "tale-tale"; + packageName = "tales-lsp"; in { packages.${packageName} = haskellPackages.callCabal2nix packageName self rec { @@ -37,6 +36,7 @@ ghcid cabal-install yarn + vsce ]; inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system}); }; diff --git a/package.json b/package.json index 6261496..042f92b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { - "name": "tale-tale", - "displayName": "tale-tale", + "name": "tales-lsp", + "displayName": "Tales LSP", + "publisher": "sand-witch", "description": "", "version": "0.0.1", "engines": { @@ -15,7 +16,7 @@ "url": "https://github.com/Player-205/tales-lsp" }, "activationEvents": [ - "onStartupFinished" + "onLanguage:tales" ], "main": "./dist/extension", "contributes": { diff --git a/src/extension.ts b/src/extension.ts index b21391f..4be9960 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -20,7 +20,7 @@ export function activate(context: any) { const serverOptions: ServerOptions = { run: { command: "tale-tale", transport: TransportKind.stdio }, debug: { - command: "tale-tale", + command: "tales-lsp", transport: TransportKind.stdio, } }; diff --git a/tale-tale.cabal b/tales-lsp.cabal similarity index 97% rename from tale-tale.cabal rename to tales-lsp.cabal index 3dd0563..f478d73 100644 --- a/tale-tale.cabal +++ b/tales-lsp.cabal @@ -19,7 +19,7 @@ extra-doc-files: CHANGELOG.md common warnings ghc-options: -Wall -executable tale-tale +executable tales-lsp import: warnings main-is: Main.hs