15 Commits

Author SHA1 Message Date
nichkara
c4dab62f6e Update plugins
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m2s
2025-11-13 13:31:04 +01:00
nichkara
6024d4e803 Remove dead name from repo 2025-11-13 03:49:10 +01:00
nichkara
5afb974b78 Fix ada leave buffer error
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m16s
2025-11-01 07:28:23 +01:00
nichkara
7b3f516848 VHDL LSP integration update
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 42s
2025-10-22 20:38:43 +02:00
nichkara
19b0ce44bc vhdl example config
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 45s
2025-10-22 10:44:05 +02:00
Nick
aa7025dfc7 nickr -> nichkara update and removal of unused code
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 37s
2025-10-19 07:09:40 +02:00
Nick
576bb711bb nickr -> nichkara update 2025-10-19 07:08:35 +02:00
Nick
ff55d76f71 Remove nix shell 2025-10-19 07:07:40 +02:00
Nick
b14e810dec Remove old plugins 2025-10-19 07:03:45 +02:00
Nick
19a27a004e Unset ada keymaps when leaving ada buffers 2025-10-19 07:01:20 +02:00
Nick
fb966de276 Beautify ada_mode to conform to lua standards 2025-10-19 06:52:52 +02:00
nichkara
ead1e9baa8 Makefile snippet for gccvarset to create clangd project file
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 32s
2025-10-12 10:06:50 +02:00
nichkara
bfc3c57d19 Migration of lspconfig to vim.lsp
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 39s
2025-10-12 10:03:04 +02:00
nichkara
d55b376ba8 Show intendation
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 31s
2025-09-23 07:35:38 +02:00
nichkara
f96b560ca7 Remove ts-rainbow as it is deprecated
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 35s
2025-09-23 07:28:44 +02:00
22 changed files with 132 additions and 158 deletions

View File

@@ -38,7 +38,7 @@ endglobal
snippet helloworld "Hello world example to test features" b snippet helloworld "Hello world example to test features" b
-- `!p snip.rv = fn` -- `!p snip.rv = fn`
-- Created on: `date` -- 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 -- Content: Hello world example
with Ada.Text_IO; use Ada.Text_IO; with Ada.Text_IO; use Ada.Text_IO;
@@ -53,9 +53,7 @@ end $1;$0
endsnippet endsnippet
snippet docstring "Document String with most important information" b snippet docstring "Document String with most important information" b
-- `!p snip.rv = fn` -- Author(s): ${1:Nina Chloe Kassandra Reiss <nina.reiss@nickr.eu>}
-- Created on: `date`
-- Author(s): ${1:Yannick Reiß}
-- Description: ${2:`!p snip.rv = fn.split('.')[0]`} -- Description: ${2:`!p snip.rv = fn.split('.')[0]`}
$0 $0
endsnippet endsnippet

View File

@@ -3,7 +3,7 @@ snippet dd "Date and Time" i
endsnippet endsnippet
snippet crednick "My private Credentials" snippet crednick "My private Credentials"
Yannick Reiss <yannick.reiss@nickr.eu> Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
endsnippet endsnippet
snippet credhsrm "Credentials HSRM" snippet credhsrm "Credentials HSRM"

View File

@@ -21,7 +21,7 @@ endsnippet
snippet template "Template for assembly program" snippet template "Template for assembly program"
global ${1:_start} ; linker entry point global ${1:_start} ; linker entry point
; Author: ${2: Yannick Reiß} ; Author: ${2:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
; Date: `date` ; Date: `date`
; Description: ${3:Desciption} ; Description: ${3:Desciption}

View File

@@ -0,0 +1,7 @@
snippet copy_1_2_w3 "Copy current cell modifying cells +1,+2"
Copy (from) (to) (with): >[-]>[-]<<[->+>+<<]>>[-<<+>>]<<
endsnippet
snippet add_1_2 "Add from 1 to 2"
Add (from) (to): [->+<]>
endsnippet

View File

@@ -124,7 +124,7 @@ endsnippet
snippet docstring "Meta Comment for Documenation" A snippet docstring "Meta Comment for Documenation" A
/* /*
* Filename: `!p snip.rv = fn` * Filename: `!p snip.rv = fn`
* Author: ${1:Yannick Reiss} * Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
* Date: `date` * Date: `date`
* Project: ${2:Project Name} * Project: ${2:Project Name}
* Copyright: ${3:None} * Copyright: ${3:None}

View File

@@ -11,7 +11,7 @@ snippet template "template for new program" A
*----------------------------------------------------------------- *-----------------------------------------------------------------
IDENTIFICATION DIVISION. IDENTIFICATION DIVISION.
PROGRAM-ID. ${1:Title}. PROGRAM-ID. ${1:Title}.
*AUTHOR. ${2:Yannick Reiß}. *AUTHOR. ${2:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}.
*CONTENT. ${3:Beschreibung}. *CONTENT. ${3:Beschreibung}.
*----------------------------------------------------------------- *-----------------------------------------------------------------

View File

@@ -35,3 +35,7 @@ endsnippet
snippet A "All" snippet A "All"
endsnippet endsnippet
snippet . "Dot"
·
endsnippet

View File

@@ -1,6 +1,6 @@
snippet docstring "Document string" b snippet docstring "Document string" b
-- Filename: `!p snip.rv = fn` -- Filename: `!p snip.rv = fn`
-- Author: ${1:Yannick Reiß} -- Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
-- Copyright: ${2:MIT-License} -- Copyright: ${2:MIT-License}
-- Description: ${3:Funny lua script} -- Description: ${3:Funny lua script}
$0 $0

View File

@@ -75,7 +75,18 @@ if t[19] == "y":
t[19] = "Created!" t[19] = "Created!"
if t[20] == "y": if t[20] == "y":
system(f"git init > /dev/null") system(f"git init > /dev/null")
t[20] = "Initialized repository!"` t[20] = "Initialized repository!"``!p
from os import system
if "cl" in t[2].split(' ') and t[19] == "y":
with open(".clangd", "w") as w:
config = f"""
CompileFlags:
Add: [{t[8].split(' ').join(', ')}]
Remove: []
Compiler: {t[3]}
""" w.write(config)
`
$0 $0
endsnippet endsnippet

View File

@@ -1,7 +1,7 @@
snippet helloworld "Hello world example" b snippet helloworld "Hello world example" b
""" """
File: `!p snip.rv = fn` File: `!p snip.rv = fn`
Author: Nicki Author: Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
Created on: `date` Created on: `date`
Description: Hello world python example Description: Hello world python example
""" """
@@ -14,7 +14,7 @@ endsnippet
snippet docmodule "Documentation for modules" snippet docmodule "Documentation for modules"
""" """
File: `!p snip.rv = fn` File: `!p snip.rv = fn`
Author: ${1:Yannick Reiß} Author: ${1:Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>}
Created on: `date` Created on: `date`
Description: ${2:No further description} Description: ${2:No further description}
""" """

View File

@@ -93,7 +93,7 @@ endsnippet
snippet textemplate "include header" A snippet textemplate "include header" A
\\input{~/latex/header.tex} \\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} \\begin{document}
\\input{~/latex/init.tex} \\input{~/latex/init.tex}

13
UltiSnips/veryl.snippets Normal file
View 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

View File

@@ -1,8 +1,3 @@
-- Lua vim-dummy variable
if vim == nil then
local vim = {}
end
-- @name Prove -- @name Prove
-- @param -- @param
-- @short Run gnatprove -- @short Run gnatprove
@@ -12,7 +7,7 @@ function Prove()
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd) vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
vim.cmd(":%!bash") vim.cmd(":%!bash")
buffer_loaded = true Buffer_loaded = true
end end
-- @name Run -- @name Run
@@ -24,25 +19,24 @@ function Run()
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd) vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
vim.cmd(":%!bash") vim.cmd(":%!bash")
buffer_loaded = true Buffer_loaded = true
end end
function Close_Prove() function Close_Prove()
if buffer_loaded then if Buffer_loaded then
buffer_loaded = false Buffer_loaded = false
vim.cmd("bd!") vim.cmd("bd!")
end end
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 -- @name setup_ada
-- @param -- @param
-- @short Verify installation of ada tools or install them. -- @short Verify installation of ada tools or install them.
local function setup_ada() local function setup_ada()
vim.keymap.set("n", "<leader>cb", ":!gnatpp %<cr>") 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.tabstop = 3
vim.opt.shiftwidth = 3 vim.opt.shiftwidth = 3
end end

View File

@@ -6,6 +6,7 @@ vim.opt.completeopt = { "menu", "menuone" }
-- shortmess is used to reduce verbocity -- shortmess is used to reduce verbocity
-- vim.opt.shortmess = vim.opt.shortmess + { c = true } -- vim.opt.shortmess = vim.opt.shortmess + { c = true }
-- ERROR: Unable to load module
local cmp = require("cmp") local cmp = require("cmp")
cmp.setup({ cmp.setup({
-- configuration -- configuration

View File

@@ -71,6 +71,16 @@ require("formatter").setup({
end, end,
}, },
veryl = {
function()
return {
exe = "veryl fmt",
args = {},
stdin = false,
}
end,
},
-- Use the special "*" filetype for defining formatter configurations on -- Use the special "*" filetype for defining formatter configurations on
-- any filetype -- any filetype
["*"] = { ["*"] = {

View File

@@ -10,6 +10,7 @@ local linters = {
tex = { "proselint" }, tex = { "proselint" },
plaintex = { "proselint" }, plaintex = { "proselint" },
ada = { "gnat", "gcc", "adals", "cspell" }, ada = { "gnat", "gcc", "adals", "cspell" },
vhdl = {},
} }
local fixers = { local fixers = {
@@ -24,11 +25,14 @@ local fixers = {
python = { "yapf" }, python = { "yapf" },
pascal = { "ptop" }, pascal = { "ptop" },
haskell = { "fourmolu" }, haskell = { "fourmolu" },
rust = { "rustfmt" },
} }
vim.g.ale_linters = linters vim.g.ale_linters = linters
vim.g.ale_fix_on_save = 0 vim.g.ale_fix_on_save = 0
vim.g.ale_fixers = fixers 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>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>")

View File

@@ -15,41 +15,14 @@ require("mason-lspconfig").setup({
}, },
}) })
-- require("mason-lspconfig").setup_handlers({ vim.lsp.enable("verible")
-- function(asm_lsp) vim.lsp.config("verible", { cmd = { "verible-verilog-ls", "--rules_config_search" } })
-- require("lspconfig")[asm_lsp].setup({})
-- end,
-- function(clangd)
-- require("lspconfig")[clangd].setup({})
-- end,
-- function(lua_ls)
-- require("lspconfig")[lua_ls].setup({})
-- end,
-- function(hls)
-- require("lspconfig")[hls].setup({})
-- end,
-- function(rust_analyzer)
-- require("lspconfig")[rust_analyzer].setup({})
-- end,
-- function(vhdl_ls)
-- require("lspconfig")[vhdl_ls].setup({})
-- end,
-- function(verible)
-- require("lspconfig")[verible].setup({})
-- end,
-- function(vimls)
-- require("lspconfig")[vimls].setup({})
-- end,
-- function(texlab)
-- require("lspconfig")[texlab].setup({})
-- end,
-- function(als)
-- require("lspconfig")[als].setup({})
-- end,
-- })
require("lspconfig").verible.setup({ vim.lsp.enable("clangd")
cmd = { "verible-verilog-ls", "--rules_config_search" }, vim.lsp.config("clangd", {
cmd = { "clangd" },
root_markers = { ".clangd" },
filetypes = { "c", "cpp" },
}) })
-- @name file_exists -- @name file_exists
@@ -81,10 +54,13 @@ local function get_config_file()
end end
end end
require("lspconfig").als.setup({ vim.lsp.enable("als")
settings = { vim.lsp.config("als", { projectFile = get_config_file() })
ada = {
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 = {},
}) })

View File

@@ -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.nichkara.eu/data/ptop64")
os.execute("chmod +x ~/.local/bin/ptop") os.execute("chmod +x ~/.local/bin/ptop")
end end
@@ -35,22 +35,3 @@ vim.api.nvim_create_autocmd({ "BufLeave" }, {
pattern = { "*.pas" }, pattern = { "*.pas" },
callback = leave_pascal, 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,
--})

View File

@@ -7,7 +7,6 @@ return {
"SirVer/UltiSnips", "SirVer/UltiSnips",
"cohama/lexima.vim", "cohama/lexima.vim",
"voldikss/vim-floaterm", "voldikss/vim-floaterm",
"https://git.nickr.eu/yannickreiss/nvim-sourcer.git",
-- Navigation -- Navigation
"preservim/nerdtree", "preservim/nerdtree",
@@ -34,7 +33,6 @@ return {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
{ "romgrk/barbar.nvim", wants = "nvim-web-devicons" }, { "romgrk/barbar.nvim", wants = "nvim-web-devicons" },
"mhinz/vim-startify", "mhinz/vim-startify",
"p00f/nvim-ts-rainbow",
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
@@ -67,17 +65,20 @@ return {
end, end,
ft = { "markdown" }, ft = { "markdown" },
}, },
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
},
-- Themes -- Themes
"folke/tokyonight.nvim", "folke/tokyonight.nvim",
"patstockwell/vim-monokai-tasty", "patstockwell/vim-monokai-tasty",
"hiroakis/cyberspace.vim", "hiroakis/cyberspace.vim",
"jaredgorski/spacecamp", "jaredgorski/spacecamp",
{
"scottmckendry/cyberdream.nvim", "scottmckendry/cyberdream.nvim",
lazy = false, "samharju/synthweave.nvim",
priority = 1000,
},
-- Code completion / Menu -- Code completion / Menu
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
@@ -102,9 +103,9 @@ return {
"mhartington/formatter.nvim", "mhartington/formatter.nvim",
{ "TamaMcGlinn/nvim-lspconfig-ada" }, { "TamaMcGlinn/nvim-lspconfig-ada" },
"sainnhe/sonokai", "sainnhe/sonokai",
"veryl-lang/veryl.vim",
-- Plugins to test -- Plugins to test
"https://git.nickr.eu/yannickreiss/nvim-macrotool.git",
-- Wiki -- Wiki
{ {

View File

@@ -46,60 +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>na", ":set norelativenumber<cr>")
vim.keymap.set("n", "<leader>nr", ":set relativenumber<cr>") vim.keymap.set("n", "<leader>nr", ":set relativenumber<cr>")
-- Nix mode vim.filetype.add({
local nix_interpreter_buffer = -1 extension = {
local nix_interpreter_window = -1 bf = "brainfuck",
},
-- @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,
}) })

View File

@@ -1,13 +1,8 @@
-- vim dummy assignment for the lsp
if vim == nil then
local vim = {}
end
-- Setup the formatter for VHDL -- Setup the formatter for VHDL
-- Download for current platform type if not already present -- Download for current platform type if not already present
local check_formatter = { os.execute("which ~/.local/bin/vhdlfmt") } local check_formatter = { os.execute("which ~/.local/bin/vhdlfmt") }
if check_formatter == 1 then if check_formatter == 1 then
-- setup the formatter here -- 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") os.execute("chmod +x ~/.local/bin/vhdlfmt")
end end

31
vhdl_defaults.toml Normal file
View 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