Skip to content

Language Support Plugins

This page describes plugins related to language servers and syntax highlighting.

nvim-treesitter

Provides syntax highlighting and text objects.

Configuration file: lua/peinan/plugins/treesitter.lua

Dependencies:

  • nvim-treesitter-textobjects

Main features:

  • Fast syntax highlighting
  • Text object extensions
  • Incremental selection
  • Code folding

Configuration features:

  • Auto installation
  • Text object configuration
  • Highlight priority settings

nvim-lspconfig

Provides LSP (Language Server Protocol) configuration.

Configuration file: lua/peinan/native/lsp/

Main features:

  • Language server configuration
  • Code completion
  • Jump to definitions and references
  • Rename
  • Format
  • Diagnostics display (errors, warnings, info, hints)
  • Virtual text diagnostics (toggleable)
  • Auto format (toggleable)
  • Diagnostics float display
  • Navigate between diagnostics

Configuration files:

Keymaps: See the LSP-related section in Keymaps List

nvim-cmp

Provides a completion engine.

Configuration file: lua/peinan/plugins/completion.lua

Dependencies:

  • cmp-omni
  • cmp-nvim-lsp
  • cmp-buffer
  • cmp-path
  • cmp-cmdline
  • cmp_luasnip
  • LuaSnip
  • friendly-snippets

Main features:

  • LSP completion
  • Path completion
  • Buffer completion
  • Command line completion
  • Snippet completion

Configuration:

lua
local sources = CMP.config.sources({
    { name = "nvim_lsp" },
    { name = "path" },
})

Keymaps:

  • <C-Space> - Start completion
  • <C-u> / <C-d> - Scroll documentation
  • <C-e> - Abort completion
  • <CR> - Confirm completion

Completion sources:

  • nvim_lsp: Completion from LSP
  • path: File path completion
  • buffer: Text completion from buffers (when searching)
  • cmdline: Command line completion

nvim-lint

Integrates linters.

Configuration file: lua/peinan/plugins/linter.lua

Main features:

  • Integration of multiple linters
  • Auto linting
  • Diagnostics display

Configuration features:

  • Automatically enabled when LSP attaches
  • File type-specific linter settings

todo-comments.nvim

Highlights and makes TODO comments searchable.

Configuration file: lua/peinan/plugins/todo.lua

Dependencies:

  • plenary.nvim

Main features:

  • TODO comment highlighting
  • Custom keyword support
  • Integration with Telescope

Supported keywords:

  • FIX - Bug fixes
  • HACK - Hacks
  • TODO - Tasks
  • WARN - Warnings
  • PERF - Performance
  • NOTE - Notes
  • TEST - Tests

Configuration:

lua
require("todo-comments").setup({
    signs = false,
    keywords = {
        FIX = { icon = "" },
        HACK = { icon = "󱠇" },
        TODO = { icon = "" },
        WARN = { icon = "" },
        PERF = { icon = "󱑂" },
        NOTE = { icon = "" },
        TEST = { icon = "󰙨" },
    },
})

Keymaps:

  • ft - TODO search (current directory)
  • fT - TODO search (Git root)

lazydev.nvim

Supports Lua development.

Dependencies:

  • luvit-meta

Main features:

  • Lua API completion
  • Type information display

Configuration features:

  • Only enabled for Lua file types
  • Automatically enabled when LSP attaches

Neovim Configuration Documentation