293 lines
5.1 KiB
Lua
293 lines
5.1 KiB
Lua
return {
|
|
{
|
|
'nvim-treesitter/nvim-treesitter',
|
|
build = ':TSUpdate',
|
|
event = { "VeryLazy" },
|
|
lazy = vim.fn.argc(-1) == 0,
|
|
opts = {
|
|
ensure_installed = {
|
|
"bash",
|
|
"bibtex",
|
|
"c",
|
|
"cs",
|
|
"cpp",
|
|
"cs",
|
|
"go",
|
|
"html",
|
|
"http",
|
|
"javascript",
|
|
"json",
|
|
"latex",
|
|
"lua",
|
|
"python",
|
|
"typescript",
|
|
"tsx",
|
|
"vim",
|
|
},
|
|
sync_install = false,
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
},
|
|
},
|
|
|
|
--
|
|
-- Autocompletion
|
|
--
|
|
{
|
|
'ms-jpq/coq.artifacts',
|
|
branch = 'artifacts'
|
|
},
|
|
{
|
|
'ms-jpq/coq_nvim',
|
|
dependencies = { 'ms-jpq/coq.artifacts' },
|
|
branch = 'coq',
|
|
build = ':COQdeps',
|
|
event = { "VimEnter" },
|
|
config = function()
|
|
vim.cmd([[autocmd VimEnter * COQnow -s]])
|
|
end
|
|
},
|
|
|
|
-- Language Configurations
|
|
--
|
|
{ 'ap/vim-css-color', lazy = false },
|
|
-- close tags in html languages
|
|
{
|
|
'alvan/closetag.vim',
|
|
ft = { "html", "vue", "typescriptreact" },
|
|
},
|
|
|
|
{
|
|
'udalov/kotlin-vim',
|
|
ft = 'kotlin'
|
|
},
|
|
|
|
{ 'bellinitte/uxntal.vim', lazy = false },
|
|
{
|
|
'nvim-flutter/flutter-tools.nvim',
|
|
ft = 'dart',
|
|
dependencies = {
|
|
'nvim-lua/plenary.nvim',
|
|
'nanotee/nvim-lsp-basics',
|
|
},
|
|
opts = {
|
|
lsp = {
|
|
color = {
|
|
enabled = true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
--
|
|
-- Language Server
|
|
--
|
|
|
|
-- Show Code Outline/Symbols tree window
|
|
{
|
|
'stevearc/aerial.nvim',
|
|
opts = {
|
|
backends = { 'lsp', 'markdown', 'man' },
|
|
layout = {
|
|
min_width = 25
|
|
},
|
|
},
|
|
keys = {
|
|
{'<Leader>e', ':AerialToggle<LF>'},
|
|
}
|
|
},
|
|
|
|
-- Language Server Installer
|
|
{
|
|
'williamboman/mason.nvim',
|
|
cmd = {
|
|
"Mason",
|
|
"MasonInstall",
|
|
"MasonUpdate",
|
|
|
|
},
|
|
opts = {
|
|
ui = {
|
|
icons = {
|
|
package_installed = "i",
|
|
package_pending = "p",
|
|
package_uninstalled = "u"
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'neovim/nvim-lspconfig',
|
|
config = function()
|
|
-- disable inline error messages
|
|
vim.diagnostic.config({ virtual_text = false })
|
|
end
|
|
},
|
|
-- {
|
|
-- 'hrsh7th/cmp-nvim-lsp',
|
|
-- dependencies = {
|
|
-- 'hrsh7th/nvim-cmp',
|
|
-- }
|
|
-- },
|
|
-- {
|
|
-- 'jacob411/Ollama-Copilot',
|
|
-- dependencies = {
|
|
-- 'hrsh7th/cmp-nvim-lsp',
|
|
-- },
|
|
-- opts = {
|
|
-- model_name = "qwen2.5-coder:14b",
|
|
-- stream_suggestion = false,
|
|
-- python_command = "python3",
|
|
-- filetypes = {
|
|
-- "bash",
|
|
-- "c",
|
|
-- "cpp",
|
|
-- "cs",
|
|
-- "dart",
|
|
-- "go",
|
|
-- "html",
|
|
-- "javascript",
|
|
-- "javascriptreact",
|
|
-- "json",
|
|
-- "lua",
|
|
-- "python",
|
|
-- "tex",
|
|
-- "typescript",
|
|
-- "typescriptreact",
|
|
-- },
|
|
-- ollama_model_opts = {
|
|
-- num_predict = 40,
|
|
-- temperature = 0.1,
|
|
-- },
|
|
-- keymaps = {
|
|
-- suggestion = '<leader>os',
|
|
-- reject = '<leader>or',
|
|
-- insert_accept = '<Leader><Tab>',
|
|
-- },
|
|
|
|
-- },
|
|
-- },
|
|
{
|
|
'williamboman/mason-lspconfig.nvim',
|
|
dependencies = {
|
|
'ms-jpq/coq_nvim',
|
|
'nanotee/nvim-lsp-basics',
|
|
-- 'jacob411/Ollama-Copilot',
|
|
'neovim/nvim-lspconfig',
|
|
'stevearc/aerial.nvim',
|
|
'williamboman/mason.nvim',
|
|
},
|
|
opts = {
|
|
ensure_installed = {
|
|
"bashls",
|
|
"clangd",
|
|
"ast_grep",
|
|
"gopls",
|
|
"html",
|
|
"jsonls",
|
|
"lua_ls",
|
|
"pyright",
|
|
"texlab",
|
|
"tsserver"
|
|
},
|
|
},
|
|
ft = {
|
|
"bash",
|
|
"c",
|
|
"cpp",
|
|
"cs",
|
|
"dart",
|
|
"go",
|
|
"html",
|
|
"javascript",
|
|
"javascriptreact",
|
|
"json",
|
|
"lua",
|
|
"python",
|
|
"tex",
|
|
"typescript",
|
|
"typescriptreact",
|
|
},
|
|
config = function()
|
|
local masonlsp = require 'mason-lspconfig'
|
|
--[[
|
|
masonlsp.setup
|
|
--]]
|
|
masonlsp.setup_handlers {
|
|
function(server_name)
|
|
require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities {
|
|
on_attach = function(client, bufnr)
|
|
local basics = require('lsp_basics')
|
|
basics.make_lsp_commands(client, bufnr)
|
|
basics.make_lsp_mappings(client, bufnr)
|
|
end
|
|
})
|
|
end
|
|
}
|
|
end
|
|
},
|
|
|
|
-- Show code diagnostics in a separate buffer window
|
|
{
|
|
'folke/trouble.nvim',
|
|
opts = {},
|
|
|
|
cmd = {
|
|
"Trouble",
|
|
},
|
|
|
|
keys = {
|
|
{'<Leader>t', ':Trouble diagnostics toggle<CR>'},
|
|
}
|
|
},
|
|
--
|
|
-- Markdown Live Preview
|
|
--
|
|
{
|
|
"iamcco/markdown-preview.nvim",
|
|
ft = {"markdown"},
|
|
-- cmd = {
|
|
-- "MarkdownPreviewToggle",
|
|
-- "MarkdownPreview",
|
|
-- "MarkdownPreviewStop"
|
|
-- },
|
|
config = function()
|
|
vim.fn["mkdp#util#install"]()
|
|
vim.g.mkdp_theme = 'light'
|
|
-- vim.g.mkdp_browser = 'netsurf'
|
|
|
|
end
|
|
},
|
|
|
|
--
|
|
-- Misc
|
|
--
|
|
{
|
|
"rest-nvim/rest.nvim",
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
opts = {
|
|
-- Open request results in a horizontal split
|
|
result_split_horizontal = true,
|
|
-- Keep the http file buffer above|left when split horizontal|vertical
|
|
--
|
|
result_split_in_place = true,
|
|
result = {
|
|
show_curl_command = false,
|
|
},
|
|
},
|
|
keys = {
|
|
{'<Leader>r', '<Plug>RestNvim<CR>'},
|
|
{'<Leader>R', '<Plug>RestNvimLast<CR>'},
|
|
{'<Leader><A-r>', '<Plug>RestNvimPreview<CR>'},
|
|
},
|
|
config = function()
|
|
-- commands
|
|
local ct = require('conftool')
|
|
ct.defcmd('RestNvim', 'lua require(\'rest-nvim\').run()<CR>')
|
|
ct.defcmd('RestNvimPreview', 'lua require(\'rest-nvim\').run(true)<CR>')
|
|
ct.defcmd('RestNvimLast', 'lua require(\'rest-nvim\').last()<CR>')
|
|
end,
|
|
},
|
|
}
|