2022-10-12 09:33:11 +02:00
|
|
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
2023-10-19 19:53:56 +02:00
|
|
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
2022-10-12 09:33:11 +02:00
|
|
|
|
2023-10-19 19:53:56 +02:00
|
|
|
require('lspconfig').pyright.setup{
|
2022-10-12 09:33:11 +02:00
|
|
|
capabilities = capabilities,
|
|
|
|
}
|
2023-10-19 19:53:56 +02:00
|
|
|
require('lspconfig').tsserver.setup {}
|
2022-10-12 09:33:11 +02:00
|
|
|
|
|
|
|
require('dap-python').setup('~/.local/share/virtualenvs/debugpy/bin/python')
|
|
|
|
require('dap-python').test_runner = 'pytest'
|
|
|
|
|
|
|
|
require("neotest").setup({
|
|
|
|
output = {
|
|
|
|
enabled = true,
|
|
|
|
open_on_run = "yes",
|
|
|
|
},
|
|
|
|
adapters = {
|
|
|
|
require("neotest-python")({
|
|
|
|
dap = { justMyCode = false },
|
|
|
|
args = {"--cov=src", "--cov-report=term-missing"},
|
|
|
|
runner = 'pytest',
|
|
|
|
}),
|
|
|
|
require("neotest-plenary"),
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
require("dapui").setup({
|
|
|
|
layouts = {
|
|
|
|
{
|
|
|
|
elements = {
|
|
|
|
-- Elements can be strings or table with id and size keys.
|
|
|
|
{ id = "scopes", size = 0.25 },
|
|
|
|
"breakpoints",
|
|
|
|
"watches",
|
|
|
|
},
|
|
|
|
size = 40, -- 40 columns
|
|
|
|
position = "right",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
require("nvim-dap-virtual-text").setup()
|
|
|
|
require("coverage").setup({
|
|
|
|
commands = true, -- create commands
|
|
|
|
highlights = {
|
|
|
|
-- customize highlight groups created by the plugin
|
|
|
|
covered = { fg = "#C3E88D" }, -- supports style, fg, bg, sp (see :h highlight-gui)
|
|
|
|
uncovered = { fg = "#F07178" },
|
|
|
|
},
|
|
|
|
signs = {
|
|
|
|
-- use your own highlight groups or text markers
|
|
|
|
covered = { hl = "CoverageCovered", text = "▎" },
|
|
|
|
uncovered = { hl = "CoverageUncovered", text = "▎" },
|
|
|
|
},
|
|
|
|
summary = {
|
|
|
|
-- customize the summary pop-up
|
|
|
|
min_coverage = 80.0, -- minimum coverage threshold (used for highlighting)
|
|
|
|
},
|
|
|
|
lang = {
|
|
|
|
-- customize language specific settings
|
|
|
|
},
|
|
|
|
})
|
2023-10-19 19:53:56 +02:00
|
|
|
require("rest-nvim").setup({
|
|
|
|
-- Open request results in a horizontal split
|
|
|
|
result_split_horizontal = false,
|
|
|
|
-- Keep the http file buffer above|left when split horizontal|vertical
|
|
|
|
result_split_in_place = true,
|
|
|
|
-- Skip SSL verification, useful for unknown certificates
|
|
|
|
skip_ssl_verification = false,
|
|
|
|
-- Encode URL before making request
|
|
|
|
encode_url = true,
|
|
|
|
-- Highlight request on run
|
|
|
|
highlight = {
|
|
|
|
enabled = true,
|
|
|
|
timeout = 150,
|
|
|
|
},
|
|
|
|
result = {
|
|
|
|
-- toggle showing URL, HTTP info, headers at top the of result window
|
|
|
|
show_url = true,
|
|
|
|
show_http_info = true,
|
|
|
|
show_headers = true,
|
|
|
|
-- executables or functions for formatting response body [optional]
|
|
|
|
-- set them to false if you want to disable them
|
|
|
|
formatters = {
|
|
|
|
json = "jq",
|
|
|
|
html = function(body)
|
|
|
|
return vim.fn.system({"tidy", "-i", "-q", "-"}, body)
|
|
|
|
end
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- Jump to request line on run
|
|
|
|
jump_to_request = false,
|
|
|
|
env_file = '.env',
|
|
|
|
custom_dynamic_variables = {},
|
|
|
|
yank_dry_run = true,
|
|
|
|
})
|