Skip to content

Commit f7c995c

Browse files
committed
code runner is now operated by shortcut key...
- lazy.nvim has been updated. - ALT+R has been used to run code in NormalMode. - code-runner will show code output in a floating window. - go and bash files have been added to code-runner.
1 parent 0928d4c commit f7c995c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lazy-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"friendly-snippets": { "branch": "main", "commit": "d1446afecd54d95b1214c6f5a032ad815fbc74d1" },
1313
"inc-rename.nvim": { "branch": "main", "commit": "7c6125b1ee476b56708a6518a37b2a3357f57bfc" },
1414
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
15-
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
15+
"lazy.nvim": { "branch": "main", "commit": "fafe1f7c640aed75e70a10e6649612cd96f39149" },
1616
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
1717
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
1818
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },

lua/plugins/code_runner.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ return {
44
cmd = "RunCode",
55
config = function()
66
require('code_runner').setup({
7+
mode = "float",
8+
float = {
9+
border = "rounded",
10+
shadow = true,
11+
},
712
focus = true,
813
filetype = {
914
java = {
1015
"cd $dir &&",
1116
"javac $fileName &&",
1217
"java $fileNameWithoutExt"
1318
},
19+
sh = "bash",
20+
go = "go run",
1421
python = "python3 -u",
1522
typescript = "deno run",
1623
javascript = "node",

lua/user/keymaps.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ nmap("f","zc")
1313
nmap("<C-f>","zM")
1414
nmap("<C-j>","zR")
1515
nmap("<M-e>","<Esc>:NvimTreeFindFile<CR>")
16+
nmap("<M-r>","<Esc>:RunCode<CR>")
1617
nmap("<C-q>","<Esc>:q!<CR>")
1718
nmap("<M-q>","<Esc>:qall!<CR>")
1819
imap("<C-q>","<Esc>:wq<CR>i")

0 commit comments

Comments
 (0)