From fb734f9e03eea1726139ea359dcdca5357b4961c Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 12 Oct 2021 16:19:52 +0300 Subject: nvim: daily love --- .config/nvim/lua/autocmds.lua | 2 +- .config/nvim/lua/mappings.lua | 8 ++++++++ .config/nvim/lua/plugin_settings.lua | 31 ++++++++++++++++++++++++++----- .config/nvim/lua/settings.lua | 3 +-- 4 files changed, 36 insertions(+), 8 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua index 90915db..1b8751c 100644 --- a/.config/nvim/lua/autocmds.lua +++ b/.config/nvim/lua/autocmds.lua @@ -8,7 +8,7 @@ local au = require('au') au.TextYankPost = function() - vim.highlight.on_yank({ higroup = 'Visual', timeout = 120 }) + vim.highlight.on_yank { higroup="IncSearch", timeout=400 } end -- autocmd FileType vimwiki,latex,tex setlocal formatprg=/home/yigit/.local/bin/sentences diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index a7827d4..c898960 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -155,7 +155,15 @@ map('n', 'fg', "lua require('telescope.builtin').live_grep()") map('n', 'fb', "lua require('telescope.builtin').buffers()") map('n', 'fh', "lua require('telescope.builtin').help_tags()") +-- vista map('n', '', ":Vista focus") map('n', '', ":Vista finder") + +map('n', 'fh', ':DashboardFindHistory') +map('n', 'ff', ':DashboardFindFile') +map('n', 'tc', ':DashboardChangeColorscheme') +map('n', 'fa', ':DashboardFindWord') +map('n', 'fb', ':DashboardJumpMark') +map('n', 'cn', ':DashboardNewFile') -- }}} plug mappings -- diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index f5caac6..4accdd2 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -225,17 +225,39 @@ g.dashboard_preview_pipeline = 'lolcat' g.dashboard_preview_file = '~/.config/nvim/neovim.cat' g.dashboard_preview_file_height = 14 g.dashboard_preview_file_width = 90 + +g.dashboard_custom_shortcut = { + last_session = ' s l', + find_history = ' f h', + find_file = ' f f', + new_file = ' c n', + change_colorscheme = ' t c', + find_word = ' f a', + book_marks = ' f b', +} + -- }}} dashboard -- -- treesitter {{{ -- -require'nvim-treesitter.configs'.setup { +require 'nvim-treesitter.configs'.setup { ensure_installed = "maintained", - ignore_install = { "javascript" }, highlight = { enable = true, additional_vim_regex_highlighting = false, }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, + indent = { + enable = true + } } -- }}} treesitter -- @@ -315,8 +337,7 @@ end g.vista_icon_indent = {"╰ ", "│ "} -- }}} vista -- +-- float-preview.nvim {{{ -- g["float_preview#docked"] = 0 +-- }}} float-preview.nvim -- --- highlight on yank -cmd('highlight HighlightedyankRegion cterm=reverse gui=reverse') -g.highlightedyank_highlight_duration = 200 diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index 7276b0e..1030fdb 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -94,5 +94,4 @@ opt.diffopt = { -- menu: use a popup menu to show the possible completions -- preview: show extra information -opt.completeopt = {"menu", "preview"} - +opt.completeopt = {"menu", "menuone", "noselect"} -- cgit v1.2.3-70-g09d2