mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
fix: Update version
This commit is contained in:
parent
fe8a42d37b
commit
50819894af
@ -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
5
server/common/log.go
Normal 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
25
server/common/options.go
Normal 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
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user