mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
51 lines
1.4 KiB
Makefile
51 lines
1.4 KiB
Makefile
#!/usr/bin/env just --justfile
|
|
|
|
set dotenv-load := true
|
|
|
|
default:
|
|
@just --list
|
|
|
|
# Lint whole project
|
|
lint:
|
|
cd server && gofmt -s -w .
|
|
# cd vs-code-extension && yarn run lint
|
|
|
|
# Build config-lsp and test it in nvim (config-lsp will be loaded automatically)
|
|
[working-directory: "./server"]
|
|
test-nvim file:
|
|
go build -o ./result/bin/config-lsp && rm -rf ~/.local/state/nvim/lsp.log && DOTFILES_IGNORE_CONFIG_LSP=1 nvim {{file}} -c ':source nvim-lsp-debug.lua'
|
|
|
|
# Show Mason Logs
|
|
show-nvim-logs:
|
|
bat ~/.local/state/nvim/lsp.log
|
|
|
|
[working-directory: "./server"]
|
|
test:
|
|
nix develop --command bash -c 'go test ./... -count=1'
|
|
|
|
[working-directory: "./server"]
|
|
update-antlr-parsers:
|
|
# aliases
|
|
cd handlers/aliases && antlr4 -Dlanguage=Go -o ast/parser Aliases.g4
|
|
|
|
# fstab
|
|
cd handlers/fstab && antlr4 -Dlanguage=Go -o ast/parser Fstab.g4
|
|
|
|
# sshd_config
|
|
cd handlers/sshd_config && antlr4 -Dlanguage=Go -o ast/parser Config.g4
|
|
cd handlers/sshd_config/match-parser && antlr4 -Dlanguage=Go -o parser Match.g4
|
|
|
|
# ssh_config
|
|
cd handlers/ssh_config && antlr4 -Dlanguage=Go -o ast/parser Config.g4
|
|
cd handlers/ssh_config/match-parser && antlr4 -Dlanguage=Go -o parser Match.g4
|
|
|
|
# hosts
|
|
cd handlers/hosts && antlr4 -Dlanguage=Go -o ast/parser Hosts.g4
|
|
|
|
|
|
# Ready for a PR? Run this recipe before opening the PR!
|
|
ready:
|
|
just lint
|
|
just test
|
|
|