settings.lua 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object"
  2. vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|.
  3. vim.cmd('set inccommand=split') -- Make substitution work in realtime
  4. vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers
  5. vim.o.title = true
  6. TERMINAL = vim.fn.expand('$TERMINAL')
  7. vim.cmd('let &titleold="'..TERMINAL..'"')
  8. vim.o.titlestring="%<%F%=%l/%L - nvim"
  9. vim.wo.wrap = O.wrap_lines -- Display long lines as just one line
  10. vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
  11. vim.cmd('syntax on') -- syntax highlighting
  12. vim.o.pumheight = 10 -- Makes popup menu smaller
  13. vim.o.fileencoding = "utf-8" -- The encoding written to file
  14. vim.o.cmdheight = 2 -- More space for displaying messages
  15. vim.cmd('set colorcolumn=99999') -- fix indentline for now
  16. vim.o.mouse = "a" -- Enable your mouse
  17. vim.o.splitbelow = true -- Horizontal splits will automatically be below
  18. vim.o.termguicolors = true -- set term gui colors most terminals support this
  19. vim.o.splitright = true -- Vertical splits will automatically be to the right
  20. -- vim.o.t_Co = "256" -- Support 256 colors
  21. vim.o.conceallevel = 0 -- So that I can see `` in markdown files
  22. vim.cmd('set ts=4') -- Insert 2 spaces for a tab
  23. vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation
  24. vim.cmd('set expandtab') -- Converts tabs to spaces
  25. vim.bo.smartindent = true -- Makes indenting smart
  26. vim.wo.number = O.number -- set numbered lines
  27. vim.wo.relativenumber = O.relative_number -- set relative number
  28. vim.wo.cursorline = O.cursorline -- set highlighting of the current line
  29. vim.o.showtabline = 2 -- Always show tabs
  30. vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore
  31. vim.o.backup = false -- This is recommended by coc
  32. vim.o.writebackup = false -- This is recommended by coc
  33. vim.o.swapfile = false -- Do not write any swp files
  34. vim.o.undodir = CACHE_PATH .. '/undo' -- Set undo directory
  35. vim.o.undofile = true -- Enable persistent undo
  36. vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
  37. vim.o.updatetime = 300 -- Faster completion
  38. vim.o.timeoutlen = O.timeoutlen -- By default timeoutlen is 1000 ms
  39. vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else
  40. -- vim.g.nvim_tree_disable_netrw = O.nvim_tree_disable_netrw -- enable netrw for remote gx gf support (must be set before plugin's packadd)
  41. vim.cmd('filetype plugin on') -- filetype detection
  42. -- vim.o.guifont = "JetBrainsMono\\ Nerd\\ Font\\ Mono:h18"
  43. -- vim.o.guifont = "Hack\\ Nerd\\ Font\\ Mono"
  44. -- vim.o.guifont = "SauceCodePro Nerd Font:h17"
  45. vim.o.guifont = "FiraCode Nerd Font:h17"
  46. -- vim.o.guifont = "JetBrains\\ Mono\\ Regular\\ Nerd\\ Font\\ Complete"