189 Commits

Author SHA1 Message Date
Nina Chlóe Kassandra Reiß
4acae3052a Class and shebang snippet for python
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-06-02 20:17:51 +02:00
Nina Chlóe Kassandra Reiß
6c8211ff4f Math 2026-05-31 20:41:58 +02:00
Nina Chlóe Kassandra Reiß
ba38abd4c7 Initialize UltiSnips keymap manually
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-05-31 20:32:19 +02:00
Nina Chlóe Kassandra Reiß
8b0409f3cb Enable autosave for haskell files
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-05-07 20:36:09 +02:00
Nina Chlóe Kassandra Reiß
7bb0a29f5c Add systemverilog basic module creation
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-05-07 20:33:56 +02:00
Nina Chlóe Kassandra Reiß
aaedc00d6d On-fly integration of Mason programs 2026-05-07 20:32:56 +02:00
Nina Chlóe Kassandra Reiß
f980944725 Format nix language files
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-04-23 13:25:04 +02:00
Nina Chlóe Kassandra Reiß
952048bd59 Add ALE fixer for various programming languages
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m5s
2026-03-28 11:37:43 +01:00
Nina Chloé Kassandra Reiß
4e19351253 remove spell files
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 31s
2026-03-12 10:29:43 +01:00
Nina Chloé Kassandra Reiß
bede228921 Fix gitignore file
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m29s
2026-03-12 10:21:13 +01:00
Nina Chloé Kassandra Reiß
952b9518b1 Still something special
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 3m24s
2026-03-03 18:11:34 +01:00
Nina Chloé Kassandra Reiß
92ef872202 Remove treesitter after causing problems
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-02-27 22:18:30 +01:00
nichkara
4b1aa4c634 Include oil
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-02-14 09:10:04 +01:00
nichkara
3a69bd9cd9 Switch NerdTREE for oil
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-01-01 19:12:54 +01:00
nichkara
d52f69ebf4 Switch NerdTREE for oil
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2026-01-01 18:57:30 +01:00
nichkara
380e2470b3 Change default wallpaper
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Has been cancelled
2025-11-20 23:24:25 +01:00
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
3db17f9849 Update 2025-07-31 08:57:16 +02:00
8564daf4b5 Create nix interpreter output 2025-07-17 16:42:07 +02:00
f19f71c182 Markdown preview 2025-07-15 16:17:23 +02:00
084fff8e1a Cyberdream 2025-07-10 15:06:16 +02:00
82226b4f78 Add lean snippets and do Neovide 2025-07-08 19:59:46 +02:00
c4c65c4e65 Merge branch 'master' of git.nickr.eu:yannickreiss/nvim 2025-06-25 17:28:22 +02:00
8ecfde7ce1 Add spark wiki to config 2025-06-25 17:28:15 +02:00
Nick
437ce3ff2e Resolve merge conflicts 2025-06-24 14:58:18 +02:00
Nick
4ad4a777f6 Add mail snippet to glob
ab
2025-06-24 14:56:19 +02:00
7daedc0b31 Ada proofs 2025-06-24 09:13:12 +02:00
5ee0540a2e Prove framework 2025-06-15 14:53:46 +02:00
41ec16380b Add function to prove ada/Spark code 2025-06-14 23:23:28 +02:00
d79f1fd6d4 Ada mode update 2025-06-11 14:43:13 +02:00
742e6f614a Remove unused features from config 2025-05-22 08:44:07 +02:00
730ec3b4bd Change default from rel to abs number 2025-05-21 22:36:30 +02:00
1234f9bd4c Update 2025-05-21 18:48:17 +02:00
12a3293fff Remove lazy lock from repo 2025-03-31 10:00:34 +02:00
e26dfea84f Add lazy lock to ignored files 2025-03-31 09:59:58 +02:00
2d0a74ed82 Change layout style of completion menu 2025-03-31 09:59:19 +02:00
8e09bfd6b7 Remove autoformat 2025-03-31 09:58:29 +02:00
9da04ad7e8 No ensure installed lsps 2025-03-28 07:47:55 +01:00
c91101470c Change default colorscheme 2025-03-27 11:33:35 +01:00
b11d36ba16 Snippets 2025-03-25 08:52:24 +01:00
67eaafaee9 Add ignore 2025-03-18 11:32:00 +01:00
a02cf6a902 Mail client 2025-03-18 11:05:20 +01:00
ae06236c2c Add mail client to nvim 2025-03-18 11:01:38 +01:00
339d5b1197 add password file to gitignore 2025-03-18 11:01:17 +01:00
06c098c194 Python updates 2025-03-15 19:19:36 +01:00
886d434849 Adjust Ada snippets to styleguide 2025-02-24 07:37:01 +01:00
cca29ca695 Spell 2025-02-04 07:59:33 +01:00
f4909335c1 Set ada configuration file dynamically on startup 2025-02-04 07:26:10 +01:00
c8be7d19a7 Change some defaults and the completion window looks 2025-02-03 15:00:49 +01:00
443a0cb897 Spell check 2025-02-01 07:17:01 +01:00
5b1d0d66de Add ada mode 2025-01-24 21:41:28 +01:00
59dc3784af Add screenkey mapping 2024-12-27 16:09:30 +01:00
8cee1dc880 Ada mode 2024-12-19 10:37:14 +01:00
af28c12ea7 Add screenkey 2024-12-19 08:58:04 +01:00
4aa297662c Show key plugin 2024-12-19 08:44:13 +01:00
fb0655896c Remove which-key, much to annoying 2024-12-18 12:22:11 +01:00
298e80f221 Add pascal snippets 2024-12-18 09:29:02 +01:00
35da498b9b Add which key for testing 2024-12-18 09:28:38 +01:00
2836ff63e3 A very nice procedure snippet for pascal 2024-12-12 09:47:32 +01:00
6e48879ffa Disable pascal formatter. 2024-12-12 06:18:24 +01:00
e5aa6d7012 Update nvim 2024-11-26 19:08:52 +01:00
d63a431242 Add high contrast theme 2024-11-01 10:00:14 +01:00
deda105b50 Add VHDL formatter 2024-10-09 10:00:30 +02:00
cfa581bf05 LSP configuration for LaTeX 2024-10-09 09:08:49 +02:00
c0ad357563 Remove Ada language server 2024-10-08 11:10:52 +02:00
3217a4456c Update Mason packages 2024-10-08 11:01:27 +02:00
4357a36235 Autosetup lsp servers 2024-10-08 10:49:48 +02:00
01359aca3c Ensure installed packages 2024-10-08 10:25:44 +02:00
2d7c2974ef Syntax feature upgrade for ada snippets 2024-10-08 10:07:59 +02:00
02c752a943 Use fourmolu as Haskell formatter and fixer 2024-10-08 10:07:17 +02:00
8cb88ec054 Formatter update 2024-10-07 08:19:18 +02:00
5f931de4cc Ada snippet update 2024-10-07 08:19:07 +02:00
af4b80906f Disable ada mode 2024-10-07 07:55:16 +02:00
cc1a7c9311 Add ada formatting 2024-10-07 07:46:40 +02:00
99e59d66e3 Add A,B:Type Syntax to Ultisnips function snippet 2024-10-07 07:46:25 +02:00
f9ae3dfe99 Format with 4 spaces of indentation 2024-10-01 17:34:54 +02:00
c2705d1f1e Delete empty configuration file 2024-10-01 17:27:14 +02:00
739d439946 Don't fix on save => not all fixed wanted 2024-10-01 17:26:46 +02:00
10ca92d206 Disable spell checking in pascal files 2024-10-01 17:01:41 +02:00
561cdf5d2d Merge branch 'master' of git.nickr.eu:yannickreiss/nvim 2024-09-24 05:41:49 +02:00
b8c5c86010 bypass reloading error when using pascal formatter 2024-09-24 05:41:41 +02:00
ad4c99c1f8 Autoreload is now up globally 2024-09-23 15:34:07 +02:00
7452ee9b06 Add pascal mode formatter 2024-09-23 15:23:56 +02:00
d2c68f99ab Add pascal mode 2024-09-23 15:23:44 +02:00
085ff836c3 PTOP configuration 2024-09-23 15:10:59 +02:00
55e22fd3f7 Snippet updates 2024-09-23 13:27:17 +02:00
963e7a1f97 Linterconfiguration 2024-09-23 13:27:06 +02:00
10c2b99fb8 Remove Doxyscan, tagbar is better 2024-09-17 11:51:26 +02:00
aa1d40613d Seperating configuration into different lua modules 2024-09-16 06:40:52 +02:00
fdd52c7471 Vim snippet add remap 2024-09-16 06:18:16 +02:00
04f7b17fd5 Change XML tag trigger to auto trigger 2024-09-15 21:09:33 +02:00
c3f37295e6 Failing self containing hello world snippet 2024-09-15 21:07:11 +02:00
8233320d90 Add Rust hello world, remove weird python based print snippet 2024-09-15 20:46:40 +02:00
3348f2e49b Hello world snippet for python 2024-09-15 20:38:53 +02:00
2135d24022 Nicer function snippet for python 2024-09-15 20:34:11 +02:00
b5a63692af Link plaintex snippets to latex 2024-09-15 20:33:57 +02:00
08394c8b54 Remove barely used snippets 2024-09-15 20:25:02 +02:00
be445dfcec Remove empty snippet files 2024-09-15 20:20:52 +02:00
566763638d Remove unused lua snippets and add return statement to doxygen 2024-09-15 20:19:50 +02:00
6734c00e68 I don't even know lisp 2024-09-15 19:55:28 +02:00
58a2717f6e Add HTML hello world snippet 2024-09-15 19:45:14 +02:00
e15b921187 Remove gitcommit snippets 2024-09-15 19:25:12 +02:00
db450d73a0 Remove csv snippets, no need for those 2024-09-15 19:08:40 +02:00
06cbad6b53 Something something LaTeX snippet something 2024-09-15 18:48:40 +02:00
ea3acd437a Reduced snippets of this piece of shit language called cobol 2024-09-15 18:48:25 +02:00
04369588f6 Remove rarely used assembly snippets 2024-09-15 10:20:09 +02:00
e1a5e7f825 Bring order into global snippets 2024-09-15 10:15:53 +02:00
ea0e244f05 Text file snippets are useless 2024-09-15 10:14:55 +02:00
577fd649e3 Ada project shell integration 2024-09-15 03:03:03 +02:00
61fb308e60 Add fancy procedure and function snippet for Ada 2024-09-15 02:56:35 +02:00
7f8f120b7b Remove deprecated ada LSP 2024-09-14 17:57:39 +02:00
04eadef1d4 Add helloworld example Ada snippet for testing 2024-09-14 17:54:46 +02:00
ab043c5c1c Order and sort plugins 2024-09-14 17:47:44 +02:00
2e0d35c2d9 Fix ultisnips cmp problem 2024-09-14 12:48:33 +02:00
299cdc7267 remove letter icons from nerdtree 2024-09-14 11:46:35 +02:00
546cc3e437 Doxygen for lua function snippet 2024-09-14 11:36:33 +02:00
f0b346271c Delete useless snippets, combining c and cpp snippets 2024-09-13 12:11:30 +02:00
8026306999 Merge branch 'master' of git.nickr.eu:yannickreiss/nvim 2024-09-13 08:03:08 +02:00
325f41372a Add hello world, better for loop snippet 2024-09-13 08:02:57 +02:00
34d96fcddc Add keybindings for relative numbers 2024-09-12 10:53:13 +02:00
e2836f519f Change tagbar behavior to support both operation modes 2024-09-10 10:20:13 +02:00
1d83337da8 Add Tagbar 2024-09-10 05:35:46 +02:00
a1cffcf7e9 Still no ultisnips in cmp 2024-09-09 08:21:29 +02:00
859311d0ee Update 2024-07-30 06:44:24 +02:00
9c504e284f Make view nicer 2024-07-26 07:42:31 +02:00
e1711a1180 C and Makefile snippets 2024-07-26 07:42:13 +02:00
94457aae68 Config update 2024-07-15 07:37:31 +02:00
7e89acf09f Linter and Correction update 2024-07-08 20:28:54 +02:00
39b9d351c0 Updated vim macros 2024-06-21 08:06:01 +02:00
f33b495d12 Backslash snippets, turn \ into \ using \´ 2024-06-11 08:37:54 +02:00
74ce5c7cde Remove buggy ultisnips 2024-06-11 07:51:21 +02:00
3661bb6693 No journal, don't use it. 2024-06-06 09:33:46 +02:00
4c4a6443b9 LaTeX snippet update 2024-06-06 09:32:53 +02:00
1b9a7264de Remove legacy python support 2024-05-22 07:48:41 +02:00
682f512251 Add action as verification 2024-05-22 07:47:30 +02:00
bd368117fe Add action as verification 2024-05-22 07:30:31 +02:00
2143b6d5a1 Remove lua and replace pylsp 2024-05-20 07:36:17 +02:00
a3983ae9c5 Corrected address in email thingy 2024-05-13 15:32:22 +02:00
290fcc1aff Add mail snippet 2024-05-13 13:03:07 +02:00
e539bb663d Easily swapping two words with ,lw 2024-05-12 22:02:26 +02:00
5f39958f59 Adding sections is now less of a pain in the ass 2024-05-12 21:32:24 +02:00
b2cbeb41c1 automacros added 2024-05-12 14:18:08 +02:00
d42f1f53e8 Various minor adjustments to snippets 2024-05-12 06:33:03 +02:00
def3c6b531 Removed Tabnine because of resource usage, addded journal plugin instead 2024-05-12 06:32:42 +02:00
1d7c562add Add exactly one unnececessary comment 2024-04-09 07:28:48 +02:00
39381d1da9 Adjust minimal characters for completion 2024-04-07 18:43:45 +02:00
f4b99df515 add forgotten RETs 2024-04-07 18:26:53 +02:00
471e420829 Ghost text 2024-04-07 15:53:20 +02:00
e15fc0dfa7 Final Refactor 2024-04-07 11:00:01 +02:00
55c7a8d1e2 Markdownpreview 2024-04-07 10:34:32 +02:00
e4812f748b Removed from init.lua 2024-04-07 09:11:07 +02:00
a7e387067a Translated plugconfig 2024-04-07 09:10:13 +02:00
4fd990b5fd Remove plugbench 2024-04-07 09:01:30 +02:00
463ded36cd Remove additional useless files 2024-04-07 08:57:12 +02:00
187b9de47a no need for ycm 2024-04-07 08:56:33 +02:00
d13d0ec0e8 Laptop 2024-04-07 08:55:38 +02:00
30fdc90545 Remove unneeded file 2024-04-07 08:47:57 +02:00
bdab32c01a Translated vanilla completely 2024-04-07 08:45:24 +02:00
abee013697 Translated vanilla completely 2024-04-07 08:44:51 +02:00
29f798abc7 Starting to move all vim to lua 2024-04-07 08:20:02 +02:00
49dfe769ed Remove and add numbers with ,ll and ,lm 2024-04-06 22:47:37 +02:00
23d1e0deb1 Update 2024-03-23 14:10:36 +01:00
4d3800a027 update 2024-03-19 10:28:46 +01:00
ce70d6f9b7 Additional code completion sources (tabnine) 2024-03-19 07:20:20 +01:00
b2a762ab4d Verible lsp 2024-03-18 21:32:10 +01:00
e20feca786 Not using transparency 2024-03-18 10:16:18 +01:00
0db71c6f62 Neovim update 2024-03-18 07:02:51 +01:00
744865e965 Update 2024-03-15 12:20:08 +01:00
6b13d4c6b4 Vim Monokai tasty 2024-03-10 08:59:32 +01:00
8eb3955fd6 Change exfun 2024-03-10 08:50:07 +01:00
54991cf3d9 Seems, it really did work 2024-03-06 08:47:42 +01:00
bb886d3fe6 Remove autosave, doesn't work 2024-03-06 08:43:23 +01:00
1ceb2e0e4a Autosave in Markdown 2024-03-06 08:33:12 +01:00
77bba8c263 Allow one step setup 2024-03-01 18:36:47 +01:00
84d14e8884 Directory update 2024-02-20 07:16:19 +01:00
66 changed files with 1752 additions and 2577 deletions

View File

@@ -0,0 +1,29 @@
name: Test Neovim config on push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install required packages
run: |
apt-get update -qy
apt-get install -y git
apt-get install -y neovim
apt-get install -y python3-neovim
- name: Clone neovim repository
run: |
git clone https://git.nickr.eu/yannickreiss/nvim
- name: Syntax check the configuration
run: |
cd nvim && nvim -l init.lua

6
.gitignore vendored
View File

@@ -1,2 +1,8 @@
lastSession.vim
plugin/
spell/
spell/*
spell
mail_password
lua/irc.lua
lazy-lock.json

View File

@@ -1,52 +1,3 @@
snippet textio "Insert Textio import" b
with Ada.Text_IO;$0
endsnippet
snippet procedure "insert procedure" b
-- @name $1
-- @return
`!p
snip.rv = ""
if t[2].startswith("l"):
parameters = []
else:
parameters = t[2].replace("\n", "").split(";");
for parameter in parameters:
if not parameter == "" and not parameter.startswith("typ"):
paramless = parameter.replace("\t", "")
snip.rv += f"-- @variable {paramless}\n"
`-- @description $3
procedure ${1:Name} is
$2
begin
$4
end $1;$0
endsnippet
snippet function "insert function" b
-- @name $1
-- @return $3
-- @param $2
`!p
snip.rv = ""
if t[4].startswith("l"):
parameters = []
else:
parameters = t[4].replace("\n", "").split(";")
for parameter in parameters:
if not parameter.startswith("typ") and not parameter == "":
paramless = parameter.replace("\t", "")
snip.rv += f"-- @variable {paramless}\n"
`-- @description $5
function ${1:Name}($2`!p if (t[2] == ""):
t[2] = "a, b: Integer"`) return ${3:Integer} is
$4
begin
$7
return ${6:`!p snip.rv = t[3]`};
end $1;$0
endsnippet
global !p
def complete(t, opts):
if t:
@@ -56,56 +7,190 @@ def complete(t, opts):
if len(opts) > 5:
opts = opts[0:5]
return "(" + "|".join(opts) + ")"
def find_candidate(tabstop, search_type):
# Split up the tabstop on semicolons
items = tabstop.replace("\n", "").replace(" ", "").split(";")
# find multiple same time assignments (a, b : Integer)
single_items = []
for item in items:
if (len(item.split(",")) > 1) and (len(item.split(":")) > 1):
variables = item.split(":")[0]
multi_type = item.split(":")[1]
for variable in variables.split(","):
single_items.append(f"{variable}:{multi_type}")
else:
single_items.append(item)
for candidate in single_items:
if len(candidate.split(":")) > 1:
name = candidate.split(":")[0]
candidate_type = candidate.split(":")[1]
else:
name = "None"
candidate_type = ""
if candidate_type == search_type:
return name
return "None"
endglobal
snippet if "If condition" b
if $1 then
$2
$3`!p snip.rv = complete(t[3], ["elsif", "else", "end if;"])` ${4:`!p if t[3] == "elsif":
snip.rv = "condition"
snippet helloworld "Hello world example to test features" b
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>
-- Content: Hello world example
with Ada.Text_IO; use Ada.Text_IO;
-- @name ${1:`!p snip.rv = fn[0].upper() + fn[1:].split('.')[0]`}
-- @return
-- @description Function printing hello world.
procedure $1 is
begin
${2:Put_Line ("Hello world!");}
end $1;$0
endsnippet
snippet docstring "Document String with most important information" b
-- Author(s): ${1:Nina Chloe Kassandra Reiss <nina.reiss@nickr.eu>}
-- Description: ${2:`!p snip.rv = fn.split('.')[0]`}
$0
endsnippet
snippet procedure "insert procedure" b
-- @name $1
-- @return
`!p
snip.rv = ""
if t[2].startswith("l"):
parameters = []
else:
snip.rv = ""`} `!p
if t[3] == "elsif":
snip.rv = "then"`
parameters = t[2].replace("; ", ";").replace('in ', '').replace('out ', '')
parameters = parameters.replace(' ', '').split(";");
parameter_list = []
for parameter in parameters:
if len(parameter.split(',')) == 1:
parameter_list.append(parameter)
else:
try:
list_type = parameter.split(':')[1]
except:
list_type = "???"
list_parameters = parameter.split(':')[0].replace(' ', '').split(',')
for sub_parameter in list_parameters:
parameter_list.append(f"{sub_parameter}\t:\t{list_type}")
for parameter in parameter_list:
if not parameter == "" and not parameter.startswith("typ"):
parameterless = parameter.replace("\t", "")
snip.rv += f"-- @parameter {parameterless}\n"
``!p
snip.rv = ""
if t[3].startswith("l"):
variables = []
else:
variables = t[3].replace("\n", "").split(";");
for variable in variables:
if not variable == "" and not variable.startswith("typ"):
variableless = variable.replace("\t", "").replace (" ", "")
snip.rv += f"\t-- @variable {variableless}\n"
`-- @description $4
procedure ${1:`!p snip.rv = fn.split('.')[0].capitalize()`} `!p snip.rv = "" if t[2] == "" else "("`${2:N : Natural}`!p snip.rv = "" if t[2] == "" else ")"` is
$3
begin
$5
`!p if t[3] == "end if;":
snip.rv = ""
else:
snip.rv = "end if;"`$0
end $1;$0
endsnippet
snippet for "For loop" b
for ${1:i} ${2:in ${3:1}..${4:10}} loop
$5
end loop;$0
endsnippet
snippet while "While loop" b
while ${1:Condition} loop
$2
end loop;$0
endsnippet
snippet let "Create new Variable" bA
${1:letName}`!p if not t[1].startswith("let"):
t[1] = t[1].capitalize()``!p snip.rv = "\t:\t"`${2}`!p if t[2].startswith("!"):
snip.rv = ""
snippet function "insert function" b
-- @name $1
-- @return $3
`!p
snip.rv = ""
if t[2].startswith("l"):
parameters = []
else:
snip.rv = complete(t[2], ["Integer", "Boolean", "Float", "Natural", "Positive", "Negative", "Long_Float", "String"])
``!p if t[3] == "":
snip.rv = ""
parameters = t[2].replace("; ", ";").replace('in ', '').replace('out ', '')
parameters = parameters.replace(' ', '').split(";");
parameter_list = []
for parameter in parameters:
if len(parameter.split(',')) == 1:
parameter_list.append(parameter)
else:
try:
list_type = parameter.split(':')[1]
except:
list_type = "???"
list_parameters = parameter.split(':')[0].replace(' ', '').split(',')
for sub_parameter in list_parameters:
parameter_list.append(f"{sub_parameter}\t:\t{list_type}")
for parameter in parameter_list:
if not parameter == "" and not parameter.startswith("typ"):
parameterless = parameter.replace("\t", "")
snip.rv += f"\t-- @parameter {parameterless}\n"
``!p
snip.rv = ""
if t[4].startswith("l"):
variables = []
else:
snip.rv = " := "
`$3;
variables = t[4].replace("\n", "").split(";");
for variable in variables:
if not variable == "" and not variable.startswith("typ") and not variable.startswith("--"):
variableless = variable.replace("\t", "").replace (" ", "")
snip.rv += f"\t-- @variable {variableless}\n"
` -- @description $5
function ${1:`!p snip.rv = fn.split('.')[0].capitalize()`} `!p snip.rv = "" if t[2] == "" else "("`${2:N : Natural}`!p snip.rv = "" if t[2] == "" else ")"` return ${3:Natural} is
$4
begin
$6
return `!p
candidate = find_candidate(t[4], t[3])
if candidate == "None":
candidate = find_candidate(t[2], t[3])
if candidate == "None":
candidate = t[1]
snip.rv = candidate
`;
end $1;$0
endsnippet
snippet type "declare a new type" bA
type ${1:TypeName} is ${2:array($3..$4)} of ${5:Integer};$0
type ${1:TypeName} is ${2:array($3..$4) of }`!p
if t[2] == "record":
snip.rv = "\n\t\t"
else:
snip.rv = ""`$5`!p
if t[2] == "record":
snip.rv = "\n\tend record"
else:
snip.rv = ""
`;$0
endsnippet
snippet docstring "Document String with most important infor" b
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): ${1:Yannick Reiß}
-- Content: ${2: Function `!p snip.rv = fn.split('.')[0]`}
snippet project "Project" b
project ${1:Default} is
for Source_Dirs use ("${2:src}");
for Object_Dir use "${3:obj}";
for Exec_Dir use "${4:bin}";
for Main use ("${5:main.adb}");
for Languages use ("Ada");
end $1;
-- Create dir? (y/): ${6:no}`!p
from os import system
if t[6] == "y":
system(f"mkdir -p {t[2]}")
system(f"mkdir -p {t[3]}")
system(f"mkdir -p {t[4]}")`
endsnippet
snippet package "Create package configuration" b
package ${1:body }${2:`!p package_name = fn.split('.')[0].replace("-", ".")
components = package_name.split('.')
structured = ""
for component in components:
structured = structured + "." + component[0].upper() + component[1:]
snip.rv = structured[1:]`} is
$0
end $2;
endsnippet

View File

@@ -1,21 +1,55 @@
snippet cred "My private Credentials"
Yannick Reiss <yannick.reiss@nickr.eu>
endsnippet
snippet solve "Solve a python equation"
${1:1*1}`!p rv = ""
from math import *
try:
rv = eval(t[1])
except:
rv = "?"
snip.rv = f" = {rv}"`
endsnippet
snippet dd "Date and Time" i
`date`
endsnippet
snippet credhsrm "Credentials HSRM"
Yannick Reiß (yareissx/yreis001) <yannick.reiss@student.hs-rm.de>
snippet crednick "My private Credentials"
Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>
endsnippet
snippet credhsrm "Credentials HSRM"
Yannick Reiß <yannick.reiss@student.hs-rm.de>
endsnippet
global !p
from datetime import datetime
def get_datetime():
now = datetime.now()
now_as_list = [
now.strftime("%d"),
now.strftime("%m"),
now.strftime("%Y"),
now.strftime("%H"),
now.strftime("%M")
]
return now_as_list
def complete(t, opts):
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t) ]
if len(opts) == 1:
return opts[0]
else:
return "(" + '|'.join(opts) + ")"
endglobal
snippet mail "Template for a new delayed Mail" b
time:${1:`!p snip.rv = get_datetime()[0]`}.${2:`!p snip.rv = get_datetime()[1]`}.${3:`!p snip.rv = get_datetime()[2]`} ${4:`!p snip.rv = get_datetime()[3]`}:${5:`!p snip.rv = get_datetime()[4]`}
from:$6`!p snip.rv = complete(t[6], ['yannick.reiss@nickr.eu', 'schnick@nickr.eu'])`
to:${7:schnick@nickr.eu}
subject:${8:Subject}
${9:Message}
${10:`cat ~/.signature.txt`}
endsnippet
snippet crednina "My true credentials"
Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>
endsnippet
snippet pwd "Print the current working directory"
`echo $(pwd)`
endsnippet

View File

@@ -1,14 +1,10 @@
snippet string "Assembler string definition"
snippet string86 "Assembler string definition"
${1:Name} db ${2:"Hello World!"} ; string $1 = $2
len_$1 equ $ - $1 ; length of string $1
$0
endsnippet
snippet \n "Zeilenumbruch" A
", 0x0a, "
endsnippet
snippet write "write sys_call"
snippet write86 "write sys_call"
mov eax, 4 ; write sys_call
mov ebx, 1 ; write to stdout
mov ecx, ${1:string} ; string to write
@@ -17,7 +13,7 @@ int 0x80 ; system interrupt
$0
endsnippet
snippet exit "exit sys_call"
snippet exit86 "exit sys_call"
mov eax, 1 ; exit sys_call
mov ebx, ${1:0} ; exit Code
int 0x80 ; system interrupt$0
@@ -25,7 +21,7 @@ endsnippet
snippet template "Template for assembly program"
global ${1:_start} ; linker entry point
; Author: ${2: Yannick Reiß}
; Author: ${2:Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>}
; Date: `date`
; Description: ${3:Desciption}
@@ -40,33 +36,7 @@ $1:
$0
endsnippet
snippet read "read sys call"
mov eax, 3 ; read sys call
mov ebx, 2 ; stdin file descriptor
mov ecx, ${1: variable} ; read input value in $1
mov edx, ${2:5} ; read $2 bytes of data
int 0x80 ; system interrupt
endsnippet
snippet aprstore "Store all purpose register on stack"
; store ap-register
push eax
push ebx
push ecx
push edx
$0
endsnippet
snippet aprload "Load all purpose register from stack"
; load ap-register
pop eax
pop ebx
pop ecx
pop edx
$0
endsnippet
snippet gcc_function "GCC conform function implementation" b
snippet functionGCC "GCC conform function implementation" b
$1:
push %ebp
mov %esp, %ebp

View File

@@ -18,9 +18,9 @@ endsnippet
snippet article "Add article reference" b
@article{${1:ref_name},
title={${2:Titel}},
author={${3:Autor}},
journal={${4:Journal}},`!p
title = {${2:Titel}},
author = {${3:Autor}},
journal = {${4:Journal}},`!p
if t[5] != "":
snip.rv = "\n\tvolume\t= {"
else:
@@ -45,8 +45,9 @@ if t[7] != "":
snip.rv = "},"
else:
snip.rv = ""`
year={${8:2023}},
publisher={${9:Verlag}}
year = {${8:2023}},
doi = {${9:DOI_NUM}}
publisher = {${10:Verlag}}
}
$0
endsnippet

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

@@ -1,10 +1,32 @@
snippet hello "Hello World"
Hallo
extends cpp
priority 200
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet helloworld "Hello World"
#include <stdio.h>
int main(void){(void)printf("Hello World!\n");return 0;}
endsnippet
snippet for "For-loop head"
for (${1:int i} = ${2:0}; ${3:i}; ${4:--i}) {
$5
for (${1:int ${2:i}} = ${3:0}; ${4:$2 < $5}; ${6:$2++}) {
$7
}
$0
endsnippet
snippet while "while loop head"
for (;$1;) {
$2
}
$0
endsnippet
@@ -26,27 +48,6 @@ else:
$0
endsnippet
snippet "(\w+)->fun" "Struct function" r
${1:int} ${2:Name} (`!p snip.rv = match.group(1)`* self, ${4:void}) {
`!p
if t[1].replace('static ', '') != "void":
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
else:
snip.rv = ""`
$5
`!p
if t[1].replace('static ', '') != "void":
snip.rv = f"return rv;"
else:
snip.rv = ""`
}
$0
endsnippet
snippet "self.(\w+)" "Struct call" r
`!p snip.rv = match.group(1)`(self$1)$0
endsnippet
snippet pfun "prototype for function" bA
/**
* @name $2
@@ -77,50 +78,33 @@ for param in params:
snip.rv = rval`
*/
${1:int} ${2:MyFunc} (${3:void}) {
/* Returns ${5:void} */
`!p
if t[1].replace('static ', '') != "void":
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
snip.rv = f"{t[1].replace('static ', '')} {t[5]} = 0;"
else:
snip.rv = ""`
$5
$6
`!p
if t[1].replace('static ', '') != "void":
snip.rv = f"return rv;"
snip.rv = f"return {t[5]};"
else:
snip.rv = ""`
}
$0
endsnippet
snippet while "while loop head"
for (;$1;) {
$2
}
$0
endsnippet
snippet "(\w+) = malloc" "Automativ malloc error implementation" rA
/* Allocate memory for `!p snip.rv = match.group(1)` */
`!p snip.rv = match.group(1)` = ($1*)malloc(sizeof(${1:int}) * $2);
if (!`!p snip.rv = match.group(1)`) {
/* Error */
(void)printf("malloc error on memory allocation of: `!p snip.rv = match.group(1)`!\n");
(void)printf("ERROR: malloc error on memory allocation of: `!p snip.rv = match.group(1)`!\n");
exit(EXIT_FAILURE);
}
$0
endsnippet
snippet "(\w+) = open" "Automatic open error implementation" rA
/* create descriptor `!p snip.rv = match.group(1)` for file $1 */
`!p snip.rv = match.group(1)` = open(${1:"Filename"}, ${2:"MODE"});
if (-1 == `!p snip.rv = match.group(1)`) {
/* Error */
perror(${4:"open error"});
${5:exit(EXIT_FAILURE);}
}
$0
endsnippet
snippet swap "Swap two integer or numerical variables"
/* Swap Variables $1 and $2 */
${1:Var1} = $1 + ${2:Var2};
@@ -129,27 +113,6 @@ $1 = $1 - $2;
$0
endsnippet
snippet cast "adds cast" i
(${1:void})$0
endsnippet
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet printf "Cast printf result to 'void' if heturn value is unneeded" bA
(void)printf("$1"`!p
if "%" in t[1]:
snip.rv = ", "
else:
snip.rv = ""`$2);$0
endsnippet
snippet defstruct "define a new type with a struct" A
/* define struct $1 ${2:Explaination} */
typedef struct $1 $1;
@@ -158,10 +121,11 @@ struct $1 {
};
endsnippet
snippet docomment "Meta Comment for Documenation" A
snippet docstring "Meta Comment for Documenation" A
/*
* Filename: `!p snip.rv = fn`
* Author: ${1:Yannick Reiss}
* Author: ${1:Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>}
* Date: `date`
* Project: ${2:Project Name}
* Copyright: ${3:None}
* Description: ${4:Funny module}
@@ -198,158 +162,10 @@ $8
$0
endsnippet
snippet let+ "Declare and initialize Variable" A
${1:int} ${2:Variable} = ${3:0}; /* ${4:Description} */
$0
endsnippet
snippet let- "Declare Variable" A
${1:int} ${2:Variable}; /* ${3:Description} */
$0
endsnippet
snippet "close\((\w+)\)" "Automatic close error implementation" brA
/* Closing file `!p snip.rv = match.group(1)` */
if (close(`!p snip.rv = match.group(1)`)) {
/* Error */
perror("${1:Could not close file!}");
exit(EXIT_FAILURE);
}
$0
endsnippet
snippet write( "Automatic write error check" A
/* Write $3 bytes from $2 to file $1 */
if (-1 == write(${1:file}, ${2:buffer}, ${3:bytes})) {
/* Error */
perror("${4:Could not write to file!}");
exit(EXIT_FAILURE);
}
$0
endsnippet
snippet /* "comment" A
/* $1 */$0
endsnippet
snippet "read\((.+), (.+), (.+)\);" "auto read" brA
/* read `!p snip.rv = match.group(3)` from file `!p snip.rv = match.group(1)` intobuffer `!p snip.rv = match.goup(2)` */
if (-1 == read(`!p snip.rv = match.group(1)`, `!p snip.rv = match.group(2)`, `!p snip.rv = match.group(3)`)) {
/* Error */
perror("${1:Could not read to file!})";
exit(EXIT_FAILURE);
}
$0
endsnippet
snippet "fstat\((.+), (.+)\);" "auto stat" brA
/* load information about file `!p snip.rv = match.group(1)` into struct `!p snip.rv = match.group(2)` */
if (fstat(`!p snip.rv = match.group(1)`, `!p snip.rv = match.group(2)`)) {
/* Error */
perror("${1:Could not fill struct with information!}");
exit(EXIT_FAILURE);
}
$0
endsnippet
snippet "ftruncate\((.+), (.+)\);" "ftruncate auto" brA
/* Resize file `!p snip.rv = match.group(1)` to size `!p snip.rv = match.group(2)` */
if (ftruncate(`!p snip.rv = match.group(1)`, `!p snip.rv = match.group(2)`)) {
/* Error */
perror("${1:Could not resize file!}j;
exit(EXIT_FAILURE);
}
endsnippet
snippet 'system\("(.+)"\);' "Automatic system error implementation" rA
/* run system command `!p snip.rv = match.group(1)` and check for success */
if (system("`!p snip.rv = match.group(1)`")) {
/* Error */
perror(${1:"Could not execute shell command!"});
${5:exit(EXIT_FAILURE);}
}
$0
endsnippet
snippet "if \(argc" "automatically add clarg check" A
/* check for right number of arguments */
if (argc ${1:!=} $2) {
/* Error */
perror("Wrong number of arguments");
exit(EXIT_FAILURE);
}
endsnippet
snippet "(\w+) = fork" "Auto fork error implementation" rA
/* create new subproccess `!p snip.rv = match.group(1)` */
`!p snip.rv = match.group(1)` = fork();
if (`!p snip.rv = match.group(1)` < 0) {
/* Error */
perror("fork error on creating new subprocess '`!p snip.rv = match.group(1)`'.");
exit(EXIT_FAILURE);
} else if (!`!p snip.rv = match.group(1)`) {
/* fork runs from here */
${1:execve(proc, args, NULL)};
}
$0
endsnippet
snippet pthread_create "pthreadcreate auto implement" A
/* Creating thread $1 running function $3 */
if (pthread_create(${1:thread}, ${2:NULL}, ${3:function}, ${4:args})) {
perror("Could not create thread $1.");
exit(EXIT_FAILURE);
}
endsnippet
snippet pthread_mutex_unlock "mutex" iA
/* Unlock mutex $1 */
if ( pthread_mutex_unlock(&${1:mutex}) ) {
perror("Could not unlock mutex $1.");
exit(EXIT_FAILURE);
}
endsnippet
snippet pthread_cond_wait "condition wait" iA
/* wait for condition $1 on mutex $2 */
if ( pthread_cond_wait(&${1:Condition}, &${2:mutex}) ) {
perror("Could not wait for signal $1 on mutex $2.");
exit(EXIT_FAILURE);
}
endsnippet
snippet pthread_cond_signal "condition signal" iA
/* Send signal $1 */
if ( pthread_cond_signal(&${1:signal}) ) {
perror("Could not send signal $1.");
exit(EXIT_FAILURE);
}
endsnippet
snippet pthread_mutex_lock "mutex" iA
/* lock the mutex $1 */
if ( pthread_mutex_lock(&${1:mutex}) ) {
perror("Could not lock mutex $1.");
exit(EXIT_FAILURE);
}
endsnippet
snippet pthread_join "join thread" iA
/* join the thread $1 */
if ( pthread_join(${1:thread}, ${2:NULL}) ) {
perror("Could not join thread $1.");
exit(EXIT_FAILURE);
}
endsnippet
snippet sigaction "signal action" i
/* call function $2 on signal $1 */
if ( sigaction(${1:SIGINT}, ${2:&act}, ${3:&old}) ) {
perror("Could not change function of signal $1 to $2.");
exit(EXIT_FAILURE);
}
endsnippet
snippet fflush "flush stdout" iA
/* flush stdout */
if ( fflush(stdout) ) {
@@ -357,3 +173,13 @@ if ( fflush(stdout) ) {
exit(EXIT_FAILURE);
}
endsnippet
snippet switch "Classic C switch statement" b
switch(${1:Expression}) {
case $3:
$4
break;$5
default:
$2
}$0
endsnippet

View File

@@ -1,8 +1,17 @@
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet template "template for new program" A
*-----------------------------------------------------------------
IDENTIFICATION DIVISION.
PROGRAM-ID. ${1:Title}.
*AUTHOR. ${2:Yannick Reiß}.
*AUTHOR. ${2:Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>}.
*CONTENT. ${3:Beschreibung}.
*-----------------------------------------------------------------
@@ -13,9 +22,9 @@ snippet template "template for new program" A
*-------------------------
WORKING-STORAGE SECTION.
$4
*-----------------------------------------------------------------
$4
*-----------------------------------------------------------------
*-----------------------------------------------------------------
PROCEDURE DIVISION.
$0
@@ -23,70 +32,7 @@ snippet template "template for new program" A
*-----------------------------------------------------------------
endsnippet
snippet let "Add new Variable" A
${1:01} ${2:Name} PIC ${3:999}${4:(8) }${5:VALUE }.
$0
endsnippet
snippet compute "Insert a computation" A
COMPUTE ${1:Expression}.
endsnippet
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet calc "Add a Calculation with autocomplete" A
$1`!p snip.rv = complete(t[1], ['ADD', 'DIVIDE', 'MULTIPLY', 'SUBTRACT'])` ${2:Var1} `!p
try:
snip.rv = {'ADD': 'TO', 'DIVIDE': 'INTO', 'MULTIPLY': 'BY', 'SUBTRACT': 'FROM'}[t[1] + complete(t[1], ['ADD', 'DIVIDE', 'MULTIPLY', 'SUBTRACT'])]
except KeyError:
snip.rv = '---'
` ${3:Var2} GIVING ${4:VarResult}.
$0
endsnippet
snippet move "Move value to another value" A
MOVE ${1:Const/Var} TO ${2:Var}.
$0
endsnippet
snippet display "Display a contant or Variable" A
DISPLAY ${1:"Hello World!"}.
$0
endsnippet
snippet accept "Accept a Value to an uninitialized Variable" A
ACCEPT ${1:Variable}.
$0
endsnippet
snippet strinit "Initialize an empty String" A
INITIALIZE ${1:Stringvariable}.
$0
endsnippet
snippet init "Inizialize a numerical Value" A
INITIALIZE ${1:Numerical variable} REPLACING NUMERIC DATA BY ${2:ZEROS}.
$0
endsnippet
snippet ifthen "If-then-else Clause" A
IF ${1:Condition} THEN
${2:Do this}
ELSE
${3:Do that}
END-IF.
$0
endsnippet
snippet ifis "IF-Condition 'is' POS/NEG" A
IS $1`!p snip.rv = complete(t[1], ['POSITIVE', 'NEGATIVE'])` $0
endsnippet

View File

@@ -1,3 +1,6 @@
extends c
priority 100
snippet header "Header wrapper" b
#ifndef $1
#define $1
@@ -7,72 +10,6 @@ $0
#endif//$1
endsnippet
snippet for "For-loop head"
for (${1:int i} = ${2:0}; ${3:i}; ${4:--i}) {
$5
}
$0
endsnippet
snippet exfun "New Function with Documentation"
/**
* @name $2
* @return `!p t[1].replace("static ", "")`
* @brief ${4: Description}
*
`!p
params = t[3].split(", ")
rval = ""
for param in params:
if len(param.split(' ')) == 2:
rval += f" * @param {param}:\t{t[2]}_{param.split(' ')[1]}\n"
snip.rv = rval`
*/
${1:int} ${2:MyFunc} (${3:void}) {
`!p
if t[1] != "void":
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
else:
snip.rv = ""`
$5
`!p
if t[1].replace("static ", "") != "void":
snip.rv = f"return rv;"
else:
snip.rv = ""`
}
$0
endsnippet
snippet fun "Function template"
${1:int} ${2:Name} (${3:void}) {
$5
return ${6:`!p
if t[1].replace("static ", "") != "void":
snip.rv = f"0"
else:
snip.rv = ""`};
}
$0
endsnippet
snippet while "while loop head"
while (${1:true}) {
$2
}
$0
endsnippet
snippet ifelse "If-Clause"
if ($1) {
$2
} else {
$3
}
$0
endsnippet
snippet class "Add new class" bA
class $1 ${2::} `!p
if t[2] == ":":
@@ -150,47 +87,3 @@ for var in variables:
snip.rv = rv`
$0
endsnippet
snippet defstruct "define a new type with a struct" A
typedef struct $1 $1;
struct $1{
$2
};
endsnippet
snippet docomment "Meta Comment" A
/*
* Filename: `!p snip.rv = fn`
* Author: ${1:Yannick Reiss}
* Project: ${2:Project Name}
* Copyright: ${3:None}
* Description: ${4:Helpful description}
*/
$0
endsnippet
snippet let+ "Declare and initialize Variable" A
${1:int} ${2:Variable} = ${3:0}; /* ${4:Description} */
$0
endsnippet
snippet let- "Declare Variable" A
${1:int} ${2:Variable}; /* ${3:Description} */
$0
endsnippet
snippet pfun "prototype for function" bA
/**
* @name $2
* @return $1
* @brief ${4: Description}
* `!p
params = t[3].split(", ")
rval = ""
for param in params:
if len(param.split(' ')) >= 2:
rval += f"\n *\t@param {param}:\t{t[2]}_{param.split(' ')[1]}"
snip.rv = rval`
*/
${1:int} ${2:MyFunc} (${3:void});
endsnippet

View File

@@ -1,32 +0,0 @@
global !p
def complete(t, opts):
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
else:
return f"({'|'.join(opts)})"
endglobal
snippet mv "Mitglied DLRG Neuaufnahme" bA
${1}`!p
snip.rv = complete(t[1], ["Herr", "Frau", "Ohne"])
`,${2:Vorname},${3:Nachname},${4:63165}`!p
snip.rv = complete(t[4], ["63165"])`,${5:Adresse},${6:Telefonnummer},${7:Email},${8:Geburtsdatum}`!p
if t[8] != "Geburtsdatum" and len(t[8]) == 8:
if len(t[8]) > 2:
t[8] = f"{t[8][0:2]}.{t[8][2:]}"
if len(t[8]) > 4:
t[8] = f"{t[8][:5]}.{t[8][5:]}"
`,${9:Eintrittsdatum}`!p
if t[9] != "Eintrittsdatum" and len(t[9]) == 8:
if len(t[9]) > 2:
t[9] = f"{t[9][0:2]}.{t[9][2:]}"
if len(t[9]) > 4:
t[9] = f"{t[9][:5]}.{t[9][5:]}"
`,DE${10:IBAN}`!p
if len(t[10]) >= 25:
t[10] = t[10].replace(' ', '')
`,${11:Kontoinhaber*in}
$0
endsnippet

View File

@@ -1,16 +0,0 @@
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet !! "Standard message" bA
$1`!p snip.rv=complete(t[1], ["BUG", "INFO", "UPDATE", "FEATURE", "ADD"])`: $2`!p snip.rv=complete(t[2], ["OPEN", "CLOSE", "FIX", "WARNING", "ERROR", "ADD", "REMOVED", "TODO", "NEW"])` `!p
if t[3] == "":
snip.rv = ""
else:
snip.rv = "=>"` $3
endsnippet

View File

@@ -0,0 +1,3 @@
snippet ß "Add backslash" A
\\
endsnippet

View File

@@ -1,4 +1,53 @@
snippet << "Tag for html" bA
<$1>$2</${1/(\w+).*/$1/}>$0
snippet helloworld "A little hello world example." b
<!DOCTYPE html>
<html>
<head>
<title>Hello world example</title>
</head>
<body>
<h1 align=center>Hello World</h1>
</body>
</html>
endsnippet
snippet << "Tag for html" bA
<${1:p}>$2</${1/(\w+).*/$1/}>$0
endsnippet
snippet >> "Line break / closing tag"
</${1:br}>$0
endsnippet
snippet ,m "Inline math mode"
<math display="inline">
$1
</math>$0
endsnippet
snippet ;M "Block formula"
<math display="block">
$1
</math>$0
endsnippet
snippet figure "A figure (typically SVG) with caption."
<figure>
<${2:svg}>
$3
</`!p snip.rv = t[2].split(" ")[0]`>
<figcaption>$1</figcaption>
</figure>
$0
endsnippet
snippet line "SVG: line"
<line x1="${1:0}%" y1="${2:0}%" x2="${3:10}%" y2="${4:10}" stroke="${5:black}" stroke-width="${6:2}" />$0
endsnippet
snippet circle "SVG: circle"
<circle cx="${1:0}%" cy="${2:0}%" fill="${3:#F1F1F1}" r="${4:4}%" style="stroke: #181818; stroke-width: 0.5" ></circle>$0
endsnippet
snippet desc "SVG: description"
<desc id="desc">$1</desc>$0
endsnippet

7
UltiSnips/irc.snippets Normal file
View File

@@ -0,0 +1,7 @@
snippet ff "Freunde (fast)" A
.freunde
endsnippet
snippet wild "Widi Schild update"
widi: Schildupdate?
endsnippet

41
UltiSnips/lean.snippets Normal file
View File

@@ -0,0 +1,41 @@
snippet ß "Backslash" A
\\
endsnippet
snippet <> "Add sharp brackets"
⟨$1⟩$0
endsnippet
snippet | "dvd"
endsnippet
snippet () "Braces"
($1)$0
endsnippet
# Mengen
snippet N "Natural number"
endsnippet
snippet Z "Whole numbers"
endsnippet
snippet R "Real"
endsnippet
# Quantoren
snippet E "Exists"
endsnippet
snippet A "All"
endsnippet
snippet . "Dot"
·
endsnippet

View File

@@ -1,3 +0,0 @@
snippet pack "This is the package." bA
(package! $1)$0
endsnippet

View File

@@ -1,61 +1,26 @@
snippet fun "New function"
function ${1:Name} ($2)
$3
end;
$0
endsnippet
snippet while "while-loop"
while (${1:true})
do
$1
end;
$0
endsnippet
snippet for "for loop"
for ${1:i = 0}, ${2:target}, ${3:1}
do
$4
end;
$0
endsnippet
snippet repeat "repeat until loop"
repeat
$2
until (${1:Condition});
$0
endsnippet
snippet ifthen "normal if clause"
if (${1:Condition})
then
$2
end;
$0
endsnippet
snippet ifelse "if and else clause"
if (${1:Condition})
then
$1
else
$2
end;
$0
endsnippet
snippet "= fun" "Assign a function" rA
= function(${1:Parameter})
$2
end;$0
endsnippet
snippet docstring "Document string" b
-- Filename: `!p snip.rv = fn`
-- Author: ${1:Yannick Reiß}
-- Author: ${1:Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>}
-- Copyright: ${2:MIT-License}
-- Description: ${3:Funny lua script}
$0
endsnippet
snippet fun "New function"
-- @name $2
`!p
lines = t[5].split('\n')
for line in lines:
if line.startswith("return"):
snip.rv = f"-- @return {line.replace('return', '').replace(' ', '')}\n"
``!p
param = ""
for i in t[3].split(","):
param += f"-- @param {i.replace(' ', '')}\n"
snip.rv = param
`-- @short ${4:Description}
${1:local }function ${2:Name} (${3:})
$5
end;
$0
endsnippet

View File

@@ -0,0 +1,35 @@
global !p
from datetime import datetime
def get_datetime():
now = datetime.now()
now_as_list = [
now.strftime("%d"),
now.strftime("%m"),
now.strftime("%Y"),
now.strftime("%H"),
now.strftime("%M")
]
return now_as_list
def complete(t, opts):
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t) ]
if len(opts) == 1:
return opts[0]
else:
return "(" + '|'.join(opts) + ")"
endglobal
snippet mail "Template for a new delayed Mail" b
time:${1:`!p snip.rv = get_datetime()[0]`}.${2:`!p snip.rv = get_datetime()[1]`}.${3:`!p snip.rv = get_datetime()[2]`} ${4:`!p snip.rv = get_datetime()[3]`}:${5:`!p snip.rv = get_datetime()[4]`}
from:$6`!p snip.rv = complete(t[6], ['yannick.reiss@nickr.eu', 'schnick@nickr.eu'])`
to:${7:schnick@nickr.eu}
subject:${8:Subject}
${9:Message}
${10:`cat ~/.signature.txt`}
endsnippet

View File

@@ -75,7 +75,18 @@ if t[19] == "y":
t[19] = "Created!"
if t[20] == "y":
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
endsnippet
@@ -108,3 +119,9 @@ snippet rule "Add new Rule"
${1:all}: $2
$0
endsnippet
snippet clean "Clean the object files and binary file" b
.PHONY: clean
clean:
${1:rm *.o $(BIN)}
endsnippet

View File

@@ -35,15 +35,15 @@ $1
$0
endsnippet
snippet cobol "Cobol Code"
\`\`\`cobol
snippet bash "bash Code"
\`\`\`bash
$1
\`\`\`
$0
endsnippet
snippet bash "bash Code"
\`\`\`bash
snippet cjson "json code"
\`\`\`json
$1
\`\`\`
$0
@@ -53,35 +53,16 @@ snippet ,m "Math equation" A
\$$1\$ $0
endsnippet
snippet entry "Add new entry" bA
-----------------------------------------------------------
## $1 ##
### Date: ${2:`date`} ###
### Author: ${3:`whoami`} ###
### Host: `hostname` ###
-----------------------------------------------------------
Tags: $4
$5
-----------------------------------------------------------
$0
endsnippet
snippet info "The Markdown Information panel" b
---
${1:Info}
Tags: $2
$0
endsnippet
snippet cite "Cite from a paper" b
---
> ${1:Citation}`!p t[1].replace('\n', '\n> ')`
Tags: $2
$0
snippet bookshelf "Tagline for bookshelf" b
`!p
if t[1] != "":
snip.rv = "[CW: "
else:
snip.rv = ""`$1`!p
if t[1] != "":
snip.rv = "]"
else:
snip.rv = ""`
${2:Title} by ${3:Author}
${4:Description}
endsnippet

3
UltiSnips/math.snippets Normal file
View File

@@ -0,0 +1,3 @@
snippet SUM "Sum sign" i
Σ
endsnippet

91
UltiSnips/pascal.snippets Normal file
View File

@@ -0,0 +1,91 @@
snippet prog "Add new program template" b
Program ${1:Name}`!p snip.rv = "" if t[2] == "" else " ("`${2:FileList}`!p snip.rv = "" if t[2] == "" else ")"`;`!p
if t[3] == "":
snip.rv = ""
else:
snip.rv = "\nconst\n (* Constant declarations *)\n "`${3:Const}`!p
if t[4] == "":
snip.rv = ""
else:
snip.rv = "\ntype\n (* Type declarations *)\n "`${4:Types}`!p
if t[5] == "":
snip.rv = ""
else:
snip.rv = "\nvar\n (* Variable declarations *)\n "`${5:Variables}
Begin
$0
End.
endsnippet
snippet procedure "Add a new procedure" b
{ Procedure
@name: $1`!p
if t[2] == "":
snip.rv = "\n\t"
else:
snip.rv = "\n"
groups = t[2].split(";");
for group in groups:
snip.rv += f"\t@param {group}\n"
snip.rv += "\t"
`@description: $3 }
Procedure ${1:name}`!p
if not (t[2] == ""):
snip.rv = " ("
else:
snip.rv = ""`$2`!p
if not (t[2] == ""):
snip.rv = ")"
else:
snip.rv = ""`;`!p
if t[4] == "":
snip.rv = ""
else:
snip.rv = "\nVar\n\t"`$4
Begin
$0
End;
endsnippet
snippet function "Add a new function" b
{ Procedure
@name: $1`!p
if t[2] == "":
snip.rv = "\n\t"
else:
snip.rv = "\n"
groups = t[2].split(";");
for group in groups:
snip.rv += f"\t@param {group}\n"
snip.rv += "\t"
`@return $3
@description: $4 }
Function ${1:name}`!p
if not (t[2] == ""):
snip.rv = " ("
else:
snip.rv = ""`$2`!p
if not (t[2] == ""):
snip.rv = ")"
else:
snip.rv = ""` : ${3:Integer};`!p
if t[5] == "":
snip.rv = ""
else:
snip.rv = "\nVar\n\t"`$5
Begin
$0
End;
endsnippet
snippet -- "Add comment"
(* $1 *)$0
endsnippet
snippet begin "Create Code Block" b
begin
$1
end;
$0
endsnippet

View File

@@ -1,608 +1 @@
snippet colx "textcolor"
\\textcolor{${1:red}}{$2}$0
endsnippet
snippet tred "text red"
\\textcolor{red}{$1}$0
endsnippet
snippet tblue "text blue"
\\textcolor{blue}{$1}$0
endsnippet
snippet tgreen "text green"
\\textcolor{green}{$1}$0
endsnippet
snippet colb "boxcolor"
\\colorbox{${1:blue}!${2:25}}{$3}$0
endsnippet
snippet imth "inlinemath"
$ $1 $ $0
endsnippet
snippet fmth "fullmath"
\\[
$1
\\]
$0
endsnippet
snippet vec "Vector"
\\vec{$1}$0
endsnippet
snippet tag "tag and text inbetween"
${1:placeholder}
$2
$1
$0
endsnippet
snippet env "Environment"
\\begin{$1}
$2
\\end{$1}
$0
endsnippet
snippet code "listing without own config"
\\begin{lstlisting}
$1
\\end{lstlisting}
$0
endsnippet
snippet ccpp "C++ listing configuration"
\\lstset{ basicstyle=\\ttfamily\\small, language=C++, keywordstyle=\\color{blue}\\bfseries } $0
endsnippet
snippet casm "Assembler listing configuration"
\\lstset{basicstyle=\\ttfamily\\small, language={[${1:x86masm}]Assembler}, keywordstyle=\\color{${2:red}}\\bfseries} $0
endsnippet
snippet cshell "ZSH/BASH config"
\\lstset{basicstyle=\\ttfamily\\small, language={bash}, keywordstyle=\\color{${2:green}}\\bfseries} $0
endsnippet
snippet cocode "Free config"
\\lstset{basicstyle=\\ttfamily\\small, language={$1}, keywordstyle=\\color{${2:red}}\\bfseries} $0
endsnippet
snippet confbook "Configuration for Lectures"
\\documentclass[a4paper]{report}
\\usepackage[utf8]{inputenc}
\\usepackage[ngerman]{babel}
\\usepackage[T1]{fontenc}
\\usepackage{amsmath}
\\usepackage{amsfonts}
\\usepackage{amssymb}
\\usepackage{makeidx}
\\usepackage[straightvoltages]{circuitikz}
\\usepackage[locale=DE]{siunitx}
\\usepackage{tikz}
\\usepackage[left=1cm, right=2cm, top=3cm, bottom=3cm, bindingoffset=1cm]{geometry}
\\usepackage{graphicx}
\\usepackage{lmodern}
\\usepackage{float}
\\usepackage{fancyhdr}
\\usepackage{listings}
\\usepackage{cancel}
\\usepackage{xcolor}
\\usepackage{interval}
\\usepackage{hyperref}
\\author{${1:Yannick Reiß}}
\\title{$2}
\\pagestyle{fancy}
\\fancyhead[C]{}
\\fancyhead[L]{$2}
\\fancyfoot[C]{\thepage}
${3:colorset}
$0
endsnippet
snippet confartcl "Configuration for short articles"
\\documentclass[16pt,a4paper]{article}
\\usepackage[utf8]{inputenc}
\\usepackage[ngerman]{babel}
\\usepackage[T1]{fontenc}
\\usepackage{amsmath}
\\usepackage{amsfonts}
\\usepackage{amssymb}
\\usepackage{fancyhdr}
\\usepackage{makeidx}
\\usepackage[straightvoltages]{circuitikz}
\\usepackage[locale=DE]{siunitx}
\\usepackage{tikz}
\\usepackage{graphicx}
\\usepackage{lmodern}
\\usepackage{float}
\\usepackage{cancel}
\\usepackage[left=1cm, right=2cm, top=3cm, bottom=3cm, bindingoffset=1cm]{geometry}
\\usepackage{listings}
\\usepackage{xcolor}
\\usepackage{interval}
\\usepackage{hyperref}
\\author{${1:Yannick Reiß}}
\\title{$2}
\\pagestyle{fancy}
\\fancyhead[C]{}
\\fancyhead[L]{$2}
\\fancyfoot[C]{\thepage}
${3:colorset}
$0
endsnippet
snippet img "Images"
\\begin{figure}
\\centering
\\includegraphics[width=${1:0.7}\\linewidth]{${2}}
\\caption{${3:Abbildung}}
\\end{figure}
$0
endsnippet
snippet document "Add document environment"
\\begin{document}
$0
\\end{document}
endsnippet
snippet land "Logical and"
\\wedge $0
endsnippet
snippet lor "Logical or"
\\vee $0
endsnippet
snippet ubrace "Underbrace"
\\underbrace{$1}_{$2} $0
endsnippet
snippet fall "For all"
\\forall{$1}
$0
endsnippet
snippet paragraph "Paragraph"
\\paragraph{$1}
$0
endsnippet
snippet menge "Menge der __ Zahlen"
\\mathbb{$1}$0
endsnippet
snippet xdelete "Cross out"
\\xcancel{$1}$0
endsnippet
snippet -> "Right normal Arrow"
\\rightarrow $0
endsnippet
snippet larrow "Left normal Arrow"
\\leftarrow $0
endsnippet
snippet frac "Fracture"
\\frac{$1}{$2}$0
endsnippet
snippet mspace "Math Space"
\\quad $0
endsnippet
snippet mmspace "Math double Space"
\\qquad $0
endsnippet
snippet sum "Sum"
\\sum_{i=${1:0}}^{${2:n}} $3 \\qquad $0
endsnippet
snippet prod "Product"
\\prod_{i=${1:1}}^{${2:N}} \\quad $3 \\qquad$0
endsnippet
snippet ltab "Table environment"
\\begin{tabular}{${1:c c c}}
$0
\\end{tabular}
endsnippet
snippet ctab "Table column"
$1 & $2 & $3 \\\\\\
$0
endsnippet
snippet lltab "Large table environment"
\\begin{tabular}{${1:c c c c c}}
$0
\\end{tabular}
endsnippet
snippet cctab "Large column environment"
$1 & $2 & $3 & $4 & $5 \\\\\\
$0
endsnippet
snippet setab "Small table environment"
\\begin{center}
\\begin{tabular}{${1:c c}}
$1
\\end{tabular}
\\end{center}
$0
endsnippet
snippet sctab "Small table column"
$1 & $2 \\\\
\\\\
$0
endsnippet
snippet lquote "Low Quote"
´$1´$0
endsnippet
snippet fquote "Full Quote"
´$1´ \\textit{($2)}$0
endsnippet
snippet colorset "std colorset (6 colors)"
\\definecolor{red}{RGB}{228, 3, 3}
\\definecolor{orange}{RGB}{255, 140, 0}
\\definecolor{yellow}{RGB}{255, 237, 0}
\\definecolor{green}{RGB}{0, 128, 38}
\\definecolor{indigo}{RGB}{36, 64, 142}
\\definecolor{blue}{RGB}{36, 64, 142}
\\definecolor{violet}{RGB}{115, 41, 130}
endsnippet
snippet href "html reference"
\\href{https://${1:link}}{\\underline{\\textcolor{blue}{${2:Text}}}}$0
endsnippet
snippet *_ "Intervall/Isotope-Notation" i
^{$1}_{$2}$0
endsnippet
snippet hook "Reference to text"
\\hyperref[$1]{$2}$0
endsnippet
snippet curled "{ ... }"
\\left\\{ $0 \\right\\}
endsnippet
snippet round "( ... )"
\\left( $0 \\right)
endsnippet
snippet menc "Mathmode-text"
\\text{ $1 }$0
endsnippet
snippet period "Periodic number"
\\overline{$1}$0
endsnippet
snippet leq "lesser equal"
\\leq
endsnippet
snippet geq "greater equal"
\\geq
endsnippet
snippet let "lesser than"
<
endsnippet
snippet grt "greater than"
>
endsnippet
snippet case "if else mathstyle"
\\begin{cases}
$1 & \\quad \\text{$2}\\\\\\ $3 & \\quad \\text{$4}\\\\\\ \\end{cases}$0
endsnippet
snippet median "Median"
\\overset{\\thicksim}{$1}$0
endsnippet
snippet ival "Intervall"
\\interval[$1]{$2}{$3}$0
endsnippet
snippet mul "multiplication"
\\cdot
endsnippet
snippet root "nth root"
\\sqrt[${1:2}]{$2}$0
endsnippet
snippet sdef "Definition"
\\colorbox{blue!25}{Definition: $1} \\\\\\$0
endsnippet
snippet mlgs "Lineares Gleichungssytem"
\\begin{gather}
$0
\\end{gather}
endsnippet
snippet cobol "COBOL config"
\\lstset{ basicstyle=\\ttfamily\\small, language=COBOL, numbers=left, keywordstyle=\\color{blue}\\bfseries} $0
endsnippet
snippet '(.*)__' "sub" r
`!p snip.rv = match.group(1)`_{$1}$0
endsnippet
snippet '(.*)\*\*' "upup" r
`!p snip.rv = match.group(1)`^{$1}$0
endsnippet
snippet ... "dots"
\\dots
endsnippet
snippet fsf "text serif"
\\textsf{$1}$0
endsnippet
snippet fblk "text block"
\\texttt{$1}{$0}
endsnippet
snippet fit "text italic"
\\textit{$1}$0
endsnippet
snippet '//(.+)//' "Make Text italic" rA
\\textit{`!p snip.rv = match.group(1)`}$0
endsnippet
snippet fbf "text bold"
\\textbf{$1}$0
endsnippet
snippet '\*\*(.+)\*\*' "Make Text bold" rA
\\textbf{`!p snip.rv = match.group(1)`}$0
endsnippet
snippet bit "itemize"
\\begin{itemize}
\\item $1
\\end{itemize}
$0
endsnippet
snippet ben "enumerate"
\\begin{enumerate}
\\item $1
\\end{enumerate}
$0
endsnippet
snippet +ni+ "next item" A
\\item $1
endsnippet
snippet sch "chapter"
\\chapter{$1}$0
endsnippet
snippet sse "Section"
\\section{$1}$0
endsnippet
snippet sss "Subsection"
\\subsection{$1}$0
endsnippet
snippet ssn "Subsubsection"
\\subsubsection{$1}$0
endsnippet
snippet par "Paragraph"
\\paragraph{$1}$0
endsnippet
snippet mquote "max quote"
\`$1\` (${2:author} : \\textit{${3:source}}, ${4:year})$0
endsnippet
snippet qed "Quod erat demonstrantum"
\\begin{flushright}
$\#$
\\end{flushright}
$0
endsnippet
snippet <- "Easy Left"
\\leftarrow $0
endsnippet
snippet => "Double Right"
\\Rightarrow $0
endsnippet
snippet <= "Double Left"
\\Leftarrow $0
endsnippet
snippet circuit "Circuit environment"
\\colorbox{blue!10}{
\\begin{circuitikz}[european resistors]
$1
\\end{circuitikz}}
$0
endsnippet
snippet edraw "Draw into electric circuit"
\\draw(${1:0}, ${2:0})
$3
;
$0
endsnippet
snippet 'R "Insert Resistor"
to [R=$R_{$1}: $2 \Omega$, ${3:i =$i$}, ${4:*-*}] ($5, $6)
$0
endsnippet
snippet 'W "Wire"
to [short, ${1:i=$i$}, ${2:*-*}] ($3, $4)
$0
endsnippet
snippet 'V "Voltage"
to [V, v=$U_{$1}: $2V$, ${3:i=$i$}, ${4:*-*}] ($5, $6)
$0
endsnippet
snippet 'L "Coil"
to [L=$L_{$1}: $2H$, ${3:i=$i$}, ${4:*-*}] ($3, $4)
$0
endsnippet
snippet 'C "Capacitor"
to [C=$C_{$1}: $2F$, ${3:i=$i$}, ${4:*-*}] ($3, $4)
$0
endsnippet
snippet 'W' "Wired powerline"
to [short, ${1:*-*}] ($2, $3)
$0
endsnippet
snippet 'G "GROUND"
to [short] node[ground] {$1} ($2, $3)
$0
endsnippet
snippet 'SA "(Sende)-Antenne"
to [short] node[antenna] {$1} ($2, $3)
$0
endsnippet
snippet timenow "The current time"
`date`
endsnippet
snippet texmeta "Meta with stamp for better documentation"
% Bookmark `!p import random as ran
if not snip.c:
snip.rv = t[1][0] + str(ran.randint(10, 100))` Content ${1:Title} on `date` by `echo $USER`
$0
endsnippet
snippet lmth "List math with align" b
\\begin{align*}
$1
\\end{align*}
$0
endsnippet
snippet lexp "List math expression"
$1 &= ${2:First} & ${3:Second} \\\\
$0
endsnippet
snippet definition "Box with definition"
\\framebox{
\\colorbox{blue!25}{
\\begin{minipage}{1.0\\textwidth}
\\textbf{Definition: $1}\\\\
$2
\\end{minipage}}}
$0
endsnippet
snippet attention "Box for attention"
\\framebox{
\\colorbox{red!25}{
\\begin{minipage}{1.0\\textwidth}
\\textbf{Achtung: $1}\\\\
$2
\\end{minipage}}}
$0
endsnippet
snippet headline "Insert a Headline"
\\lhead{}
\\chead{\\rightmark}
\\rhead{\\date}
\\renewcommand{\\headrulewidth}{1pt}
endsnippet
snippet footline "Insert a footer"
\\lfoot{}
\\cfoot{}
\\rfoot{}
endsnippet
global !p
def create_table_tabs(snip):
anon_snippet_body = ""
# get start and end line number of (expanded) snippet
start = snip.snippet_start[0]
end = snip.snippet_end[0]
# Append current line into snippet
for i in range(start, end+1):
anon_snippet_body += snip.buffer[i]
anon_snippet_body += "" if i == end else '\n'
# delete expanded snippet line while preserving the line
for i in range(start, end):
del snip.buffer[start]
# Empty last line, while preserving the line
snip.buffer[start] = ''
# Expand anonymous snippet
snip.expand_anon(anon_snippet_body)
def create_table(cols, rows, sep, start, end, head="##"):
res = ""
placeholder = 1
for _ in range(0, int(rows)):
res += start + head.replace("##", f"${placeholder} ")
placeholder += 1
for _ in range(0, int(cols) - 1):
res += sep + head.replace("##", f" ${placeholder} ")
placeholder += 1
res += end
return res[:-1]
endglobal
post_jump "create_table_tabs(snip)"
snippet 'table(\d+),(\d+)' "Table with given row and column count" r
\begin{center}
\begin{tabular}{`!p
orient = "c"
for _ in range(0, int(match.group(1))): orient += " c"
snip.rv = orient`}
`!p
snip.rv = create_table(match.group(1), match.group(2), "&", "\t", "\\\\\\\\\n")
`$0
\end{tabular}
\end{center}
endsnippet
post_jump "create_table_tabs(snip)"
snippet 'matrix(\d+),(\d+)' "Matrix with given row and column count" r
\begin{pmatrix}
`!p
snip.rv = create_table(match.group(1), match.group(2), "&", "\t", "\\\\\\\\\n")
`$0
\end{pmatrix}
endsnippet
extends latex

6
UltiSnips/pyenv.snippets Normal file
View File

@@ -0,0 +1,6 @@
global !p
def print_hello():
print("Hello")
endglobal

View File

@@ -1,32 +1,82 @@
snippet docmodule "Documentation for modules" A
snippet helloworld "Hello world example" b
"""
File: `!p snip.rv = fn`
Author: ${1:Yannick Reiß}
Author: Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>
Created on: `date`
Description: Hello world python example
"""
if __name__ == "__main__":
print("Hello world!")
$0
endsnippet
snippet docmodule "Documentation for modules"
"""
File: `!p snip.rv = fn`
Author: ${1:Nina Chloe Kassandra Reiß <nina.reiss@nickr.eu>}
Created on: `date`
Description: ${2:No further description}
"""
$0
endsnippet
snippet def "Python Function" A
snippet def "Python Function"
def ${1:function}(${2}):
"""
@name $1
@brief ${3:function description}
Args:
`!p
`!p
params = t[2].replace(", ", ",").split(",")
snip.rv = ""
for param in params:
snip.rv += f"@param {param}"
snip.rv += f"\t\t@param {param}\n"
`
Returns:
$4 ${5:description}
@return $4
"""
$6
$5
`!p
if t[4] != "":
snip.rv = f"\n\treturn {t[4]}"`
if t[4] != "" and len(t[4].split(":")) > 1:
snip.rv = f"return {t[4].split(':')[0]}"`
$0
endsnippet
snippet class "Python class description" b
class ${1:`!p snip.rv = fn.split('.')[0]`}`!p
if t[2] != "":
snip.rv = " ("
else:
snip.rv = ""`${2:object}`!p
if t[2] == "":
snip.rv = ""
else:
snip.rv = ")"`:
"""
${3:Description of module $1.}
"""
def __init__(${4:self}`!p
if not t[4].startswith("self"):
t[4] = f"self, {t[4]}"
t[4] = t[4].replace(' ', '')
t[4] = t[4].replace(':', ': ')
t[4] = t[4].replace(',', ', ')`):
"""`!p
parameters: list = t[4].split(", ")
snip.rv = "\n"
for parameter in parameters:
parameter_meta = parameter.split(": ")
if len(parameter_meta) == 1:
snip.rv += f"\t\tnotype:\t{parameter_meta[0]}\n"
else:
snip.rv += f"\t\t{parameter_meta[0]}:\t{parameter_meta[1]}\n"`
"""
endsnippet
snippet #! "Environment Shebang" b
#!/usr/bin/env bash
$0
endsnippet

View File

@@ -1,3 +1,14 @@
snippet helloworld "Hello world example" b
// @name main
// @return
// @brief Hello world example.
// @param
fn main() {
println!("Hello World!");
}
$0
endsnippet
snippet fn "function declaration" i
// @name $1
// @return $3
@@ -13,13 +24,6 @@ else:
$0
endsnippet
snippet doxygen "Doxygen comment" b
// @name ${1:name}
// @return ${2:Return type}
// @param ${3:Parameter}
// @brief ${4:Description}
endsnippet
snippet struct "struct declaration"
// $1
// ${2:Description}
@@ -50,28 +54,6 @@ while $1 {
} $0
endsnippet
global !p
import re
def create_parameter_placeholders(snip):
placeholders_amount = int(snip.buffer[snip.line].strip())
snip.buffer[snip.line] = ''
anon_snippet_body = 'println!("' + '{}'.join(['$' + str(i+1) for i in range(placeholders_amount)]) + f"${placeholders_amount}" + '"'
if placeholders_amount > 0:
anon_snippet_body = anon_snippet_body + ', '
anon_snippet_body = anon_snippet_body + ', '.join(['$' + str(i+1) for i in range(placeholders_amount, 2*placeholders_amount)]) + ");"
snip.expand_anon(anon_snippet_body)
endglobal
post_jump "create_parameter_placeholders(snip)"
snippet "print\d+" "println" rA
`!p snip.rv = match.group(1)`
endsnippet
snippet println "println" A
println!("$1");$0
endsnippet

View File

@@ -4,3 +4,9 @@ $4
`!p snip.rv = "endsnippet"`
$0
endsnippet
snippet helloworld "A simple hello world snippet" b
${0:`!p
if not snip.c:
snip.rv = f'snippet helloworld "A simple hello world snippet" b\n{t[0]}\nendsnippet'`}
endsnippet

View File

@@ -0,0 +1,32 @@
extends verilog
priority 300
snippet module "Define a new module" b
module ${1:`!p snip.rv = fn.split(".")[0]`}`!p if t[2] == "":
snip.rv = ""
else:
snip.rv = " #("`${2:parameter p0 = 5}`!p if t[2] == "":
snip.rv = ""
else:
snip.rv = ") "``!p if t[3] == "":
snip.rv = ""
else:
snip.rv = "("`${3:input wire clk}`!p if t[3] == "":
snip.rv = ""
else:
snip.rv = ")"`;`!p
if t[3] == "":
snip.rv = t[3]
else:
no_break = t[3].replace("\n", "")
io_break = no_break.replace("input", "\n\tinput")
io_break = io_break.replace("output", "\n\toutput")
t[3] = io_break
`
$0
// `!p snip.rv = t[1]`
// `!p snip.rv = t[2]`
// `!p snip.rv = t[3]`
endmodule
endsnippet

View File

@@ -1,3 +1,9 @@
extends pyenv
snippet cc "Add Citation" i
\\cite{$1}$0
endsnippet
snippet colx "textcolor"
\\textcolor{${1:red}}{$2}$0
endsnippet
@@ -64,6 +70,7 @@ snippet img "Images"
\\centering
\\includegraphics[width=${2:0.8}\\linewidth]{${3}}
\\caption{${4:Abbildung}}
\\label{img:`!p snip.rv = t[4].lower().replace(" ", "_")`}
\\end{figure}
$0
endsnippet
@@ -86,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 Chloe Kassandra Reiß <nina.reiss@nickr.eu>}}{${3:Titel}}
\\begin{document}
\\input{~/latex/init.tex}
@@ -264,23 +271,28 @@ snippet - "new item" b
endsnippet
snippet sch "chapter"
\\chapter{$1}$0
\\chapter{$1}
\\label{chapter:`!p snip.rv = get_label(t[1])`}$0
endsnippet
snippet sse "Section"
\\section{$1}$0
\\section{$1}
\\label{section:`!p snip.rv = get_label(t[1])`}$0
endsnippet
snippet sss "Subsection"
\\subsection{$1}$0
\\subsection{$1}
\\label{subsection:`!p snip.rv = get_label(t[1])`}$0
endsnippet
snippet ssn "Subsubsection"
\\subsubsection{$1}$0
\\subsubsection{$1}
\\label{subsubsection:`!p snip.rv = get_label(t[1])`}$0
endsnippet
snippet par "Paragraph"
\\paragraph{$1}$0
\\paragraph{$1}
\\label{paragraph:`!p snip.rv = get_label(t[1])`}$0
endsnippet
snippet mquote "max quote"
@@ -373,6 +385,16 @@ def create_table(cols, rows, sep, start, end, head="##"):
placeholder += 1
res += end
return res[:-1]
def get_label(title):
return_label = title.lower()
return_label = return_label.replace(" ", "_")
return_label = return_label.replace("ä", "ae")
return_label = return_label.replace("ö", "oe")
return_label = return_label.replace("ü", "ue")
return_label = return_label.replace("-", "__")
return return_label
endglobal
post_jump "create_table_tabs(snip)"
@@ -459,7 +481,7 @@ snippet _- "Escape _ easier" iA
\\_
endsnippet
snippet bsp "Beispielsweise" iA
snippet bsp "Beispielsweise" A
beispielsweise
endsnippet
@@ -467,23 +489,12 @@ snippet ß "Backslash" A
\\
endsnippet
snippet bibbook "Add a new book/journal/paper reference" b
\\bibitem{${1:Reference_name}}
${2:Author}. (${3:2023}) \`${4:Title}'. ${5:Extension} `!p
if t[6] == "":
snip.rv = ""
elif "-" in t[6]:
snip.rv = "Seiten "
else:
snip.rv = "Seite"
`$6`!p
if t[6] == "":
snip.rv = ""
else:
snip.rv = "."`
$0
snippet \0 "Add another Backslash" iA
\\\\
endsnippet
snippet cc "Cite" A
\\cite{$1}$0
snippet setenv "Set Environment around Text" b
\\begin{$1}
${VISUAL}
\\end{$1}$0
endsnippet

View File

@@ -1,60 +0,0 @@
snippet entry "Add new entry" bA
-----------------------------------------------------------
--- Title: $1
--- Date: ${2:`date`}
--- Author: ${3:`whoami`}
--- Host: `hostname`
-----------------------------------------------------------
Tags: $4
$5
-----------------------------------------------------------
$0
endsnippet
snippet 1) "Enumerated List" b
1) $1
`!p
if t[1] == "":
index = 2
if " \n" in t[1]:
t[1] = t[1].replace(" \n", f"\n{index})")
index += 1`
$0
endsnippet
snippet - "Itemized List" b
- $1
`!p
t[1] = t[1].replace(" \n", f"\n-")`
$0
endsnippet
global !p
def complete(t, opts):
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
else:
return f"({'|'.join(opts)})"
endglobal
snippet mgl "DLRG neues Mitglied" b
${1:Num}|${2:Eintrittsdatum}`!p
if t[2] != "Eintrittsdatum" and len(t[2]) == 8:
if len(t[2]) > 2:
t[2] = f"{t[2][0:2]}.{t[2][2:]}"
if len(t[2]) > 4:
t[2] = f"{t[2][:5]}.{t[2][5:]}"
`|${3:Geburtsdatum}`!p
if t[3] != "Geburtsdatum" and len(t[3]) == 8:
if len(t[3]) > 2:
t[3] = f"{t[3][0:2]}.{t[3][2:]}"
if len(t[3]) > 4:
t[3] = f"{t[3][:5]}.{t[3][5:]}"
`|${4:PLZ}|${5}`!p snip.rv= complete(t[5], ['Offenbach', 'Hanau', 'Mühlheim', 'Frankfurt'])`|${6:Adresse}|${7:Nachname}`!p t[7] = t[7].upper()`, ${8:Vorname}
endsnippet

View File

@@ -61,3 +61,7 @@ snippet def "Definition/Constant" b
\`define ${1:NAME} ${2:VALUE}
$0
endsnippet
snippet filename "Get Filename" b
// `pwd`/`!p snip.rv = fn`
endsnippet

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

@@ -49,7 +49,7 @@ endsnippet
snippet docstring "Header Comment" A
-- `!p snip.rv = fn`
-- Created on: `date`
-- Author(s): ${1:Alexander Graf, Carl Ries, Yannick Reiß}
-- Author(s): ${1:Nina Chloe Reiß}
-- Content: ${2: Entity `!p snip.rv = fn.split('.')[0]`}
$0
endsnippet
@@ -73,3 +73,7 @@ endsnippet
snippet regflit "reg_idx from literal" iA
std_logic_vector(to_unsigned('${1:Literal}', reg_adr_size));
endsnippet
snippet fillvec "Stdout to fill a vector" A
(others => '0')
endsnippet

View File

@@ -1,5 +1,3 @@
snippet fun "Lua function" b
function ${1:name}()
$2
endfunction$0
snippet nnoremap "Normal mode remap" b
nnoremap ${1:<leader>key} $2$0
endsnippet

5
UltiSnips/xml.snippets Normal file
View File

@@ -0,0 +1,5 @@
snippet << "automated tag insertion" A
<${1:tag}>
$2
</${1/(\w+).*/$1/}>$0
endsnippet

View File

@@ -1,7 +1,8 @@
-- Basic setup configuration
vim.cmd("source ~/.config/nvim/viml/vanilla.vim")
require("vanilla")
vim.cmd("source ~/.config/nvim/viml/automacro.vim")
-- Lazy plugin setup
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
@@ -19,9 +20,3 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")
require("plugconfig")
require("confformat")
vim.cmd("source ~/.config/nvim/viml/plugconfig.vim")
local plugtestbench = require("plugbench")

View File

@@ -1,72 +0,0 @@
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) (format=lualatex 2023.7.21) 16 AUG 2023 18:24
restricted system commands enabled.
**viml/legacyconf.vim
(./viml/legacyconf.vim
LaTeX2e <2022-11-01> patch level 1
Lua module: luaotfload 2022-10-03 3.23 Lua based OpenType font support
Lua module: lualibs 2022-10-04 2.75 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2022-10-04 2.75 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "/home/nick/.texlive/texmf-var/luate
x-cache/generic/names".
luaotfload | init : Loading fontloader "fontloader-2022-10-03.lua" from kpse-res
olved path "/usr/share/texmf-dist/tex/luatex/luaotfload/fontloader-2022-10-03.lu
a".
Lua-only attribute luaotfload@noligature = 1
luaotfload | init : Context OpenType loader version 3.120
Inserting `luaotfload.node_processor' in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' in `hpack_filter'.
Inserting `luaotfload.glyph_stream' in `glyph_stream_provider'.
Inserting `luaotfload.define_font' in `define_font'.
Lua-only attribute luaotfload_color_attribute = 2
luaotfload | conf : Root cache directory is "/home/nick/.texlive/texmf-var/luate
x-cache/generic/names".
Inserting `luaotfload.harf.strip_prefix' in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' in `find_truetype_file'.
Removing `luaotfload.glyph_stream' from `glyph_stream_provider'.
Inserting `luaotfload.harf.glyphstream' in `glyph_stream_provider'.
Inserting `luaotfload.harf.finalize_vlist' in `post_linebreak_filter'.
Inserting `luaotfload.harf.finalize_hlist' in `hpack_filter'.
Inserting `luaotfload.cleanup_files' in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 3
Inserting `luaotfload.aux.set_sscale_dimens' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_font_index' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.patch_cambria_domh' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.fixup_fontdata' in `luaotfload.patch_font_unsafe'.
Inserting `luaotfload.aux.set_capheight' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_xheight' in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' in `luaotfload.patch_font'. L3 programm
ing layer <2023-02-22>
Inserting `tracingstacklevels' in `input_level_string'.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 "
NERDTree remap
?
! Emergency stop.
...
l.1 "
NERDTree remap
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Here is how much of LuaTeX's memory you used:
21 strings out of 478285
100000,1977958 words of node,token memory allocated 333 words of node memory still in use:
2 hlist, 1 local_par, 1 dir, 1 glue, 3 kern, 1 glyph, 3 attribute, 39 glue_sp
ec, 3 attribute_list, 1 temp nodes
avail lists: 2:5,3:3,4:1,5:1,7:1
20343 multiletter control sequences out of 65536+600000
14 fonts using 591679 bytes
13i,0n,12p,58b,15s stack positions out of 10000i,1000n,20000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!

61
lua/ada_mode.lua Normal file
View File

@@ -0,0 +1,61 @@
-- @name Prove
-- @param
-- @short Run gnatprove
function Prove()
vim.cmd("new")
local run_cmd = { "alr gnatprove" }
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
vim.cmd(":%!bash")
Buffer_loaded = true
end
-- @name Run
-- @param
-- @short Run program using alire
function Run()
vim.cmd("new")
local run_cmd = { "alr run" }
vim.api.nvim_buf_set_lines(0, 0, -1, false, run_cmd)
vim.cmd(":%!bash")
Buffer_loaded = true
end
function Close_Prove()
if Buffer_loaded then
Buffer_loaded = false
vim.cmd("bd!")
end
end
-- @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
-- Setup and verify ada tools when opening a ada file
vim.api.nvim_create_autocmd({ "BufEnter" }, {
pattern = { "*.adb", "*.ads" },
callback = setup_ada,
})
-- @name leave_ada
-- @param
-- @short Leave ada and reverse any changes to my editor defaults
local function leave_ada()
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
end
vim.api.nvim_create_autocmd({ "BufLeave" }, {
pattern = { "*.adb", "*.ads" },
callback = leave_ada,
})

View File

@@ -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
@@ -16,10 +17,18 @@ cmp.setup({
},
-- Add borders to the windows
-- window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
-- },
view = {
entries = "custom",
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
-- experimental settings
experimental = {
ghost_text = {},
},
-- mapping
mapping = cmp.mapping.preset.insert({
@@ -49,12 +58,12 @@ cmp.setup({
{ name = "path" },
{ name = "nvim_lsp", keyword_length = 2 },
{ name = "nvim_lsp_signature_help" },
{ name = "nvim_lua", keyword_length = 4 },
{ name = "buffer", keyword_length = 3 },
{ name = "nvim_lua", keyword_length = 2 },
{ name = "buffer", keyword_length = 2 },
{ name = "calc" },
{ name = "lua-latex-symbols", option = { cache = true } },
-- { name = "spell", option = { keep_all_entries = false }, keyword_length = 2 },
-- { name = "fuzzy_buffer", keyword_length = 2 }, -- Throwing unknown errors
{ name = "cmp_tabnine", keyword_length = 20 },
-- { name = "fuzzy_buffer", keyword_length = 4 },
}),
-- add formatting of the different sources
@@ -62,14 +71,15 @@ cmp.setup({
fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local menu_icon = {
ultisnips = "Φ",
nvim_lsp = "λ",
ultisnips = "",
path = "🌐",
path = "󰴠",
calc = "Σ",
buffer = "📚",
lualatexsymbols = "𝕋",
spell = "📚",
fuzzy_buffer = "📄",
buffer = "",
lualatexsymbols = "󰿈",
spell = "󰘝",
fuzzy_buffer = "",
cmp_tabnine = "🖳",
}
item.menu = menu_icon[entry.source.name]
return item
@@ -77,20 +87,23 @@ cmp.setup({
},
})
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = "buffer" },
}),
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
{ name = "fuzzy_path", keyword_length = 4 },
},
formatting = {
fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local menu_icon = {
buffer = "󰱼",
fuzzy_path = "",
}
item.menu = menu_icon[entry.source.name]
return item
end,
},
})
@@ -99,8 +112,20 @@ cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
{ name = "cmdline_history", keyword_length = 15 },
{ name = "cmdline_history", keyword_length = 24 },
}, {
{ name = "cmdline" },
{ name = "cmdline", keyword_length = 1 },
}),
formatting = {
fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local menu_icon = {
path = "󰙅",
cmdline = "",
cmdline_history = "󰂺 ",
}
item.menu = menu_icon[entry.source.name]
return item
end,
},
})

203
lua/explorer.lua Normal file
View File

@@ -0,0 +1,203 @@
require("oil").setup({
default_file_explorer = true,
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
"icon",
"permissions",
"size",
"mtime",
},
-- Buffer-local options to use for oil buffers
buf_options = {
buflisted = false,
bufhidden = "hide",
},
-- Window-local options to use for oil buffers
win_options = {
wrap = false,
signcolumn = "no",
cursorcolumn = false,
foldcolumn = "0",
spell = false,
list = false,
conceallevel = 3,
concealcursor = "nvic",
},
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
delete_to_trash = false,
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
skip_confirm_for_simple_edits = true,
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
-- (:help prompt_save_on_select_new_entry)
prompt_save_on_select_new_entry = true,
-- Oil will automatically delete hidden buffers after this delay
-- You can set the delay to false to disable cleanup entirely
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
cleanup_delay_ms = 2000,
lsp_file_methods = {
-- Enable or disable LSP file operations
enabled = true,
-- Time to wait for LSP file operations to complete before skipping
timeout_ms = 1000,
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
-- Set to "unmodified" to only save unmodified buffers
autosave_changes = false,
},
-- Constrain the cursor to the editable parts of the oil buffer
-- Set to `false` to disable, or "name" to keep it on the file names
constrain_cursor = "editable",
-- Set to true to watch the filesystem for changes and reload oil
watch_for_changes = true,
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
-- Additionally, if it is a string that matches "actions.<name>",
-- it will use the mapping at require("oil.actions").<name>
-- Set to `false` to remove a keymap
-- See :help oil-actions for a list of all available actions
keymaps = {
["g?"] = { "actions.show_help", mode = "n" },
["<CR>"] = "actions.select",
["<C-s>"] = { "actions.select", opts = { vertical = true } },
["<C-h>"] = { "actions.select", opts = { horizontal = true } },
["<C-t>"] = { "actions.select", opts = { tab = true } },
["<C-p>"] = "actions.preview",
["<C-c>"] = { "actions.close", mode = "n" },
["<C-l>"] = "actions.refresh",
["-"] = { "actions.parent", mode = "n" },
["_"] = { "actions.open_cwd", mode = "n" },
["`"] = { "actions.cd", mode = "n" },
["g~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" },
["gs"] = { "actions.change_sort", mode = "n" },
["gx"] = "actions.open_external",
["g."] = { "actions.toggle_hidden", mode = "n" },
["g\\"] = { "actions.toggle_trash", mode = "n" },
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
-- This function defines what is considered a "hidden" file
is_hidden_file = function(name, bufnr)
local m = name:match("^%.")
return m ~= nil
end,
-- This function defines what will never be shown, even when `show_hidden` is set
is_always_hidden = function(name, bufnr)
return false
end,
-- Sort file names with numbers in a more intuitive order for humans.
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
natural_order = "fast",
-- Sort file and directory names case insensitive
case_insensitive = false,
sort = {
-- sort order can be "asc" or "desc"
-- see :help oil-columns to see which columns are sortable
{ "type", "asc" },
{ "name", "asc" },
},
-- Customize the highlight group for the file name
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
return nil
end,
},
-- Extra arguments to pass to SCP when moving/copying files over SSH
extra_scp_args = {},
-- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3
extra_s3_args = {},
-- EXPERIMENTAL support for performing file operations with git
git = {
-- Return true to automatically git add/mv/rm files
add = function(path)
return false
end,
mv = function(src_path, dest_path)
return false
end,
rm = function(path)
return false
end,
},
-- Configuration for the floating window in oil.open_float
float = {
-- Padding around the floating window
padding = 2,
-- max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
max_width = 0,
max_height = 0,
border = nil,
win_options = {
winblend = 0,
},
-- optionally override the oil buffers window title with custom function: fun(winid: integer): string
get_win_title = nil,
-- preview_split: Split direction: "auto", "left", "right", "above", "below".
preview_split = "auto",
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
override = function(conf)
return conf
end,
},
-- Configuration for the file preview window
preview_win = {
-- Whether the preview window is automatically updated when the cursor is moved
update_on_cursor_moved = true,
-- How to open the preview window "load"|"scratch"|"fast_scratch"
preview_method = "fast_scratch",
-- A function that returns true to disable preview on a file e.g. to avoid lag
disable_preview = function(filename)
return false
end,
-- Window-local options to use for preview window buffers
win_options = {},
},
-- Configuration for the floating action confirmation window
confirmation = {
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_width and max_width can be a single value or a list of mixed integer/float types.
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
max_width = 0.9,
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
min_width = { 40, 0.4 },
-- optionally define an integer/float for the exact width of the preview window
width = nil,
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_height and max_height can be a single value or a list of mixed integer/float types.
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
max_height = 0.9,
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
min_height = { 5, 0.1 },
-- optionally define an integer/float for the exact height of the preview window
height = nil,
border = nil,
win_options = {
winblend = 0,
},
},
-- Configuration for the floating progress window
progress = {
max_width = 0.9,
min_width = { 40, 0.4 },
width = nil,
max_height = { 10, 0.9 },
min_height = { 5, 0.1 },
height = nil,
border = nil,
minimized_border = "none",
win_options = {
winblend = 0,
},
},
-- Configuration for the floating SSH window
ssh = {
border = nil,
},
-- Configuration for the floating keymaps help window
keymaps_help = {
border = nil,
},
})
vim.keymap.set("n", "<C-E>", "<CMD>Oil<CR>", { desc = "Open parent directory" })

View File

@@ -12,8 +12,6 @@ require("formatter").setup({
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
},
@@ -45,6 +43,52 @@ require("formatter").setup({
require("formatter.filetypes.rust").rustfmt,
},
nix = {
function()
return {
exe = "nixfmt",
}
end,
},
haskell = {
function()
-- Full specification of configurations is down below and in Vim help
-- files
return {
exe = "fourmolu",
args = {
util.escape_path(util.get_current_buffer_file_path()),
},
stdin = true,
}
end,
},
vhdl = {
function()
-- Full specification of configurations is down below and in Vim help
-- files
return {
exe = "vsg",
args = {
util.escape_path(util.get_current_buffer_file_path()),
},
stdin = true,
}
end,
},
veryl = {
function()
return {
exe = "veryl fmt",
args = {},
stdin = false,
}
end,
},
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
["*"] = {
@@ -54,3 +98,13 @@ require("formatter").setup({
},
},
})
-- Formatter autocommands
vim.cmd([[
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false })
]])

View File

@@ -0,0 +1,40 @@
-- Ale configuration
vim.g.ale_linters_explicit = 0
local linters = {
ada = { "gnat", "gcc", "adals", "cspell" },
c = { "clang" },
cpp = { "clang" },
latex = { "proselint" },
markdown = { "languagetool" },
plaintex = { "proselint" },
python = { "pylint" },
tex = { "proselint" },
vhdl = {},
vim = { "vint" },
}
local fixers = {
ada = { "gnatpp" },
asm = { "gcc" },
bash = { "bashate" },
c = { "astyle" },
haskell = { "fourmolu" },
html = { "prettier", "html-beautify" },
latex = { "texlab", "textlint" },
lua = { "stylua" },
markdown = { "prettier", "pandoc" },
nix = { "nixfmt" },
pascal = { "ptop" },
python = { "yapf", "ruff", "autopep8" },
rust = { "rustfmt" },
tex = { "textlint", "latexindent" },
}
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>lr", ":ALEFindReferences<CR>")
vim.keymap.set("n", "<leader>ln", ":ALENext<CR>")

84
lua/lspconfiguration.lua Normal file
View File

@@ -0,0 +1,84 @@
-- Mason setup
require("mason").setup(require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "󰔟",
package_uninstalled = "",
},
},
}))
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
},
})
vim.lsp.enable("verible")
vim.lsp.config("verible", { cmd = { "verible-verilog-ls", "--rules_config_search" } })
vim.lsp.enable("clangd")
vim.lsp.config("clangd", {
cmd = { "clangd" },
root_markers = { ".clangd" },
filetypes = { "c", "cpp" },
})
-- @name file_exists
-- @param (name
-- @short Check if a file does exists (i. e. an ada project file)
local function file_exists(name)
local f = io.open(name, "r")
return f ~= nil and io.close(f)
end
-- @name get_config_file
-- @param
-- @short Get the configuration file.
local function get_config_file()
local filename = vim.api.nvim_buf_get_name(0)
local basedirectory = filename:gsub("/[^%/]-$", "")
local currentdirectory = filename:match("[^%/]-$")
if file_exists(basedirectory .. currentdirectory .. ".gpr") then
return basedirectory .. currentdirectory .. ".gpr"
else
basedirectory = basedirectory:gsub("/[^%/]-$", "")
currentdirectory = filename:match("[^%/]-$")
if file_exists(basedirectory .. currentdirectory .. ".gpr") then
return basedirectory .. currentdirectory .. ".gpr"
else
return "default.gpr"
end
end
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 = {},
})
local registry = require("mason-registry")
registry:on("package:install:success", function(pkg)
vim.schedule(function()
vim.notify("Installed " .. pkg.name)
-- Formatter neu laden
package.loaded["formatter"] = nil
require("formatter")
-- ALE reset
vim.cmd("ALEFixSuggest") -- oder ALELint
-- LSP neu attachen
vim.cmd("LspRestart")
end)
end)

View File

@@ -1,23 +0,0 @@
-- default config:
require("peek").setup({
auto_load = true, -- whether to automatically load preview when
-- entering another markdown buffer
close_on_bdelete = true, -- close preview window on buffer delete
syntax = true, -- enable syntax highlighting, affects performance
theme = "dark", -- 'dark' or 'light'
update_on_change = true,
app = "webview", -- 'webview', 'browser', string or a table of strings
-- explained below
filetype = { "markdown" }, -- list of filetypes to recognize as markdown
-- relevant if update_on_change is true
throttle_at = 200000, -- start throttling when file exceeds this
-- amount of bytes in size
throttle_time = "auto", -- minimum amount of time in milliseconds
-- that has to pass before starting new render
})

20
lua/navigation.lua Normal file
View File

@@ -0,0 +1,20 @@
-- Bufstop
vim.keymap.set("n", "<M-w>", ":bdelete<CR>")
vim.keymap.set("n", "<C-y>", ":BufstopFast<CR>")
-- Telescope snippet
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<c-f>", builtin.current_buffer_fuzzy_find, {})
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
vim.keymap.set("n", "<leader>fc", builtin.commands, {})
-- Telescope + Ultisnips
require("telescope").load_extension("ultisnips")
vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {})
-- Tagbar
vim.keymap.set("n", "<F8>", ":TagbarToggle<CR>") -- permanent window
vim.keymap.set("n", "<C-j>", ":TagbarOpenAutoClose<CR>") -- select, jump, close
vim.g.tagbar_autoclose = 0 -- do not autoclose after selection

37
lua/pascal_mode.lua Normal file
View File

@@ -0,0 +1,37 @@
-- Lua vim-dummy variable
if vim == nil then
local vim = {}
end
-- @name setup_pascal
-- @param
-- @short Verify installation of pascal tools or install them.
local function setup_pascal()
local check_ptop = { os.execute("which ptop") }
-- if return value is 1, get ptop
if check_ptop == 1 then
os.execute("wget -O ~/.local/bin/ptop https://www.nichkara.eu/data/ptop64")
os.execute("chmod +x ~/.local/bin/ptop")
end
vim.opt.spell = false
end
-- Setup and verify pascal tools when opening a pascal file
vim.api.nvim_create_autocmd({ "BufEnter" }, {
pattern = { "*.pas" },
callback = setup_pascal,
})
-- @name leave_pascal
-- @param
-- @short Leave pascal and reverse any changes to my editor defaults
local function leave_pascal()
vim.opt.spell = true
end
vim.api.nvim_create_autocmd({ "BufLeave" }, {
pattern = { "*.pas" },
callback = leave_pascal,
})

View File

@@ -1,31 +0,0 @@
local M = {}
-- Delete area in between the current and next occurrence of the current symbol under cursor.
-- use builtin functionality for opening brackets
function M.Delete_interval()
-- TODO: Think of something
end
-- resize current window using control + 7,8,9,0
function M.Resize_Current_Window(change_width, change_height)
local width = vim.api.nvim_win_get_width(0)
local height = vim.api.nvim_win_get_height(0)
if width + change_width > 5 then
vim.api.nvim_win_set_width(0, width + change_width)
end
if height + change_height > 5 then
vim.api.nvim_win_set_height(0, height + change_height)
end
end
-- Keybindings
-- 7/8 change width
-- 9/0 change height
--vim.keymap.set("n", "<C-7>", Resize_Current_Window(-1, 0))
--vim.keymap.set("n", "<C-8>", Resize_Current_Window(1, 0))
--vim.keymap.set("n", "<C-9>", Resize_Current_Window(0, -1))
--vim.keymap.set("n", "<C-0>", Resize_Current_Window(0, 1))
return M

View File

@@ -1,69 +1,62 @@
-- UltiSnips Configuration
vim.g.UltiSnipsExpandTrigger = "<tab>"
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
vim.g.UltiSnipsJumpBackwardTrigger = "<c-h>"
vim.g.UltiSnipsEditSplit = "vertical"
vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
-- VHDL mode (Vanilla with shell interaction)
require("vhdl_mode")
-- NERDTree Config
vim.g.NERDTreeShowHidden = 1
-- Formatter configuration
require("formatterconfiguration")
-- Code completion
require("code-completion")
-- Snippet configuration (Ultisnips)
require("snippetconfiguration")
-- ALE configuration
require("linterconfiguration")
-- Navigation and jumping configuration
require("navigation")
-- Mason and builtin lsp configuration
require("lspconfiguration")
-- Pascal mode (supported by plugins)
require("pascal_mode")
-- Ada mode (supported by plugins)
require("ada_mode")
-- Explorer (oil)
require("explorer")
-- Markdown Preview
vim.g.mkdp_auto_start = 0
vim.g.mkdp_browser = "epiphany"
vim.g.mkdp_echo_preview_url = 1
-- Misc configuration
if vim == nil then
vim = {}
end
-- Update function and call
function Update_Sys()
--vim.cmd("TSUpdate")
vim.cmd("MasonUpdate")
vim.cmd("Lazy sync")
end
vim.keymap.set("n", "<M-u>", ":lua Update_Sys()<CR>")
-- Lexima
vim.g.lexima_enable_basic_rules = 1
vim.g.lexima_enable_newline_rules = 1
-- Telescope snippet
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<c-f>", builtin.current_buffer_fuzzy_find, {})
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
vim.keymap.set("n", "<leader>fc", builtin.commands, {})
-- Telescope + Ultisnips
require("telescope").load_extension("ultisnips")
vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {})
-- NERDTree Config
vim.g.NERDTreeDirArrowExpandable = ""
vim.g.NERDTreeDirArrowCollapsible = ""
-- Git-Blame configuration
vim.g.gitblame_message_template = " => <author> • <date> • <summary>"
vim.g.gitblame_date_format = "%r"
-- Intendation basics
require("ibl").setup()
-- Floating terminal
vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>")
-- Code completion
require("code-completion")
-- Mason setup
require("mason").setup(require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
}))
require("mason-lspconfig").setup({
-- ensure_installed = { "clangd", "cmake", "jdtls", "texlab", "pylsp" },
})
require("mason-lspconfig").setup_handlers({
function(clangd)
require("lspconfig")[clangd].setup({})
end,
["als"] = function()
require("lspconfig").als.setup({
settings = {
ada = {
projectFile = "default.gpr",
},
},
})
end,
})
-- Set default colorscheme
vim.cmd("colo synthweave-transparent")

View File

@@ -1,44 +1,75 @@
return {
"preservim/nerdtree",
"Xuyuanp/nerdtree-git-plugin",
"SirVer/UltiSnips",
-- Behavior
"tpope/vim-surround",
"tpope/vim-speeddating",
"mg979/vim-visual-multi",
"SirVer/UltiSnips",
"cohama/lexima.vim",
"voldikss/vim-floaterm",
-- Navigation
"mihaifm/bufstop",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release",
},
{ "tzachar/fuzzy.nvim", requires = { "nvim-telescope/telescope-fzf-native.nvim" } },
"fhill2/telescope-ultisnips.nvim",
"preservim/tagbar",
{
"stevearc/oil.nvim",
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
},
-- Visuals
"vim-airline/vim-airline",
"vim-airline/vim-airline-themes",
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
-- ensure_installed = { "c", "vim", "ada", "html", "python" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
"f-person/git-blame.nvim",
"p00f/nvim-ts-rainbow",
"cohama/lexima.vim",
"ryanoasis/vim-devicons",
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
},
"fhill2/telescope-ultisnips.nvim",
"hiroakis/cyberspace.vim",
"tpope/vim-speeddating",
"yannickreiss/nvim-doxyscan",
"nvim-tree/nvim-web-devicons",
{ "romgrk/barbar.nvim", wants = "nvim-web-devicons" },
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
"dstein64/vim-startuptime",
"mhinz/vim-startify",
"dense-analysis/ale",
"f-person/git-blame.nvim",
"dstein64/vim-startuptime",
"hiphish/rainbow-delimiters.nvim",
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && npm install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
},
-- Themes
"folke/tokyonight.nvim",
"patstockwell/vim-monokai-tasty",
"hiroakis/cyberspace.vim",
"jaredgorski/spacecamp",
"scottmckendry/cyberdream.nvim",
"samharju/synthweave.nvim",
-- Code completion / Menu
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
@@ -50,17 +81,69 @@ return {
"dmitmel/cmp-cmdline-history",
"amarakon/nvim-cmp-lua-latex-symbols",
"f3fora/cmp-spell",
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" },
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
"quangnguyen30192/cmp-nvim-ultisnips",
-- LSP / Formatter
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
"mfussenegger/nvim-dap",
"mhartington/formatter.nvim",
"mg979/vim-visual-multi",
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
{ "tzachar/fuzzy.nvim", requires = { "nvim-telescope/telescope-fzf-native.nvim" } },
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
"quangnguyen30192/cmp-nvim-ultisnips",
"mihaifm/bufstop",
"https://git.nickr.eu/yannickreiss/nvim-sourcer.git",
{ "TamaMcGlinn/nvim-lspconfig-ada" },
"sainnhe/sonokai",
"veryl-lang/veryl.vim",
-- Plugins to test
-- Wiki
{
"echaya/neowiki.nvim",
opts = {
wiki_dirs = {
-- neowiki.nvim supports both absolute and relative paths
{ name = "Personal", path = "~/.wiki" },
{ name = "RiscVar", path = "~/Documents/HSRM/riscvar.wiki" },
{ name = "Ada/Spark", path = "~/Documents/Science/ada_spark_wiki" },
{ name = "FPGA Book", path = "~/Documents/Science/FPGA_Design" },
{ name = "Spark-Shell", path = "~/Documents/Programming/spark/spark_shell/spark_shell.wiki" },
},
},
keys = {
{ "<leader>ww", "<cmd>lua require('neowiki').open_wiki()<cr>", desc = "Open Wiki" },
{ "<leader>wW", "<cmd>lua require('neowiki').open_wiki_floating()<cr>", desc = "Open Floating Wiki" },
{ "<leader>wT", "<cmd>lua require('neowiki').open_wiki_new_tab()<cr>", desc = "Open Wiki in Tab" },
},
},
{
"brianhuster/live-preview.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
},
-- Lean
{
"Julian/lean.nvim",
event = { "BufReadPre *.lean", "BufNewFile *.lean" },
dependencies = {
"neovim/nvim-lspconfig",
"nvim-lua/plenary.nvim",
-- optional dependencies:
-- a completion engine
-- hrsh7th/nvim-cmp or Saghen/blink.cmp are popular choices
-- 'nvim-telescope/telescope.nvim', -- for 2 Lean-specific pickers
-- 'andymass/vim-matchup', -- for enhanced % motion behavior
-- 'andrewradev/switch.vim', -- for switch support
-- 'tomtom/tcomment_vim', -- for commenting
},
---@type lean.Config
opts = { -- see below for full configuration options
mappings = true,
},
},
}

View File

@@ -0,0 +1,14 @@
vim.g.UltiSnipsExpandTrigger = "<tab>"
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
vim.g.UltiSnipsJumpBackwardTrigger = "<c-h>"
vim.g.UltiSnipsEditSplit = "vertical"
vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
-- Keymaps
vim.keymap.set({ "i", "s" }, "<c-l>", function()
vim.fn["UltiSnips#JumpForwards"]()
end)
vim.keymap.set({ "i", "s" }, "<c-h>", function()
vim.fn["UltiSnips#JumpBackwards"]()
end)

View File

@@ -1,14 +1,12 @@
-- in tools.lua
local api = vim.api
local M = {};
local M = {}
function M.makeScratch()
vim.bo[0].buftype=nofile -- set the current buffer's (buffer 0) buftype to nofile
vim.bo[0].bufhidden=hide
vim.bo[0].swapfile=false
end;
vim.bo[0].buftype = nofile -- set the current buffer's (buffer 0) buftype to nofile
vim.bo[0].bufhidden = hide
vim.bo[0].swapfile = false
end
return M;
return M

View File

@@ -1,15 +1,54 @@
-- Filetypes and compatibility
vim.opt.compatible = false
vim.cmd("filetype on")
vim.cmd("filetype plugin on")
vim.cmd("syntax on")
-- Spell
vim.opt.spell = true
vim.opt.spl = "en_us,de_de"
vim.opt.sps = "fast,timeout:100"
-- Editor configuration
vim.opt.number = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.showmatch = true
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.relativenumber = false
vim.g.mapleader = ","
vim.cmd("set clipboard+=unnamedplus")
vim.cmd("autocmd! CursorHold,CursorHoldI *.md write")
vim.cmd("autocmd! CursorHold,CursorHoldI *.hs write")
vim.cmd("set autoread")
-- GUI
vim.opt.cursorline = true
vim.opt.hlsearch = true
vim.opt.encoding = "UTF-8"
vim.g.tex_flavor = "latex"
vim.opt.conceallevel = 2
vim.opt.guifont = "DroidSansMono Nerd Font 11"
vim.g.mapleader = ","
vim.opt.showmatch = true
-- set color scheme
vim.opt.termguicolors = true
vim.cmd("colorscheme slate")
vim.keymap.set("n", "<M-+>", ":colo tokyonight-day<CR>")
vim.keymap.set("n", "<M-->", ":colo tokyonight-night<CR>")
-- vim.opt.mouse = ""
-- set copy mode
vim.keymap.set("n", "<leader>ll", ":set nonumber<cr>")
vim.keymap.set("n", "<leader>lm", ":set number<cr>")
-- switch mode
vim.keymap.set("n", "<leader>na", ":set norelativenumber<cr>")
vim.keymap.set("n", "<leader>nr", ":set relativenumber<cr>")
vim.filetype.add({
extension = {
bf = "brainfuck",
},
})

8
lua/vhdl_mode.lua Normal file
View File

@@ -0,0 +1,8 @@
-- 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.nichkara.eu/data/vhdlfmt")
os.execute("chmod +x ~/.local/bin/vhdlfmt")
end

98
ptop.conf Normal file
View File

@@ -0,0 +1,98 @@
end=crbefore,dindonkey,dindent,crafter,capital
[end]=if,then,else,while,with,for,record,try,finally,except,class,object,private,public,protected,published,casevar,colon,equals
begin=crbefore,dindonkey,inbytab,crafter,capital
[begin]=var,label,const,type
if=spaft,gobsym,inbytab,capital
then=capital
else=crbefore,dindonkey,inbytab,capital
[else]=if,then,else
proc=dindonkey,spaft,capital
[proc]=var,label,const,type
var=blinbefore,dindonkey,spaft,inbytab,capital
[var]=var,label,const,type
of=crsupp,spbef,spaft,capital
while=spaft,gobsym,inbytab,crafter,capital
do=crsupp,spbef,capital
case=spaft,gobsym,inbytab,crafter,capital
with=spaft,gobsym,inbytab,crafter,capital
for=spaft,gobsym,inbytab,crafter,capital
repeat=inbytab,crafter,capital
until=crbefore,dindonkey,dindent,spaft,gobsym,crafter,capital
[until]=if,then,else,while,with,for,colon,equals
func=dindonkey,spaft,capital
[func]=var,label,const,type
label=blinbefore,spaft,inbytab,capital
const=blinbefore,dindonkey,spaft,inbytab,capital
[const]=var,label,const,type
type=blinbefore,dindonkey,spaft,inbytab,capital
[type]=var,label,const,type
record=inbyindent,crafter,capital
[record]=end
string=
prog=blinbefore,spaft,capital
asm=
try=crbefore,inbytab,crafter,capital
finally=crbefore,dindent,inbytab,crafter,capital
[finally]=try
except=crbefore,dindent,inbytab,crafter,capital
[except]=try
raise=
class=inbyindent,capital
object=inbyindent,capital
constructor=
destructor=
inherited=
property=
private=crbefore,dindonkey,spaft,inbytab,capital
[private]=end,private,public,protected,published
public=crbefore,dindonkey,spaft,inbytab,capital
[public]=end,private,public,protected,published
protected=crbefore,dindonkey,spaft,inbytab,capital
[protected]=end,private,public,protected,published
published=crbefore,dindonkey,spaft,inbytab,capital
[published]=end,private,public,protected,published
initialization=
finalization=
inline=
library=blinbefore,spaft,capital
interface=blinbefore,crafter,capital
implementation=blinbefore,dindonkey,crafter,capital
[implementation]=end,var,label,const,type,property
read=
write=
unit=blinbefore,spaft,capital
and=
arr=
div=
down=
file=
goto=
in=
mod=
not=
nil=
or=
set=
to=
virtual=
uses=blinbefore,spaft,capital
casevar=spaft,gobsym,inbytab,crafter,capital
ofobject=
becomes=spbef,spaft,gobsym,capital
notequal=
lessorequal=
greaterorequal=
delphicomment=crafter
dopencomment=
dclosecomment=
opencomment=crsupp,capital
closecomment=crsupp,capital
semicolon=crsupp,dindonkey,crafter,capital
[semicolon]=if,then,else,while,with,for,colon,equals
colon=inbytab,capital
equals=spbef,spaft,inbytab,capital
openparen=gobsym,capital
closeparen=
period=crsupp,capital
endoffile=
other=

View File

@@ -1,177 +0,0 @@
import os
import os.path
import fnmatch
import logging
import ycm_core
import re
BASE_FLAGS = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-ferror-limit=10000',
'-DNDEBUG',
'-std=c++11',
'-xc++',
'-I/usr/lib/',
'-I/usr/include/'
]
SOURCE_EXTENSIONS = [
'.cpp',
'.cxx',
'.cc',
'.c',
'.m',
'.mm'
]
SOURCE_DIRECTORIES = [
'src',
'lib'
]
HEADER_EXTENSIONS = [
'.h',
'.hxx',
'.hpp',
'.hh'
]
HEADER_DIRECTORIES = [
'include'
]
def IsHeaderFile(filename):
extension = os.path.splitext(filename)[1]
return extension in HEADER_EXTENSIONS
def GetCompilationInfoForFile(database, filename):
if IsHeaderFile(filename):
basename = os.path.splitext(filename)[0]
for extension in SOURCE_EXTENSIONS:
# Get info from the source files by replacing the extension.
replacement_file = basename + extension
if os.path.exists(replacement_file):
compilation_info = database.GetCompilationInfoForFile(replacement_file)
if compilation_info.compiler_flags_:
return compilation_info
# If that wasn't successful, try replacing possible header directory with possible source directories.
for header_dir in HEADER_DIRECTORIES:
for source_dir in SOURCE_DIRECTORIES:
src_file = replacement_file.replace(header_dir, source_dir)
if os.path.exists(src_file):
compilation_info = database.GetCompilationInfoForFile(src_file)
if compilation_info.compiler_flags_:
return compilation_info
return None
return database.GetCompilationInfoForFile(filename)
def FindNearest(path, target, build_folder):
candidate = os.path.join(path, target)
if(os.path.isfile(candidate) or os.path.isdir(candidate)):
logging.info("Found nearest " + target + " at " + candidate)
return candidate;
parent = os.path.dirname(os.path.abspath(path));
if(parent == path):
raise RuntimeError("Could not find " + target);
if(build_folder):
candidate = os.path.join(parent, build_folder, target)
if(os.path.isfile(candidate) or os.path.isdir(candidate)):
logging.info("Found nearest " + target + " in build folder at " + candidate)
return candidate;
return FindNearest(parent, target, build_folder)
def MakeRelativePathsInFlagsAbsolute(flags, working_directory):
if not working_directory:
return list(flags)
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith('/'):
new_flag = os.path.join(working_directory, flag)
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
break
if flag.startswith(path_flag):
path = flag[ len(path_flag): ]
new_flag = path_flag + os.path.join(working_directory, path)
break
if new_flag:
new_flags.append(new_flag)
return new_flags
def FlagsForClangComplete(root):
try:
clang_complete_path = FindNearest(root, '.clang_complete')
clang_complete_flags = open(clang_complete_path, 'r').read().splitlines()
return clang_complete_flags
except:
return None
def FlagsForInclude(root):
try:
include_path = FindNearest(root, 'include')
flags = []
for dirroot, dirnames, filenames in os.walk(include_path):
for dir_path in dirnames:
real_path = os.path.join(dirroot, dir_path)
flags = flags + ["-I" + real_path]
return flags
except:
return None
def FlagsForCompilationDatabase(root, filename):
try:
# Last argument of next function is the name of the build folder for
# out of source projects
compilation_db_path = FindNearest(root, 'compile_commands.json', 'build')
compilation_db_dir = os.path.dirname(compilation_db_path)
logging.info("Set compilation database directory to " + compilation_db_dir)
compilation_db = ycm_core.CompilationDatabase(compilation_db_dir)
if not compilation_db:
logging.info("Compilation database file found but unable to load")
return None
compilation_info = GetCompilationInfoForFile(compilation_db, filename)
if not compilation_info:
logging.info("No compilation info for " + filename + " in compilation database")
return None
return MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_)
except:
return None
def FlagsForFile(filename):
root = os.path.realpath(filename);
compilation_db_flags = FlagsForCompilationDatabase(root, filename)
if compilation_db_flags:
final_flags = compilation_db_flags
else:
final_flags = BASE_FLAGS
clang_flags = FlagsForClangComplete(root)
if clang_flags:
final_flags = final_flags + clang_flags
include_flags = FlagsForInclude(root)
if include_flags:
final_flags = final_flags + include_flags
return {
'flags': final_flags,
'do_cache': True
}

View File

@@ -1,353 +0,0 @@
transgender
python
SI
Tera
Giga
Mega
kilo
hekto
Deka
dezi
centi
milli
mikro
nano
piko
femto
atto
blue
Summenregel
Konstantenregel
itemize
Maschengleichungen
Maschenstromverfahren
rho
green
Maschensatz
Maschenregel
Date
Author
Lian
Sep
CEST
Nm
cos
sin
Jacobideterminante
Chlorionen
Coulombkraft
Coulomb'schen
Youtube
Whiteboard
DuckDuckGo
duckduckgo
Ecosia
ecosia
DOSB
https
www
org
search
method
index
com
Scherenschlag
ausschwimmen
Gewöhnungsübung
Scherenschlages
Theorieteil
Whatsapp
Ghiuri
Fiona
Nenke
Mia
Femdt
Trainingzeiten
Katha
OFF
ä
ä
Fornauf
Präventionsseminar
KJM
Juleica
Lotz
Laju
Plätzchenbacken
DLRG
Teambuildingmaßnahmen
Fileshare
Verplegung
Teambuildingmaßnahme
Nachnahme/!
Skale
Bins
äqudidistant
univariat
Lageparameter
yellow
center
tabular
Modalwert
Streuungsparameter
Zusammenhangsparameter
univariate
Modalwerte
multi
Range
Verschiebungssatz
violet
Regressionsprobleme
indigo
Squares
Square
xy
enumerate
Multiplikationssatz
Binomial
hypergeometrische
hypergeometrisch
hypergeometrischer
cc
Poisson
Uniformverteilung
uniformverteilt
exponentialverteilt
Gauß'sche
standardnormalverteilt
Achsenssymmetrisch
Trapezregel
Simpson
standardnormalverteilte
Intervallschätzung
Konfidenz
argmax
logarithmierten
Likelihoodfunktion
logarithmierte
Likelihood
cccc
Exponential
erwartungstreu
Intervallschätzer
Intervallschätzern
Student'sche
Intervallformel
Quantiltabelle
Testvariable
Quantiltabllen
Signifikanzlevel
domänenabhängig
kongeriert
white
HEP
IHP
of
Chain
Security
by
Obscurity
Werkzeuge
ASICs
Skywater
RISC
Open
PDK
Source
closed
open
Exfiltration
access
remote
code
execution
source
Backdoor
no
Wavetable
Ausschwingteil
FPGA
Hüllkurvengenerator
Physical
Modelling
FM
Granularsynthese
HCM
übermischt
PWM
Netzwerkschnittstellen
zuteilbaren
Betriebsmittelnutzung
Zuses
Z3
Interkompatibilität
Very
Large
Scale
Safety
Multiprocessing
SMP
AMP
Middleware
syscalls
TRAP
Kernelmode
Usermode
Syscall
aktueller
TODO
Sky
Process
ICs
Central
Processing
Units
Multiplikationsbeschleuniger
Modules
HSM
VHDL
Verilog
SpinalHDL
TODO
rm
hs
student
reiss
yannick
yreis001
Oct
Sat
on
process
fabrication
the
part
taking
parties
different
Add
N50
IEEEtran
Aufspürbarkeit
zielspezifische
Microchips
syswrite
bsp
system
operating
PCB
Threads
Trusted
Scheduling
Print
ISC
Sewobe
Timetable
Round
Scheduler
Traps
IVT
pid
int
status
Kindprozesses
ID
wait
exit
Thread
pthread
POSIX
pthreads
opts
waitpid
IRT
Dispatch
Latency
PDLT
SWT
Performancegewinn
auch
toolchain
EDA
Entwicklungswerkzeuge
Progenitor
software
concept
proof
VexRISCV
litex
VexRiscv
Vivado
FPGAs
Low
OpenWRT
VecRiscv
buildroot
High
TPM
modules
platform
trusted
VE
Waveform
Synthesizerimplementierung
Kologromov
frame
Sampling
empty
Kindprozesse
Kernelaufrufe
root
sigpause
Signalhandler
Nachrichtenorientierte
send
receive
duty
cycles
Skalier
mHz
Cycle
Lookup
rodata
text
data
bss
Heap
pop
push
Overflow
LIFO
free
malloc
Relokationsproblem
Heaps
Relokation
Mikrocontrollersystemen
Debugging
Metaspeicher
Soundcard
ressourcenbeschränkten
Nexys
Mono
Zynq
Z7
Arty
Repository
Rotating
first
Next
Worst
Knuth
Allokationsalgorithmus
Buddy
Buddies
werden
werden
Kolmogorov
Bayes
German
Instagram
Tablet
Abschwington
BerndDasBot

Binary file not shown.

View File

@@ -1,173 +0,0 @@
t0
UltiSnipsConfig
yannick
CEST
Reiss
reiss
protonmail
focusable
unmodifiable
nvim
buf
argv
param
argc
filename
unallocated
extractTokens
are
github
DoomEngine
struct
OpenGL
src
dir
README
Makefile
DEVILENGINE
for
x7
u3
md
apk
Reiß
brainfuck
clk
jmp
pc
bfpu
hardcoded
logisim
intoLogisim
unallocated
filetype
Risc
trojan
netlist
risc
ic
VexRISCV
noob
Qualcolm
0
Knowledge
Knowledge
trojans
C3
g
Fabio
Stöttinger
backend
PDK
Sky130
cryptographic
#anpulation
manpulation/!
hdl
tokenizer
testToken
testBrackets
CCompiler
Tokenize
tokenize
SpinalHDL
HSM
riscv
https
VexRiscv
VexRiscv
crypto
openlane
IHP
AUTOSAR
toolchain
FPGAs
efabless
ICs
unmatching
photonic
cryptoalgorithms
depackage
PIPs
detectability
runtime
IDDT
SoC
asic
GDS
RTL
IPs
nm
PDKs
EDA
ASICs
Tapeout
OpenROAD
OpenLANE
GDSII
SoCs
StriVe
Qflow
Verilog
Toolchains
DFT
ATPG
Floorplanning
OpenSTA
Yosys
LEC
CTS
backdoors
themself
intel
Calma's
nsf
Vec
plugconfig
folke
viml
config
confformat
plugbench
jedec
Graf
HoP
Hearttron
lexed
malloc
nicklang
NL
Rhein
Wiesbaden
Crysler
TT
ssm
automata
IEEEtran
de
hs
yreis001
CET
M4
on
evaluator
basisc
untrusted
VHDL
floorplanning
toolchains
OpenLane
floorplanner
combinational
pinetime
nRF52832
nordic
openROAD
gcc
linux
chibicc
chibi

Binary file not shown.

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

32
viml/automacro.vim Normal file
View File

@@ -0,0 +1,32 @@
" various tools inside vim
function! GetCharUnderCursor()
let line = getline('.')
let col = col('.')
return line[col - 1]
endfunction
" predefined macros in functions
function SpacedLine()
normal o
normal O
normal O
normal j
endfunction
function SwapWords()
normal dw
normal e
exec 'normal! a '
normal p
normal l
let char = GetCharUnderCursor()
if char == ' '
normal x
endif
normal h
normal b
normal b
endfunction
let @o = ':call SpacedLine()
'

View File

@@ -1,103 +0,0 @@
" NERDTree remap
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
nmap <C-e> :NERDTreeToggle<CR>
" open builtin terminal
function OpenTerm()
vsplit
terminal
endfunction
nnoremap <C-t> :call OpenTerm()<CR>
" open new files right/below
set splitright
set splitbelow
set clipboard+=unnamedplus
" Autoformat on save
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
" set spellcheck according to Filetype
autocmd VimEnter * set spell spelllang=en_us
function Litde()
set spell spelllang=de_de
endfunction
function Liten()
set spell spelllang=en_us
endfunction
nnoremap <M-e> :call Liten()<CR>
nnoremap <M-g> :call Litde()<CR>
" Theme
nnoremap <M-+> :colo github_light_high_contrast<CR>
nnoremap <M--> :colo default<CR>
" Fuzzy finder
nnoremap <C-f> :Lines<CR>
function RestoreSession()
if @% == ""
source ~/.config/nvim/lastSession.vim
endif
endfunction
" Git-Blame configuration
let g:gitblame_message_template = ' => <author> • <date> • <summary>'
let g:gitblame_date_format = '%r'
if executable('vhdl-tool')
au User lsp_setup call lsp#register_server({
\ 'name': 'vhdl-tool',
\ 'cmd': {server_info->['vhdl-tool', 'lsp']},
\ 'whitelist': ['vhdl'],
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'vhdltool-config.yaml'))},
\ })
endif
autocmd FileType vhdl setlocal omnifunc=lsp#complete
nnoremap <silent> <C-0> <Cmd>BufferNext<CR>
" update function and call
function Update_Sys()
PackerSync
TSUpdate
MasonUpdate
endfunction
nnoremap <M-u> :call Update_Sys()<CR>
" Call build function
function! Build()
let l:filetype = &filetype
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
execute 'make'
elseif l:filetype == 'py' || l:filetype == 'python'
execute '!python3 %'
elseif l:filetype == 'tex'
execute '!lualatex % < /dev/null'
elseif l:filetype == 'rs'
execute 'cargo run'
elseif l:filetype == 'S'
execute 'make'
elseif l:filetype == 'verilog'
execute 'verilator --binary %'
elseif l:filetype == 'rust'
execute 'cargo run'
else
echo "Unsupported file type: " . l:filetype
endif
endfunction
nnoremap <C-b> :call Build()<CR>
nnoremap <M-w> :bdelete<CR>
nnoremap <C-y> :b#<CR>

View File

@@ -1,47 +0,0 @@
" NERDTree remap
nmap <C-e> :NERDTreeToggle<CR>
" Autoformat on save
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
nnoremap <silent> <C-0> <Cmd>BufferNext<CR>
" update function and call
function Update_Sys()
Lazy sync
TSUpdate
endfunction
nnoremap <M-u> :call Update_Sys()<CR>
" Call build function
function! Build()
let l:filetype = &filetype
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
execute '!make'
elseif l:filetype == 'py' || l:filetype == 'python'
execute '!python3 %'
elseif l:filetype == 'tex'
execute '!lualatex % < /dev/null'
elseif l:filetype == 'rs'
execute 'cargo run'
elseif l:filetype == 'S'
execute '!make'
elseif l:filetype == 'verilog'
execute '!verilator --binary %'
elseif l:filetype == 'rust'
execute '!cargo run'
elseif l:filetype == 'markdown'
execute '!okular %&'
else
echo "Unsupported file type: " . l:filetype
endif
endfunction
nnoremap <C-b> :call Build()<CR>
nnoremap <M-w> :bdelete<CR>
nnoremap <C-y> :BufstopFast<CR>

View File

@@ -1,43 +0,0 @@
set nocompatible
filetype on
filetype plugin on
syntax on
colorscheme vim-monokai-tasty
" open builtin terminal
function OpenTerm()
10 split
terminal
endfunction
nnoremap <C-t> :call OpenTerm()<CR>
set splitright
set splitbelow
set clipboard+=unnamedplus
" set spellcheck according to Filetype
autocmd VimEnter * set spell spelllang=en_us
function Litde()
set spell spelllang=de_de
endfunction
function Liten()
set spell spelllang=en_us
endfunction
nnoremap <M-e> :call Liten()<CR>
nnoremap <M-g> :call Litde()<CR>
" Theme
nnoremap <M-+> :colo tokyonight-day<CR>
nnoremap <M--> :colo tokyonight-night<CR>
" Try transparent nvim
highlight Normal guibg=none
highlight NonText guibg=none
highlight Normal ctermbg=none
highlight NonText ctermbg=none