vim.opt.hidden = true vim.opt.guicursor = "" vim.opt.nu = true vim.opt.relativenumber = true vim.opt.tabstop = 4 vim.opt.softtabstop = 4 vim.opt.shiftwidth = 4 vim.opt.expandtab = true vim.opt.hlsearch = false vim.opt.incsearch = true vim.opt.wrap = true vim.opt.mouse = "" vim.opt.smartindent = true vim.g.mapleader = " " -- vim.g.python3_host_prog = os.getenv('HOME') .. '/.local/venv/nvim/bin/python' -- --Set completeopt to have a better completion experience -- :help completeopt -- menuone: popup even when there's only one match -- noinsert: Do not insert text until a selection is made -- noselect: Do not select, force to select one from the menu -- shortness: avoid showing extra messages when using completion -- updatetime: set updatetime for CursorHold vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'} vim.opt.shortmess = vim.opt.shortmess + { c = true} vim.api.nvim_set_option('updatetime', 300) -- Fixed column for diagnostics to appear -- Show autodiagnostic popup on cursor hover_range -- Goto previous / next diagnostic warning / error -- Show inlay_hints more frequently vim.cmd([[ set signcolumn=yes autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false }) ]]) vim.cmd([[ let g:vimspector_sidebar_width = 85 let g:vimspector_bottombar_height = 15 let g:vimspector_terminal_maxwidth = 70 ]]) require("nvim-treesitter.configs").setup { ensure_installed = { "bash", "c", "css", "html", "javascript", "json", "lua", "markdown", "markdown_inline", "python", "regex", "rust", "scss", "sql", "toml", "tsx", "typescript", "vim", "yaml", }, filetypes = { "html", "javascript", "svelte", "typescript", "xml", }, yati = { enable = true, -- Disable by languages, see `Supported languages` disable = { "yaml" }, -- Whether to enable lazy mode (recommend to enable this if bad indent happens frequently) default_lazy = true, -- Determine the fallback method used when we cannot calculate indent by tree-sitter -- "auto": fallback to vim auto indent -- "asis": use current indent as-is -- "cindent": see `:h cindent()` -- Or a custom function return the final indent result. default_fallback = "auto" }, indent = { enable = false -- disable builtin indent module } }