From f88c0531965c4855de35a8bd2af2d6c2d6152537 Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Tue, 17 Jan 2023 18:05:48 -0300 Subject: [PATCH] Add cr mapping in n mode and discord rich presence integration --- configs/nvim/after/plugin/lsp.lua | 2 ++ configs/nvim/after/plugin/treesitter.lua | 26 ++++++++++++++++-------- configs/nvim/lua/jabuxas/packer.lua | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/configs/nvim/after/plugin/lsp.lua b/configs/nvim/after/plugin/lsp.lua index 9bfaeac..9cc4303 100644 --- a/configs/nvim/after/plugin/lsp.lua +++ b/configs/nvim/after/plugin/lsp.lua @@ -28,6 +28,8 @@ local cmp_select = { behavior = cmp.SelectBehavior.Select } local cmp_mappings = lsp.defaults.cmp_mappings({ [''] = cmp.mapping.select_prev_item(cmp_select), [''] = cmp.mapping.select_next_item(cmp_select), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping.complete(), }) diff --git a/configs/nvim/after/plugin/treesitter.lua b/configs/nvim/after/plugin/treesitter.lua index f160c22..899fe6b 100644 --- a/configs/nvim/after/plugin/treesitter.lua +++ b/configs/nvim/after/plugin/treesitter.lua @@ -1,5 +1,5 @@ require 'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" + -- a list of parser names, or "all" ensure_installed = { "help", "python", @@ -15,24 +15,34 @@ require 'nvim-treesitter.configs'.setup { "css", }, - -- Install parsers synchronously (only applied to `ensure_installed`) + -- install parsers synchronously (only applied to `ensure_installed`) sync_install = true, - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + -- automatically install missing parsers when entering buffer + -- recommendation: set to false if you don't have `tree-sitter` cli installed locally auto_install = true, highlight = { -- `false` will disable the whole extension enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages + -- setting this to true will run `:h syntax` and tree-sitter at the same time. + -- set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- using this option may slow down your editor, and you may see some duplicate highlights. + -- instead of true it can also be a list of languages additional_vim_regex_highlighting = false, }, autotag = { enable = true, }, + + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = "", + node_decremental = "", + }, + }, } diff --git a/configs/nvim/lua/jabuxas/packer.lua b/configs/nvim/lua/jabuxas/packer.lua index bf29f06..b6b8592 100644 --- a/configs/nvim/lua/jabuxas/packer.lua +++ b/configs/nvim/lua/jabuxas/packer.lua @@ -134,6 +134,7 @@ return require('packer').startup(function(use) use({"L3MON4D3/LuaSnip", tag = "v.*"}) use "rafamadriz/friendly-snippets" + use "andweeb/presence.nvim" if packer_bootstrap then require('packer').sync()