From 444d03d3663cb4c8aaf4633a1a665bd56c352549 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 16 Jan 2024 13:56:36 -0600 Subject: [PATCH] nvim life with nim --- home/private_dot_config/nim/config.nims | 6 +++--- .../nvim/lua/plugins/language/nim.lua | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/home/private_dot_config/nim/config.nims b/home/private_dot_config/nim/config.nims index 852c942..293e6c1 100644 --- a/home/private_dot_config/nim/config.nims +++ b/home/private_dot_config/nim/config.nims @@ -34,8 +34,8 @@ let proc formatNimCode(pattern = r"^src/.*\.nim$") = let srcFiles = gorgeExCd(fmt"nimgrep --filenames -r '{pattern}' --noColor").output.split("\n")[0..^2] for file in srcFiles: - let cmd = "nph $1" % [file] - # let cmd = "nimpretty $1" % [file] + # let cmd = "nph $1" % [file] + let cmd = "nimpretty $1" % [file] echo "Running $1 .." % [cmd] exec(cmd) @@ -57,7 +57,7 @@ task i, "install package": task lexidInc, "bump lexigraphic id": let (vsn, code) = gorgeExCd("git describe --tags --always --dirty=-dev") - if code != 0: + if code != 0: echo "is this a git repo?" echo &"output: {vsn}" quit 1 diff --git a/home/private_dot_config/nvim/lua/plugins/language/nim.lua b/home/private_dot_config/nvim/lua/plugins/language/nim.lua index cc2c904..c975fc8 100644 --- a/home/private_dot_config/nvim/lua/plugins/language/nim.lua +++ b/home/private_dot_config/nvim/lua/plugins/language/nim.lua @@ -1,3 +1,13 @@ 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, + }, + } + } + } }