a
This commit is contained in:
@ -62,8 +62,8 @@ noremap('n', '<leader>ar', ':source ~/.config/nvim/init.lua<CR>')
|
|||||||
noremap('n', '<leader>ac', ':cd ~/.config/nvim/<CR>')
|
noremap('n', '<leader>ac', ':cd ~/.config/nvim/<CR>')
|
||||||
|
|
||||||
-- keymap switches
|
-- keymap switches
|
||||||
noremap('n', '<leader>me', ':set keymap=<CR>')
|
noremap('i', '<C-x>', '<Esc>:set keymap=<CR>a')
|
||||||
noremap('n', '<leader>mh', ':set keymap=hebrew<CR>')
|
noremap('i', '<C-z>', '<Esc>:set keymap=hebrew<CR>a')
|
||||||
|
|
||||||
-- telescope
|
-- telescope
|
||||||
noremap('n', '<leader>tt', ':Telescope<CR>')
|
noremap('n', '<leader>tt', ':Telescope<CR>')
|
||||||
|
|||||||
@ -86,6 +86,11 @@ require('packer').startup(function()
|
|||||||
after = 'nvim-dap',
|
after = 'nvim-dap',
|
||||||
config = function() require('plugins.dapui') end
|
config = function() require('plugins.dapui') end
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
|
after = 'nvim-dap',
|
||||||
|
config = function() require('plugins.dap-go') end
|
||||||
|
}
|
||||||
|
|
||||||
-- toggleterm
|
-- toggleterm
|
||||||
use {
|
use {
|
||||||
|
|||||||
1
.config/nvim/lua/plugins/dap-go.lua
Normal file
1
.config/nvim/lua/plugins/dap-go.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require ('dap-go').setup()
|
||||||
@ -1,69 +1,5 @@
|
|||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
|
||||||
--
|
|
||||||
-- go
|
|
||||||
--
|
|
||||||
|
|
||||||
-- dap.adapters.go = function(callback, config)
|
|
||||||
-- local stdout = vim.loop.new_pipe(false)
|
|
||||||
-- local handle local pid_or_err local port = 38697
|
|
||||||
-- local opts = {
|
|
||||||
-- stdio = {nil, stdout},
|
|
||||||
-- args = {"dap", "-l", "127.0.0.1:" .. port},
|
|
||||||
-- detached = true
|
|
||||||
-- }
|
|
||||||
-- handle, pid_or_err = vim.loop.spawn("dlv", opts, function(code)
|
|
||||||
-- stdout:close()
|
|
||||||
-- handle:close()
|
|
||||||
-- if code ~= 0 then
|
|
||||||
-- print('dlv exited with code', code)
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- assert(handle, 'Error running dlv: ' .. tostring(pid_or_err))
|
|
||||||
-- stdout:read_start(function(err, chunk)
|
|
||||||
-- assert(not err, err)
|
|
||||||
-- if chunk then
|
|
||||||
-- vim.schedule(function()
|
|
||||||
-- require('dap.repl').append(chunk)
|
|
||||||
-- end)
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- vim.defer_fn(
|
|
||||||
-- function()
|
|
||||||
-- callback({type = "server", host = "127.0.0.1", port = port})
|
|
||||||
-- end,
|
|
||||||
-- 100)
|
|
||||||
-- end
|
|
||||||
dap.adapters.go = {
|
|
||||||
type = "server",
|
|
||||||
host = "127.0.0.1",
|
|
||||||
port = 38697,
|
|
||||||
}
|
|
||||||
-- https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md
|
|
||||||
dap.configurations.go = {
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug",
|
|
||||||
request = "launch",
|
|
||||||
program = "${fileDirname}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug test", -- configuration for debugging test files
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "${file}"
|
|
||||||
},
|
|
||||||
-- works with go.mod packages and sub packages
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug test (go.mod)",
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "./${relativeFileDirname}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- python
|
-- python
|
||||||
--
|
--
|
||||||
|
|||||||
0
.config/nvim/lua/plugins/mdpreview.lua
Normal file
0
.config/nvim/lua/plugins/mdpreview.lua
Normal file
@ -32,11 +32,6 @@ wk.register({
|
|||||||
r = "Show References",
|
r = "Show References",
|
||||||
t = "Show Type Definition"
|
t = "Show Type Definition"
|
||||||
},
|
},
|
||||||
m = {
|
|
||||||
name = "Keymap",
|
|
||||||
e = "English",
|
|
||||||
e = "Hebrew"
|
|
||||||
},
|
|
||||||
s = {
|
s = {
|
||||||
name = "Splits & Buffers",
|
name = "Splits & Buffers",
|
||||||
v = "Vertical Split",
|
v = "Vertical Split",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user