refactor lang to constants
This commit is contained in:
parent
6893271547
commit
5d630d9dac
6 changed files with 197 additions and 9 deletions
24
lua/cp/constants.lua
Normal file
24
lua/cp/constants.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
local M = {}
|
||||
|
||||
M.PLATFORMS = { "atcoder", "codeforces", "cses" }
|
||||
M.ACTIONS = { "run", "debug", "test", "next", "prev" }
|
||||
|
||||
M.CPP = "cpp"
|
||||
M.PYTHON = "python"
|
||||
|
||||
---@type table<string, string>
|
||||
M.filetype_to_language = {
|
||||
cc = M.CPP,
|
||||
cxx = M.CPP,
|
||||
cpp = M.CPP,
|
||||
py = M.PYTHON,
|
||||
py3 = M.PYTHON,
|
||||
}
|
||||
|
||||
---@type table<string, string>
|
||||
M.canonical_filetypes = {
|
||||
[M.CPP] = "cpp",
|
||||
[M.PYTHON] = "python",
|
||||
}
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue