FRC commands

This commit is contained in:
vxclutch
2026-06-03 15:32:20 -04:00
parent 952b42d6fa
commit 5ad742b480
5 changed files with 53 additions and 12 deletions

View File

@@ -0,0 +1 @@
vim.opt_local.makeprg = "./gradlew build"

View 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

View File

@@ -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

View File

@@ -2,3 +2,4 @@ require 'plugins'
require 'configs'
require 'lsp'
require 'keymaps'
require 'commands'

View 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, {})