2021-08-08 15:33:23 +03:00
|
|
|
local o = vim.o
|
|
|
|
local g = vim.g
|
|
|
|
|
|
|
|
-- True colors
|
|
|
|
o.termguicolors = true
|
|
|
|
|
2022-10-20 11:24:54 +03:00
|
|
|
-- Font for nvim GUI's
|
2022-10-26 14:08:20 +03:00
|
|
|
o.guifont = "Fira Code:h14"
|
2022-10-20 11:24:54 +03:00
|
|
|
|
2022-11-02 16:04:11 +02:00
|
|
|
-- Hide mouse when typing in neovide
|
|
|
|
g.neovide_hide_mouse_when_typing = true
|
|
|
|
|
|
|
|
-- Enable cursor particles in neovide
|
2022-11-17 09:18:56 +02:00
|
|
|
g.neovide_cursor_vfx_mode = "railgun"
|
2022-11-02 16:04:11 +02:00
|
|
|
|
2021-08-08 15:33:23 +03:00
|
|
|
-- Floating window transparency
|
|
|
|
o.winblend = 10
|
|
|
|
|
2022-10-20 11:24:54 +03:00
|
|
|
-- Set window title
|
|
|
|
o.title = true
|
2022-10-26 14:08:20 +03:00
|
|
|
o.titlestring = "NeoVim: " .. vim.fn.getcwd()
|
2022-10-20 11:24:54 +03:00
|
|
|
|
2021-08-17 22:36:48 +03:00
|
|
|
-- Diff settings
|
2022-10-26 14:08:20 +03:00
|
|
|
o.diffopt = "filler,internal,algorithm:histogram,indent-heuristic"
|
2021-08-17 22:36:48 +03:00
|
|
|
|
2021-10-06 16:31:09 +03:00
|
|
|
-- Allow switching buffers with unsaved changes
|
2022-09-02 23:49:56 +03:00
|
|
|
o.hidden = true
|
2021-10-06 16:31:09 +03:00
|
|
|
|
2021-08-18 09:29:44 +03:00
|
|
|
-- Show line numbers
|
2022-09-02 23:49:56 +03:00
|
|
|
o.number = true
|
2021-08-18 09:29:44 +03:00
|
|
|
|
2022-09-03 14:41:13 +03:00
|
|
|
o.guicursor = table.concat({
|
2022-10-26 14:08:20 +03:00
|
|
|
"i:ver1", -- Vertical bar cursor in insert mode
|
|
|
|
"a:blinkon1", -- Blinking cursor in all modes
|
|
|
|
}, ",")
|
2021-08-08 15:33:23 +03:00
|
|
|
|
2022-09-02 23:49:56 +03:00
|
|
|
-- Enable global statusline
|
|
|
|
o.laststatus = 3
|
|
|
|
|
2022-09-06 16:37:50 +03:00
|
|
|
o.cmdheight = 1
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Use suda by default
|
|
|
|
g.suda_smart_edit = 1
|
|
|
|
|
|
|
|
-- Case insensitive search
|
|
|
|
o.ignorecase = true
|
|
|
|
o.smartcase = true
|
|
|
|
|
2022-08-23 22:18:57 +03:00
|
|
|
-- Set leader
|
|
|
|
g.mapleader = " "
|
2022-09-03 00:33:55 +03:00
|
|
|
|
|
|
|
-- Indentation settings
|
|
|
|
o.tabstop = 4
|
|
|
|
o.shiftwidth = 4
|
|
|
|
o.smartindent = true
|
2022-11-17 09:18:56 +02:00
|
|
|
|
|
|
|
-- Wayland clipboard provider that strips carriage returns (GTK3 issue).
|
|
|
|
-- This is needed because currently there's an issue where GTK3 applications on
|
|
|
|
-- Wayland contain carriage returns at the end of the lines (this is a root
|
|
|
|
-- issue that needs to be fixed).
|
|
|
|
vim.cmd([[
|
|
|
|
let g:clipboard = {
|
|
|
|
\ 'name': 'wayland-strip-carriage',
|
|
|
|
\ 'copy': {
|
|
|
|
\ '+': 'wl-copy --foreground --type text/plain',
|
|
|
|
\ '*': 'wl-copy --foreground --type text/plain --primary',
|
|
|
|
\ },
|
|
|
|
\ 'paste': {
|
|
|
|
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
|
|
|
|
\ '*': {-> systemlist('wl-paste --no-newline --primary | tr -d "\r"')},
|
|
|
|
\ },
|
|
|
|
\ 'cache_enabled': 1,
|
|
|
|
\ }
|
|
|
|
]])
|