update settings

This commit is contained in:
Gustavo Silva (es00679121_prosegur) 2023-07-26 21:11:04 +02:00
parent ab0d9c600b
commit f92189bc70
8 changed files with 164 additions and 47 deletions

View File

@ -51,3 +51,4 @@ global.mkdp_browser = '/usr/bin/firefox'
--o.foldmethod = 'syntax' --o.foldmethod = 'syntax'
o.foldmethod = 'expr' o.foldmethod = 'expr'
o.foldexpr = 'nvim_treesitter#foldexpr()' o.foldexpr = 'nvim_treesitter#foldexpr()'
o.foldlevel = 1

View File

@ -33,3 +33,15 @@ Moving between tabs
gt # next tab gt # next tab
gT # previous tab gT # previous tab
``` ```
### HTTP client
install pynvim
```
sudo apt install python3-pynvim
```
install requests
```
sudo apt install python3-requests
```

View File

@ -33,7 +33,36 @@ return {
local dap_go = require 'dap-go' local dap_go = require 'dap-go'
-- Install golang specific config -- Install golang specific config
dap_go.setup() dap_go.setup {
-- Additional dap configurations can be added.
-- dap_configurations accepts a list of tables where each entry
-- represents a dap configuration. For more details do:
-- :help dap-configuration
dap_configurations = {
{
-- Must be "go" or it will be ignored by the plugin
type = "go",
name = "Attach remote",
mode = "remote",
request = "attach",
},
},
-- delve configurations
delve = {
-- the path to the executable dlv which will be used for debugging.
-- by default, this is the "dlv" executable on your PATH.
path = "dlv",
-- time to wait for delve to initialize the debug session.
-- default to 20 seconds
initialize_timeout_sec = 20,
-- a string that defines the port to start delve debugger.
-- default to string "${port}" which instructs nvim-dap
-- to start the process in a random available port
port = "${port}",
-- additional args to pass to dlv
args = {}
},
}
-- Dap UI setup -- Dap UI setup
-- For more information, see |:help nvim-dap-ui| -- For more information, see |:help nvim-dap-ui|
@ -94,6 +123,5 @@ return {
dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close
end, end,
} }

View File

@ -9,7 +9,10 @@ return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
config = function() config = function()
-- local gofmt = require("go.format")
require("go").setup() require("go").setup()
-- vim.keymap.set('n', 'gF', gofmt.goimport, { desc = 'Go Import' })
end, end,
event = { "CmdlineEnter" }, event = { "CmdlineEnter" },
ft = { "go", 'gomod' }, ft = { "go", 'gomod' },

View File

@ -9,7 +9,7 @@ return {
config = function() config = function()
require('neo-tree').setup { require('neo-tree').setup {
window = { window = {
position = "float", position = "right",
popup = { popup = {
-- settings that apply to float position only -- settings that apply to float position only
size = { height = "20", width = "95" }, size = { height = "20", width = "95" },

View File

@ -1,48 +1,106 @@
return { return {
"rest-nvim/rest.nvim", "rest-nvim/rest.nvim",
dependencies = { "nvim-lua/plenary.nvim" }, -- enabled = false,
config = function() dependencies = { "nvim-lua/plenary.nvim" },
local rest_client = require("rest-nvim") ft = "http",
config = function()
local rest_nvim = require "rest-nvim"
rest_client.setup { rest_nvim.setup {
-- Open request results in a horizontal split -- Open request results in a horizontal split
result_split_horizontal = false, result_split_horizontal = false,
-- Keep the http file buffer above|left when split horizontal|vertical -- Skip SSL verification, useful for unknown certificates
result_split_in_place = false, skip_ssl_verification = false,
-- Skip SSL verification, useful for unknown certificates encode_url = false,
skip_ssl_verification = false, -- Highlight request on run
-- Encode URL before making request highlight = {
encode_url = true, enabled = true,
-- Highlight request on run timeout = 150,
highlight = { },
enabled = true, result = {
timeout = 150, -- toggle showing URL, HTTP info, headers at top the of result window
}, show_url = true,
result = { show_http_info = true,
-- toggle showing URL, HTTP info, headers at top the of result window show_headers = true,
show_url = true, },
-- show the generated curl command in case you want to launch -- Jump to request line on run
-- the same request via the terminal (can be verbose) jump_to_request = false,
show_curl_command = false, env_file = ".env",
show_http_info = true, custom_dynamic_variables = {},
show_headers = true, yank_dry_run = 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.api.nvim_create_autocmd("FileType", {
vim.keymap.set('n', '<leader>rl', rest_client.last, { desc = '[R]un rest [Last] request' }) pattern = "http",
end callback = function()
local buff = tonumber(vim.fn.expand "<abuf>", 10)
vim.keymap.set(
"n",
"<leader>rc",
rest_nvim.run,
{ noremap = true, buffer = buff, desc = "Run near http request" }
)
vim.keymap.set(
"n",
"<leader>rl",
rest_nvim.last,
{ noremap = true, buffer = buff, desc = "Run last http resquest" }
)
vim.keymap.set("n", "<leader>rp", function()
rest_nvim.run(true)
end, { noremap = true, buffer = buff, desc = "Preview http curl" })
end,
})
end,
} }
-- return {
-- 'BlackLight/nvim-http'
-- }
-- 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
-- }

View File

@ -150,3 +150,18 @@ a893
b1177a b1177a
dataItem dataItem
CountryCode CountryCode
MVVM
MVC
DataStore
Proto
Firebase
Gradle
Modularization
observables
courotines
RxJava
OKHttp
Firestore
OpenAI
firestore
LiveData

Binary file not shown.