summaryrefslogtreecommitdiff
path: root/lua/ide.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/ide.lua')
-rw-r--r--lua/ide.lua94
1 files changed, 78 insertions, 16 deletions
diff --git a/lua/ide.lua b/lua/ide.lua
index 5496e2a..4a1d252 100644
--- a/lua/ide.lua
+++ b/lua/ide.lua
@@ -8,12 +8,11 @@ local pk_use = require 'packer'.use
--
-- Tree Sitter
--
---[[
pk_use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
- require('nvim-treesitter.configs').setup{
+ require('nvim-treesitter.configs').setup {
ensure_installed = {
"bash",
"bibtex",
@@ -22,11 +21,14 @@ pk_use {
"css",
"go",
"html",
+ "http",
"javascript",
"json",
"latex",
+ "lua",
"python",
"typescript",
+ "tsx",
"vim",
},
sync_install = false,
@@ -36,7 +38,6 @@ pk_use {
}
end
}
-]]--
--
-- Autocompletion
@@ -48,6 +49,7 @@ pk_use {
vim.cmd([[autocmd VimEnter * COQnow -s]])
end
}
+
pk_use {
'ms-jpq/coq.artifacts',
branch = 'artifacts'
@@ -56,22 +58,25 @@ pk_use {
--
-- Language Configurations
--
--- pk_use 'ap/vim-css-color'
+pk_use 'ap/vim-css-color'
-- close tags in html languages
pk_use {
'alvan/closetag.vim',
- ft = {"html", "vue"}
-}
-pk_use {
- 'fatih/vim-go',
- ft = 'go'
+ ft = { "html", "vue", "typescriptreact" }
}
+-- pk_use {
+-- 'fatih/vim-go',
+-- ft = 'go'
+-- }
+
pk_use {
'udalov/kotlin-vim',
ft = 'kotlin'
}
+pk_use 'bellinitte/uxntal.vim'
+
--
-- Language Server
--
@@ -85,9 +90,9 @@ pk_use {
config = function()
require('conftool').map('n', '<Leader>e', ':AerialToggle<LF>')
require('aerial').setup({
- backends = {'lsp', 'markdown', 'man'},
+ backends = { 'lsp', 'markdown', 'man' },
layout = {
- max_width = 25
+ min_width = 25
}
})
end
@@ -108,15 +113,30 @@ pk_use {
}
end
}
-pk_use {
+pk_use {
'williamboman/mason-lspconfig.nvim',
requires = {
+ 'neovim/nvim-lspconfig',
'williamboman/mason.nvim',
'ms-jpq/coq_nvim',
'stevearc/aerial.nvim'
},
config = function()
local masonlsp = require 'mason-lspconfig'
+ --[[
+ masonlsp.setup {
+ ensure_installed = {
+ "bashls",
+ "clangd",
+ "html",
+ "jsonls",
+ "lua_ls",
+ "pyright",
+ "texlab",
+ "tsserver"
+ },
+ }
+ --]]
masonlsp.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities {
@@ -125,7 +145,7 @@ pk_use {
basics.make_lsp_commands(client, bufnr)
basics.make_lsp_mappings(client, bufnr)
end
- })
+ })
end
}
end
@@ -135,7 +155,7 @@ pk_use {
'neovim/nvim-lspconfig',
config = function()
-- disable inline error messages
- vim.diagnostic.config({virtual_text = false})
+ vim.diagnostic.config({ virtual_text = false })
end
}
@@ -161,7 +181,7 @@ pk_use {
end
}
---
+--[[
-- Latex Live Preview
--
pk_use {
@@ -171,8 +191,21 @@ pk_use {
vim.g.livepreview_previewer = require('defs').external_pdfviewer
vim.g.livepreview_engine = "xelatex"
end
-}
+}]]
+--
+-- Markdown Live Preview
+--
+pk_use {
+ "iamcco/markdown-preview.nvim",
+ ft = 'markdown',
+ run = function()
+ vim.fn["mkdp#util#install"]()
+ end,
+ config = function()
+ vim.g.mkdp_theme = 'light'
+ end
+}
-- Debugger Adapter Protocol
--[[
@@ -185,3 +218,32 @@ pk_use {
}
--]]
+--
+-- Misc
+--
+pk_use {
+ "rest-nvim/rest.nvim",
+ requires = { "nvim-lua/plenary.nvim" },
+ 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>')
+
+ ct.map('n', '<Leader>r', '<Plug>RestNvim<CR>')
+ ct.map('n', '<Leader>R', '<Plug>RestNvimLast<CR>')
+ ct.map('n', '<Leader><A-r>', '<Plug>RestNvimPreview<CR>')
+
+ require("rest-nvim").setup({
+ -- 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,
+ }
+ })
+ end
+}