dotfiles/nvim/lua/config/options.lua
m1ngsama 11cbe8c259 nvim: modernize and optimize neovim configuration
Update deprecated LSP server names, fix API calls, and resolve plugin
conflicts to improve configuration maintainability and performance.

Changes include:

- Replace deprecated tsserver with ts_ls in LSP configuration
  The nvim-lspconfig project renamed tsserver to ts_ls following
  upstream changes. This update ensures compatibility with current
  and future versions.

- Fix treesitter API call from config to configs
  The correct API is nvim-treesitter.configs, not .config. This
  fixes potential runtime errors during treesitter initialization.

- Resolve completion plugin conflict between nvim-cmp and blink.cmp
  Disable nvim-cmp configuration as blink.cmp is already configured
  and active. Running both completion engines simultaneously causes
  conflicts and degrades performance.

- Replace symbols-outline.nvim with aerial.nvim
  The symbols-outline plugin is no longer actively maintained.
  Aerial.nvim provides similar functionality with better performance
  and active maintenance.

- Remove redundant cmdheight setting in options.lua
  The cmdheight option was set twice. Keep only the modern value
  of 0 and remove the outdated conditional check for nvim-0.8.

- Enable matchparen in disabled_plugins list
  Modern alternatives like vim-matchup provide better functionality.
  Disabling the built-in matchparen reduces startup overhead.

- Update dashboard header from DEVASLIFE to M1NGSAMA
  Personalize the neovim startup screen with custom branding.

These changes bring the configuration up to date with current best
practices, eliminate deprecated APIs, and improve overall performance
and maintainability.

Signed-off-by: m1ngsama <m1ng@example.com>
2025-12-20 20:43:38 +08:00

45 lines
1.3 KiB
Lua

vim.g.mapleader = " "
vim.opt.encoding = "utf-8"
vim.opt.fileencoding = "utf-8"
vim.opt.number = true
vim.opt.title = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.hlsearch = true
vim.opt.backup = false
vim.opt.showcmd = true
vim.opt.laststatus = 3
vim.opt.expandtab = true
vim.opt.scrolloff = 10
vim.opt.shell = "fish"
vim.opt.backupskip = { "/tmp/*", "/private/tmp/*" }
vim.opt.inccommand = "split"
vim.opt.ignorecase = true -- Case insensitive searching UNLESS /C or capital in search
vim.opt.smarttab = true
vim.opt.breakindent = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.wrap = false -- No Wrap lines
vim.opt.backspace = { "start", "eol", "indent" }
vim.opt.path:append({ "**" }) -- Finding files - Search down into subfolders
vim.opt.wildignore:append({ "*/node_modules/*" })
vim.opt.splitbelow = true -- Put new windows below current
vim.opt.splitright = true -- Put new windows right of current
vim.opt.splitkeep = "cursor"
vim.opt.mouse = ""
-- Undercurl
vim.cmd([[let &t_Cs = "\e[4:3m"]])
vim.cmd([[let &t_Ce = "\e[4:0m"]])
-- Add asterisks in block comments
vim.opt.formatoptions:append({ "r" })
vim.cmd([[au BufNewFile,BufRead *.astro setf astro]])
vim.cmd([[au BufNewFile,BufRead Podfile setf ruby]])
-- Modern Neovim (0.8+) supports cmdheight = 0
vim.opt.cmdheight = 0