diff --git a/nix/core.nix b/nix/core.nix index 83812ea..bcf5e70 100644 --- a/nix/core.nix +++ b/nix/core.nix @@ -39,9 +39,11 @@ dive ctop bottom + tailscale # Nodejs nodejs_20 + deno # Golang go diff --git a/nvim/lua/code_helpers.lua b/nvim/lua/code_helpers.lua index e58042f..ce033aa 100644 --- a/nvim/lua/code_helpers.lua +++ b/nvim/lua/code_helpers.lua @@ -134,7 +134,7 @@ require("mason-lspconfig").setup({ "bashls", -- bash "bufls", -- buf "cssls", -- css - -- "denols", -- deno + "denols", -- deno "dockerls", -- docker "docker_compose_language_service", -- docker-compose "eslint", -- eslint @@ -162,6 +162,24 @@ require("mason-lspconfig").setup({ require("mason-lspconfig").setup_handlers({ function(server_name) + -- DenoLSP and TSServer should not be run + -- at the same time. + -- https://docs.deno.com/runtime/manual/getting_started/setup_your_environment#neovim-06-using-the-built-in-language-server + if server_name == "denols" then + require("lspconfig")[server_name].setup({ + capabilities = require("cmp_nvim_lsp").default_capabilities(), + root_dir = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc"), + }) + return + end + if server_name == "tsserver" then + require("lspconfig")[server_name].setup({ + capabilities = require("cmp_nvim_lsp").default_capabilities(), + root_dir = require("lspconfig.util").root_pattern("package.json"), + single_file_support = false, + }) + return + end require("lspconfig")[server_name].setup({ capabilities = require("cmp_nvim_lsp").default_capabilities(), }) diff --git a/switch.sh b/switch.sh index 65ed2f0..83f5bdd 100755 --- a/switch.sh +++ b/switch.sh @@ -1,7 +1,7 @@ #!/bin/env bash source common.sh -echo_header "== DotFiles with GUI: $GUI and ENV: $ENVIRONMENT" +echo_header "== DotFiles with ENV: $ENVIRONMENT" echo_header "==[host] Installing Home Manager packages" workspace_link nix/home.nix .config/home-manager/home.nix