fix: update last of languages references to point to constants file
This commit is contained in:
parent
5d630d9dac
commit
c06a0d8a84
4 changed files with 7 additions and 7 deletions
|
|
@ -8,8 +8,8 @@
|
|||
local M = {}
|
||||
local logger = require("cp.log")
|
||||
|
||||
local languages = require("cp.languages")
|
||||
local filetype_to_language = languages.filetype_to_language
|
||||
local constants = require("cp.constants")
|
||||
local filetype_to_language = constants.filetype_to_language
|
||||
|
||||
---@param source_file string
|
||||
---@param contest_config table
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ if __name__ == "__main__":
|
|||
|
||||
for language, template_set in pairs(template_definitions) do
|
||||
local snippets = {}
|
||||
local filetype = languages.canonical_filetypes[language]
|
||||
local filetype = constants.canonical_filetypes[language]
|
||||
|
||||
for contest, template in pairs(template_set) do
|
||||
local prefixed_trigger = ("cp.nvim/%s.%s"):format(contest, language)
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ end
|
|||
|
||||
local function run_single_test_case(ctx, contest_config, test_case)
|
||||
local language = vim.fn.fnamemodify(ctx.source_file, ":e")
|
||||
local languages = require("cp.languages")
|
||||
local language_name = languages.filetype_to_language[language] or contest_config.default_language
|
||||
local constants = require("cp.constants")
|
||||
local language_name = constants.filetype_to_language[language] or contest_config.default_language
|
||||
local language_config = contest_config[language_name]
|
||||
|
||||
if not language_config then
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
---@field height integer
|
||||
|
||||
local M = {}
|
||||
local languages = require("cp.languages")
|
||||
local constants = require("cp.constants")
|
||||
|
||||
function M.clearcol()
|
||||
vim.api.nvim_set_option_value("number", false, { scope = "local" })
|
||||
|
|
@ -79,7 +79,7 @@ function M.restore_layout(state, tile_fn)
|
|||
local source_file
|
||||
if source_files ~= "" then
|
||||
local files = vim.split(source_files, "\n")
|
||||
local valid_extensions = vim.tbl_keys(languages.filetype_to_language)
|
||||
local valid_extensions = vim.tbl_keys(constants.filetype_to_language)
|
||||
for _, file in ipairs(files) do
|
||||
local ext = vim.fn.fnamemodify(file, ":e")
|
||||
if vim.tbl_contains(valid_extensions, ext) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue