fix(nvim completion): relative path to edited files + hide nvim startup message

This commit is contained in:
TheK4n 2023-01-31 01:10:55 +03:00
parent 01b7c37139
commit 96a738f6bc
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
local status, autosave = pcall(require, "gruvbox") local status, _ = pcall(require, "gruvbox")
if (not status) then return end if (not status) then return end
vim.cmd.colorscheme("gruvbox") vim.cmd.colorscheme("gruvbox")

View File

@ -1,5 +1,6 @@
local opt = vim.opt local opt = vim.opt
opt.ruler = true opt.ruler = true
opt.encoding = 'utf-8' opt.encoding = 'utf-8'
opt.fileencoding = 'utf-8' opt.fileencoding = 'utf-8'
@ -7,7 +8,11 @@ opt.fileencoding = 'utf-8'
opt.number = true opt.number = true
opt.relativenumber = true opt.relativenumber = true
opt.clipboard:append { 'unnamedplus' } opt.clipboard:append { 'unnamedplus' }
opt.shm = opt.shm["_value"] .. "I" -- disable startup message
opt.shell = 'bash' opt.shell = 'bash'
opt.ttimeoutlen = 0 opt.ttimeoutlen = 0

View File

@ -3,7 +3,7 @@
_nvim() { _nvim() {
subcmds=($(git diff --name-only 2>/dev/null)) subcmds=($(git diff --name-only --relative 2>/dev/null))
if [[ -z "$subcmds" ]]; then if [[ -z "$subcmds" ]]; then
_files _files
else else