add flutter shortcut
This commit is contained in:
parent
62ed453c7b
commit
866429e6bc
@ -197,6 +197,7 @@ map("n", "<C-o>", ":lua require'dap'.step_over()<CR>", opt)
|
|||||||
|
|
||||||
-- set keymap based on file type
|
-- set keymap based on file type
|
||||||
vim.cmd("autocmd FileType * lua SetKeybinds()")
|
vim.cmd("autocmd FileType * lua SetKeybinds()")
|
||||||
|
|
||||||
function SetKeybinds()
|
function SetKeybinds()
|
||||||
local fileTy = vim.api.nvim_buf_get_option(0, "filetype")
|
local fileTy = vim.api.nvim_buf_get_option(0, "filetype")
|
||||||
local opts = { prefix = "<localleader>", buffer = 0 }
|
local opts = { prefix = "<localleader>", buffer = 0 }
|
||||||
@ -212,6 +213,13 @@ function SetKeybinds()
|
|||||||
["r"] = { ":MagmaEvaluateOperator<CR>", "Jupyter evaluate" },
|
["r"] = { ":MagmaEvaluateOperator<CR>", "Jupyter evaluate" },
|
||||||
["c"] = { ":MagmaEvaluateCell<CR>", "Jupyter evaluate cell" },
|
["c"] = { ":MagmaEvaluateCell<CR>", "Jupyter evaluate cell" },
|
||||||
}, opts)
|
}, opts)
|
||||||
|
elseif fileTy == "dart" then
|
||||||
|
wk.register({
|
||||||
|
["r"] = { ":FlutterRun<CR>", "FlutterRun" },
|
||||||
|
["q"] = { ":FlutterQuit<CR>", "FlutterQuit" },
|
||||||
|
["c"] = { ":FlutterCopyProfilerUrl<CR>", "FlutterCopyProfilerUrl" },
|
||||||
|
["w"] = { ":FlutterDevTools<CR>", "FlutterDevTools" },
|
||||||
|
}, opts)
|
||||||
-- elseif fileTy == "sh" then
|
-- elseif fileTy == "sh" then
|
||||||
-- wk.register({
|
-- wk.register({
|
||||||
-- ["W"] = { ":w<CR>", "test write" },
|
-- ["W"] = { ":w<CR>", "test write" },
|
||||||
|
Loading…
Reference in New Issue
Block a user