Add new keymaps and plugins
parent
da87fc4247
commit
ab0d9c600b
@ -1,3 +1,17 @@
|
||||
-- return {
|
||||
-- 'fatih/vim-go',
|
||||
-- }
|
||||
return {
|
||||
'fatih/vim-go',
|
||||
"ray-x/go.nvim",
|
||||
dependencies = { -- optional packages
|
||||
"ray-x/guihua.lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = function()
|
||||
require("go").setup()
|
||||
end,
|
||||
event = { "CmdlineEnter" },
|
||||
ft = { "go", 'gomod' },
|
||||
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'rmagatti/goto-preview',
|
||||
config = function()
|
||||
require('goto-preview').setup {}
|
||||
end
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
-- lazy.nvim
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
-- "rcarriga/nvim-notify",
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
return {
|
||||
"rest-nvim/rest.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local rest_client = require("rest-nvim")
|
||||
|
||||
rest_client.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 = false,
|
||||
-- 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 the generated curl command in case you want to launch
|
||||
-- the same request via the terminal (can be verbose)
|
||||
show_curl_command = false,
|
||||
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,
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<leader>rc', rest_client.run, { desc = '[R]un rest [Client]' })
|
||||
vim.keymap.set('n', '<leader>rl', rest_client.last, { desc = '[R]un rest [Last] request' })
|
||||
end
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
config = function(_, opts)
|
||||
require('trouble').setup(opts)
|
||||
|
||||
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.keymap.set("n", "gR", "<cmd>TroubleToggle lsp_references<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
end,
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue