Compare commits
12 Commits
ead1e9baa8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
380e2470b3 | ||
|
|
c4dab62f6e | ||
|
|
6024d4e803 | ||
|
|
5afb974b78 | ||
|
|
7b3f516848 | ||
|
|
19b0ce44bc | ||
|
|
aa7025dfc7 | ||
|
|
576bb711bb | ||
|
|
ff55d76f71 | ||
|
|
b14e810dec | ||
|
|
19a27a004e | ||
|
|
fb966de276 |
@@ -38,7 +38,7 @@ endglobal
|
||||
snippet helloworld "Hello world example to test features" b
|
||||
-- `!p snip.rv = fn`
|
||||
-- Created on: `date`
|
||||
-- Author(s): Yannick Reiss <yannick.reiss@nickr.eu>
|
||||
-- Author(s): Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
|
||||
-- Content: Hello world example
|
||||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
@@ -53,9 +53,7 @@ end $1;$0
|
||||
endsnippet
|
||||
|
||||
snippet docstring "Document String with most important information" b
|
||||
-- `!p snip.rv = fn`
|
||||
-- Created on: `date`
|
||||
-- Author(s): ${1:Yannick Reiß}
|
||||
-- Author(s): ${1:Nina Chloe Kassandra Reiss <nina.reiss@nickr.eu>}
|
||||
-- Description: ${2:`!p snip.rv = fn.split('.')[0]`}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
@@ -3,7 +3,7 @@ snippet dd "Date and Time" i
|
||||
endsnippet
|
||||
|
||||
snippet crednick "My private Credentials"
|
||||
Yannick Reiss <yannick.reiss@nickr.eu>
|
||||
Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
|
||||
endsnippet
|
||||
|
||||
snippet credhsrm "Credentials HSRM"
|
||||
|
||||
@@ -21,7 +21,7 @@ endsnippet
|
||||
|
||||
snippet template "Template for assembly program"
|
||||
global ${1:_start} ; linker entry point
|
||||
; Author: ${2: Yannick Reiß}
|
||||
; Author: ${2:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
|
||||
; Date: `date`
|
||||
; Description: ${3:Desciption}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ endsnippet
|
||||
snippet docstring "Meta Comment for Documenation" A
|
||||
/*
|
||||
* Filename: `!p snip.rv = fn`
|
||||
* Author: ${1:Yannick Reiss}
|
||||
* Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
|
||||
* Date: `date`
|
||||
* Project: ${2:Project Name}
|
||||
* Copyright: ${3:None}
|
||||
|
||||
@@ -11,7 +11,7 @@ snippet template "template for new program" A
|
||||
*-----------------------------------------------------------------
|
||||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. ${1:Title}.
|
||||
*AUTHOR. ${2:Yannick Reiß}.
|
||||
*AUTHOR. ${2:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}.
|
||||
*CONTENT. ${3:Beschreibung}.
|
||||
*-----------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -35,3 +35,7 @@ endsnippet
|
||||
snippet A "All"
|
||||
∀
|
||||
endsnippet
|
||||
|
||||
snippet . "Dot"
|
||||
·
|
||||
endsnippet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
snippet docstring "Document string" b
|
||||
-- Filename: `!p snip.rv = fn`
|
||||
-- Author: ${1:Yannick Reiß}
|
||||
-- Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
|
||||
-- Copyright: ${2:MIT-License}
|
||||
-- Description: ${3:Funny lua script}
|
||||
$0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
snippet helloworld "Hello world example" b
|
||||
"""
|
||||
File: `!p snip.rv = fn`
|
||||
Author: Nicki
|
||||
Author: Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
|
||||
Created on: `date`
|
||||
Description: Hello world python example
|
||||
"""
|
||||
@@ -14,7 +14,7 @@ endsnippet
|
||||
snippet docmodule "Documentation for modules"
|
||||
"""
|
||||
File: `!p snip.rv = fn`
|
||||
Author: ${1:Yannick Reiß}
|
||||
Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
|
||||
Created on: `date`
|
||||
Description: ${2:No further description}
|
||||
"""
|
||||
|
||||
@@ -93,7 +93,7 @@ endsnippet
|
||||
|
||||
snippet textemplate "include header" A
|
||||
\\input{~/latex/header.tex}
|
||||
\\header{${1:report/article}}{${2:Yannick Reiß}}{${3:Titel}}
|
||||
\\header{${1:report/article}}{${2:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}}{${3:Titel}}
|
||||
|
||||
\\begin{document}
|
||||
\\input{~/latex/init.tex}
|
||||
|
||||
13
UltiSnips/veryl.snippets
Normal file
13
UltiSnips/veryl.snippets
Normal file
@@ -0,0 +1,13 @@
|
||||
snippet module "Create a new module" b
|
||||
${1:pub } module ${2:module_name} (
|
||||
$3
|
||||
) {
|
||||
$0
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet embed "Add embed"
|
||||
embed (inline) sv{{{
|
||||
$1
|
||||
}}}$0
|
||||
endsnippet
|
||||
@@ -1,8 +1,3 @@
|
||||
-- Lua vim-dummy variable
|
||||
if vim == nil then
|
||||
local vim = {}
|
||||
end
|
||||
|
||||
-- @name Prove
|
||||
-- @param
|
||||
-- @short Run gnatprove
|
||||
@@ -12,7 +7,7 @@ function Prove()
|
||||
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
|
||||
vim.cmd(":%!bash")
|
||||
|
||||
buffer_loaded = true
|
||||
Buffer_loaded = true
|
||||
end
|
||||
|
||||
-- @name Run
|
||||
@@ -24,25 +19,24 @@ function Run()
|
||||
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
|
||||
vim.cmd(":%!bash")
|
||||
|
||||
buffer_loaded = true
|
||||
Buffer_loaded = true
|
||||
end
|
||||
|
||||
function Close_Prove()
|
||||
if buffer_loaded then
|
||||
buffer_loaded = false
|
||||
if Buffer_loaded then
|
||||
Buffer_loaded = false
|
||||
vim.cmd("bd!")
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "pp", ":lua Close_Prove()<cr>")
|
||||
vim.keymap.set("n", "<leader>pp", ":lua Prove()<cr>")
|
||||
vim.keymap.set("n", "<leader>op", ":lua Run()<cr>")
|
||||
|
||||
-- @name setup_ada
|
||||
-- @param
|
||||
-- @short Verify installation of ada tools or install them.
|
||||
local function setup_ada()
|
||||
vim.keymap.set("n", "<leader>cb", ":!gnatpp %<cr>")
|
||||
vim.keymap.set("n", "pp", ":lua Close_Prove()<cr>")
|
||||
vim.keymap.set("n", "<leader>pp", ":lua Prove()<cr>")
|
||||
vim.keymap.set("n", "<leader>op", ":lua Run()<cr>")
|
||||
vim.opt.tabstop = 3
|
||||
vim.opt.shiftwidth = 3
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ vim.opt.completeopt = { "menu", "menuone" }
|
||||
|
||||
-- shortmess is used to reduce verbocity
|
||||
-- vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
||||
-- ERROR: Unable to load module
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
-- configuration
|
||||
|
||||
@@ -71,6 +71,16 @@ require("formatter").setup({
|
||||
end,
|
||||
},
|
||||
|
||||
veryl = {
|
||||
function()
|
||||
return {
|
||||
exe = "veryl fmt",
|
||||
args = {},
|
||||
stdin = false,
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- Use the special "*" filetype for defining formatter configurations on
|
||||
-- any filetype
|
||||
["*"] = {
|
||||
|
||||
@@ -10,6 +10,7 @@ local linters = {
|
||||
tex = { "proselint" },
|
||||
plaintex = { "proselint" },
|
||||
ada = { "gnat", "gcc", "adals", "cspell" },
|
||||
vhdl = {},
|
||||
}
|
||||
|
||||
local fixers = {
|
||||
@@ -30,6 +31,8 @@ local fixers = {
|
||||
vim.g.ale_linters = linters
|
||||
vim.g.ale_fix_on_save = 0
|
||||
vim.g.ale_fixers = fixers
|
||||
-- vim.g.ale_vhdl_ghdl_options = "--std=08 --workdir=src/"
|
||||
|
||||
vim.keymap.set("n", "<leader>lf", ":ALEFix<CR>")
|
||||
vim.keymap.set("n", "<leader>lp", ":ALEFindReferences<CR>")
|
||||
vim.keymap.set("n", "<leader>lr", ":ALEFindReferences<CR>")
|
||||
vim.keymap.set("n", "<leader>ln", ":ALENext<CR>")
|
||||
|
||||
@@ -56,3 +56,11 @@ end
|
||||
|
||||
vim.lsp.enable("als")
|
||||
vim.lsp.config("als", { projectFile = get_config_file() })
|
||||
|
||||
vim.lsp.enable("vhdl_ls")
|
||||
vim.lsp.config("vhdl_ls", {
|
||||
cmd = { "vhdl_ls" },
|
||||
filetypes = { "vhdl" },
|
||||
root_markers = { "vhdl_ls.toml", ".git" },
|
||||
settings = {},
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ local function setup_pascal()
|
||||
|
||||
-- if return value is 1, get ptop
|
||||
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.nichkara.eu/data/ptop64")
|
||||
os.execute("chmod +x ~/.local/bin/ptop")
|
||||
end
|
||||
|
||||
@@ -35,22 +35,3 @@ vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
||||
pattern = { "*.pas" },
|
||||
callback = leave_pascal,
|
||||
})
|
||||
|
||||
-- @name auto_format
|
||||
-- @param
|
||||
-- @short The format function for pascal.
|
||||
local function auto_format()
|
||||
vim.cmd("checktime %")
|
||||
local write_cmd = "ptop -i 4 -c ~/.config/nvim/ptop.conf "
|
||||
.. vim.api.nvim_buf_get_name(0)
|
||||
.. " "
|
||||
.. vim.api.nvim_buf_get_name(0)
|
||||
os.execute(write_cmd)
|
||||
vim.cmd("checktime %")
|
||||
end
|
||||
|
||||
-- Add formatter command
|
||||
--vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
-- pattern = { "*.pas" },
|
||||
-- callback = auto_format,
|
||||
--})
|
||||
|
||||
@@ -56,5 +56,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>")
|
||||
|
||||
-- Set default colorscheme
|
||||
-- vim.cmd("colo vim-monokai-tasty")
|
||||
vim.cmd("colo vim-monokai-tasty")
|
||||
vim.cmd("colo synthweave")
|
||||
|
||||
@@ -7,7 +7,6 @@ return {
|
||||
"SirVer/UltiSnips",
|
||||
"cohama/lexima.vim",
|
||||
"voldikss/vim-floaterm",
|
||||
"https://git.nickr.eu/yannickreiss/nvim-sourcer.git",
|
||||
|
||||
-- Navigation
|
||||
"preservim/nerdtree",
|
||||
@@ -78,11 +77,8 @@ return {
|
||||
"patstockwell/vim-monokai-tasty",
|
||||
"hiroakis/cyberspace.vim",
|
||||
"jaredgorski/spacecamp",
|
||||
{
|
||||
"scottmckendry/cyberdream.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
},
|
||||
"samharju/synthweave.nvim",
|
||||
|
||||
-- Code completion / Menu
|
||||
"hrsh7th/nvim-cmp",
|
||||
@@ -110,7 +106,6 @@ return {
|
||||
"veryl-lang/veryl.vim",
|
||||
|
||||
-- Plugins to test
|
||||
"https://git.nickr.eu/yannickreiss/nvim-macrotool.git",
|
||||
|
||||
-- Wiki
|
||||
{
|
||||
|
||||
@@ -46,67 +46,8 @@ vim.keymap.set("n", "<leader>lm", ":set number<cr>")
|
||||
vim.keymap.set("n", "<leader>na", ":set norelativenumber<cr>")
|
||||
vim.keymap.set("n", "<leader>nr", ":set relativenumber<cr>")
|
||||
|
||||
-- Nix mode
|
||||
local nix_interpreter_buffer = -1
|
||||
local nix_interpreter_window = -1
|
||||
|
||||
-- @name run_nix_interpreter
|
||||
-- @param
|
||||
-- @short Run nix and output to a buffer on the right
|
||||
local function run_nix_interpreter()
|
||||
local original_win = vim.api.nvim_get_current_win()
|
||||
vim.cmd("vsplit")
|
||||
nix_interpreter_buffer = vim.api.nvim_create_buf(false, true)
|
||||
vim.api.nvim_win_set_buf(0, nix_interpreter_buffer)
|
||||
nix_interpreter_window = vim.api.nvim_get_current_win()
|
||||
vim.api.nvim_set_current_win(original_win)
|
||||
end
|
||||
|
||||
-- @name update_nix_interpreter
|
||||
-- @param
|
||||
-- @short Run nix enterpreter on that file.
|
||||
local function update_nix_interpreter()
|
||||
local filename = vim.api.nvim_buf_get_name(0)
|
||||
if filename == "" then
|
||||
vim.api.nvim_buf_set_lines(nix_interpreter_buffer, 0, -1, false, {
|
||||
"Error: Current buffer has no file name.",
|
||||
})
|
||||
return
|
||||
end
|
||||
local cmd = { "nix-instantiate", "--eval", "--strict", filename }
|
||||
local output = vim.fn.systemlist(cmd)
|
||||
if vim.v.shell_error ~= 0 then
|
||||
table.insert(output, 1, "Error running nix-instantiate:")
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(nix_interpreter_buffer, 0, -1, false, output)
|
||||
end
|
||||
|
||||
-- @name close_nix_interpreter
|
||||
-- @param
|
||||
-- @short Closes the window and buffer of the interpreter
|
||||
local function close_nix_interpreter()
|
||||
vim.api.nvim_buf_delete(nix_interpreter_buffer, { unload = true })
|
||||
vim.api.nvim_win_close(nix_interpreter_window, true)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
pattern = { "*.nix" },
|
||||
callback = run_nix_interpreter,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
pattern = { "*.nix" },
|
||||
callback = update_nix_interpreter,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufLeave" }, {
|
||||
pattern = { "*.nix" },
|
||||
callback = close_nix_interpreter,
|
||||
})
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
bf = "brainfuck",
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
-- 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("wget -O ~/.local/bin/vhdlfmt https://www.nichkara.eu/data/vhdlfmt")
|
||||
os.execute("chmod +x ~/.local/bin/vhdlfmt")
|
||||
end
|
||||
|
||||
31
vhdl_defaults.toml
Normal file
31
vhdl_defaults.toml
Normal file
@@ -0,0 +1,31 @@
|
||||
# What standard to use. This is optional and defaults to VHDL2008.
|
||||
standard = "2008"
|
||||
# File names are either absolute or relative to the parent folder of the vhdl_ls.toml file
|
||||
[libraries]
|
||||
lib2.files = [
|
||||
'pkg2.vhd',
|
||||
]
|
||||
lib1.files = [
|
||||
'pkg1.vhd',
|
||||
'tb_ent.vhd'
|
||||
]
|
||||
|
||||
# Wildcards and exclude patterns are supported
|
||||
lib3.files = [
|
||||
'test/*.vhd',
|
||||
'src/*.vhd',
|
||||
'src/*/*.vhd',
|
||||
]
|
||||
lib3.exclude = [
|
||||
'test/*_old.vhd',
|
||||
]
|
||||
|
||||
# Libraries can be marked as third-party to disable some analysis warnings, such as unused declarations
|
||||
UNISIM.files = [
|
||||
'C:\Xilinx\Vivado\2023.1\data\vhdl\src\unisims\unisim_VCOMP.vhd',
|
||||
]
|
||||
UNISIM.is_third_party = true
|
||||
|
||||
[lint]
|
||||
unused = 'error' # Upgrade the 'unused' diagnostic to the 'error' severity
|
||||
unnecessary_work_library = false # Disable linting for the 'library work;' statement
|
||||
Reference in New Issue
Block a user