dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

options.lua (1936B)


      1 -- Basic options
      2 vim.opt.mouse = ''                     -- Disable visual-mode mouse select.
      3 vim.opt.clipboard = 'unnamedplus'      -- Use the system clipboard on macOS.
      4 vim.opt.incsearch = true               -- Turn on incremental searching.
      5 vim.opt.hlsearch = true                -- Highlight search.
      6 vim.opt.visualbell = true              -- Less noise.
      7 vim.opt.number = true                  -- Use line numbering.
      8 vim.opt.ruler = true                   -- Show row/col in status.
      9 vim.opt.laststatus = 2                 -- Always show status line.
     10 vim.opt.showmatch = true               -- Highlight matching bracket.
     11 vim.opt.history = 50                   -- Keep 50 lines of cmdline history.
     12 vim.opt.wildmenu = true                -- Nicer autocomplete.
     13 vim.opt.wildmode = {'longest', 'full'}
     14 vim.opt.wildignore = {'*.o', '*.pyc'}  -- Ignore some filetypes during completion.
     15 vim.opt.spelllang = 'en_ca'            -- Set the spelling language.
     16 vim.opt.completeopt:append('longest')  -- Insert longest common prefix of options.
     17 vim.opt.autoindent = true              -- Copy indent from current line when starting a new line.
     18 vim.opt.smartindent = true             -- Attempt to autoindent when starting a new line.
     19 vim.opt.smarttab = true                -- Use shiftwidth rather than tabstop at start of line.
     20 vim.opt.tabstop = 2                    -- Number of spaces per tab.
     21 vim.opt.shiftwidth = 2                 -- Number of spaces for each step of autoindent.
     22 vim.opt.softtabstop = 2                -- Number of spaces per tab when editing.
     23 vim.opt.expandtab = true               -- Insert spaces in place of tabs.
     24 
     25 -- Don't show warnings, errors, etc. by default.
     26 vim.diagnostic.enable(false)
     27 
     28 -- Use fancy diagnostics icons.
     29 for type, icon in pairs({ Error = "✘", Warn = "▲", Hint = "⚑", Info = "»" }) do
     30   local hl = "DiagnosticSign" .. type
     31   vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
     32 end