" In je init.vim (VimScript) let g:coc_global_extensions = ['coc-tsserver', 'coc-json', 'coc-pyright', 'coc-sourcekit', 'coc-zig', 'coc-eslint', 'coc-prettier','coc-eslint','coc-html','coc-htmlhint','coc-css','coc-stylelint'] " 1. Alle Plugins in één blok call plug#begin() Plug 'Tetralux/odin.vim' " Plug 'harelang/hare.vim' Plug 'ziglang/zig.vim' Plug 'leafgarland/typescript-vim' Plug 'MaxMEllon/vim-jsx-pretty' Plug 'https://github.com/folke/which-key.nvim.git' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'} Plug 'https://github.com/JesseKPhillips/d.vim.git' Plug 'https://github.com/lewis6991/satellite.nvim.git' " Plug 'D-Language/vim-diet' Plug 'JesseKPhillips/d.vim' " Fuzzy Finder Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf binary Plug 'junegunn/fzf.vim' " FZF Vim integration Plug 'antoinemadec/coc-fzf' Plug 'alaviss/nim.nvim' Plug 'scalameta/nvim-metals' Plug 'tetralux/odin.vim' Plug 'ziglang/zig.vim' Plug 'ionide/Ionide-vim' Plug 'Olical/conjure' Plug 'preservim/tagbar' Plug 'preservim/nerdtree' " Completion (nvim-cmp) & Snippets Plug 'L3MON4D3/LuaSnip' " UI & Look Plug 'onsails/lspkind.nvim' Plug 'stevearc/dressing.nvim' Plug 'nvim-lualine/lualine.nvim' Plug 'nvim-tree/nvim-web-devicons' Plug 'ellisonleao/gruvbox.nvim' Plug 'norcalli/nvim-colorizer.lua' " Tools Plug 'nvim-lua/plenary.nvim' Plug 'ray-x/lsp_signature.nvim' Plug 'folke/which-key.nvim' Plug 'akinsho/toggleterm.nvim' Plug 'kylechui/nvim-surround' Plug 'guns/vim-sexp' Plug 'tpope/vim-sexp-mappings-for-regular-people' Plug 'akinsho/bufferline.nvim', { 'tag': '*' } Plug 'ray-x/lsp_signature.nvim' call plug#end() " 2. Vim Settings set guifont=NotoMono\ Nerd\ Font:h12 set background=dark colorscheme gruvbox set autoindent set clipboard+=unnamedplus set noexpandtab set tabstop=4 set shiftwidth=4 set number set termguicolors set signcolumn=yes set shortmess+=A " Voorkom 'ATTENTION' meldingen bij swap files set shortmess+=I " Geen intro scherm set shortmess+=c " Geen 'match 1 of 2' meldingen in de completion set termguicolors " Essentieel voor mooie kleuren set showtabline=2 " 0: nooit, 1: alleen bij >1 tab, 2: altijd " Gebruik het systeem klembord voor alles (y, d, p) set clipboard+=unnamedplus set completeopt=menu,menuone,noselect " ============================================================================= " 3. Mappings & Settings " ============================================================================= let g:conjure#client#scheme#stdio#command = "csi -quiet -:c" let g:conjure#client#racket#stdio#command = "racket" let mapleader = " " " --- Algemene Instellingen --- set encoding=utf-8 set nobackup set nowritebackup set updatetime=300 set signcolumn=yes set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} " --- Interface & Navigatie --- nmap :TagbarToggle nnoremap :NERDTreeToggle nnoremap exe v:count1 . "ToggleTerm" nnoremap :noh " Snel tussen splits bewegen nnoremap h nnoremap j nnoremap k nnoremap l " Buffer management (Tabline) nnoremap :BufferLineCycleNext nnoremap :BufferLineCyclePrev nnoremap x :bdelete " --- FZF (Zoeken) --- nnoremap p :Files nnoremap b :Buffers nnoremap rg :Rg nnoremap h :History: " --- Klembord --- " Plakken zonder register te overschrijven xnoremap v "_dP " Kopieer naar systeemklembord nnoremap y "+y vnoremap y "+y " --- CoC Autocomplete (Tab & Enter) --- inoremap \ coc#pum#visible() ? coc#pum#next(1) : \ CheckBackspace() ? "\" : \ coc#refresh() inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" inoremap coc#pum#visible() ? coc#pum#confirm() \: "\u\\=coc#on_enter()\" function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction " --- CoC LSP Mappings --- nmap gd (coc-definition) nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) nnoremap K :call ShowDocumentation() function! ShowDocumentation() if CocAction('hasProvider', 'hover') call CocActionAsync('doHover') else call feedkeys('K', 'in') endif endfunction nmap rn (coc-rename) nmap ac (coc-codeaction-cursor) nmap qf (coc-fix-current) nmap n :CocCommand explorer " --- CoC List Mappings (Spatie + toets) --- nnoremap a :CocList diagnostics nnoremap c :CocList commands nnoremap o :CocList outline nnoremap s :CocList -I symbols nnoremap p :CocListResume " --- NERDTree Config --- let g:NERDTreeCascadeOpenSingleChildDir = 0 let g:NERDTreeIgnore = ['^node_modules$', '^\.git$', '^\.cache$', '^\.nimble$', '^target$'] autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " Zoek in de inhoud van bestanden (vereist 'ripgrep' op FreeBSD) nnoremap g :Rg " -- Stel je Leader key in (spatie is erg populair voor moderne setups) " vim.g.mapleader = " " " vim.g.maplocalleader = " " " Explicitly set filetype for Diet templates autocmd BufNewFile,BufRead *.dt set filetype=diet "---------------------------------------------------------------------- lua << EOF -- Schakel which-key in require("which-key").setup {} -- Voorbeeld van hoe je shortcuts groepeert zodat Which-Key ze mooi toont local wk = require("which-key") wk.add({ { "f", group = "Bestand" }, -- Groep voor bestanden { "ff", "Telescope find_files", desc = "Zoek Bestand" }, { "n", group = "NERDTree" }, { "nt", "NERDTreeToggle", desc = "Toggle Tree" }, { "c", group = "Code/LSP" }, }) EOF lua << EOF require('satellite').setup { current_only = false, winblend = 50, zindex = 40, excluded_filetypes = {}, width = 2, handlers = { cursor = { enable = true, -- Supports any number of symbols symbols = { '⎺', '⎻', '⎼', '⎽' } -- symbols = { '⎻', '⎼' } -- Highlights: -- - SatelliteCursor (default links to NonText }, search = { enable = true, -- Highlights: -- - SatelliteSearch (default links to Search) -- - SatelliteSearchCurrent (default links to SearchCurrent) }, diagnostic = { enable = true, signs = {'-', '=', '≡'}, min_severity = vim.diagnostic.severity.HINT, -- Highlights: -- - SatelliteDiagnosticError (default links to DiagnosticError) -- - SatelliteDiagnosticWarn (default links to DiagnosticWarn) -- - SatelliteDiagnosticInfo (default links to DiagnosticInfo) -- - SatelliteDiagnosticHint (default links to DiagnosticHint) }, gitsigns = { enable = true, signs = { -- can only be a single character (multibyte is okay) add = "│", change = "│", delete = "-", }, -- Highlights: -- SatelliteGitSignsAdd (default links to GitSignsAdd) -- SatelliteGitSignsChange (default links to GitSignsChange) -- SatelliteGitSignsDelete (default links to GitSignsDelete) }, marks = { enable = true, show_builtins = false, -- shows the builtin marks like [ ] < > key = 'm' -- Highlights: -- SatelliteMark (default links to Normal) }, quickfix = { signs = { '-', '=', '≡' }, -- Highlights: -- SatelliteQuickfix (default links to WarningMsg) } }, } EOF lua << EOF -- 3. Top Bar (Bufferline) Setup require("bufferline").setup({ options = { mode = "buffers", always_show_bufferline = true, separator_style = "slant", offsets = { { filetype = "nerdtree", text = "File Explorer", text_align = "left", separator = true } }, } }) EOF lua << EOF -- UI Modules require('lualine').setup({ options = { theme = 'gruvbox', globalstatus = true }}) require('dressing').setup() require('lsp_signature').setup({ floating_window = true, hint_enable = true }) require('colorizer').setup() require('toggleterm').setup() require('which-key').setup() require('nvim-surround').setup() require('gruvbox').setup({ transparent_mode = true }) EOF lua << EOF require("bufferline").setup({ options = { mode = "buffers", -- Gebruik 'tabs' als je echte vim-tabs wilt, maar 'buffers' is gebruikelijker separator_style = "thin", numbers = "none", diagnostics = "nvim_lsp", -- Toont errors/warnings van je LSP's (Nim, Scala, etc.) offsets = { { filetype = "nerdtree", text = "File Explorer", text_align = "left", highlight = "Directory", separator = true } }, show_buffer_icons = true, show_buffer_close_icons = true, separator_style = "slant", -- Opties: "slant", "thick", "thin" } }) -- Handige keymaps om te switchen tussen bestanden vim.keymap.set('n', '', 'BufferLineCycleNext', { silent = true }) vim.keymap.set('n', '', 'BufferLineCyclePrev', { silent = true }) EOF lua << EOF require('lualine').setup { options = { theme = 'gruvbox', icons_enabled = true, component_separators = { left = '', right = ''}, section_separators = { left = '', right = ''} }, sections = { lualine_a = {'mode'}, lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, lualine_y = {'progress'}, lualine_z = {'location'} } } EOF lua << EOF vim.opt.guifont = "NotoMono_Nerd_Font:h12" EOF " ---------------------------------------------------------------------