typescript-tools.nvim icon indicating copy to clipboard operation
typescript-tools.nvim copied to clipboard

[Question] Default remap for code actions?

Open itse4elhaam opened this issue 1 year ago • 2 comments

These is my current remap, it works fine with other projects but not with typescript(when using typescript tools).

    ["<leader>ca"] = {
      function()
        vim.lsp.buf.code_action()
      end,
      "LSP code action",
    },

itse4elhaam avatar Oct 28 '24 03:10 itse4elhaam

For me also not working other language servers do, tested across different projects.

zettlrobert avatar Jan 27 '25 01:01 zettlrobert

Hey just to let you know that i found the problem i had with code_actiosn and typescript-tools

the section

-- I used to write "all" which for whatever reason hides all code actions
expose_as_code_action = { "all" }


-- What works is listing them all explicitly
expose_as_code_action = {
     "fix_all",
     "add_missing_imports",
     "remove_unused",
     "remove_unused_imports",
     "organize_imports",
},

zettlrobert avatar Feb 01 '25 23:02 zettlrobert