From 15662647d71e8fbe5ae0771419dea583db0e4caa Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 30 Dec 2025 23:46:29 +0100 Subject: [PATCH] chore(nvim): reintroduce typescript --- configuration.nix | 4 +++- pkgs/neovim/lua/plugins/format.lua | 2 +- pkgs/neovim/lua/plugins/lsp.lua | 16 +++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5332815..32369ff 100644 --- a/configuration.nix +++ b/configuration.nix @@ -50,7 +50,9 @@ in "rustfmt" "rust-analyzer" ]) - nodejs-slim_latest + nodejs_latest + prettierd + typescript-language-server pnpm nixd nixfmt-rfc-style diff --git a/pkgs/neovim/lua/plugins/format.lua b/pkgs/neovim/lua/plugins/format.lua index 2366f2f..e06515c 100644 --- a/pkgs/neovim/lua/plugins/format.lua +++ b/pkgs/neovim/lua/plugins/format.lua @@ -24,7 +24,7 @@ local function formatter(exe, args) } end -local prettier = formatter('prettier', { +local prettier = formatter('prettierd', { '--config-precedence prefer-file', '--single-quote', '--use-tabs', diff --git a/pkgs/neovim/lua/plugins/lsp.lua b/pkgs/neovim/lua/plugins/lsp.lua index 3305f19..854e2f7 100644 --- a/pkgs/neovim/lua/plugins/lsp.lua +++ b/pkgs/neovim/lua/plugins/lsp.lua @@ -11,11 +11,12 @@ return { mason_lspconfig.setup(lazy.opts) mason_lspconfig.setup_handlers({ - vim.lsp.enable + vim.lsp.enable, }) - vim.lsp.enable('nixd') - vim.lsp.enable('rust_analyzer') + for _, lsp in pairs({ 'nixd', 'rust_analyzer', 'ts_ls' }) do + vim.lsp.enable(lsp) + end end, dependencies = { 'mason-org/mason.nvim', @@ -51,11 +52,16 @@ return { menu = { auto_show = true, draw = { - columns = { { 'kind_icon' }, { 'label', 'label_description', gap = 1 }, { 'kind' } }, + columns = { + { 'kind_icon' }, + { 'label', 'label_description', gap = 1 }, + { 'kind' }, + }, components = { kind_icon = { text = function(ctx) - local icon, _, _ = common.icons_require().get('lsp', ctx.kind) + local icon, _, _ = + common.icons_require().get('lsp', ctx.kind) return icon end, },