Add VHDL formatter
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m41s
Details
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m41s
Details
This commit is contained in:
parent
cfa581bf05
commit
deda105b50
|
@ -57,6 +57,20 @@ require("formatter").setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vhdl = {
|
||||||
|
function()
|
||||||
|
-- Full specification of configurations is down below and in Vim help
|
||||||
|
-- files
|
||||||
|
return {
|
||||||
|
exe = "vhdlfmt",
|
||||||
|
args = {
|
||||||
|
util.escape_path(util.get_current_buffer_file_path()),
|
||||||
|
},
|
||||||
|
stdin = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Use the special "*" filetype for defining formatter configurations on
|
-- Use the special "*" filetype for defining formatter configurations on
|
||||||
-- any filetype
|
-- any filetype
|
||||||
["*"] = {
|
["*"] = {
|
|
@ -11,7 +11,7 @@ local function setup_pascal()
|
||||||
|
|
||||||
-- if return value is 1, get ptop
|
-- if return value is 1, get ptop
|
||||||
if check_ptop == 1 then
|
if check_ptop == 1 then
|
||||||
os.execute("wget -o ~/.local/bin/ptop https://www.nickr.eu/data/ptop64")
|
os.execute("wget -O ~/.local/bin/ptop https://www.nickr.eu/data/ptop64")
|
||||||
os.execute("chmod +x ~/.local/bin/ptop")
|
os.execute("chmod +x ~/.local/bin/ptop")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
|
-- VHDL mode (Vanilla with shell interaction)
|
||||||
|
require("vhdl_mode")
|
||||||
|
|
||||||
-- Formatter configuration
|
-- Formatter configuration
|
||||||
require("confformat")
|
require("formatterconfiguration")
|
||||||
|
|
||||||
-- Code completion
|
-- Code completion
|
||||||
require("code-completion")
|
require("code-completion")
|
||||||
|
@ -29,9 +32,9 @@ end
|
||||||
|
|
||||||
-- Update function and call
|
-- Update function and call
|
||||||
function Update_Sys()
|
function Update_Sys()
|
||||||
vim.cmd("Lazy sync")
|
|
||||||
vim.cmd("TSUpdate")
|
vim.cmd("TSUpdate")
|
||||||
vim.cmd("MasonUpdate")
|
vim.cmd("MasonUpdate")
|
||||||
|
vim.cmd("Lazy sync")
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-u>", ":lua Update_Sys()<CR>")
|
vim.keymap.set("n", "<M-u>", ":lua Update_Sys()<CR>")
|
||||||
|
@ -48,4 +51,4 @@ vim.g.gitblame_date_format = "%r"
|
||||||
vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>")
|
vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>")
|
||||||
|
|
||||||
-- Set default colorscheme
|
-- Set default colorscheme
|
||||||
vim.cmd("colo tokyonight-night")
|
vim.cmd("colo vim-monokai-tasty")
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
-- vim dummy assignment for the lsp
|
||||||
|
if vim == nil then
|
||||||
|
local vim = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Setup the formatter for VHDL
|
||||||
|
-- Download for current platform type if not already present
|
||||||
|
local check_formatter = { os.execute("which ~/.local/bin/vhdlfmt") }
|
||||||
|
if check_formatter == 1 then
|
||||||
|
-- setup the formatter here
|
||||||
|
os.execute("wget -O ~/.local/bin/vhdlfmt https://www.nickr.eu/data/vhdlfmt")
|
||||||
|
os.execute("chmod +x ~/.local/bin/vhdlfmt")
|
||||||
|
end
|
Loading…
Reference in New Issue