fix: Update version

This commit is contained in:
Myzel394 2025-02-13 21:27:18 +01:00
parent fe8a42d37b
commit 50819894af
No known key found for this signature in database
GPG Key ID: ED20A1D1D423AF3F
6 changed files with 34 additions and 3 deletions

View File

@ -23,7 +23,7 @@
"aarch64-windows" "aarch64-windows"
] (system: ] (system:
let let
version = "0.1.2"; # CI:CD-VERSION version = "0.1.3"; # CI:CD-VERSION
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ overlays = [

5
server/common/log.go Normal file
View File

@ -0,0 +1,5 @@
package common
import "github.com/tliron/commonlog"
var Log = commonlog.GetLogger("config-lsp")

25
server/common/options.go Normal file
View File

@ -0,0 +1,25 @@
package common
import (
"os"
"slices"
)
// Global options for the server
type ServerOptionsType struct {
// If true, the server will not return any errors if the
// language was undetectable.
// This is used for example in the VS Code extension, where
// we show a native warning. The error message boxes just clutter
// the interface.
NoUndetectableErrors bool
}
var ServerOptions = new(ServerOptionsType)
func InitServerOptions() {
if slices.Contains(os.Args, "--no-undetectable-errors") {
Log.Info("config-lsp will not return errors for undetectable files")
ServerOptions.NoUndetectableErrors = true
}
}

View File

@ -8,6 +8,7 @@ import (
func analyzeValuesAreValid( func analyzeValuesAreValid(
ctx *analyzerContext, ctx *analyzerContext,
) { ) {
// Check if there are unknown options
for _, info := range ctx.document.Config.GetAllOptions() { for _, info := range ctx.document.Config.GetAllOptions() {
option := info.Option option := info.Option
block := info.Block block := info.Block

View File

@ -2,4 +2,4 @@ package roothandler
// The comment below at the end of the line is required for the CI:CD to work. // The comment below at the end of the line is required for the CI:CD to work.
// Do not remove it // Do not remove it
var Version = "0.1.2" // CI:CD-VERSION var Version = "0.1.3" // CI:CD-VERSION

View File

@ -2,7 +2,7 @@
"name": "config-lsp", "name": "config-lsp",
"description": "Language Features (completions, diagnostics, etc.) for your config files: gitconfig, fstab, aliases, hosts, wireguard, ssh_config, sshd_config, and more to come!", "description": "Language Features (completions, diagnostics, etc.) for your config files: gitconfig, fstab, aliases, hosts, wireguard, ssh_config, sshd_config, and more to come!",
"author": "Myzel394", "author": "Myzel394",
"version": "0.1.2", "version": "0.1.3",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/Myzel394/config-lsp" "url": "https://github.com/Myzel394/config-lsp"