Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dotfiles
vim
Compare revisions
da22a0dc3fc9636e87cd257d8fb648e79a59b491 to 0cc39e9b164524496ec4d560f0b37c331732316b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dotfiles/vim
Select target project
No results found
0cc39e9b164524496ec4d560f0b37c331732316b
Select Git revision
Branches
master
1 result
Swap
Target
dotfiles/vim
Select target project
dotfiles/vim
1 result
da22a0dc3fc9636e87cd257d8fb648e79a59b491
Select Git revision
Branches
master
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (8)
Add spellings
· ac70df94
Henrik Tjäder
authored
2 years ago
ac70df94
coc clangd add keybinds for jumping to header/src
· bd9b7195
Henrik Tjäder
authored
2 years ago
bd9b7195
Latest coc requires setting these
· 3cc9aeea
Henrik Tjäder
authored
2 years ago
3cc9aeea
Try to ignore SVD files
· c0df5bc0
Henrik Tjäder
authored
2 years ago
c0df5bc0
Disable languageserver define for CCLS
· 8a93f321
Henrik Tjäder
authored
2 years ago
8a93f321
Add spellcheck of words from src
· 36fab50a
Henrik Tjäder
authored
2 years ago
36fab50a
Remove TagList plugin completely
· 46aaacb0
Henrik Tjäder
authored
2 years ago
46aaacb0
Add coc-xml, coc-snippets and coc-git
· 0cc39e9b
Henrik Tjäder
authored
2 years ago
0cc39e9b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.config/nvim/coc-settings.json
+79
-16
79 additions, 16 deletions
.config/nvim/coc-settings.json
.vimrc
+32
-9
32 additions, 9 deletions
.vimrc
with
111 additions
and
25 deletions
.config/nvim/coc-settings.json
View file @
0cc39e9b
{
"languageserver"
:
{
"ccls"
:
{
"command"
:
"ccls"
,
"filetypes"
:
[
"c"
,
"cpp"
,
"cuda"
,
"objc"
,
"objcpp"
],
"rootPatterns"
:
[
".ccls-root"
,
"compile_commands.json"
],
"initializationOptions"
:
{
"cache"
:
{
"directory"
:
".ccls-cache"
},
"client"
:
{
"snippetSupport"
:
true
}
}
}
},
//
diagnostic-languageserver
"diagnostic-languageserver.enable"
:
true
,
"diagnostic-languageserver.mergeConfig"
:
false
,
...
...
@@ -158,6 +143,7 @@
"ACTL"
,
"ADDRE"
,
"ALGO"
,
"ALTA"
,
"ARTCSP"
,
"ASIC"
,
"ASYNCH"
,
...
...
@@ -179,6 +165,7 @@
"AwesomeWM"
,
"BANKB"
,
"BAUDRATE"
,
"BBPR"
,
"BKSWRST"
,
"BOOTPROT"
,
"BTreeMap"
,
...
...
@@ -191,6 +178,7 @@
"Bootprotection"
,
"Brusell"
,
"Buildroot"
,
"CACHERAM"
,
"CARCFG"
,
"CBOR"
,
"CBPDIS"
,
...
...
@@ -226,17 +214,50 @@
"Conv"
,
"Cpuram"
,
"Ctype"
,
"DALL"
,
"DARCHITECTURE"
,
"DARM"
,
"DBBPR"
,
"DBGT"
,
"DCURRENT"
,
"DDEBUG"
,
"DDMA"
,
"DEBOUNCEN"
,
"DEXTERNAL"
,
"DFAMILY"
,
"DFLPR"
,
"DFPGA"
,
"DGLOBAL"
,
"DGMRAM"
,
"DGUNILLAS"
,
"DHALTIUM"
,
"DHFV"
,
"DIAG"
,
"DINTERNAL"
,
"DIRCLR"
,
"DLCS"
,
"DLILIUMSOC"
,
"DMA"
,
"DMAIN"
,
"DNRF"
,
"DNVM"
,
"DPLLCTRLA"
,
"DPLLCTRLB"
,
"DPLLRATIO"
,
"DPPR"
,
"DPRODUCT"
,
"DRADIO"
,
"DRNGSEED"
,
"DRTL"
,
"DSCR"
,
"DSEC"
,
"DSECURE"
,
"DSTM"
,
"DSU"
,
"DSYSCTRL"
,
"DSYSTEM"
,
"DUT's"
,
"DVERSION"
,
"DWT"
,
"Damiano"
,
"Danaux"
,
...
...
@@ -266,6 +287,7 @@
"EXTI1"
,
"EXTI2"
,
"EXTI3"
,
"EXTMEM"
,
"Enhetsvektor"
,
"Epostadress"
,
"Eposthistoriken"
,
...
...
@@ -275,6 +297,7 @@
"FFI"
,
"FILTE"
,
"FLASHSIZE"
,
"FLPR"
,
"Feriejobb"
,
"Flashmode"
,
"Flashmodes"
,
...
...
@@ -288,6 +311,7 @@
"GHA"
,
"GHAS"
,
"GHASH"
,
"GMRAM"
,
"GND"
,
"GPIO"
,
"GPIOA"
,
...
...
@@ -296,6 +320,7 @@
"GPIOI"
,
"GPIOTE"
,
"GPIOs"
,
"GROM"
,
"Gatewaying"
,
"Gclk"
,
"GitLab"
,
...
...
@@ -303,6 +328,7 @@
"Grepit"
,
"Grundkurs"
,
"Gränssnitt"
,
"HFCLKSTAT"
,
"HOTP"
,
"HW"
,
"Haltium"
,
...
...
@@ -318,6 +344,7 @@
"ISR"
,
"ITM"
,
"ITMDump"
,
"Ibuild"
,
"Idents"
,
"Ints"
,
"IoT"
,
...
...
@@ -355,6 +382,7 @@
"MISO"
,
"MMIO"
,
"MOSI"
,
"MRAM"
,
"MSRV"
,
"Macrocell"
,
"Maskable"
,
...
...
@@ -367,9 +395,11 @@
"Mthd"
,
"Munns"
,
"Mutex"
,
"NFCT"
,
"NMIENCLR"
,
"NMIENSET"
,
"NMIFLAG"
,
"NONSECURE"
,
"NVIC"
,
"NVM"
,
"NVMCTRL"
,
...
...
@@ -393,6 +423,7 @@
"PAGESIZE"
,
"PARTNO"
,
"PID"
,
"PINSET"
,
"PMIC"
,
"POOKEY"
,
"PRIMASK"
,
...
...
@@ -460,6 +491,7 @@
"SLOC"
,
"SMT"
,
"SPI"
,
"SPIM"
,
"SRP"
,
"STM"
,
"STM32"
,
...
...
@@ -523,11 +555,14 @@
"UARTs"
,
"UDEV"
,
"UI"
,
"UNENCRY"
,
"UNINNIT"
,
"URAD"
,
"URAT"
,
"USART2"
,
"USARTs"
,
"USBD"
,
"USBH"
,
"USEE"
,
"Ultrascale"
,
"Undel"
,
...
...
@@ -539,6 +574,7 @@
"Utvecklarinformation"
,
"V3"
,
"VBFs"
,
"VBUS"
,
"VCC"
,
"VECS"
,
"VIUs"
,
...
...
@@ -560,10 +596,13 @@
"WWAN"
,
"WWDG"
,
"Wahlquist"
,
"Werror"
,
"Wextra"
,
"Winsa"
,
"XCVU"
,
"XORed"
,
"XOUT"
,
"XXAA"
,
"Xargo"
,
"Xeri"
,
"Xidfc"
,
...
...
@@ -577,6 +616,7 @@
"actf"
,
"aesmode"
,
"afirst"
,
"ahbap"
,
"ahbmask"
,
"ahbs"
,
"aktiveringstid"
,
...
...
@@ -654,6 +694,7 @@
"checkexamples"
,
"checkmacros"
,
"checkopt"
,
"cifra"
,
"ciplen"
,
"cksum"
,
"cleanup"
,
...
...
@@ -665,11 +706,14 @@
"cmdex"
,
"cntr"
,
"codegen"
,
"comlink"
,
"compat"
,
"compiledb"
,
"concat"
,
"const"
,
"consts"
,
"contiki"
,
"coremark"
,
"cosinussatsen"
,
"countsync"
,
"croutes"
,
...
...
@@ -765,8 +809,10 @@
"exekveringsmodeller"
,
"extint"
,
"extintpin"
,
"falign"
,
"fancyhdr"
,
"fastboot"
,
"ffunction"
,
"fidx"
,
"fifo"
,
"figurtexter"
,
...
...
@@ -776,6 +822,8 @@
"flashable"
,
"flashbank"
,
"flavor"
,
"fmax"
,
"fomit"
,
"formatcp"
,
"forskningsartiklar"
,
"forskningspapper"
,
...
...
@@ -794,6 +842,7 @@
"getswlm"
,
"gfmcmp"
,
"gfmul"
,
"ggdb"
,
"gpio"
,
"gridlayout"
,
"gsettings"
,
...
...
@@ -832,6 +881,7 @@
"intflag"
,
"introductional"
,
"io"
,
"ipct"
,
"iser"
,
"itm"
,
"jokertecken"
,
...
...
@@ -862,7 +912,9 @@
"legalpaper"
,
"letterpaper"
,
"letterspacing"
,
"lfclk"
,
"lightgray"
,
"liliumsoc"
,
"linkchecker"
,
"linkedin"
,
"linux"
,
...
...
@@ -879,6 +931,8 @@
"mars"
,
"masq"
,
"matchclr"
,
"mcmse"
,
"mcpu"
,
"md"
,
"mdbook"
,
"meddelanderad"
,
...
...
@@ -890,6 +944,7 @@
"messageram"
,
"metaprogramming"
,
"metodbeskrivningen"
,
"mfloat"
,
"microcontroller"
,
"microcontrollers"
,
"microkernel"
,
...
...
@@ -904,6 +959,8 @@
"momentaneous"
,
"motorvärmare"
,
"mottagaradress"
,
"msoft"
,
"mthumb"
,
"mult"
,
"multibib"
,
"multiremove"
,
...
...
@@ -920,6 +977,7 @@
"noexecstack"
,
"nondeleted"
,
"nonempty"
,
"nvmc"
,
"nvmp"
,
"oathmode"
,
"oathtool"
,
...
...
@@ -998,6 +1056,7 @@
"regexstöd"
,
"relän"
,
"repo"
,
"repower"
,
"repr"
,
"resched"
,
"resendings"
,
...
...
@@ -1021,6 +1080,7 @@
"rustfmt"
,
"rustup"
,
"rxts"
,
"saadc"
,
"samd"
,
"sblk"
,
"schedulability"
,
...
...
@@ -1050,6 +1110,7 @@
"socmodtest"
,
"spawnee"
,
"specialtecken"
,
"spiss"
,
"spki"
,
"spsc"
,
"src"
,
...
...
@@ -1150,6 +1211,7 @@
"v2"
,
"videostreaming"
,
"virtualenv"
,
"vref"
,
"vscode"
,
"wakeups"
,
"wbuf"
,
...
...
@@ -1173,5 +1235,6 @@
"yaml"
,
"zcvf"
,
"ämnesvalet"
]
],
"clangd.path"
:
"~/.config/coc/extensions/coc-clangd-data/install/14.0.3/clangd_14.0.3/bin/clangd"
}
This diff is collapsed.
Click to expand it.
.vimrc
View file @
0cc39e9b
...
...
@@ -277,9 +277,6 @@ else
" Grammatical checking
Plug
'rhysd/vim-grammarous'
" Tag generation for ctags
"Plug 'ludovicchabant/vim-gutentags'
" Rust-lang support
Plug
'rust-lang/rust.vim'
...
...
@@ -947,9 +944,29 @@ nmap <silent> <leader>gt :call CocAction('jumpDefinition', 'tabe')<CR>
nmap
<
silent
>
<
leader
>
me
<
Plug
>(
coc
-
command
)
expandMacro
nmap
<
silent
>
<
leader
>
gh
:
CocCommand clangd
.
switchSourceHeader
<
CR
>
nmap
<
silent
>
<
leader
>
gH
:
CocCommand clangd
.
switchSourceHeader
vsplit
<
CR
>
nmap
<
silent
>
<
leader
>
gsi
:
CocCommand clangd
.
SymbolInfo
<
CR
>
" From coc-completion-help 2022-08-01
inoremap
<
expr
>
<
cr
>
coc#pum#visible
()
? coc#_select_confirm
()
:
"\<CR>"
" Use K to show documentation in preview window
nnoremap
<
silent
>
K
:
call
<
SID
>
show_documentation
()<
CR
>
function
!
s:check_back_space
()
abort
let
col
=
col
(
'.'
)
-
1
return
!
col
||
getline
(
'.'
)[
col
-
1
]
=~
'\s'
endfunction
" Insert <tab> when previous text is space, refresh completion if not.
inoremap
<
silent
><
expr
>
<
TAB
>
\
coc#pum#visible
()
? coc#pum#
next
(
1
):
\
<
SID
>
check_back_space
()
?
"\<Tab>"
:
\
coc#refresh
()
inoremap
<
expr
><
S
-
TAB
>
coc#pum#visible
()
? coc#pum#
prev
(
1
)
:
"\<C-h>"
function
!
s:show_documentation
()
if
(
index
([
'vim'
,
'help'
],
&
filetype
)
>=
0
)
execute
'h '
.
expand
(
'<cword>'
)
...
...
@@ -1042,14 +1059,21 @@ let g:coc_global_extensions = [
\
'coc-markdownlint'
,
\
'coc-yaml'
,
\
'coc-toml'
,
\
'coc-xml'
,
\
'coc-pyright'
,
\
'coc-diagnostic'
,
\
'coc-spell-checker'
,
\
'coc-ltex'
,
\
'coc-cspell-dicts'
,
\
'coc-clangd'
,
\
'coc-snippets'
,
\
'coc-git'
,
\
'coc-vimtex'
]
" Of interest later:
"\'coc-explorer',
" Conflict with coc-git and coc-explorer https://github.com/weirongxu/coc-explorer/issues/480
" Coc END
nnoremap
<
silent
>
<
leader
>
lt
:!
languagetool
-
l
en
-
GB
-
d
DOUBLE_PUNCTUATION
,
MORFOLOGIK_RULE_EN_GB
,
ARROWS
[
1
],
NON_STANDARD_WORD
[
1
]
%
<
CR
>
...
...
@@ -1143,8 +1167,7 @@ let g:fzf_preview_window = 'right:60%'
let
g:fzf_buffers_jump
=
1
"
[
Buffers
]
to
existing
split
let
$FZF_DEFAULT_COMMAND
=
'rg --vimgrep --no-heading --color=never --smart-case --hidden --files-with-matches -g\!.git -g\!.pijul -g\!.ccls-cache . || git ls-tree -r --name-only HEAD || fd --type f || find .'
let
$FZF_DEFAULT_COMMAND
=
'rg --vimgrep --no-heading --color=never --smart-case --hidden --files-with-matches -g\!.git -g\!.pijul -g\!.ccls-cache -g\!\*.svd . || git ls-tree -r --name-only HEAD || fd --type f || find .'
"Get Files
"command! -bang -nargs=? -complete=dir Files
...
...
@@ -1153,12 +1176,12 @@ let $FZF_DEFAULT_COMMAND='rg --vimgrep --no-heading --color=never --smart-case -
"" Get text in files with Rg
"command! -bang -nargs=* Rg
" \ call fzf#vim#grep(
"
\ 'rg --
column --line-number
--no-heading --color=always --smart-case '.shellescape(<q-args>), 1,
"
\ 'rg --
vimgrep
--no-heading --color=always --smart-case
--hidden -g\!.git -g\!.pijul -g\!.ccls-cache -g\!\*.svd .
'.shellescape(<q-args>), 1,
" \ fzf#vim#with_preview(), <bang>0)
" Ripgrep advanced
function
!
RipgrepFzf
(
query
,
fullscreen
)
let
command_fmt
=
'rg --column --line-number --no-heading --color=always --smart-case --hidden -g\!.git -g\!.pijul -g\!.ccls-cache %s || true'
let
command_fmt
=
'rg --column --line-number --no-heading --color=always --smart-case --hidden -g\!.git -g\!.pijul -g\!.ccls-cache
-g\!\*.svd
%s || true'
let
initial_command
=
printf
(
command_fmt
,
shellescape
(
a:query
))
let
reload_command
=
printf
(
command_fmt
,
'{q}'
)
let
spec
=
{
'options'
:
[
'--phony'
,
'--query'
,
a:query
,
'--bind'
,
'change:reload:'
.
reload_command
]}
...
...
This diff is collapsed.
Click to expand it.