1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
jdhao
954a4a1cad
Merge pull request #95 from jdhao/error-msg
refactor: use nvim_err_writeln for error msg
2022-09-07 23:36:49 +08:00
jdhao
67a322c26c refactor: use nvim_err_writeln for error msg 2022-09-07 23:35:18 +08:00
jdhao
91c9dbe40d
Merge pull request #94 from jdhao/neovide
add neovide conf
2022-09-07 23:31:57 +08:00
jdhao
6a5f1d24a7 add neovide conf 2022-09-07 23:30:52 +08:00
3 changed files with 19 additions and 4 deletions

View File

@ -59,3 +59,16 @@ if exists('g:fvim_loaded')
FVimUIPopupMenu v:false
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" config for neovide "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if exists("g:neovide")
set guifont=Hack\ NF:h10
let g:neovide_transparency = 1.0
let g:neovide_cursor_animation_length = 0.1
let g:neovide_cursor_trail_size=0.3
let g:neovide_cursor_vfx_mode = ""
let g:neovide_cursor_vfx_particle_density=10.0
let g:neovide_cursor_vfx_opacity=150.0
endif

View File

@ -8,15 +8,16 @@
-- Email: jdhao@hotmail.com
-- Blog: https://jdhao.github.io/
local api = vim.api
local utils = require "utils"
-- check if we have the latest stable version of nvim
local expected_ver = "0.7.2"
local utils = require "utils"
local nvim_ver = utils.get_nvim_version()
if nvim_ver ~= expected_ver then
local msg = string.format("Unsupported nvim version: expect %s, but got %s instead!", expected_ver, nvim_ver)
vim.api.nvim_echo({ { msg, "ErrorMsg" } }, false, {})
api.nvim_err_writeln(msg)
return
end

View File

@ -1,3 +1,4 @@
local api = vim.api
local keymap = vim.keymap
require('hlslens').setup({
@ -12,7 +13,7 @@ local activate_hlslens = function(direction)
msg = msg:sub(13)
if not status then
vim.api.nvim_echo({{msg, "ErrorMsg"}}, false, {})
api.nvim_err_writeln(msg)
return
end
require('hlslens').start()