nvim: add quarto-nvim
This commit is contained in:
parent
5612d97dc4
commit
9720cf47f7
2 changed files with 79 additions and 44 deletions
|
@ -127,42 +127,24 @@ return require('packer').startup({function()
|
|||
end
|
||||
}
|
||||
}
|
||||
use { -- rust-tools: make nvim a better rust environment
|
||||
'simrat39/rust-tools.nvim',
|
||||
requires = {
|
||||
'mattn/webapi-vim', -- allow :RustPlay
|
||||
},
|
||||
config = function ()
|
||||
local rt = require("rust-tools")
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
use { -- cmp: completion menu
|
||||
'hrsh7th/nvim-cmp',
|
||||
config = function()
|
||||
require('blake.lsp').cmp()
|
||||
end,
|
||||
requires = { -- (mostly) nvim-cmp sources (not required by cmp, but reqired by my configuration)
|
||||
'onsails/lspkind-nvim', -- icons for entries of the completion menu, required by config
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'ray-x/cmp-treesitter',
|
||||
'hrsh7th/cmp-calc',
|
||||
'f3fora/cmp-spell',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-calc',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/cmp-emoji',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-path',
|
||||
'jc-doyle/cmp-pandoc-references',
|
||||
'onsails/lspkind-nvim', -- icons for entries of the completion menu, required by config
|
||||
'ray-x/cmp-treesitter',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
},
|
||||
}
|
||||
use { -- luasnip: snippits plugin
|
||||
|
@ -376,6 +358,54 @@ return require('packer').startup({function()
|
|||
require('hop').setup { keys = 'etovxqpdygfblzhckisuran' }
|
||||
end
|
||||
}
|
||||
---- Language-specific packages
|
||||
use { -- rust-tools: make nvim a better rust environment
|
||||
'simrat39/rust-tools.nvim',
|
||||
requires = {
|
||||
'mattn/webapi-vim', -- allow :RustPlay
|
||||
},
|
||||
config = function ()
|
||||
local rt = require("rust-tools")
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
use { -- quarto-nvim: tools for writing with quarto
|
||||
'quarto-dev/quarto-nvim',
|
||||
requires = {
|
||||
'jmbuhr/otter.nvim', -- execute code in a terminal
|
||||
},
|
||||
config = function ()
|
||||
require'quarto'.setup({
|
||||
debug = false,
|
||||
closePreviewOnExit = true,
|
||||
lspFeatures = {
|
||||
enabled = true,
|
||||
languages = { 'bash' },
|
||||
chunks = 'curly', -- 'curly' or 'all'
|
||||
diagnostics = {
|
||||
enabled = true,
|
||||
triggers = { "BufWritePost" }
|
||||
},
|
||||
completion = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
hover = 'K',
|
||||
definition = 'gd',
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
-- Conveniences
|
||||
use { -- sort motion: (gs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue