Add cr mapping in n mode and discord rich presence integration

This commit is contained in:
Lucas Barbieri 2023-01-17 18:05:48 -03:00
parent 78e313751e
commit f88c053196
3 changed files with 21 additions and 8 deletions

View File

@ -28,6 +28,8 @@ local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-k>'] = cmp.mapping.scroll_docs(-4),
['<C-j>'] = cmp.mapping.scroll_docs(4),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})

View File

@ -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 = "<cr>",
node_incremental = "<cr>",
scope_incremental = "<s-cr>",
node_decremental = "<bs>",
},
},
}

View File

@ -134,6 +134,7 @@ return require('packer').startup(function(use)
use({"L3MON4D3/LuaSnip", tag = "v<CurrentMajor>.*"})
use "rafamadriz/friendly-snippets"
use "andweeb/presence.nvim"
if packer_bootstrap then
require('packer').sync()