diff --git a/config/plugins/lang/default.nix b/config/plugins/lang/default.nix index 2d2a478..0e9aeaa 100644 --- a/config/plugins/lang/default.nix +++ b/config/plugins/lang/default.nix @@ -6,7 +6,9 @@ ./docker.nix ./html.nix ./json.nix + ./lua.nix ./nix.nix + ./protobuf.nix ./rust.nix ./ts.nix ./yaml.nix diff --git a/config/plugins/lang/lua.nix b/config/plugins/lang/lua.nix new file mode 100644 index 0000000..1c1556d --- /dev/null +++ b/config/plugins/lang/lua.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + plugins = { + lsp.servers.lua_ls.enable = true; + + conform-nvim.settings = { + formatters_by_ft = { + lua = [ "stylua" ]; + }; + + formatters = { + stylua = { + command = "${pkgs.stylua}/bin/stylua"; + }; + }; + }; + + lint = { + lintersByFt.lua = [ "luacheck" ]; + linters.luacheck.cmd = "${pkgs.lua54Packages.luacheck}/bin/luacheck"; + }; + }; +} diff --git a/config/plugins/lang/protobuf.nix b/config/plugins/lang/protobuf.nix new file mode 100644 index 0000000..971b7b1 --- /dev/null +++ b/config/plugins/lang/protobuf.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + + # Enable language server for protbuf files (.proto) + plugins = { + lsp.servers.protols = { + enable = true; + }; + + lint = { + lintersByFt = { + protobuf = [ "protobuf" ]; + }; + + linters = { + protobuf = { + cmd = "${pkgs.protolint}/bin/protolint"; + }; + }; + }; + }; +} +