From 7690940398179c061ad13df0da63c1211e7d8d6d Mon Sep 17 00:00:00 2001 From: Jannik Buhr Date: Tue, 3 Sep 2024 12:27:21 +0200 Subject: [PATCH 1/2] molten tests --- lua/config/keymap.lua | 4 ++-- lua/plugins/lsp.lua | 6 +++--- lua/plugins/quarto.lua | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/config/keymap.lua b/lua/config/keymap.lua index 1dd601b..d767bcb 100644 --- a/lua/config/keymap.lua +++ b/lua/config/keymap.lua @@ -60,9 +60,9 @@ local function send_cell() local has_molten, molten_status = pcall(require, 'molten.status') local molten_active = "" if has_molten then - molten_active = molten_status.kernels() + molten_active = molten_status.initialized() end - if molten_active ~= vim.NIL and molten_active ~= "" then + if molten_active ~= vim.NIL and molten_active ~= "" and molten_status.kernels() ~= "Molten" then vim.cmd.QuartoSend() return end diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 25325d7..4b12428 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -5,7 +5,7 @@ return { -- for lsp features in code cells / embedded code 'jmbuhr/otter.nvim', - dev = true, + dev = false, dependencies = { { 'neovim/nvim-lspconfig', @@ -100,8 +100,8 @@ return { map('gh', vim.lsp.buf.signature_help, '[g]o to signature [h]elp') map('gI', vim.lsp.buf.implementation, '[g]o to [I]mplementation') map('gr', vim.lsp.buf.references, '[g]o to [r]eferences') - map('[d', function () vim.diagnostic.jump({count = 1}) end,'previous [d]iagnostic ') - map(']d', function () vim.diagnostic.jump({count = -1}) end, 'next [d]iagnostic ') + map(']d', function () if vim.fn.has("nvim-0.11.0") == 1 then vim.diagnostic.jump({count = 1}) else vim.diagnostic.goto_next() end end,'next [d]iagnostic ') + map('[d', function () if vim.fn.has("nvim-1.11.0") == 1 then vim.diagnostic.jump({count = -1}) else vim.diagnostic.goto_prev() end end,'previous [d]iagnostic ') map('ll', vim.lsp.codelens.run, '[l]ens run') map('lR', vim.lsp.buf.rename, '[l]sp [R]ename') map('lf', vim.lsp.buf.format, '[l]sp [f]ormat') diff --git a/lua/plugins/quarto.lua b/lua/plugins/quarto.lua index 4c9a244..ab90377 100644 --- a/lua/plugins/quarto.lua +++ b/lua/plugins/quarto.lua @@ -127,7 +127,8 @@ return { { 'benlubas/molten-nvim', - enabled = true, + dev = false, + enabled = false, build = ':UpdateRemotePlugins', init = function() vim.g.molten_image_provider = 'image.nvim' From 6454aea43ffd613aa525e097d0d0cd099b7b3aad Mon Sep 17 00:00:00 2001 From: marsiwiec Date: Mon, 9 Sep 2024 11:20:13 +0200 Subject: [PATCH 2/2] Change deprecated tsserver to ts_ls (#124) --- lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 029dfa6..e430e64 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -182,7 +182,7 @@ return { flags = lsp_flags, } - lspconfig.tsserver.setup { + lspconfig.ts_ls.setup { capabilities = capabilities, flags = lsp_flags, filetypes = { 'js', 'javascript', 'typescript', 'ojs' },