diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-04-16 20:43:35 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-04-16 20:43:35 +0200 |
commit | 10b5d39766588dbe9a9fef6e4f09f31d287c7b9f (patch) | |
tree | 0dc0f848d4fa1d4965ee41c53cbacb36587709c6 | |
parent | 80d646215a52b8a89447129d9e0f46005572a9cf (diff) |
Updates
-rw-r--r-- | .config/.alacritty.yml | 49 | ||||
-rw-r--r-- | .config/nvim/after/ftdetect/antlr4.vim | 1 | ||||
-rw-r--r-- | .config/nvim/after/ftdetect/jolie.vim | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/nvim/after/ftdetect/prr.vim | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/nvim/after/ftplugin/dockerfile.vim | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/nvim/after/ftplugin/json.vim | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/nvim/after/ftplugin/markdown.vim | 0 | ||||
-rw-r--r-- | .config/nvim/after/syntax/antlr4.vim | 93 | ||||
-rw-r--r-- | .config/nvim/after/syntax/jolie.vim | 59 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/nvim/after/syntax/prr.vim | 0 | ||||
-rw-r--r-- | .config/nvim/init.vim | 27 | ||||
-rw-r--r-- | .config/nvim/lua/lsp_conf.lua | 14 | ||||
-rw-r--r-- | git/.gitconfig | 34 |
13 files changed, 231 insertions, 47 deletions
diff --git a/.config/.alacritty.yml b/.config/.alacritty.yml index 2603373..06d0eff 100644 --- a/.config/.alacritty.yml +++ b/.config/.alacritty.yml @@ -3,40 +3,43 @@ shell: args: - new + font: - size: 7 + size: 11.5 normal: + # family: FiraMono + # style: Normal # family: DejaVuSansMono # family: UbuntuMono # style: Nerd - family: FiraMono - style: Normal + family: GitLabMono + style: Regular colors: primary: - background: "0x000000" - foreground: "0xc1c1c1" + background: "#000000" + foreground: "#c1c1c1" cursor: - text: "0x424242" - cursor: "0x808080" + text: "#424242" + cursor: "#808080" normal: - black: "0x080808" - red: "0xaf005f" - green: "0x5faf00" - yellow: "0xf1c40f" - blue: "0x5fafd7" - magenta: "0x808080" - cyan: "0x2ecc71" - white: "0xf2f2f2" + black: "#000000" + red: "#af005f" + green: "#5faf00" + yellow: "#f1c40f" + blue: "#5fafd7" + magenta: "#808080" + cyan: "#2ecc71" + white: "#f2f2f2" bright: - black: "0x6a6a6a" - red: "0xe74c3c" - green: "0xafd700" - yellow: "0xf1c40f" - blue: "0xffaf00" - magenta: "0xffaf00" - cyan: "0x00afaf" - white: "0x5f8787" + black: "#6a6a6a" + red: "#e74c3c" + green: "#afd700" + yellow: "#f1c40f" + blue: "#ffaf00" + magenta: "#ffaf00" + cyan: "#00afaf" + white: "#5f8787" diff --git a/.config/nvim/after/ftdetect/antlr4.vim b/.config/nvim/after/ftdetect/antlr4.vim new file mode 100644 index 0000000..d4d39a1 --- /dev/null +++ b/.config/nvim/after/ftdetect/antlr4.vim @@ -0,0 +1 @@ +autocmd BufEnter,BufNewFile *.g4 setf antlr4 diff --git a/.config/nvim/after/ftdetect/jolie.vim b/.config/nvim/after/ftdetect/jolie.vim new file mode 100644 index 0000000..efa43f7 --- /dev/null +++ b/.config/nvim/after/ftdetect/jolie.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.ol,*.iol set filetype=jolie diff --git a/.config/nvim/after/ftdetect/prr.vim b/.config/nvim/after/ftdetect/prr.vim index 15a474c..15a474c 100644..100755 --- a/.config/nvim/after/ftdetect/prr.vim +++ b/.config/nvim/after/ftdetect/prr.vim diff --git a/.config/nvim/after/ftplugin/dockerfile.vim b/.config/nvim/after/ftplugin/dockerfile.vim index b388056..b388056 100644..100755 --- a/.config/nvim/after/ftplugin/dockerfile.vim +++ b/.config/nvim/after/ftplugin/dockerfile.vim diff --git a/.config/nvim/after/ftplugin/json.vim b/.config/nvim/after/ftplugin/json.vim index b388056..b388056 100644..100755 --- a/.config/nvim/after/ftplugin/json.vim +++ b/.config/nvim/after/ftplugin/json.vim diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim index b388056..b388056 100644..100755 --- a/.config/nvim/after/ftplugin/markdown.vim +++ b/.config/nvim/after/ftplugin/markdown.vim diff --git a/.config/nvim/after/syntax/antlr4.vim b/.config/nvim/after/syntax/antlr4.vim new file mode 100644 index 0000000..8f6c412 --- /dev/null +++ b/.config/nvim/after/syntax/antlr4.vim @@ -0,0 +1,93 @@ +if exists('b:current_syntax') + finish +endif + +command -nargs=* HiLink highlight link <args> + +syntax match antlr4EventId +[a-zA-Z_][a-zA-Z0-9_]*+ contained +syntax match antlr4ParName +\<[a-z][a-zA-Z0-9_]*\>+ containedin=antlr4RHS +syntax match antlr4LexName +\<[A-Z][a-zA-Z0-9_]*\>+ containedin=antlr4RHS +syntax match antlr4Assign /[a-zA-Z]\++\?=/ containedin=antlr4RHS + +if exists('g:antlr4_highlight_punctuation') + syntax match antlr4Punctuation +[\-():;]+ +endif + +syntax include @included syntax/java.vim + +syntax region antlr4RHS start=+:+ end=+;+ extend + +syntax region antlr4Embed start=+{+ end=+}?\?+ contains=@included,antlr4Variable keepend + \ containedin=antlr4RHS +syntax region antlr4Embed start=+\[+ end=+\]+ contains=@included,antlr4Variable keepend + + +syntax match antlr4Repeat +[+*]+ containedin=antlr4RHS +syntax match antlr4Condition +?+ containedin=antlr4RHS +syntax match antlr4Option "|" containedin=antlr4RHS + +" Use specifically containedin=javaParenT so it will be highlighted inside +" parens +syntax match antlr4Variable contained +\$[a-zA-Z_][a-zA-Z0-9_]*+ containedin=javaParenT + +syntax match antlr4Keyword /@\(\(parser\|lexer\)::\)\?\(header\|members\)/ +syntax match antlr4Keyword /@after/ + +syntax match antlr4Escape +\\[nrvt]+ +syntax match antlr4Escape +\\u[0-9a-fA-F]\{4}+ +syntax match antlr4Escape +\\u{[0-9a-fA-F]\{4}}+ +syntax match antlr4Escape +\\p{.\{-}}+ + +syntax match antlr4SetEscape +\\-+ containedin=antlr4RHS + +syntax keyword antlr4Keyword grammar +syntax keyword antlr4Keyword lexer parser options +syntax keyword antlr4Keyword fragment tokens +syntax keyword antlr4Keyword returns locals throws catch finally mode options + +syntax keyword antlr4Import import + +syntax keyword antlr4Operation skip more popMode mode pushMode type channel + \ containedin=antlr4RHS + +syntax region antlr4Set start=+\[+ end=+\]+ contained + \ contains=antlr4Escape,antlr4SetEscape containedin=antlr4RHS +syntax region antlr4Attr start="<" end=">" + \ containedin=antlr4RHS +syntax region antlr4String start=+'+ end=+'+ containedin=antlr4RHS contains=antlr4Escape + +syntax region antlr4Comment start=+/\*+ end=+\*/+ + \ containedin=antlr4RHS +syntax region antlr4Comment start=+//+ end=+$+ + \ containedin=antlr4RHS + +syntax region antlr4Event start=+#+ end=+$+ + \ containedin=antlr4RHS contains=antlr4EventId + +HiLink antlr4Comment Comment +HiLink antlr4Keyword KeyWord +HiLink antlr4ParName Type +HiLink antlr4LexName Macro +HiLink antlr4Attr Special +HiLink antlr4Assign Statement +HiLink antlr4Set Character +HiLink antlr4String String + +if exists('g:antlr4_highlight_punctuation') + HiLink antlr4Punctuation Operator +endif + +HiLink antlr4Repeat Repeat +HiLink antlr4Condition Conditional +HiLink antlr4Option Delimiter +HiLink antlr4Import PreProc +HiLink antlr4Escape Special +HiLink antlr4SetEscape antlr4Escape +HiLink antlr4Operation Function +HiLink antlr4EventId Function +HiLink antlr4Annotation KeyWord +HiLink antlr4Variable Special + +delcommand HiLink + +let b:current_syntax = 'antlr4' diff --git a/.config/nvim/after/syntax/jolie.vim b/.config/nvim/after/syntax/jolie.vim new file mode 100644 index 0000000..c7b3a21 --- /dev/null +++ b/.config/nvim/after/syntax/jolie.vim @@ -0,0 +1,59 @@ +if exists("b:current_syntax") + finish +endif + +syn keyword jolieBoolean true false +syn keyword jolieDefinitionTypes inputPort outputPort interface type define service +syn keyword jolieKeyword location Location protocol Protocol interfaces Interfaces aggregates Aggregates redirects Redirects class Jolie JavaScript Java OneWay oneWay RequestResponse requestResponse execution +syn keyword jolieOtherKeyword constants cH instanceof execution comp concurrent nullProcess single sequential main foreign java init cset is_defined embed embedded extender courier forward install undef include synchronized throws throw from import as +syn keyword jolieConditional if else +syn keyword jolieRepeat while for foreach until in +syn keyword jolieException throw +syn keyword jolieStatement forward scope provide +syn keyword jolieType void bool int string long double any raw +syn keyword jolieKeywordModifiers csets global +syn match jolieOperators "(<<|&&|\|\||+|-|/|*|=|==|++|-|+=|-=|*=|/=|!|%=|%)" + +syn match jolieSpecialChar contained "\\." + +syn region jolieString start=+"+ end=+"+ contains=jolieSpecialChar + +syn match jolieNumber "\<\d\+\>" + +syn match jolieMethodInvocation "\<\(\w\+\)@\(\w\+\)\>" contains=jolieMethodName,jolieClassName + +syn match jolieMethodName "\w\+@"me=e-1 contained +syn match jolieClassName "@\w\+\>"ms=s+1 contained + +syn match jolieMethodName2 "\(\w\+\)(" + +syn keyword jolieTodo contained TODO FIXME +syn region jolieComment start="/\*" end="\*/" contains=jolieTodo +syn match jolieLineComment "//.*" + +let b:current_syntax = "jolie" + +hi def link jolieBoolean Boolean +hi def link jolieComment Comment +hi def link jolieLineComment Comment +hi def link jolieDefinitionTypes Keyword +hi def link jolieKeyword Keyword +hi def link jolieOtherKeyword Keyword + +hi def link jolieOperators Operator + +hi def link jolieConditional Conditional +hi def link jolieRepeat Repeat +hi def link jolieException Exception +hi def link jolieStatement Statement +hi def link jolieType Type + +hi def link jolieKeywordModifiers StorageClass + +hi def link jolieString String + +hi def link jolieNumber Number + +hi def link jolieMethodName Function +hi def link jolieClassName Type +hi def link jolieMethodName2 Function diff --git a/.config/nvim/after/syntax/prr.vim b/.config/nvim/after/syntax/prr.vim index 43a0557..43a0557 100644..100755 --- a/.config/nvim/after/syntax/prr.vim +++ b/.config/nvim/after/syntax/prr.vim diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 74227f5..7c4845b 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -22,7 +22,7 @@ Plug 'togglebyte/togglerust' " Debug Rust projects Plug 'chriskempson/base16-vim' -Plug 'editorconfig/editorconfig-vim' +" Plug 'editorconfig/editorconfig-vim' if has('nvim') Plug 'nvim-telescope/telescope.nvim' @@ -44,9 +44,6 @@ if has('nvim') Plug 'folke/lsp-colors.nvim' Plug 'sindrets/diffview.nvim' - - " Used as light theme - Plug 'yorik1984/newpaper.nvim' endif @@ -59,6 +56,11 @@ set runtimepath+=~/.vim-plugins/LanguageClient-neovim set completeopt=menu,menuone,noselect set clipboard=unnamed + +" copy with `y` to clipboard +ca ce set clipboard+=unnamedplus +ca cd set clipboard-=unnamedplus + set mouse=a " click with mouse set wildmenu set wildmode=full @@ -104,13 +106,19 @@ set background=dark if has('nvim') let base16colorspace=256 - colorscheme base16-irblack + "colorscheme base16-irblack + colorscheme base16-gruvbox-dark-hard + highlight Normal guibg=NONE highlight LineNr guibg=NONE highlight CursorLine guibg=NONE highlight CursorLineNr guibg=NONE guifg=YELLOW - highlight StatusLine guibg=#111111 guifg=YELLOW + highlight StatusLine guibg=NONE guifg=YELLOW highlight StatusLineNC guibg=NONE guifg=#dddddd + highlight SignColumn guibg=NONE + highlight GitGutterChange guibg=NONE + highlight GitGutterAdd guibg=NONE + highlight GitGutterDelete guibg=NONE lua require('git') let g:coq_settings = { 'auto_start': v:true } @@ -131,6 +139,12 @@ if has('nvim') ca dc DiffviewClose ca dh DiffviewFileHistory + " Launch gopls when Go files are in use + let g:LanguageClient_serverCommands = { + \ 'go': ['gopls'] + \ } + " Run gofmt on save + set cursorline " need for Neovim 0.6 for highlight CursorLineNr else colorscheme gruvbox @@ -171,6 +185,7 @@ nnoremap k gk nnoremap tn :tabnew<cr> nnoremap <leader>xx :TroubleToggle<cr> +nnoremap <leader>xf :TodoQuickFix<cr> " buffers nnoremap ]b :bnext<CR> diff --git a/.config/nvim/lua/lsp_conf.lua b/.config/nvim/lua/lsp_conf.lua index 591f51e..9ec2c35 100644 --- a/.config/nvim/lua/lsp_conf.lua +++ b/.config/nvim/lua/lsp_conf.lua @@ -57,17 +57,17 @@ local common_on_attach = function(client, bufnr) end -local servers = { 'pyright', 'rust_analyzer', 'tsserver', 'clangd' } +local servers = { 'pyright', 'rust_analyzer', 'tsserver', 'clangd', 'gopls', 'ocamllsp' } -- local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.offsetEncoding = { "utf-16" } for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - capabilities = capabilities, - on_attach = common_on_attach, - flags = { - debounce_text_changes = 150, + nvim_lsp[lsp].setup { + capabilities = capabilities, + on_attach = common_on_attach, + flags = { + debounce_text_changes = 150, + } } - } end trouble.setup({ diff --git a/git/.gitconfig b/git/.gitconfig index 0e9b0bb..662b90a 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -3,17 +3,22 @@ email = santo@dcariotti.me signingkey = C9B7C8FD3701C2C6 [alias] - ci = commit + amend = commit --amend --verbose + ci = commit --verbose co = checkout - logs = log --graph --branches --remotes --tags --pretty=format':%C(yellow)%h%C(green)%d%Creset %s %C(yellow)|%Creset %C(cyan)%an <%ae> %C(yellow)| %C(white)%aD %C(red)(%ar)%Creset' - st = status + cp = cherry-pick + di = diff + dis = diff --staged fd = "!f() { git log --grep=$1; }; f" - amend = commit --amend + logs = log --graph --branches --remotes --tags --pretty=format':%C(yellow)%h%C(green)%d%Creset %C(cyan)%an <%ae> %Creset%C(white)%aD %C(red)(%ar)\n%s%Creset\n' + st = status [credential] helper = store [core] - editor = nvim - pager = delta + editor = nvim --clean + ; pager = bat -l diff + ; pager = delta + excludesFile = ~/.gitignore [init] defaultBranch = main [grep] @@ -23,13 +28,20 @@ match = red bold filename = cyan [merge] - tool = vimdiff + tool = nvimdiff conflictstyle = diff3 [mergetool] prompt = false -[interactive] - diffFilter = delta --color-only -[delta] - features = side-by-side line-numbers decorations +; [interactive] +; diffFilter = delta --color-only +; [delta] +; features = line-numbers decorations [pull] rebase = false +[diff] + ; external = difft + algorithm = histogram +[safe] + directory = /home/santo/Documents/Notes +[url "ssh://git@github.com"] + insteadOf = https://github.com |