FRC commands
This commit is contained in:
1
nvim/.config/nvim/ftplugin/java.lua
Normal file
1
nvim/.config/nvim/ftplugin/java.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
vim.opt_local.makeprg = "./gradlew build"
|
||||||
12
nvim/.config/nvim/ftplugin/markdown.lua
Normal file
12
nvim/.config/nvim/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
vim.opt_local.textwidth = 80
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.linebreak = true
|
||||||
|
vim.opt_local.list = false
|
||||||
|
vim.opt_local.spell = true
|
||||||
|
vim.opt_local.spelllang = "en_us"
|
||||||
|
vim.opt_local.conceallevel = 2
|
||||||
|
vim.opt_local.concealcursor = "nv"
|
||||||
|
vim.opt_local.autoindent = true
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
setlocal textwidth=80
|
|
||||||
setlocal wrap
|
|
||||||
setlocal linebreak
|
|
||||||
setlocal nolist
|
|
||||||
setlocal spell
|
|
||||||
setlocal spelllang=en_us
|
|
||||||
setlocal conceallevel=2
|
|
||||||
setlocal concealcursor=nv
|
|
||||||
setlocal autoindent
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal expandtab
|
|
||||||
@@ -2,3 +2,4 @@ require 'plugins'
|
|||||||
require 'configs'
|
require 'configs'
|
||||||
require 'lsp'
|
require 'lsp'
|
||||||
require 'keymaps'
|
require 'keymaps'
|
||||||
|
require 'commands'
|
||||||
|
|||||||
39
nvim/.config/nvim/lua/commands.lua
Normal file
39
nvim/.config/nvim/lua/commands.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
vim.api.nvim_create_user_command('SimulateRobotCode', function()
|
||||||
|
vim.fn.jobstart({
|
||||||
|
"./gradlew",
|
||||||
|
"simulateJava",
|
||||||
|
}, {
|
||||||
|
stdout_buffered = true,
|
||||||
|
stderr_buffered = true,
|
||||||
|
on_stdout = function(_, data)
|
||||||
|
end,
|
||||||
|
on_stderr = function(_, data)
|
||||||
|
end,
|
||||||
|
|
||||||
|
})
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("DeployRobotCode", function()
|
||||||
|
vim.fn.jobstart({
|
||||||
|
"./gradlew",
|
||||||
|
"deploy",
|
||||||
|
"-PteamNumber=245",
|
||||||
|
"--offline",
|
||||||
|
"--console=plain",
|
||||||
|
"--warning-mode=none",
|
||||||
|
"-q"
|
||||||
|
}, {
|
||||||
|
stdout_buffered = true,
|
||||||
|
stderr_buffered = true,
|
||||||
|
on_stdout = function(_, data)
|
||||||
|
if data then
|
||||||
|
vim.notify(table.concat(data, "\n"))
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_stderr = function(_, data)
|
||||||
|
if data then
|
||||||
|
vim.notify(table.concat(data, "\n"), vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end, {})
|
||||||
Reference in New Issue
Block a user