Skip to content

Commit

Permalink
fix(typescript): enable function call completion snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 4, 2023
1 parent b10c9ad commit 6fec14e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/lazyvim/plugins/extras/lang/typescript.lua
Expand Up @@ -17,14 +17,22 @@ return {
opts = {
-- make sure mason installs the server
servers = {
tsserver = {},
---@type lspconfig.options.tsserver
tsserver = {
settings = {
completions = {
completeFunctionCalls = true,
},
},
},
},
setup = {
tsserver = function(_, opts)
require("lazyvim.util").on_attach(function(client, buffer)
if client.name == "tsserver" then
-- stylua: ignore
vim.keymap.set("n", "<leader>co", "<cmd>TypescriptOrganizeImports<CR>", { buffer = buffer, desc = "Organize Imports" })
-- stylua: ignore
vim.keymap.set("n", "<leader>cR", "<cmd>TypescriptRenameFile<CR>", { desc = "Rename File", buffer = buffer })
end
end)
Expand Down

0 comments on commit 6fec14e

Please sign in to comment.