Skip to content

uggedal/nvim-config

Repository files navigation

Neovim config

Neovim config in lua.

Configuration

  • settings: tweak built-in settings.
  • languages: spaces vs tab indent setup, text wrapping, line numbering and conceal for different languages.
  • keymaps: definition and re-definition of built-in mappings:
    • <C-l>: clear screen (original) and clear search highlight.
    • ,cp: paste from system clipboard.
    • ,cy: yank to system clipboard (visual mode).
    • ,p: previous buffer.
    • ,n: next buffer.
    • ,d: delete buffer.
    • ,gc: git commit and sync.
    • ,e: edit in working directory of current file.
    • gl: view diagnostic.

Custom plugins

Other plugins

  • which-key with spelling suggestions (z=).
  • treesitter.
  • telescope with telescope-fzf-native with mappings for:
    • <C-p>: finding files
    • <C-g: live grep
    • ,gl: list git commits of current file.
    • ,gL: list all git commits.
    • ,gB: list git branches.
    • ,gs: show git status
    • gr: list lsp references
  • buftabline for buffer list in the tabline with mappings ,1 to ,9 to switch to buffer with corresponding index.
  • gitsigns showing diffs in number column and mappings for:
    • ,gb: git blame for current line.
    • [h: go to previous diff hunk.
    • ]h: go to previous diff hunk.
  • nvim-colorizer to highlight hex color definitions.
  • nvim-lastplace for opening files at last edit position.
  • mkdir for creating missing directories when saving files.
  • lsp with mappings for:
    • gd: go to definition.
    • ,lr: rename.
    • ,lc: code action.
    • K: show symbol info.
  • lspconfig setup for pylsp, bashls, deno, gopls and lua-language-server.
  • null-ls with:
    • Lua formatting: stylua.
    • Shell formatting and diagnostics: shfmt and shellcheck.
    • Go formatting: gofmt.
  • cmp for non-automatic completion with Tab for path, lsp and buffer sources.