Compare commits
2 Commits
3661bb6693
...
nvim4.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d47c184fd | |||
| f29beb74cf |
@@ -1,29 +0,0 @@
|
|||||||
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
|
|
||||||
3
.netrwhist
Normal file
3
.netrwhist
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
let g:netrw_dirhistmax =10
|
||||||
|
let g:netrw_dirhistcnt =1
|
||||||
|
let g:netrw_dirhist_1='/home/nick/.config/nvim'
|
||||||
@@ -38,8 +38,8 @@ for parameter in parameters:
|
|||||||
paramless = parameter.replace("\t", "")
|
paramless = parameter.replace("\t", "")
|
||||||
snip.rv += f"-- @variable {paramless}\n"
|
snip.rv += f"-- @variable {paramless}\n"
|
||||||
`-- @description $5
|
`-- @description $5
|
||||||
function ${1:Name}${2:a, b: Integer}`!p if (t[2] != "" and not t[2].startswith("(")):
|
function ${1:Name}($2`!p if (t[2] == ""):
|
||||||
t[2] = f"({t[2]})"` return ${3:Integer} is
|
t[2] = "a, b: Integer"`) return ${3:Integer} is
|
||||||
$4
|
$4
|
||||||
begin
|
begin
|
||||||
$7
|
$7
|
||||||
@@ -100,16 +100,7 @@ else:
|
|||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet type "declare a new type" bA
|
snippet type "declare a new type" bA
|
||||||
type ${1:TypeName} is ${2:array($3..$4) of }`!p
|
type ${1:TypeName} is ${2:array($3..$4)} of ${5:Integer};$0
|
||||||
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
|
endsnippet
|
||||||
|
|
||||||
snippet docstring "Document String with most important infor" b
|
snippet docstring "Document String with most important infor" b
|
||||||
@@ -118,13 +109,3 @@ snippet docstring "Document String with most important infor" b
|
|||||||
-- Author(s): ${1:Yannick Reiß}
|
-- Author(s): ${1:Yannick Reiß}
|
||||||
-- Content: ${2: Function `!p snip.rv = fn.split('.')[0]`}
|
-- Content: ${2: Function `!p snip.rv = fn.split('.')[0]`}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
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;
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -2,6 +2,16 @@ snippet cred "My private Credentials"
|
|||||||
Yannick Reiss <yannick.reiss@nickr.eu>
|
Yannick Reiss <yannick.reiss@nickr.eu>
|
||||||
endsnippet
|
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
|
snippet dd "Date and Time" i
|
||||||
`date`
|
`date`
|
||||||
endsnippet
|
endsnippet
|
||||||
@@ -9,7 +19,3 @@ endsnippet
|
|||||||
snippet credhsrm "Credentials HSRM"
|
snippet credhsrm "Credentials HSRM"
|
||||||
Yannick Reiß (yareissx/yreis001) <yannick.reiss@student.hs-rm.de>
|
Yannick Reiß (yareissx/yreis001) <yannick.reiss@student.hs-rm.de>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet gitfeed "New git feed entry."
|
|
||||||
${1:Datei}.html:${2:Message}$0
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ endsnippet
|
|||||||
|
|
||||||
snippet article "Add article reference" b
|
snippet article "Add article reference" b
|
||||||
@article{${1:ref_name},
|
@article{${1:ref_name},
|
||||||
title = {${2:Titel}},
|
title={${2:Titel}},
|
||||||
author = {${3:Autor}},
|
author={${3:Autor}},
|
||||||
journal = {${4:Journal}},`!p
|
journal={${4:Journal}},`!p
|
||||||
if t[5] != "":
|
if t[5] != "":
|
||||||
snip.rv = "\n\tvolume\t= {"
|
snip.rv = "\n\tvolume\t= {"
|
||||||
else:
|
else:
|
||||||
@@ -45,9 +45,8 @@ if t[7] != "":
|
|||||||
snip.rv = "},"
|
snip.rv = "},"
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
year = {${8:2023}},
|
year={${8:2023}},
|
||||||
doi = {${9:DOI_NUM}}
|
publisher={${9:Verlag}}
|
||||||
publisher = {${10:Verlag}}
|
|
||||||
}
|
}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|||||||
@@ -77,16 +77,15 @@ for param in params:
|
|||||||
snip.rv = rval`
|
snip.rv = rval`
|
||||||
*/
|
*/
|
||||||
${1:int} ${2:MyFunc} (${3:void}) {
|
${1:int} ${2:MyFunc} (${3:void}) {
|
||||||
/* Returns ${5:void} */
|
|
||||||
`!p
|
`!p
|
||||||
if t[1].replace('static ', '') != "void":
|
if t[1].replace('static ', '') != "void":
|
||||||
snip.rv = f"{t[1].replace('static ', '')} {t[5]} = 0;"
|
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
$6
|
$5
|
||||||
`!p
|
`!p
|
||||||
if t[1].replace('static ', '') != "void":
|
if t[1].replace('static ', '') != "void":
|
||||||
snip.rv = f"return {t[5]};"
|
snip.rv = f"return rv;"
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
}
|
}
|
||||||
@@ -111,7 +110,7 @@ if (!`!p snip.rv = match.group(1)`) {
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet "(\w+) = open" "Automatic open error implementation" r
|
snippet "(\w+) = open" "Automatic open error implementation" rA
|
||||||
/* create descriptor `!p snip.rv = match.group(1)` for file $1 */
|
/* create descriptor `!p snip.rv = match.group(1)` for file $1 */
|
||||||
`!p snip.rv = match.group(1)` = open(${1:"Filename"}, ${2:"MODE"});
|
`!p snip.rv = match.group(1)` = open(${1:"Filename"}, ${2:"MODE"});
|
||||||
if (-1 == `!p snip.rv = match.group(1)`) {
|
if (-1 == `!p snip.rv = match.group(1)`) {
|
||||||
@@ -358,13 +357,3 @@ if ( fflush(stdout) ) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet switch "Classic C switch statement" b
|
|
||||||
switch(${1:Expression}) {
|
|
||||||
case $3:
|
|
||||||
$4
|
|
||||||
break;$5
|
|
||||||
default:
|
|
||||||
$2
|
|
||||||
}$0
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
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
|
|
||||||
|
|||||||
@@ -49,13 +49,6 @@ $1
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet cjson "json code"
|
|
||||||
\`\`\`json
|
|
||||||
$1
|
|
||||||
\`\`\`
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ,m "Math equation" A
|
snippet ,m "Math equation" A
|
||||||
\$$1\$ $0
|
\$$1\$ $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|||||||
@@ -75,14 +75,3 @@ endsnippet
|
|||||||
snippet println "println" A
|
snippet println "println" A
|
||||||
println!("$1");$0
|
println!("$1");$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet docstring "Document head" b
|
|
||||||
/*
|
|
||||||
* Filename: `!p snip.rv = fn`
|
|
||||||
* Author: ${1:Yannick Reiss}
|
|
||||||
* Project: ${2:Project Name}
|
|
||||||
* Copyright: ${3:None} => You • 9 months ago • Move of Snippets into repository
|
|
||||||
* Description: ${4:Funny module}
|
|
||||||
*
|
|
||||||
*/$0
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ snippet img "Images"
|
|||||||
\\centering
|
\\centering
|
||||||
\\includegraphics[width=${2:0.8}\\linewidth]{${3}}
|
\\includegraphics[width=${2:0.8}\\linewidth]{${3}}
|
||||||
\\caption{${4:Abbildung}}
|
\\caption{${4:Abbildung}}
|
||||||
\\label{img:`!p snip.rv = t[4].lower().replace(" ", "_")`}
|
|
||||||
\\end{figure}
|
\\end{figure}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
@@ -485,12 +484,6 @@ else:
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet cc "Cite" i
|
snippet cc "Cite" A
|
||||||
\\cite{$1}$0
|
\\cite{$1}$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet setenv "Set Environment around Text" b
|
|
||||||
\\begin{$1}
|
|
||||||
${VISUAL}
|
|
||||||
\\end{$1}$0
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -56,4 +56,5 @@ if t[3] != "Geburtsdatum" and len(t[3]) == 8:
|
|||||||
if len(t[3]) > 4:
|
if len(t[3]) > 4:
|
||||||
t[3] = f"{t[3][:5]}.{t[3][5:]}"
|
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}
|
`|${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
|
endsnippet
|
||||||
|
|||||||
@@ -73,7 +73,3 @@ endsnippet
|
|||||||
snippet regflit "reg_idx from literal" iA
|
snippet regflit "reg_idx from literal" iA
|
||||||
std_logic_vector(to_unsigned('${1:Literal}', reg_adr_size));
|
std_logic_vector(to_unsigned('${1:Literal}', reg_adr_size));
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet fillvec "Stdout to fill a vector" A
|
|
||||||
(others => '0')
|
|
||||||
endsnippet
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
snippet tg "automated tag insertion" b
|
|
||||||
<${1:tag}>
|
|
||||||
$2
|
|
||||||
</${1/(\w+).*/$1/}>$0
|
|
||||||
endsnippet
|
|
||||||
24
init.lua
24
init.lua
@@ -1,24 +0,0 @@
|
|||||||
-- Basic setup configuration
|
|
||||||
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
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
|
|
||||||
require("plugconfig")
|
|
||||||
|
|
||||||
require("confformat")
|
|
||||||
4
init.vim
Normal file
4
init.vim
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
source ~/.config/nvim/vim/init.vim
|
||||||
|
source ~/.config/nvim/vim/plug.vim
|
||||||
|
|
||||||
|
lua require('plug')
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
{
|
|
||||||
"UltiSnips": { "branch": "master", "commit": "49dc8cb2086db19d385791c8e1635723b0fd95c7" },
|
|
||||||
"barbar.nvim": { "branch": "master", "commit": "3c48b5edf61dda21ad41c514e53448fee366a824" },
|
|
||||||
"bufstop": { "branch": "master", "commit": "274fc0e9fd6e8de860c427860c1e9970df142df5" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
|
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
|
||||||
"cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" },
|
|
||||||
"cmp-fuzzy-buffer": { "branch": "main", "commit": "ada6352bc7e3c32471ab6c08f954001870329de1" },
|
|
||||||
"cmp-git": { "branch": "main", "commit": "8d8993680d627c8f13bd85094eba84604107dbdd" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
|
||||||
"cmp-nvim-ultisnips": { "branch": "main", "commit": "24bca5c3e137b28cd87442d4fc51a2b312dd99cc" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" },
|
|
||||||
"cyberspace.vim": { "branch": "master", "commit": "8d002ef6a449f08025d75249078ecae75a136a2d" },
|
|
||||||
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
|
|
||||||
"fuzzy.nvim": { "branch": "master", "commit": "67a42ad2fa6d5ff41f0ef3cf69bb247410da5d7a" },
|
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
|
|
||||||
"lexima.vim": { "branch": "master", "commit": "5513d686801993b40c55baa65602f79cd3cf3c77" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "82c7cb08ddb836ad938b2708e50085f12a8825d2" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
|
|
||||||
"nerdtree": { "branch": "master", "commit": "f3a4d8eaa8ac10305e3d53851c976756ea9dc8e8" },
|
|
||||||
"nerdtree-git-plugin": { "branch": "master", "commit": "e1fe727127a813095854a5b063c15e955a77eafb" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
|
||||||
"nvim-cmp-lua-latex-symbols": { "branch": "master", "commit": "89345d6e333c700d13748e8a7ee6fe57279b7f88" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "c1695e500c7d552a0a19953a9aefcc89178fb1af" },
|
|
||||||
"nvim-doxyscan": { "branch": "master", "commit": "2c266fdb9395d6afa5d7188f8212fd7757193990" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "8c1831817d40925d22cd8a555296c44c02fdaaf5" },
|
|
||||||
"nvim-sourcer": { "branch": "main", "commit": "a2f6bc737a63a208d39fcc5c211076ea5aa9f390" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "2014f8285e306f4c8a896c7d3af53fdd599e5a4f" },
|
|
||||||
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
|
||||||
"telescope-ultisnips.nvim": { "branch": "main", "commit": "d1cca4b5aa809a90b7a8caddeb860329d5a8c2ff" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "c025baf23b62f044eff1f4ef561c45de636f0e32" },
|
|
||||||
"vim-airline": { "branch": "master", "commit": "d9f42cb46710e31962a9609939ddfeb0685dd779" },
|
|
||||||
"vim-airline-themes": { "branch": "master", "commit": "a9aa25ce323b2dd04a52706f4d1b044f4feb7617" },
|
|
||||||
"vim-devicons": { "branch": "master", "commit": "71f239af28b7214eebb60d4ea5bd040291fb7e33" },
|
|
||||||
"vim-monokai-tasty": { "branch": "master", "commit": "57c67feac63158a232c43aee2f463a994029b699" },
|
|
||||||
"vim-speeddating": { "branch": "master", "commit": "5a36fd29df63ea3f65562bd2bb837be48a5ec90b" },
|
|
||||||
"vim-startify": { "branch": "master", "commit": "4e089dffdad46f3f5593f34362d530e8fe823dcf" },
|
|
||||||
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },
|
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
|
||||||
"vim-visual-multi": { "branch": "master", "commit": "fe1ec7e430013b83c8c2dee85ae496251b71e253" }
|
|
||||||
}
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
-- menuone: show also for just one code suggestion
|
|
||||||
-- noinsert: only insert text when selection confirmed
|
|
||||||
-- noselect: force to select from suggestion
|
|
||||||
-- preview: show more details
|
|
||||||
vim.opt.completeopt = { "menu", "menuone" }
|
|
||||||
|
|
||||||
-- shortmess is used to reduce verbocity
|
|
||||||
-- vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
|
||||||
local cmp = require("cmp")
|
|
||||||
cmp.setup({
|
|
||||||
-- configuration
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
vim.fn["UltiSnips#Anon"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add borders to the windows
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- experimental settings
|
|
||||||
experimental = {
|
|
||||||
ghost_text = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- mapping
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
-- Shift+TAB to go to the Previous Suggested item
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
|
||||||
-- Tab to go to the next suggestion
|
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
|
||||||
-- CTRL+SHIFT+f to scroll backwards in description
|
|
||||||
["<C-S-f>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
-- CTRL+F to scroll forwards in the description
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
-- CTRL+SPACE to bring up completion at current Cursor location
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
-- CTRL+e to exit suggestion and close it
|
|
||||||
["<C-d>"] = cmp.mapping.close(), -- TODO: Search better option
|
|
||||||
-- CR (enter or return) to CONFIRM the currently selection suggestion
|
|
||||||
-- We set the ConfirmBehavior to insert the Selected suggestion
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
|
|
||||||
-- installed sources for code suggestion
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "ultisnips", keyword_length = 1 },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "nvim_lsp", keyword_length = 2 },
|
|
||||||
{ name = "nvim_lsp_signature_help" },
|
|
||||||
-- { name = "nvim_lua", keyword_length = 2 },
|
|
||||||
{ name = "buffer", keyword_length = 2 },
|
|
||||||
{ name = "calc" },
|
|
||||||
{ name = "lua-latex-symbols", option = { cache = true } },
|
|
||||||
{ name = "cmp_tabnine", keyword_length = 3 },
|
|
||||||
}),
|
|
||||||
|
|
||||||
-- add formatting of the different sources
|
|
||||||
formatting = {
|
|
||||||
fields = { "menu", "abbr", "kind" },
|
|
||||||
format = function(entry, item)
|
|
||||||
local menu_icon = {
|
|
||||||
nvim_lsp = "λ",
|
|
||||||
ultisnips = "⋗",
|
|
||||||
path = "🌐",
|
|
||||||
calc = "Σ",
|
|
||||||
buffer = "📚",
|
|
||||||
lualatexsymbols = "𝕋",
|
|
||||||
spell = "📚",
|
|
||||||
fuzzy_buffer = "📄",
|
|
||||||
cmp_tabnine = "🖳",
|
|
||||||
}
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
|
||||||
return item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 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" },
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = { "menu", "abbr", "kind" },
|
|
||||||
format = function(entry, item)
|
|
||||||
local menu_icon = {
|
|
||||||
buffer = "📚",
|
|
||||||
}
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
|
||||||
return item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "cmdline_history", keyword_length = 8 },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
-- Utilities for creating configurations
|
|
||||||
local util = require("formatter.util")
|
|
||||||
|
|
||||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
|
||||||
require("formatter").setup({
|
|
||||||
-- Enable or disable logging
|
|
||||||
logging = true,
|
|
||||||
-- Set the log level
|
|
||||||
log_level = vim.log.levels.WARN,
|
|
||||||
-- All formatter configurations are opt-in
|
|
||||||
filetype = {
|
|
||||||
-- 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,
|
|
||||||
},
|
|
||||||
|
|
||||||
c = {
|
|
||||||
require("formatter.filetypes.c").astyle,
|
|
||||||
},
|
|
||||||
|
|
||||||
cpp = {
|
|
||||||
require("formatter.filetypes.cpp").astyle,
|
|
||||||
},
|
|
||||||
|
|
||||||
html = {
|
|
||||||
require("formatter.filetypes.html").htmlbeautifier,
|
|
||||||
},
|
|
||||||
|
|
||||||
latex = {
|
|
||||||
require("formatter.filetypes.latex").latexindent,
|
|
||||||
},
|
|
||||||
|
|
||||||
markdown = {
|
|
||||||
require("formatter.filetypes.markdown").prettier,
|
|
||||||
},
|
|
||||||
|
|
||||||
tex = {
|
|
||||||
require("formatter.filetypes.latex").latexindent,
|
|
||||||
},
|
|
||||||
|
|
||||||
rust = {
|
|
||||||
require("formatter.filetypes.rust").rustfmt,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Use the special "*" filetype for defining formatter configurations on
|
|
||||||
-- any filetype
|
|
||||||
["*"] = {
|
|
||||||
-- "formatter.filetypes.any" defines default configurations for any
|
|
||||||
-- filetype
|
|
||||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
6
lua/plug.lua
Normal file
6
lua/plug.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
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, {})
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
-- Update function and call
|
|
||||||
function Update_Sys()
|
|
||||||
vim.cmd("Lazy sync")
|
|
||||||
vim.cmd("TSUpdate")
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-u>", ":lua Update_Sys()<CR>")
|
|
||||||
|
|
||||||
-- Bufstop
|
|
||||||
vim.keymap.set("n", "<M-w>", ":bdelete<CR>")
|
|
||||||
vim.keymap.set("n", "<C-y>", ":BufstopFast<CR>")
|
|
||||||
|
|
||||||
-- 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" }
|
|
||||||
|
|
||||||
-- NERDTree Config
|
|
||||||
vim.g.NERDTreeShowHidden = 1
|
|
||||||
vim.keymap.set("n", "<C-e>", ":NERDTreeToggle<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"
|
|
||||||
|
|
||||||
-- 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,
|
|
||||||
})
|
|
||||||
|
|
||||||
require("lspconfig").verible.setup({
|
|
||||||
cmd = { "verible-verilog-ls", "--rules_config_search" },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Floating terminal
|
|
||||||
vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>")
|
|
||||||
|
|
||||||
-- Set default colorscheme
|
|
||||||
vim.cmd("colo vim-monokai-tasty")
|
|
||||||
|
|
||||||
-- Formatter configuration
|
|
||||||
vim.cmd([[
|
|
||||||
augroup FormatAutogroup
|
|
||||||
autocmd!
|
|
||||||
autocmd BufWritePost * FormatWrite
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false })
|
|
||||||
]])
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
return {
|
|
||||||
"preservim/nerdtree",
|
|
||||||
"Xuyuanp/nerdtree-git-plugin",
|
|
||||||
"SirVer/UltiSnips",
|
|
||||||
"tpope/vim-surround",
|
|
||||||
"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" },
|
|
||||||
"dstein64/vim-startuptime",
|
|
||||||
"mhinz/vim-startify",
|
|
||||||
"folke/tokyonight.nvim",
|
|
||||||
"patstockwell/vim-monokai-tasty",
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-nvim-lua",
|
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-calc",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"dmitmel/cmp-cmdline-history",
|
|
||||||
"amarakon/nvim-cmp-lua-latex-symbols",
|
|
||||||
"f3fora/cmp-spell",
|
|
||||||
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" },
|
|
||||||
"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",
|
|
||||||
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
|
|
||||||
"jaredgorski/spacecamp",
|
|
||||||
"voldikss/vim-floaterm",
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
-- in tools.lua
|
|
||||||
local api = vim.api
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return M;
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
-- 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.splitright = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
vim.g.mapleader = ","
|
|
||||||
vim.cmd("set clipboard+=unnamedplus")
|
|
||||||
vim.cmd("autocmd! CursorHold,CursorHoldI *.md write")
|
|
||||||
|
|
||||||
-- 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.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-moon<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>")
|
|
||||||
|
|
||||||
@@ -351,30 +351,3 @@ Instagram
|
|||||||
Tablet
|
Tablet
|
||||||
Abschwington
|
Abschwington
|
||||||
BerndDasBot
|
BerndDasBot
|
||||||
Frameworks
|
|
||||||
Tuples
|
|
||||||
structs
|
|
||||||
make
|
|
||||||
IoT
|
|
||||||
json
|
|
||||||
Request
|
|
||||||
Dictionary
|
|
||||||
Everything
|
|
||||||
Disclaimer
|
|
||||||
linuxspezifischen
|
|
||||||
linuxspezifischen
|
|
||||||
cron
|
|
||||||
false
|
|
||||||
true
|
|
||||||
boolsche
|
|
||||||
bash
|
|
||||||
zsh
|
|
||||||
sockets
|
|
||||||
requests
|
|
||||||
otwendige
|
|
||||||
ptionale
|
|
||||||
utomatischer
|
|
||||||
anueller
|
|
||||||
nickr
|
|
||||||
eu
|
|
||||||
email
|
|
||||||
|
|||||||
Binary file not shown.
@@ -171,5 +171,3 @@ gcc
|
|||||||
linux
|
linux
|
||||||
chibicc
|
chibicc
|
||||||
chibi
|
chibi
|
||||||
readonly
|
|
||||||
extern
|
|
||||||
|
|||||||
Binary file not shown.
37
vim/init.vim
Normal file
37
vim/init.vim
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
set nocompatible
|
||||||
|
filetype on
|
||||||
|
filetype plugin on
|
||||||
|
syntax on
|
||||||
|
set number
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set showmatch
|
||||||
|
set hlsearch
|
||||||
|
set cursorline
|
||||||
|
colorscheme desert
|
||||||
|
set splitright
|
||||||
|
set splitbelow
|
||||||
|
set completeopt=menuone,preview
|
||||||
|
set clipboard+=unnamedplus
|
||||||
|
set expandtab
|
||||||
|
set conceallevel=2
|
||||||
|
set termguicolors
|
||||||
|
let g:mapleader=","
|
||||||
|
let g:tex_flavor="latex"
|
||||||
|
|
||||||
|
function OpenTerm()
|
||||||
|
10 split
|
||||||
|
terminal
|
||||||
|
endfunction
|
||||||
|
nnoremap <C-t> :call OpenTerm()<CR>
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
34
vim/plug.vim
Normal file
34
vim/plug.vim
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
call plug#begin('~/.vim/plugged')
|
||||||
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
Plug 'preservim/nerdtree'
|
||||||
|
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
|
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.5' }
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'tpope/vim-speeddating'
|
||||||
|
Plug 'mhinz/vim-startify'
|
||||||
|
Plug 'dstein64/vim-startuptime'
|
||||||
|
Plug 'hiroakis/cyberspace.vim'
|
||||||
|
Plug 'mhinz/vim-startify'
|
||||||
|
Plug 'dstein64/vim-startuptime'
|
||||||
|
Plug 'SirVer/ultisnips'
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
function Update_sys()
|
||||||
|
PlugUpdate
|
||||||
|
endfunction
|
||||||
|
nmap <C-u> :call Update_sys()<CR>
|
||||||
|
|
||||||
|
" NERDTree config
|
||||||
|
let g:NERDTreeShowHidden = 1
|
||||||
|
let g:NERDTreeDirArrowExpandable = "▸"
|
||||||
|
let g:NERDTreeDirArrowCollapsible = "▾"
|
||||||
|
nmap <C-e> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
" UltiSnips config
|
||||||
|
let g:UltiSnipsExpandTrigger = "<tab>"
|
||||||
|
let g:UltiSnipsJumpForwardTrigger = "<c-l>"
|
||||||
|
let g:UltiSnipsJumpBackwardTrigger = "<c-h>"
|
||||||
|
let g:UltiSnipsEditSplit = "vertical"
|
||||||
|
let g:UltiSnipsSnippetDirectories = [ "~/.config/nvim/UltiSnips" ]
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
" 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
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
nnoremap <leader>o :call SpacedLine()<CR>
|
|
||||||
nnoremap <leader>ls :call SwapWords()<CR>
|
|
||||||
Reference in New Issue
Block a user