|
@@ -31,7 +31,8 @@ if vim.fn.executable("node_modules/.bin/eslint") == 1 then
|
|
|
client.server_capabilities.documentFormattingProvider = true
|
|
|
client.server_capabilities.documentRangeFormattingProvider = true
|
|
|
|
|
|
- on_attach(client, bufnr)
|
|
|
+ -- mappings should have been attached by typescript and re-attaching can
|
|
|
+ -- overwrite the typescript specific overrides
|
|
|
end,
|
|
|
})
|
|
|
end
|
|
@@ -72,6 +73,8 @@ else
|
|
|
local opts = { silent = true, buffer = bufnr }
|
|
|
-- exclude import statements from reference search (may have false positives)
|
|
|
vim.keymap.set('n', 'gr', '<cmd>Telescope lsp_references default_text=!import\\ <CR>', opts)
|
|
|
+ vim.keymap.set('n', 'gd', '<cmd>TypescriptGoToSourceDefinition<CR>', opts)
|
|
|
+ vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
|
|
end
|
|
|
}
|
|
|
})
|