Adding Aerial and improving volar lsp settup
This commit is contained in:
parent
458c249266
commit
f198869fab
11
after/plugin/aerial.lua
Normal file
11
after/plugin/aerial.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
require("aerial").setup({
|
||||||
|
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
-- Jump forwards/backwards with '{' and '}'
|
||||||
|
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
||||||
|
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- You probably also want to set a keymap to toggle aerial
|
||||||
|
vim.keymap.set("n", "<leader>ta", "<cmd>AerialToggle float<CR>",{ desc = 'toggle Aerial' })
|
||||||
|
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle left<CR>",{ desc = 'toggle Aerial' })
|
@ -77,8 +77,15 @@ require('mason-lspconfig').setup({
|
|||||||
},
|
},
|
||||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue"},
|
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue"},
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
on_attach = function(client)
|
||||||
|
client.server_capabilities.document_formatting = false
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
require('lspconfig').volar.setup({
|
||||||
|
on_attach = function(client)
|
||||||
|
client.server_capabilities.document_formatting = false
|
||||||
|
end,
|
||||||
}),
|
}),
|
||||||
require('lspconfig').volar.setup({}),
|
|
||||||
require('lspconfig').rust_analyzer.setup({
|
require('lspconfig').rust_analyzer.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
cmd = {
|
cmd = {
|
||||||
|
@ -51,6 +51,15 @@ require("lazy").setup({
|
|||||||
{'xiyaowong/transparent.nvim'},
|
{'xiyaowong/transparent.nvim'},
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
{ 'mg979/vim-visual-multi' },
|
{ 'mg979/vim-visual-multi' },
|
||||||
|
{
|
||||||
|
'stevearc/aerial.nvim',
|
||||||
|
opts = {},
|
||||||
|
-- Optional dependencies
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
|
Loading…
Reference in New Issue
Block a user