Skip to content

Commit

Permalink
feat(vim): improve options
Browse files Browse the repository at this point in the history
fixes folds
  • Loading branch information
marmos91 committed Jun 21, 2024
1 parent d34ea93 commit e4c295a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"oil.nvim": { "branch": "master", "commit": "f6df58ad370f45dbc18c42ffbaefbcf27df14036" },
"oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"precognition.nvim": { "branch": "main", "commit": "02dcc8f8db677fe02d2dd68da6155177283fe711" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
Expand Down
36 changes: 32 additions & 4 deletions config/nvim/lua/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,30 @@ vim.opt.mouse = "a"
vim.opt.showmode = false

-- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.opt.clipboard = "unnamedplus"
-- only set clipboard if not in ssh, to make sure the OSC 52
-- integration works automatically. Requires Neovim >= 0.10.0
vim.opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard

-- Enable break indent
vim.opt.completeopt = "menu,menuone,noselect"

-- Indentation
vim.opt.shiftwidth = 4
vim.opt.smartindent = true
vim.opt.breakindent = true

-- Use spaces instead of tabs
vim.opt.expandtab = true

-- Special carachters
vim.opt.fillchars = {
foldopen = "",
foldclose = "",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
}

-- Save undo history
vim.opt.undofile = true

Expand Down Expand Up @@ -66,6 +83,17 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10

-- Folding (requires neovim > 0.10)
vim.opt.smoothscroll = true
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldmethod = "expr"
vim.opt.foldtext = ""
vim.opt.foldlevel = 99

-- Grep
vim.opt.grepformat = "%f:%l:%c:%m"
vim.opt.grepprg = "rg --vimgrep"

-- Undercurl
vim.cmd([[let &t_Cs = "\e[4:3m"]])
vim.cmd([[let &t_Ce = "\e[4:0m"]])
Expand Down

0 comments on commit e4c295a

Please sign in to comment.