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)
|
||||||
|
|
||||||
|
|
|
@ -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