Updating lsp to use ts_ls instead of tsserver(deprecated). And updated
whichkey
This commit is contained in:
parent
85a938e71a
commit
6ee3d5f407
4
after/ftplugin/vue.lua
Normal file
4
after/ftplugin/vue.lua
Normal file
@ -0,0 +1,4 @@
|
||||
vim.bo.tabstop = 2 -- size of a hard tabstop (ts).
|
||||
vim.bo.shiftwidth = 2 -- size of an indentation (sw).
|
||||
vim.bo.expandtab = true -- always uses spaces instead of tab characters (et).
|
||||
vim.bo.softtabstop = 2 -- number of spaces a <Tab> counts for. When 0, feature is off (sts).
|
@ -41,6 +41,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
map('<leader>cf', vim.lsp.buf.format, '[C]ode [F]ormat')
|
||||
|
||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||
-- For example, in C this would take you to the header.
|
||||
@ -59,13 +60,13 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {'lua_ls', 'pyright', 'rust_analyzer', 'clangd', 'tsserver', },
|
||||
ensure_installed = {'lua_ls', 'pyright', 'rust_analyzer', 'clangd', 'ts_ls', },
|
||||
handlers = {
|
||||
require('lspconfig').clangd.setup({
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto","hpp"},
|
||||
capabilities = capabilities,
|
||||
}),
|
||||
require('lspconfig').tsserver.setup({
|
||||
require('lspconfig').ts_ls.setup({
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
|
@ -1,8 +1,13 @@
|
||||
-- Document existing key chains
|
||||
require('which-key').register {
|
||||
['<leader>f'] = { name = '[F]ind', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||
require('which-key').add {
|
||||
{ "<leader>f", group = "[F]ind" },
|
||||
{ "<leader>f_", hidden = true },
|
||||
{ "<leader>h", group = "Git [H]unk" },
|
||||
{ "<leader>h_", hidden = true },
|
||||
{ "<leader>s", group = "[S]earch" },
|
||||
{ "<leader>s_", hidden = true },
|
||||
{ "<leader>t", group = "[T]oggle" },
|
||||
{ "<leader>t_", hidden = true },
|
||||
{ "<leader>w", group = "[W]orkspace" },
|
||||
{ "<leader>w_", hidden = true },
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ require("lazy").setup({
|
||||
{'xiyaowong/transparent.nvim'},
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
{ 'mg979/vim-visual-multi' },
|
||||
{ 'xorid/asciitree.nvim' },
|
||||
{
|
||||
'stevearc/aerial.nvim',
|
||||
opts = {},
|
||||
|
Loading…
Reference in New Issue
Block a user