nvim life with nim
This commit is contained in:
parent
da89e73b60
commit
444d03d366
2 changed files with 14 additions and 4 deletions
|
@ -34,8 +34,8 @@ let
|
||||||
proc formatNimCode(pattern = r"^src/.*\.nim$") =
|
proc formatNimCode(pattern = r"^src/.*\.nim$") =
|
||||||
let srcFiles = gorgeExCd(fmt"nimgrep --filenames -r '{pattern}' --noColor").output.split("\n")[0..^2]
|
let srcFiles = gorgeExCd(fmt"nimgrep --filenames -r '{pattern}' --noColor").output.split("\n")[0..^2]
|
||||||
for file in srcFiles:
|
for file in srcFiles:
|
||||||
let cmd = "nph $1" % [file]
|
# let cmd = "nph $1" % [file]
|
||||||
# let cmd = "nimpretty $1" % [file]
|
let cmd = "nimpretty $1" % [file]
|
||||||
echo "Running $1 .." % [cmd]
|
echo "Running $1 .." % [cmd]
|
||||||
exec(cmd)
|
exec(cmd)
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ task i, "install package":
|
||||||
|
|
||||||
task lexidInc, "bump lexigraphic id":
|
task lexidInc, "bump lexigraphic id":
|
||||||
let (vsn, code) = gorgeExCd("git describe --tags --always --dirty=-dev")
|
let (vsn, code) = gorgeExCd("git describe --tags --always --dirty=-dev")
|
||||||
if code != 0:
|
if code != 0:
|
||||||
echo "is this a git repo?"
|
echo "is this a git repo?"
|
||||||
echo &"output: {vsn}"
|
echo &"output: {vsn}"
|
||||||
quit 1
|
quit 1
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
return {
|
return {
|
||||||
require("util").setup_lang({ treesitter = { "nim", "nim_format_string" }, mason = { "nimlsp" } }),
|
require("util").setup_lang({ treesitter = { "nim", "nim_format_string" } }),
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
nimls = {
|
||||||
|
mason = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue