mirror of
https://gitlab.com/baco/dotconf.git
synced 2024-06-18 13:57:04 +00:00
Compare commits
148 Commits
the-great-
...
master
Author | SHA1 | Date | |
---|---|---|---|
e1a17b02aa | |||
43a256a488 | |||
a914ead1d8 | |||
73a5104004 | |||
34d3aa67be | |||
c7da3fb632 | |||
f031db10b9 | |||
93e11c29d3 | |||
3864103606 | |||
a45589b8b7 | |||
46c0ed311a | |||
8f7134b3bb | |||
a7a7066fe0 | |||
b45ed9b96b | |||
71bd1fc4f0 | |||
fd78a1fc25 | |||
465dfb7080 | |||
4d95556967 | |||
4da012f342 | |||
e3979594cb | |||
ac555813a9 | |||
6dcaeacfd3 | |||
10255c0b55 | |||
22a64f89f9 | |||
e839064e12 | |||
3b4ddd41ba | |||
e93b853fa9 | |||
b15b9178c6 | |||
8d626d2188 | |||
8418e53327 | |||
fe8b7b0238 | |||
bd435b7730 | |||
5d6c98a528 | |||
695f0977d6 | |||
a22d0b22d1 | |||
d89fbb2f40 | |||
41115cdd19 | |||
1493b3ceb5 | |||
85838e4521 | |||
773acf8ec4 | |||
11a1962f09 | |||
4dfdba8ac7 | |||
a1dbef0b64 | |||
e139152080 | |||
b887f0b9ae | |||
7dfa03eb73 | |||
52cd15c96d | |||
f248c257bd | |||
6b5452f9d1 | |||
aeaf9bc692 | |||
54938dd02c | |||
af5a35e874 | |||
6d2951b2b1 | |||
00a57f889c | |||
b3ff8ceca0 | |||
e5a65b3ea9 | |||
13920d3841 | |||
4ef1f32186 | |||
7f3a8deede | |||
584deb9575 | |||
a272a609a3 | |||
881a3b70ce | |||
7a260bf0da | |||
cd10517361 | |||
848d6377f1 | |||
07b3b2a6df | |||
1ca997c674 | |||
9a003190ed | |||
ea03e3300a | |||
1d2aa742e8 | |||
bd061bf7b3 | |||
97e4052934 | |||
5971e6e019 | |||
ae1d9a6043 | |||
72fc1f4244 | |||
fb843d5dbc | |||
82d55e6231 | |||
9b659ae6dd | |||
8c40b02eda | |||
fa9077a603 | |||
1880c45bc8 | |||
b204811426 | |||
cc9b4d7582 | |||
7ac935e2ca | |||
56ca26d493 | |||
0d08a423d3 | |||
741ad52052 | |||
4e30f2806f | |||
2f9692c1e3 | |||
4025066a19 | |||
43bf852b71 | |||
ede333abc5 | |||
0db220678a | |||
83c1c4f10d | |||
eb2204a567 | |||
8550e82f06 | |||
5e8067677c | |||
7b1944e11a | |||
7cbc5f95e5 | |||
981abbc56b | |||
29e38da242 | |||
03294e28cc | |||
927cfa6a95 | |||
c774ccf89f | |||
b0cfeb9888 | |||
76d872d09a | |||
20259cbb4e | |||
49878a0ff4 | |||
0ec2c14a82 | |||
50a61778e7 | |||
fff98b3bf5 | |||
724587d5e5 | |||
6955551138 | |||
b183c9027c | |||
2a8118e694 | |||
66c4be90c7 | |||
19df5c58a7 | |||
035e74b485 | |||
6288f4c3c4 | |||
7c711a5f33 | |||
8fbfbd37cf | |||
293a907b2a | |||
5fa39e888f | |||
3f37701e0e | |||
a62af9725c | |||
0a378dbc3d | |||
97954c8aca | |||
3bcf9552f2 | |||
78f6b9b423 | |||
ceab39a86c | |||
61993b21c9 | |||
b2a699cc02 | |||
37da48aaf5 | |||
b87d50b6a9 | |||
3f0f6f9f85 | |||
d201a98346 | |||
a41548bc0b | |||
3016873438 | |||
d38abb38a7 | |||
10762c34c8 | |||
d256e4ccc6 | |||
fd9a401c09 | |||
b527a82099 | |||
96731b1e3d | |||
052565cba4 | |||
538afba5d4 | |||
d89024cbd6 | |||
53c0b334d5 |
22
.gitmodules
vendored
22
.gitmodules
vendored
|
@ -23,14 +23,9 @@
|
||||||
url = https://github.com/tomasiser/vim-code-dark.git
|
url = https://github.com/tomasiser/vim-code-dark.git
|
||||||
shallow = true
|
shallow = true
|
||||||
ignore = all
|
ignore = all
|
||||||
[submodule "vim/pack/misc/start/indentLine"]
|
|
||||||
path = vim/pack/misc/start/indentLine
|
|
||||||
url = https://github.com/Yggdroot/indentLine.git
|
|
||||||
shallow = true
|
|
||||||
ignore = all
|
|
||||||
[submodule "vim/pack/misc/start/auto-pairs"]
|
[submodule "vim/pack/misc/start/auto-pairs"]
|
||||||
path = vim/pack/misc/start/auto-pairs
|
path = vim/pack/misc/start/auto-pairs
|
||||||
url = https://github.com/jiangmiao/auto-pairs.git
|
url = https://github.com/LunarWatcher/auto-pairs.git
|
||||||
shallow = true
|
shallow = true
|
||||||
ignore = all
|
ignore = all
|
||||||
[submodule "vim/pack/misc/start/coc.nvim"]
|
[submodule "vim/pack/misc/start/coc.nvim"]
|
||||||
|
@ -84,6 +79,11 @@
|
||||||
url = https://github.com/nvim-treesitter/nvim-treesitter.git
|
url = https://github.com/nvim-treesitter/nvim-treesitter.git
|
||||||
shallow = true
|
shallow = true
|
||||||
ignore = all
|
ignore = all
|
||||||
|
[submodule "nvim/pack/misc/start/nvim-treesitter-textobjects"]
|
||||||
|
path = nvim/pack/misc/start/nvim-treesitter-textobjects
|
||||||
|
url = https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git
|
||||||
|
shallow = true
|
||||||
|
ignore = all
|
||||||
[submodule "vim/pack/misc/start/vim-gitgutter"]
|
[submodule "vim/pack/misc/start/vim-gitgutter"]
|
||||||
path = vim/pack/misc/start/vim-gitgutter
|
path = vim/pack/misc/start/vim-gitgutter
|
||||||
url = https://github.com/airblade/vim-gitgutter.git
|
url = https://github.com/airblade/vim-gitgutter.git
|
||||||
|
@ -114,3 +114,13 @@
|
||||||
url = https://github.com/glacambre/firenvim.git
|
url = https://github.com/glacambre/firenvim.git
|
||||||
shallow = true
|
shallow = true
|
||||||
ignore = all
|
ignore = all
|
||||||
|
[submodule "nvim/pack/misc/start/nvim-treesitter-context"]
|
||||||
|
path = nvim/pack/misc/start/nvim-treesitter-context
|
||||||
|
url = https://github.com/nvim-treesitter/nvim-treesitter-context.git
|
||||||
|
shallow = true
|
||||||
|
ignore = all
|
||||||
|
[submodule "vim/pack/misc/start/context.vim"]
|
||||||
|
path = vim/pack/misc/start/context.vim
|
||||||
|
url = https://github.com/wellle/context.vim.git
|
||||||
|
shallow = true
|
||||||
|
ignore = all
|
||||||
|
|
|
@ -1,31 +1,34 @@
|
||||||
{
|
{
|
||||||
"window.menuBarVisibility": "toggle",
|
"window.titleBarStyle": "custom",
|
||||||
"workbench.colorTheme": "One Dark Pro",
|
|
||||||
"oneDarkPro.bold": true,
|
"oneDarkPro.bold": true,
|
||||||
"editor.fontFamily": "'Iosevka Curly Slab', 'Iosevka', 'Fira Code', 'Go Mono', 'Source Code Pro', 'Inconsolata', 'DejaVu Sans Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
|
"editor.fontFamily": "'Iosevka Curly Slab', 'Iosevka', 'Fira Code', 'Go Mono', 'Source Code Pro', 'Inconsolata', 'DejaVu Sans Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
|
||||||
"editor.fontSize": 11.5,
|
"editor.fontSize": 15,
|
||||||
"editor.fontLigatures": "'HSKL','ss14','cv26' 8,'cv32' 2,'VLAA' 2,'cv93' 1,'cv95' 3,'VSAC' 1,'VSAD' 1,'VSAB' 9,'cv81' 2,'VSAA' 6,'cv98' 3",
|
"editor.fontLigatures": "'HSKL','ss14','cv26' 8,'cv32' 2,'VLAA' 2,'cv93' 1,'cv95' 3,'VSAC' 1,'VSAD' 1,'VSAB' 9,'cv81' 2,'VSAA' 6,'cv98' 3",
|
||||||
"editor.rulers": [80],
|
"editor.rulers": [80],
|
||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.rulers": [
|
"editor.rulers": [79]
|
||||||
79
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"editor.renderWhitespace": "boundary",
|
"editor.renderWhitespace": "boundary",
|
||||||
|
"editor.lineNumbers": "relative",
|
||||||
|
"editor.inlayHints.enabled": "onUnlessPressed",
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
"files.trimFinalNewlines": true,
|
"files.trimFinalNewlines": true,
|
||||||
"terminal.integrated.fontFamily": "'Go Mono'",
|
"terminal.integrated.fontFamily": "'Go Mono'",
|
||||||
"terminal.integrated.fontSize": 10,
|
"terminal.integrated.fontSize": 13,
|
||||||
"window.titleBarStyle": "custom",
|
|
||||||
"search.quickOpen.includeSymbols": true,
|
"search.quickOpen.includeSymbols": true,
|
||||||
"python.workspaceSymbols.enabled": true,
|
"python.analysis.inlayHints.callArgumentNames": "all",
|
||||||
"python.linting.mypyEnabled": true,
|
"python.analysis.inlayHints.functionReturnTypes": true,
|
||||||
"python.linting.mypyArgs": [
|
"python.analysis.inlayHints.variableTypes": true,
|
||||||
"--ignore-missing-imports",
|
"python.analysis.inlayHints.pytestParameters": true,
|
||||||
"--follow-imports=silent",
|
"mypy-type-checker.args": [
|
||||||
"--show-column-numbers",
|
"--show-column-numbers",
|
||||||
"--strict"
|
"--pretty",
|
||||||
|
"--ignore-missing-imports",
|
||||||
|
"--follow-imports=silent"
|
||||||
],
|
],
|
||||||
"editor.lineNumbers": "relative",
|
"rust-analyzer.check.command": "clippy",
|
||||||
"window.commandCenter": true
|
"haskell.manageHLS": "GHCup",
|
||||||
|
"haskell.formattingProvider": "fourmolu",
|
||||||
|
"dev.containers.dockerPath": "podman",
|
||||||
|
"dev.containers.dockerComposePath": "podman-compose"
|
||||||
}
|
}
|
3
clangd/config.yaml
Normal file
3
clangd/config.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
CompileFlags:
|
||||||
|
Add: [-Wall, -Wextra, -Wpedantic, -std=c2x]
|
||||||
|
Compiler: gcc # Until clang supports the whole C23 standard
|
|
@ -1,10 +1,37 @@
|
||||||
(custom-set-variables
|
(load-theme 'tango-dark t)
|
||||||
'(custom-enabled-themes '(tango-dark))
|
(setq display-line-numbers-type 'relative)
|
||||||
'(display-line-numbers-type 'relative)
|
(save-place-mode 1)
|
||||||
'(column-number-mode t)
|
(setq column-number-mode t)
|
||||||
'(truncate-lines t)
|
(setq-default truncate-lines t)
|
||||||
'(tool-bar-mode nil))
|
(tool-bar-mode -1)
|
||||||
(custom-set-faces
|
|
||||||
'(default ((t (:family "Iosevka Curly Slab" :foundry "UKWN" :slant normal :weight regular :height 113 :width normal)))))
|
(set-face-attribute 'default nil
|
||||||
|
:family "Iosevka Curly Slab"
|
||||||
|
:slant 'normal
|
||||||
|
:weight 'regular
|
||||||
|
:height 113
|
||||||
|
:width 'normal)
|
||||||
|
|
||||||
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
||||||
|
(add-hook 'prog-mode-hook 'eglot-ensure) ; Requires LSP servers in PATH
|
||||||
|
(setq-default eglot-workspace-configuration
|
||||||
|
'(:pylsp (:configurationSources ["flake8"]
|
||||||
|
:plugins (:flake8 (:enabled t)
|
||||||
|
:pylint (:enabled t
|
||||||
|
:executable "pylint")
|
||||||
|
:pylsp_mypy (:overrides [t "--no-pretty"])
|
||||||
|
:pycodestyle (:enabled :json-false)
|
||||||
|
:pyflakes (:enabled :json-false)))))
|
||||||
(when window-system (set-frame-size (selected-frame) 85 60))
|
(when window-system (set-frame-size (selected-frame) 85 60))
|
||||||
|
|
||||||
|
; After dealing with some nice defaults setup packages
|
||||||
|
(with-eval-after-load 'package
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t))
|
||||||
|
|
||||||
|
(use-package vscode-dark-plus-theme
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(load-theme 'vscode-dark-plus t))
|
||||||
|
|
||||||
|
(use-package rust-mode :ensure t)
|
||||||
|
(use-package haskell-mode :ensure t)
|
||||||
|
|
|
@ -2,3 +2,5 @@ if status is-interactive
|
||||||
# Commands to run in interactive sessions can go here
|
# Commands to run in interactive sessions can go here
|
||||||
[ -r $HOME/.sh.d/aliases ] && . $HOME/.sh.d/aliases
|
[ -r $HOME/.sh.d/aliases ] && . $HOME/.sh.d/aliases
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set -gx EDITOR nvim
|
||||||
|
|
6
flake8
Normal file
6
flake8
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# This does not work from $XDG_CONFIG_HOME, but python-lsp-server looks for it
|
||||||
|
# in that location anyways. This is explicitly achieved here:
|
||||||
|
# https://github.com/python-lsp/python-lsp-server/blob/fc2851a/pylsp/config/flake8_conf.py#L52
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 79
|
||||||
|
#extend-ignore = E501, W293, W391, E402, W503 # Those are also checked by pylint
|
|
@ -1,5 +1,14 @@
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
<!-- Override monospace detection for custom fonts -->
|
<!-- Override monospace detection for custom fonts -->
|
||||||
|
<!-- either raising the symbols-font immediately after default font -->
|
||||||
|
<alias>
|
||||||
|
<family>monospace</family>
|
||||||
|
<prefer>
|
||||||
|
<family>DejaVu Sans Mono</family>
|
||||||
|
<family>Symbols Nerd Font Mono</family>
|
||||||
|
</prefer>
|
||||||
|
</alias>
|
||||||
|
<!-- or using the patched version of the default font -->
|
||||||
<match target="pattern">
|
<match target="pattern">
|
||||||
<test name="family" qual="any">
|
<test name="family" qual="any">
|
||||||
<string>monospace</string>
|
<string>monospace</string>
|
||||||
|
|
1
fourmolu.yaml
Normal file
1
fourmolu.yaml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
column-limit: 80
|
|
@ -10,3 +10,5 @@
|
||||||
lg = less -S
|
lg = less -S
|
||||||
[tar "tar.xz"]
|
[tar "tar.xz"]
|
||||||
command = xz -c
|
command = xz -c
|
||||||
|
[blame]
|
||||||
|
date = relative
|
||||||
|
|
19
mypy/config
Normal file
19
mypy/config
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[mypy]
|
||||||
|
show_column_numbers = true
|
||||||
|
pretty = true
|
||||||
|
ignore_missing_imports = true
|
||||||
|
follow_imports = silent
|
||||||
|
|
||||||
|
warn_unused_configs = true
|
||||||
|
allow_any_generics = false
|
||||||
|
allow_subclassing_any = false
|
||||||
|
allow_untyped_calls = false
|
||||||
|
allow_untyped_defs = false
|
||||||
|
allow_incomplete_defs = false
|
||||||
|
check_untyped_defs = true
|
||||||
|
allow_untyped_decorators = false
|
||||||
|
no_implicit_optional = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
warn_return_any = true
|
||||||
|
implicit_reexport = false
|
|
@ -1,5 +1,5 @@
|
||||||
current_width = 777
|
current_width = 782 # for Iosevka Curly Slab 11.5; 96col
|
||||||
current_height = 1000
|
current_height = 1044
|
||||||
is_maximized = false
|
is_maximized = false
|
||||||
show_sidebar = false
|
show_sidebar = false
|
||||||
sidebar_width = 174
|
sidebar_width = 174
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
Tuning up Neovim/Vim
|
Tuning up Neovim/Vim
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
Neovim - Vim compatibility
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
The idea is to keep both projects set up to behave, as close as possible, one
|
||||||
|
like the other. Sometimes that requires translating from Lua to Vimscript, and
|
||||||
|
viceversa, in order to use the best possible solution for each editor.
|
||||||
|
|
||||||
|
Furthermore, when possible the same plugin is used for both editors. But
|
||||||
|
sometimes it is necessary to use different solutions; that being either because
|
||||||
|
one of the editors is not capable of achieving the pretended behavior, or
|
||||||
|
because Neovim (being a more modern project) can achieve the expected behavior
|
||||||
|
in a better way.
|
||||||
|
|
||||||
Fonts with icon glyphs
|
Fonts with icon glyphs
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -20,6 +32,17 @@ Choose your favourite programming font (already patched) from `NerdFonts
|
||||||
<https://www.nerdfonts.com/font-downloads>`_, install it on your system and set
|
<https://www.nerdfonts.com/font-downloads>`_, install it on your system and set
|
||||||
it as your terminal profile font.
|
it as your terminal profile font.
|
||||||
|
|
||||||
|
Easier fix, yet (GNU/Linux only)
|
||||||
|
''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
Just download from NerdFonts the Symbols Only variant (NerdFontsSymbolsOnly)
|
||||||
|
and decompress it on your HOME in ``~/.local/share/fonts/``; then run
|
||||||
|
``fc-cache -frv`` to cache the new glyphs and restart your terminal (or app).
|
||||||
|
|
||||||
|
If you still have some mismatched symbols on your system, you can prioritize
|
||||||
|
the whole font *Symbols Nerd Font Mono* by symlinking
|
||||||
|
``fontconfig/fonts.conf`` into ``~/.config/fontconfig/`` provided in this repo.
|
||||||
|
|
||||||
(Alternatively)
|
(Alternatively)
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
; extends
|
||||||
|
|
||||||
; Correct coloring group for class keyword:
|
; Correct coloring group for class keyword:
|
||||||
; https://github.com/nvim-treesitter/nvim-treesitter/pull/3177#issuecomment-1186027468
|
; https://github.com/nvim-treesitter/nvim-treesitter/pull/3177#issuecomment-1186027468
|
||||||
"class" @keyword.function
|
"class" @keyword.function
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
" Some settings Vim has on its defaults.vim that NeoVim hasn't set by default
|
" Some settings Vim has on “defaults.vim” that Neovim hasn't set by default
|
||||||
|
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
|
|
||||||
if has('mouse')
|
if has('mouse')
|
||||||
set mouse=a
|
set mouse=a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
augroup vimStartup
|
augroup RestoreCursor
|
||||||
au!
|
autocmd!
|
||||||
autocmd BufReadPost *
|
" This is slightly different than Vim's defaults.vim, but taken from
|
||||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
" “:h restore-cursor” for Neovim
|
||||||
\ | exe "normal! g`\""
|
autocmd BufRead * autocmd FileType <buffer> ++once
|
||||||
\ | endif
|
\ let s:line = line("'\"")
|
||||||
|
\ | if s:line >= 1 && s:line <= line("$") && &filetype !~# 'commit'
|
||||||
|
\ && index(['xxd', 'gitrebase'], &filetype) == -1
|
||||||
|
\ | execute "normal! g`\""
|
||||||
|
\ | endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
call rpcnotify(1, 'Gui', 'Font', 'Iosevka Curly Slab 8.4')
|
call rpcnotify(1, 'Gui', 'Font', 'Iosevka Curly Slab 11.5')
|
||||||
" Iosevka customizations: Haskell ligations; JetBrains Mono Style variant;
|
" Iosevka customizations: Haskell ligations; JetBrains Mono Style variant;
|
||||||
" cv-a-single-storey-serifed; cv-g-double-storey-open;
|
" cv-a-single-storey-serifed; cv-g-double-storey-open;
|
||||||
" cv-lig-ltgteq-slanted; cv-tilde-high; cv-underscore-low; cv-dollar-open;
|
" cv-lig-ltgteq-slanted; cv-tilde-high; cv-underscore-low; cv-dollar-open;
|
||||||
|
|
|
@ -11,10 +11,14 @@ set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set cursorline
|
set cursorline
|
||||||
set tabstop=4 shiftwidth=4
|
set tabstop=4 shiftwidth=4
|
||||||
set softtabstop=4 " If not 0, must coincide with "tabstop" for tabs indentation
|
set softtabstop=-1 " Negative value sets to use "shiftwidth" instead
|
||||||
" and with "shiftwidth" for spaces indentation
|
|
||||||
|
|
||||||
set list listchars=tab:→ ,trail:·
|
set list listchars=tab:→ ,trail:·,leadmultispace:⦙···
|
||||||
|
if has('autocmd')
|
||||||
|
autocmd OptionSet shiftwidth execute
|
||||||
|
\ 'setlocal listchars=tab:→ ,trail:·,'
|
||||||
|
\ .. 'leadmultispace:⦙' .. repeat('·', &sw - 1)
|
||||||
|
endif
|
||||||
let &colorcolumn = join(range(80+1, 256), ',')
|
let &colorcolumn = join(range(80+1, 256), ',')
|
||||||
|
|
||||||
set clipboard+=unnamed,unnamedplus
|
set clipboard+=unnamed,unnamedplus
|
||||||
|
@ -24,25 +28,20 @@ set switchbuf+=usetab,newtab
|
||||||
|
|
||||||
" Coding Styles
|
" Coding Styles
|
||||||
if has('autocmd')
|
if has('autocmd')
|
||||||
" Restore some :filetype defaults overrided by setting ts, sw and sts
|
|
||||||
autocmd FileType c setlocal tabstop=8 shiftwidth=8 softtabstop=0
|
|
||||||
|
|
||||||
" Ensure spelling is loaded when writting text. Also start insert
|
" Ensure spelling is loaded when writting text. Also start insert
|
||||||
augroup GitStuff
|
augroup GitStuff
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType gitcommit setlocal spell nonumber norelativenumber
|
autocmd FileType gitcommit setlocal spell nonumber norelativenumber
|
||||||
autocmd FileType gitcommit startinsert
|
autocmd FileType gitcommit startinsert
|
||||||
autocmd FileType gitcommit exe "normal! gg"
|
|
||||||
augroup END
|
augroup END
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Extras
|
" Extras
|
||||||
let g:vimsyn_embed = 'Pl'
|
let g:vimsyn_embed = 'Pl'
|
||||||
let g:indentLine_char = '⦙'
|
let g:AutoPairsMapBS = v:true
|
||||||
let g:indentLine_leadingSpaceChar = '·'
|
let g:AutoPairsMultilineBackspace = v:true
|
||||||
let g:indentLine_leadingSpaceEnabled = v:true
|
|
||||||
|
|
||||||
runtime! lsp_client_settings.vim
|
runtime! **/lsp/init.lua
|
||||||
|
|
||||||
if has('autocmd')
|
if has('autocmd')
|
||||||
augroup TerminalStuff
|
augroup TerminalStuff
|
||||||
|
@ -57,6 +56,13 @@ command -nargs=? Terminal rightbelow 16split +terminal\ <args>
|
||||||
nnoremap <silent> <leader>tt :rightbelow 16split +terminal<cr>
|
nnoremap <silent> <leader>tt :rightbelow 16split +terminal<cr>
|
||||||
tnoremap <Esc> <C-\><C-n><C-w>p
|
tnoremap <Esc> <C-\><C-n><C-w>p
|
||||||
|
|
||||||
|
set foldcolumn=auto:4
|
||||||
|
set foldlevelstart=99
|
||||||
|
set foldmethod=expr
|
||||||
|
set foldexpr=nvim_treesitter#foldexpr()
|
||||||
|
set foldtext=""
|
||||||
|
set nofoldenable
|
||||||
|
|
||||||
" Theming
|
" Theming
|
||||||
let g:aldmeris_transparent = v:true
|
let g:aldmeris_transparent = v:true
|
||||||
let g:aldmeris_termcolors = 'tango'
|
let g:aldmeris_termcolors = 'tango'
|
||||||
|
@ -88,6 +94,7 @@ if exists('g:colors_name') && (g:colors_name == 'onedark'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Misc
|
" Misc
|
||||||
|
set laststatus=3
|
||||||
let g:airline#extensions#tabline#enabled = v:true
|
let g:airline#extensions#tabline#enabled = v:true
|
||||||
let g:airline#extensions#tabline#buffer_min_count = 2
|
let g:airline#extensions#tabline#buffer_min_count = 2
|
||||||
let g:airline_mode_map = {
|
let g:airline_mode_map = {
|
||||||
|
@ -98,12 +105,14 @@ let g:airline_mode_map = {
|
||||||
\ 'c': 'C',
|
\ 'c': 'C',
|
||||||
\ 'v': 'V',
|
\ 'v': 'V',
|
||||||
\ 'V': 'V-L',
|
\ 'V': 'V-L',
|
||||||
\ '': 'V',
|
\ '': 'V',
|
||||||
\ 's': 'S',
|
\ 's': 'S',
|
||||||
\ }
|
\ }
|
||||||
let g:airline#extensions#tagbar#flags = 'f' " Requires majutsushi/tagbar plugin
|
let g:airline#extensions#tagbar#flags = 'f' " Requires majutsushi/tagbar plugin
|
||||||
|
let g:airline#extensions#nvimlsp#show_line_numbers = v:false
|
||||||
if exists('g:colors_name') && g:colors_name == 'vscode'
|
if exists('g:colors_name') && g:colors_name == 'vscode'
|
||||||
let g:airline_theme = 'codedark' " vscode.nvim doesn't provide one
|
let g:airline_theme = 'codedark' " vscode.nvim doesn't provide one
|
||||||
endif
|
endif
|
||||||
|
let g:DevIconsEnableDistro = v:false
|
||||||
|
|
||||||
runtime! nvim_treesitter.vim
|
lua require("treesitter")
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
" nvim-lspconfig
|
|
||||||
lua << EOF
|
|
||||||
-- This section must be before setting up any LSP server for the automatic
|
|
||||||
-- installation of servers to work as expected.
|
|
||||||
require("mason").setup() -- Just for updating paths to mason packages on launch
|
|
||||||
require("mason-lspconfig").setup({ automatic_installation = true })
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
|
||||||
local opts = require("lsp_server_settings")
|
|
||||||
|
|
||||||
lspconfig.pylsp.setup(
|
|
||||||
vim.tbl_deep_extend("error", { capabilities = lsp_capabilities }, opts.pylsp)
|
|
||||||
)
|
|
||||||
lspconfig.clangd.setup { capabilities = lsp_capabilities }
|
|
||||||
EOF
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
require("lsp.keymaps")
|
|
||||||
require("lsp.completion")
|
|
||||||
require("lsp.diagnostics")
|
|
||||||
EOF
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
if vim.fn.has("nvim-0.10") == 0 then -- Remove block for v0.10+ release. Covered by vim.diagnostic.config()
|
||||||
|
vim.fn.sign_define("DiagnosticSignError", { text="", texthl="DiagnosticSignError", linehl="", numhl="" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignWarn", { text="", texthl="DiagnosticSignWarn", linehl="", numhl="" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignInfo", { text="", texthl="DiagnosticSignInfo", linehl="", numhl="" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignHint", { text="", texthl="DiagnosticSignHint", linehl="", numhl="" })
|
||||||
|
end
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
signs = {
|
signs = {
|
||||||
text = {
|
text = {
|
||||||
|
@ -5,31 +11,26 @@ vim.diagnostic.config({
|
||||||
[vim.diagnostic.severity.WARN] = "",
|
[vim.diagnostic.severity.WARN] = "",
|
||||||
[vim.diagnostic.severity.INFO] = "",
|
[vim.diagnostic.severity.INFO] = "",
|
||||||
[vim.diagnostic.severity.HINT] = "",
|
[vim.diagnostic.severity.HINT] = "",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
|
update_in_insert = true,
|
||||||
|
virtual_text = { source = "if_many", spacing = 24 },
|
||||||
|
float = { source = "if_many", border = "rounded" },
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", { clear = false }),
|
group = vim.api.nvim_create_augroup("UserLspConfig", { clear = false }),
|
||||||
callback = function(args)
|
callback = function()
|
||||||
local bufnr = args.buf
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
||||||
vim.api.nvim_create_autocmd("CursorHoldI", {
|
|
||||||
group = vim.api.nvim_create_augroup("Diagnostics", { clear = true }),
|
group = vim.api.nvim_create_augroup("Diagnostics", { clear = true }),
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.diagnostic.open_float({ focusable = false, header = "" })
|
vim.diagnostic.open_float({
|
||||||
end
|
focusable = false,
|
||||||
})
|
header = "",
|
||||||
|
scope = "cursor",
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
})
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
end,
|
||||||
update_in_insert = true,
|
|
||||||
virtual_text = { source = "if_many", spacing = 24 },
|
|
||||||
}
|
|
||||||
)
|
|
||||||
vim.diagnostic.config({
|
|
||||||
float = { source = "if_many", border = "rounded" }
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
20
nvim/lua/lsp/init.lua
Normal file
20
nvim/lua/lsp/init.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
require("mason").setup() -- Just for updating paths to mason packages on launch
|
||||||
|
require("mason-lspconfig").setup({ automatic_installation = true })
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
local default_opts = { capabilities = capabilities }
|
||||||
|
local opts = require("lsp.server_settings")
|
||||||
|
|
||||||
|
lspconfig.pylsp.setup(vim.tbl_deep_extend("error", default_opts, opts.pylsp))
|
||||||
|
lspconfig.clangd.setup(default_opts)
|
||||||
|
lspconfig.rust_analyzer.setup(default_opts)
|
||||||
|
lspconfig.hls.setup(vim.tbl_deep_extend("error", default_opts, opts.hls))
|
||||||
|
lspconfig.fortls.setup(vim.tbl_deep_extend("error", default_opts, opts.fortls))
|
||||||
|
|
||||||
|
require("lsp.keymaps")
|
||||||
|
require("lsp.completion")
|
||||||
|
require("lsp.diagnostics")
|
||||||
|
if vim.lsp.inlay_hint then -- Remove condition for v0.10+ release
|
||||||
|
require("lsp.inlay")
|
||||||
|
end
|
12
nvim/lua/lsp/inlay.lua
Normal file
12
nvim/lua/lsp/inlay.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", { -- Highly experimental textDocument/inlayHint not in PyLSP
|
||||||
|
group = vim.api.nvim_create_augroup("UserLspConfig", { clear = false }),
|
||||||
|
callback = function(args)
|
||||||
|
if not (args.data and args.data.client_id) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local bufnr = args.buf
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||||
|
end,
|
||||||
|
})
|
|
@ -11,7 +11,9 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts)
|
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||||
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||||
vim.keymap.set("n", "<space>wl", function() vim.pretty_print(vim.lsp.buf.list_workspace_folders()) end, opts)
|
vim.keymap.set("n", "<space>wl", function()
|
||||||
|
vim.print(vim.lsp.buf.list_workspace_folders())
|
||||||
|
end, opts)
|
||||||
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts)
|
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts)
|
||||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
|
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
|
||||||
|
|
||||||
|
@ -23,5 +25,13 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||||
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts)
|
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>f", function()
|
||||||
|
vim.lsp.buf.format { async = true }
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ih", function()
|
||||||
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
|
end, opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
27
nvim/lua/lsp/server_settings/fortls.lua
Normal file
27
nvim/lua/lsp/server_settings/fortls.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local default_cmd = vim.deepcopy(lspconfig.fortls.document_config.default_config.cmd)
|
||||||
|
|
||||||
|
local cmd = vim.list_slice(default_cmd, nil, 1)
|
||||||
|
local default_flags = vim.list_slice(default_cmd, 3) -- 1st flag dropped intentionally
|
||||||
|
|
||||||
|
local fortls_opts = {
|
||||||
|
flags = vim.list_extend({ "--lowercase_intrinsics" }, default_flags)
|
||||||
|
}
|
||||||
|
return { cmd = vim.list_extend(cmd, fortls_opts.flags) }
|
||||||
|
|
||||||
|
-- In order to achive:
|
||||||
|
-- ===================
|
||||||
|
--local lsp = "fortls"
|
||||||
|
--settings[lsp] = { lowercaseIntrinsics = true }
|
||||||
|
--lspconfig[lsp].setup {
|
||||||
|
-- capabilities = capabilities,
|
||||||
|
-- settings = { ["fortran-ls"] = settings[lsp] },
|
||||||
|
-- root_dir = function(fname) return vim.fn.getcwd() end,
|
||||||
|
-- cmd = (function()
|
||||||
|
-- if lsp == "fortls" then
|
||||||
|
-- return vim.list_extend(
|
||||||
|
-- vim.deepcopy(lspconfig[lsp].document_config.default_config.cmd),
|
||||||
|
-- { "--lowercase_intrinsics" }
|
||||||
|
-- )
|
||||||
|
-- end
|
||||||
|
-- end)()}
|
6
nvim/lua/lsp/server_settings/hls.lua
Normal file
6
nvim/lua/lsp/server_settings/hls.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
-- For plugins here to work properly refer to https://haskell-language-server.rtfd.io/en/latest/support/plugin-support.html#current-plugin-support-tiers
|
||||||
|
-- This documentation tells which GHC versions won't work for each plugin
|
||||||
|
local hls_settings = {
|
||||||
|
formattingProvider = "fourmolu",
|
||||||
|
}
|
||||||
|
return { settings = { haskell = hls_settings } }
|
12
nvim/lua/lsp/server_settings/init.lua
Normal file
12
nvim/lua/lsp/server_settings/init.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
local opts = {}
|
||||||
|
opts.pylsp = require("lsp.server_settings.pylsp")
|
||||||
|
opts.hls = require("lsp.server_settings.hls")
|
||||||
|
opts.fortls = require("lsp.server_settings.fortls")
|
||||||
|
|
||||||
|
local workspace_conf_file = vim.fn.findfile(".nvim/lsp-server-conf.lua", ".;")
|
||||||
|
if workspace_conf_file ~= "" then
|
||||||
|
local workspace_conf = dofile(workspace_conf_file)
|
||||||
|
opts = vim.tbl_deep_extend("force", opts, workspace_conf)
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
58
nvim/lua/lsp/server_settings/pylsp.lua
Normal file
58
nvim/lua/lsp/server_settings/pylsp.lua
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
--if vim.fn.exists(":PylspInstall") then
|
||||||
|
-- vim.cmd("PylspInstall pylsp-mypy")
|
||||||
|
--end
|
||||||
|
-- https://github.com/williamboman/mason.nvim/discussions/908
|
||||||
|
local pylsp = require("mason-registry").get_package("python-lsp-server")
|
||||||
|
pylsp:on("install:success", function ()
|
||||||
|
local mason_package_path = function(package)
|
||||||
|
local path = vim.fn.resolve(vim.fn.stdpath("data") .. "/mason/packages/" .. package)
|
||||||
|
return path
|
||||||
|
end
|
||||||
|
|
||||||
|
local path = mason_package_path("python-lsp-server")
|
||||||
|
local command = path .. "/venv/bin/python"
|
||||||
|
|
||||||
|
local install_cmd = { command, "-m", "pip", "install" }
|
||||||
|
local pylsp_plugins = { "python-lsp-ruff", "pylsp-mypy" }
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.fn.system(vim.list_extend(install_cmd, pylsp_plugins))
|
||||||
|
end)
|
||||||
|
|
||||||
|
local flake8_plugins = { "flake8-pyproject", "flake8-pylint" }
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.fn.system(vim.list_extend(install_cmd, flake8_plugins))
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
local pylsp_settings = {
|
||||||
|
configurationSources = { "flake8" }, -- tool's config files to override settings from
|
||||||
|
plugins = {
|
||||||
|
flake8 = { enabled = true },
|
||||||
|
pylint = { enabled = true },
|
||||||
|
pylsp_mypy = { overrides = { true, "--no-pretty" } },
|
||||||
|
pycodestyle = { enabled = false }, -- covered in flake8
|
||||||
|
pyflakes = { enabled = false }, -- covered in flake8
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local venv_dir = vim.env.VIRTUAL_ENV
|
||||||
|
if venv_dir ~= nil then
|
||||||
|
local python_exec = vim.fn.findfile("python", venv_dir .. "/bin;")
|
||||||
|
if python_exec ~= "" then
|
||||||
|
pylsp_settings.plugins.jedi = {environment = python_exec}
|
||||||
|
end
|
||||||
|
local flake8_exec = vim.fn.findfile("flake8", venv_dir .. "/bin;")
|
||||||
|
if flake8_exec ~= "" then
|
||||||
|
pylsp_settings.plugins.flake8.executable = flake8_exec
|
||||||
|
end
|
||||||
|
local pylint_exec = vim.fn.findfile("pylint", venv_dir .. "/bin;")
|
||||||
|
if pylint_exec ~= "" then
|
||||||
|
pylsp_settings.plugins.pylint.executable = pylint_exec
|
||||||
|
end
|
||||||
|
local mypy_exec = vim.fn.findfile("mypy", venv_dir .. "/bin;")
|
||||||
|
if mypy_exec ~= "" or python_exec ~= "" then
|
||||||
|
pylsp_settings.plugins.pylsp_mypy.overrides = {"--python-executable", python_exec, true}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return { settings = { pylsp = pylsp_settings } }
|
|
@ -0,0 +1,16 @@
|
||||||
|
local pylsp_settings = {
|
||||||
|
plugins = {
|
||||||
|
flake8 = { maxLineLength = 120 },
|
||||||
|
pylint = {
|
||||||
|
args = {
|
||||||
|
"--max-line-length=120",
|
||||||
|
"--disable=missing-docstring,invalid-name,redefined-outer-name,logging-format-interpolation",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local opts = {}
|
||||||
|
opts.pylsp = { settings = { pylsp = pylsp_settings } }
|
||||||
|
|
||||||
|
return opts
|
|
@ -1,10 +0,0 @@
|
||||||
local opts = {}
|
|
||||||
opts.pylsp = require("python_lsp_server_settings")
|
|
||||||
|
|
||||||
local workspace_settings_file = vim.fn.findfile(".nvim/lsp-server-settings.lua", ".;")
|
|
||||||
if workspace_settings_file ~= "" then
|
|
||||||
local workspace_settings = dofile(workspace_settings_file)
|
|
||||||
opts = vim.tbl_deep_extend("force", opts, workspace_settings)
|
|
||||||
end
|
|
||||||
|
|
||||||
return opts
|
|
|
@ -1,42 +0,0 @@
|
||||||
local pylsp_settings = {
|
|
||||||
configurationSources = {"flake8", "pycodestyle"}, -- config files to read from, not plugins enabled
|
|
||||||
plugins = {
|
|
||||||
flake8 = {
|
|
||||||
enabled = true,
|
|
||||||
maxLineLength = 79,
|
|
||||||
-- ignore = {"E501", "W293", "W391"}, -- Those are also checked by pylint
|
|
||||||
},
|
|
||||||
pylint = {
|
|
||||||
enabled = true,
|
|
||||||
args = {
|
|
||||||
"--max-line-length=79",
|
|
||||||
"--disable=missing-docstring,invalid-name,redefined-outer-name,logging-format-interpolation",
|
|
||||||
"--disable=line-too-long,trailing-whitespace,trailing-newlines", -- Checked by flake8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pylsp_mypy = {enabled = true},
|
|
||||||
pycodestyle = {enabled = false}, -- covered in flake8
|
|
||||||
pyflakes = {enabled = false}, -- covered in flake8
|
|
||||||
-- mccabe = {enabled = false}, -- not covered in flake8 by default; PyLSP doesn't handle the option
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local venv_dir = vim.fn.finddir(".venv/", vim.fn.expand("%:p:h") .. ";")
|
|
||||||
local python_exec = vim.fn.findfile("python3", venv_dir .. "/bin;")
|
|
||||||
if venv_dir ~= "" and python_exec ~= "" then
|
|
||||||
pylsp_settings.plugins.jedi = {environment = python_exec}
|
|
||||||
end
|
|
||||||
local flake8_exec = vim.fn.findfile("flake8", venv_dir .. "/bin;")
|
|
||||||
if flake8_exec ~= "" then
|
|
||||||
pylsp_settings.plugins.flake8.executable = flake8_exec
|
|
||||||
end
|
|
||||||
local pylint_exec = vim.fn.findfile("pylint", venv_dir .. "/bin;")
|
|
||||||
if pylint_exec ~= "" then
|
|
||||||
pylsp_settings.plugins.pylint.executable = pylint_exec
|
|
||||||
end
|
|
||||||
local mypy_exec = vim.fn.findfile("mypy", venv_dir .. "/bin;")
|
|
||||||
if mypy_exec ~= "" or python_exec ~= "" then
|
|
||||||
pylsp_settings.plugins.pylsp_mypy.overrides = {"--python-executable", python_exec, true}
|
|
||||||
end
|
|
||||||
|
|
||||||
return { settings = { pylsp = pylsp_settings } }
|
|
27
nvim/lua/treesitter.lua
Normal file
27
nvim/lua/treesitter.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
auto_install = true,
|
||||||
|
highlight = { enable = true },
|
||||||
|
incremental_selection = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
|
||||||
|
-- textobjects treesitter plugin
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
lookahead = true,
|
||||||
|
keymaps = {
|
||||||
|
["af"] = "@function.outer",
|
||||||
|
["if"] = "@function.inner",
|
||||||
|
["ac"] = "@class.outer",
|
||||||
|
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||||
|
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require'treesitter-context'.setup {
|
||||||
|
max_lines = 2,
|
||||||
|
min_window_height = 32,
|
||||||
|
trim_scope = "inner",
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
local settings = {}
|
|
||||||
settings.pylsp = {
|
|
||||||
plugins = {
|
|
||||||
flake8 = {maxLineLength = 120},
|
|
||||||
pylint = {
|
|
||||||
args = {
|
|
||||||
"--max-line-length=120",
|
|
||||||
"--disable=missing-docstring,invalid-name,redefined-outer-name,logging-format-interpolation"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return settings
|
|
|
@ -1,8 +0,0 @@
|
||||||
lua <<EOF
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
auto_install = true,
|
|
||||||
highlight = { enable = true },
|
|
||||||
incremental_selection = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
}
|
|
||||||
EOF
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0e6b2ed705ddcff9738ec4ea838141654f12eeef
|
Subproject commit 39e2eda76828d88b773cc27a3f61d2ad782c922d
|
|
@ -1 +1 @@
|
||||||
Subproject commit c68b3a003483cf382428a43035079f78474cd11e
|
Subproject commit 1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf
|
|
@ -1 +1 @@
|
||||||
Subproject commit a5ca8b03972b347b74b2ad2f7f23f120a514593b
|
Subproject commit 9ae570e206360e47d30b4c35a4550c165f4ea7b7
|
|
@ -1 +1 @@
|
||||||
Subproject commit 84af7a1fa1dbdb0f201849be7993d999a05d973b
|
Subproject commit 49ff59aded1047a773670651cfa40e76e63c6377
|
|
@ -1 +1 @@
|
||||||
Subproject commit 777450fd0ae289463a14481673e26246b5e38bf2
|
Subproject commit abacd4cb7ffd640b558845b617cfca1692dcb1a6
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1ec6f5cbf6ffc44c84783d70039df5295ca22b4e
|
Subproject commit a284b14b3a9c4851f900286cd7eb68e3a8f90b1c
|
|
@ -1 +1 @@
|
||||||
Subproject commit ee4ef314bd990b2b05b7fbd95b857159e444a2fe
|
Subproject commit fc72687977e1c34259c42f0e408655cf2638760d
|
|
@ -1 +0,0 @@
|
||||||
../../../../vim/pack/misc/start/indentLine
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 584ccea56e2d37b31ba292da2b539e1a4bb411ca
|
Subproject commit 19ac9e8b5c1e5eedd2ae7957243e25b32e269ea7
|
1
nvim/pack/misc/start/nvim-treesitter-context
Submodule
1
nvim/pack/misc/start/nvim-treesitter-context
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 865424e468a6926e913b523ff5fc7d34a2f8f996
|
1
nvim/pack/misc/start/nvim-treesitter-textobjects
Submodule
1
nvim/pack/misc/start/nvim-treesitter-textobjects
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 84cc9ed772f1fee2f47c1e076f518829583d8347
|
|
@ -1 +1 @@
|
||||||
Subproject commit dd640f6cfb0e370cfd3db389f04b172508848bd3
|
Subproject commit 8e4b79b0e6495ddf29552178eceba1e147e6cecf
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9cf814fbc1e7ec05fe05e5381beee2ceec5b099c
|
Subproject commit 1a2cb491a962acf3bbf53c6d0a61b4ec76012570
|
18
pylintrc.toml
Normal file
18
pylintrc.toml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Linkable as $XDG_CONFIG_HOME/pylintrc (without the extension). Pylint
|
||||||
|
# ignores the category and loads the settings anyways.
|
||||||
|
[tool.pylint.format]
|
||||||
|
max-line-length = 79
|
||||||
|
[tool.pylint."messages control"]
|
||||||
|
disable = [
|
||||||
|
# Covered in flake8 according to https://pylint.rtfd.io/en/latest/faq.html#which-messages-should-i-disable-to-avoid-duplicates-if-i-use-other-popular-linters
|
||||||
|
"unnecessary-semicolon", "bad-indentation", "bare-except", # pycodestyle
|
||||||
|
"unnecessary-negation", "singleton-comparison", "line-too-long", # pycodestyle
|
||||||
|
"trailing-whitespace", "missing-final-newline", "trailing-newlines", # pycodestyle
|
||||||
|
"multiple-statements", "wrong-import-position", # pycodestyle
|
||||||
|
"undefined-variable", "unused-import", "unused-variable", # pyflakes
|
||||||
|
"too-many-branches", # mccabe
|
||||||
|
|
||||||
|
# other stuff
|
||||||
|
# Unfold "missing-docstring" (https://pylint.rtfd.io/en/latest/user_guide/messages/convention/missing-docstring.html)
|
||||||
|
"missing-module-docstring", "missing-class-docstring", "missing-function-docstring",
|
||||||
|
]
|
3
pytest.ini
Normal file
3
pytest.ini
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[pytest]
|
||||||
|
addopts = --pdbcls=IPython.terminal.debugger:TerminalPdb --tb=short --quiet
|
||||||
|
--disable-pytest-warnings --no-cov
|
6
ruff/ruff.toml
Normal file
6
ruff/ruff.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
line-length = 79
|
||||||
|
[lint]
|
||||||
|
extend-select = [
|
||||||
|
"E", "W", "F", "C90", # Pycodestyle + Pyflakes + McCabe = Flake8
|
||||||
|
"PL", # Pylint
|
||||||
|
]
|
|
@ -2,5 +2,6 @@ alias ls="ls --color=auto"
|
||||||
alias rm="rm -i"
|
alias rm="rm -i"
|
||||||
alias cp="cp -i"
|
alias cp="cp -i"
|
||||||
alias mv="mv -i"
|
alias mv="mv -i"
|
||||||
|
alias vi=nvim
|
||||||
alias grep="grep --color=auto"
|
alias grep="grep --color=auto"
|
||||||
alias less="less --LONG-PROMPT --LINE-NUMBERS"
|
alias less="less --LONG-PROMPT --LINE-NUMBERS"
|
||||||
|
|
4
templates/Makefile
Normal file
4
templates/Makefile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
-include base.mk
|
||||||
|
|
||||||
|
TARGET = appname
|
||||||
|
all: $(TARGET)
|
16
templates/README.rst
Normal file
16
templates/README.rst
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Templates
|
||||||
|
=========
|
||||||
|
|
||||||
|
This directory bundles templates of config files for different kind of
|
||||||
|
projects.
|
||||||
|
|
||||||
|
The purpose of files here, is that for these tools there is no global/user
|
||||||
|
configuration that can be used as a common base, but instead, these tools can
|
||||||
|
only be configured per-project adding config files to the base dir of the
|
||||||
|
corresponding project.
|
||||||
|
|
||||||
|
Therefore, here are a bunch of files that with minimum or non changes can be
|
||||||
|
copied into project's base directories for configuring them.
|
||||||
|
|
||||||
|
There are templates for tools for different technologies. Depending on
|
||||||
|
technologies used in each project is which files should be copied.
|
8
templates/_clang-format
Normal file
8
templates/_clang-format
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
BasedOnStyle: llvm
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: ForIndentation
|
||||||
|
BreakBeforeBinaryOperators: NonAssignment
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
AlignTrailingComments: false
|
||||||
|
SpacesBeforeTrailingComments: 2
|
73
templates/_pre-commit-config.yaml
Normal file
73
templates/_pre-commit-config.yaml
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.5.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-toml
|
||||||
|
- id: check-yaml
|
||||||
|
exclude: .chart/
|
||||||
|
- id: check-added-large-files
|
||||||
|
|
||||||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: v0.2.2
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
args: [--config=./backoffice/ceg/pyproject.toml]
|
||||||
|
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 7.0.0
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
args: [--toml-config=./pyproject.toml]
|
||||||
|
additional_dependencies: [Flake8-pyproject]
|
||||||
|
language: system # don't commit!!
|
||||||
|
|
||||||
|
- repo: https://github.com/PyCQA/pylint
|
||||||
|
rev: v3.0.3
|
||||||
|
hooks:
|
||||||
|
- id: pylint
|
||||||
|
args: [--rcfile=./pyproject.toml]
|
||||||
|
# disabled plugins: pylint.extensions.mccabe
|
||||||
|
exclude: tests|tests/input|tests/extensions/data|tests/regrtest_data|tests/data|doc
|
||||||
|
language: system # don't commit!!
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
rev: v1.8.0
|
||||||
|
hooks:
|
||||||
|
- id: mypy
|
||||||
|
args: [--show-column-numbers, --pretty, --ignore-missing-imports, --follow-imports=silent]
|
||||||
|
additional_dependencies: [types-all]
|
||||||
|
#exclude: migrations/
|
||||||
|
language: system # don't commit!!
|
||||||
|
|
||||||
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
rev: v3.15.0
|
||||||
|
hooks:
|
||||||
|
- id: pyupgrade
|
||||||
|
args: [--py311-plus]
|
||||||
|
args: [--py37-plus]
|
||||||
|
|
||||||
|
- repo: https://github.com/pycqa/isort
|
||||||
|
rev: 5.13.2
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
name: isort (python)
|
||||||
|
args: [--check-only, --line-length=120, --diff]
|
||||||
|
args: [--check-only, --profile=django, --line-length=120, --diff, --py=37, --src=ceg/]
|
||||||
|
|
||||||
|
- repo: https://github.com/jazzband/pip-tools
|
||||||
|
rev: 7.3.0
|
||||||
|
hooks:
|
||||||
|
- id: pip-compile
|
||||||
|
name: pip-compile requirements.txt
|
||||||
|
files: ^requirements\.(in|txt)$
|
||||||
|
args: [requirements.txt]
|
||||||
|
- id: pip-compile
|
||||||
|
name: pip-compile requirements-dev.in
|
||||||
|
files: ^requirements-dev\.(in|txt)$
|
||||||
|
args: [requirements-dev.in]
|
||||||
|
- id: pip-compile
|
||||||
|
name: pip-compile requirements-lint.in
|
||||||
|
files: ^requirements-lint\.(in|txt)$
|
||||||
|
args: [requirements-lint.in]
|
6
templates/base.mk
Normal file
6
templates/base.mk
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
BUILD ?= debug
|
||||||
|
|
||||||
|
CFLAGS ?= -Wall -Wextra -std=c23 -Wpedantic
|
||||||
|
cflags.debug = -g -DDEBUG
|
||||||
|
cflags.release = -O2 -Werror
|
||||||
|
CFLAGS += ${cflags.${BUILD}}
|
53
templates/pyproject.toml
Normal file
53
templates/pyproject.toml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 120
|
||||||
|
[tool.ruff.lint]
|
||||||
|
extend-select = [
|
||||||
|
"E", "W", "F", # Pycodestyle + Pyflakes - McCabe (C90) = Flake8
|
||||||
|
"PL", # Pylint
|
||||||
|
]
|
||||||
|
extend-ignore = [
|
||||||
|
"PLW2901", "PLR2004", # From Pylint plugin, not enabled by default
|
||||||
|
"PLR0912", # Already covered: mccabe (C90)
|
||||||
|
]
|
||||||
|
[tool.ruff.lint.per-file-ignores]
|
||||||
|
"__init__.py" = ["F401"]
|
||||||
|
|
||||||
|
[tool.flake8]
|
||||||
|
# This category requires “Flake8-pyproject” plugin to take effect
|
||||||
|
max-line-length = 120
|
||||||
|
per-file-ignores = [
|
||||||
|
"__init__.py:F401",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.pylint.format]
|
||||||
|
max-line-length = 120
|
||||||
|
[tool.pylint."messages control"]
|
||||||
|
disable = [
|
||||||
|
# Covered in flake8 according to https://pylint.rtfd.io/en/latest/faq.html#which-messages-should-i-disable-to-avoid-duplicates-if-i-use-other-popular-linters
|
||||||
|
"unnecessary-semicolon", "bad-indentation", "bare-except", # pycodestyle
|
||||||
|
"unnecessary-negation", "singleton-comparison", "line-too-long", # pycodestyle
|
||||||
|
"trailing-whitespace", "missing-final-newline", "trailing-newlines", # pycodestyle
|
||||||
|
"multiple-statements", "wrong-import-position", # pycodestyle
|
||||||
|
"undefined-variable", "unused-import", "unused-variable", # pyflakes
|
||||||
|
"too-many-branches", # mccabe
|
||||||
|
|
||||||
|
# other stuff
|
||||||
|
"missing-module-docstring", "missing-class-docstring", "missing-function-docstring",
|
||||||
|
#"logging-format-interpolation",
|
||||||
|
#"redefined-outer-name", # Pytest fixtures in tests
|
||||||
|
#"invalid-name", # Class-attributes in Django-commands (.help)
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
show_column_numbers = true
|
||||||
|
pretty = true
|
||||||
|
ignore_missing_imports = true
|
||||||
|
follow_imports = "silent"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = """
|
||||||
|
--pdbcls=IPython.terminal.debugger:TerminalPdb --tb=short --quiet
|
||||||
|
--disable-pytest-warnings --no-cov
|
||||||
|
"""
|
||||||
|
log_level = "INFO"
|
||||||
|
python_files = ["*_tests.py", "tests.py"]
|
|
@ -6,10 +6,10 @@
|
||||||
// https://microsoft.github.io/vscode-codicons/dist/codicon.html
|
// https://microsoft.github.io/vscode-codicons/dist/codicon.html
|
||||||
// Unicode symbols taken from VS Code source code (search symbol- entries):
|
// Unicode symbols taken from VS Code source code (search symbol- entries):
|
||||||
// https://github.com/microsoft/vscode/blob/main/src/vs/base/common/codicons.ts#L113-L556
|
// https://github.com/microsoft/vscode/blob/main/src/vs/base/common/codicons.ts#L113-L556
|
||||||
"diagnostic.errorSign": "",
|
"diagnostic.errorSign": "",
|
||||||
"diagnostic.warningSign": "",
|
"diagnostic.warningSign": "",
|
||||||
"diagnostic.infoSign": "",
|
"diagnostic.infoSign": "",
|
||||||
"diagnostic.hintSign": "",
|
"diagnostic.hintSign": "",
|
||||||
|
|
||||||
"suggest.completionItemKindLabels": {
|
"suggest.completionItemKindLabels": {
|
||||||
"keyword": "",
|
"keyword": "",
|
||||||
|
@ -40,14 +40,17 @@
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
|
|
||||||
// coc-diagnostic
|
"languageserver": {
|
||||||
"diagnostic-languageserver.filetypes": {
|
"haskell": {
|
||||||
"python": ["flake8", "pylint", "mypy", "pycodestyle"]
|
"command": "haskell-language-server-wrapper",
|
||||||
},
|
"args": ["--lsp"],
|
||||||
"diagnostic-languageserver.linters": {
|
"rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
|
||||||
"pycodestyle": {
|
"filetypes": ["haskell", "lhaskell"],
|
||||||
"sourceName": "pycodestyle",
|
"settings": {
|
||||||
"command": "pycodestyle"
|
"haskell": {
|
||||||
|
"formattingProvider": "formolu"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
" Default extensions
|
||||||
|
let g:coc_global_extensions = [
|
||||||
|
\ "coc-diagnostic",
|
||||||
|
\ "@yaegassy/coc-ruff", "@yaegassy/coc-pylsp", "@yaegassy/coc-mypy", "coc-clangd", "coc-rust-analyzer"
|
||||||
|
\ ]
|
||||||
|
|
||||||
" Remap keys for gotos
|
" Remap keys for gotos
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
nmap <silent> gd <Plug>(coc-definition)
|
||||||
nmap <silent> gD <Plug>(coc-implementation)
|
nmap <silent> gD <Plug>(coc-implementation)
|
||||||
|
@ -18,6 +24,3 @@ endfunction
|
||||||
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
|
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
|
||||||
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
|
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
|
||||||
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
||||||
|
|
||||||
" Default extensions
|
|
||||||
let g:coc_global_extensions = ["coc-diagnostic", "coc-jedi", "coc-clangd"]
|
|
15
vim/neovim.vim
Normal file
15
vim/neovim.vim
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
" Some nice defaults from Neovim
|
||||||
|
|
||||||
|
set tabpagemax=50
|
||||||
|
|
||||||
|
if empty($XDG_STATE_HOME)
|
||||||
|
let $XDG_STATE_HOME = "~/.local/state"
|
||||||
|
endif
|
||||||
|
let g:stdpath_state = $XDG_STATE_HOME .. "/vim"
|
||||||
|
call mkdir(g:stdpath_state .. "/swap", "p", 0o700)
|
||||||
|
call mkdir(g:stdpath_state .. "/undo", "p", 0o700)
|
||||||
|
call mkdir(g:stdpath_state .. "/backup", "p", 0o700)
|
||||||
|
|
||||||
|
set directory^=$XDG_STATE_HOME/vim/swap//
|
||||||
|
set undodir^=$XDG_STATE_HOME/vim/undo
|
||||||
|
set backupdir^=$XDG_STATE_HOME/vim/backup
|
|
@ -1 +1 @@
|
||||||
Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76
|
Subproject commit cd97efbeba5fdf66cf3db0c8fad5660e571bffa3
|
|
@ -1 +1 @@
|
||||||
Subproject commit bbaa1d5d1ff3cbd9d26bb37cfda1a990494c4043
|
Subproject commit f1ffb8d9b336ec6fe2ea0bd68ffeff5b77150e43
|
1
vim/pack/misc/start/context.vim
Submodule
1
vim/pack/misc/start/context.vim
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 108644e146c864995288dee7dacf219267917ac1
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d15d63bf9c4a74a02470d4bc8ecce53df13e3a75
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit be563539754b7af22bbe842ef217d4463f73468c
|
Subproject commit 12edcb59449b335555652898f82dd6d5c59d519a
|
|
@ -1 +1 @@
|
||||||
Subproject commit a532fed72ace069e61c0132125b728316f9abd3c
|
Subproject commit ff0f9a45a5d81d2c8aa67601c264b18c4fe26b15
|
|
@ -1 +1 @@
|
||||||
Subproject commit 44dbd57dd19e8ec58b2a50c787c8ae7bb231c145
|
Subproject commit e801371917e52805a4ceb1e93f55ed1fba712f82
|
|
@ -1 +1 @@
|
||||||
Subproject commit b6b5ffe31a195a3077338d7a506b905e4a51590f
|
Subproject commit 57b77747694ea5676c3ca0eeaf9567dc499730c0
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7bf26b5432ca93309d08037b27fa9459e64a460c
|
Subproject commit 05d7843412c4fb7d1bdafefd04462ac4db841f0f
|
39
vim/vimrc
39
vim/vimrc
|
@ -12,23 +12,22 @@ set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set cursorline
|
set cursorline
|
||||||
set tabstop=4 shiftwidth=4
|
set tabstop=4 shiftwidth=4
|
||||||
set softtabstop=4 " If not 0, must coincide with "tabstop" for tabs indentation
|
set softtabstop=-1 " Negative value sets to use "shiftwidth" instead
|
||||||
" and with "shiftwidth" for spaces indentation
|
|
||||||
|
|
||||||
set list listchars=tab:→ ,trail:·
|
set list listchars=tab:→ ,trail:·,leadmultispace:⦙···
|
||||||
|
if has('autocmd')
|
||||||
|
autocmd OptionSet shiftwidth execute
|
||||||
|
\ 'setlocal listchars=tab:→ ,trail:·,'
|
||||||
|
\ .. 'leadmultispace:⦙' .. repeat('·', &sw - 1)
|
||||||
|
endif
|
||||||
let &colorcolumn = join(range(80+1, 256), ',')
|
let &colorcolumn = join(range(80+1, 256), ',')
|
||||||
|
|
||||||
set directory^=~/.local/share/vim/swap//
|
runtime! neovim.vim
|
||||||
set undodir^=~/.local/share/vim/undo
|
|
||||||
set backupdir^=~/.local/share/vim/backup
|
|
||||||
|
|
||||||
set switchbuf+=usetab,newtab
|
set switchbuf+=usetab,newtab
|
||||||
|
|
||||||
" Coding Styles
|
" Coding Styles
|
||||||
if has('autocmd')
|
if has('autocmd')
|
||||||
" Restore some :filetype defaults overrided by setting ts, sw and sts
|
|
||||||
autocmd FileType c setlocal tabstop=8 shiftwidth=8 softtabstop=0
|
|
||||||
|
|
||||||
" Ensure spelling is loaded when writting text. Also start insert
|
" Ensure spelling is loaded when writting text. Also start insert
|
||||||
augroup GitStuff
|
augroup GitStuff
|
||||||
autocmd!
|
autocmd!
|
||||||
|
@ -39,16 +38,22 @@ endif
|
||||||
|
|
||||||
" Extras
|
" Extras
|
||||||
let g:vimsyn_embed = 'Pl'
|
let g:vimsyn_embed = 'Pl'
|
||||||
let g:indentLine_char = '⦙'
|
let g:AutoPairsMapBS = v:true
|
||||||
let g:indentLine_leadingSpaceChar = '·'
|
let g:AutoPairsMultilineBackspace = v:true
|
||||||
let g:indentLine_leadingSpaceEnabled = v:true
|
|
||||||
|
|
||||||
runtime! lsp_client_settings.vim
|
runtime! lsp.vim
|
||||||
|
|
||||||
command -nargs=? Terminal rightbelow terminal ++rows=16 <args>
|
command -nargs=? Terminal rightbelow terminal ++rows=16 <args>
|
||||||
nnoremap <silent> <leader>tt :rightbelow terminal ++rows=16<CR>
|
nnoremap <silent> <leader>tt :rightbelow terminal ++rows=16<CR>
|
||||||
tnoremap <Esc> <C-\><C-n><C-w>p
|
tnoremap <Esc> <C-\><C-n><C-w>p
|
||||||
|
|
||||||
|
set foldcolumn=4
|
||||||
|
set foldlevelstart=99
|
||||||
|
set foldmethod=expr
|
||||||
|
set foldexpr=coc#util#refactor_foldlevel(v:lnum)
|
||||||
|
set foldtext=coc#util#refactor_fold_text(v:foldstart)
|
||||||
|
set nofoldenable
|
||||||
|
|
||||||
" Theming
|
" Theming
|
||||||
let g:aldmeris_transparent = v:true
|
let g:aldmeris_transparent = v:true
|
||||||
let g:aldmeris_termcolors = 'tango'
|
let g:aldmeris_termcolors = 'tango'
|
||||||
|
@ -93,7 +98,13 @@ let g:airline_mode_map = {
|
||||||
\ 'c': 'C',
|
\ 'c': 'C',
|
||||||
\ 'v': 'V',
|
\ 'v': 'V',
|
||||||
\ 'V': 'V-L',
|
\ 'V': 'V-L',
|
||||||
\ '': 'V',
|
\ '': 'V',
|
||||||
\ 's': 'S',
|
\ 's': 'S',
|
||||||
\ }
|
\ }
|
||||||
let g:airline#extensions#tagbar#flags = 'f' " Requires majutsushi/tagbar plugin
|
let g:airline#extensions#tagbar#flags = 'f' " Requires majutsushi/tagbar plugin
|
||||||
|
let g:airline#extensions#coc#stl_format_err = '%C'
|
||||||
|
let g:airline#extensions#coc#stl_format_warn = '%C'
|
||||||
|
let g:DevIconsEnableDistro = v:false
|
||||||
|
|
||||||
|
let g:context_max_height = 2
|
||||||
|
let g:context_highlight_border = '<hide>'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user