Draft: Trying to make a compiler for ivlint
This commit is contained in:
parent
202bb2ba6f
commit
f1a0c48d98
3 changed files with 26 additions and 0 deletions
6
compiler/mypy.vim
Normal file
6
compiler/mypy.vim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mypy"
|
||||
|
||||
lua require("custom.compilers.mypy").setup()
|
||||
12
lua/custom/compilers/mypy.lua
Normal file
12
lua/custom/compilers/mypy.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
vim.opt_local.makeprg = "mypy ."
|
||||
vim.opt_local.errorformat = table.concat({
|
||||
"%f:%l:%c:%t%*[^:]: %m",
|
||||
"%f:%l:%t%*[^:]: %m",
|
||||
"%f:%l: %m",
|
||||
}, ",")
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -28,3 +28,11 @@ if ok then
|
|||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- For fzf-lua settings
|
||||
local ok_fzf, fzf_lua_config = pcall(require, "fzf-lua.config")
|
||||
if ok_fzf then
|
||||
local actions = require("trouble.sources.fzf").actions
|
||||
fzf_lua_config.defaults.actions.files["ctrl-t"] = actions.open
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue