diff --git a/config/fish/conf.d/linux/handlr.fish b/config/fish/conf.d/linux/handlr.fish index 25da8f2f..0ee496f5 100644 --- a/config/fish/conf.d/linux/handlr.fish +++ b/config/fish/conf.d/linux/handlr.fish @@ -1 +1,3 @@ -export BROWSER="handlr" +function open + handlr open $argv +end diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 0c053736..39159597 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,8 +1,11 @@ { + "LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" }, "copilot.vim": { "branch": "release", "commit": "719dd8d0beab993dbad47a9e86ecb0dbd4a99da5" }, "d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" }, diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 2210fb39..dc36c637 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -105,7 +105,7 @@ return require('lazy').setup({ }, }, }, - dependencies = { { "nvim-lua/plenary.nvim" } }, + dependencies = { "nvim-lua/plenary.nvim" }, } }, { 'folke/which-key.nvim', config = function() require("which-key").setup() end, event = "BufEnter" }, @@ -243,21 +243,74 @@ return require('lazy').setup({ { 'hrsh7th/cmp-buffer', lazy = false }, { 'hrsh7th/cmp-path', lazy = false }, { 'hrsh7th/cmp-cmdline', lazy = false }, + { 'L3MON4D3/LuaSnip' }, + { 'saadparwaiz1/cmp_luasnip' }, + { + "petertriho/cmp-git", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() require "cmp_git".setup() end, + }, { 'hrsh7th/nvim-cmp', lazy = false, - setup = function() + config = function() local cmp = require("cmp") - -- print!"setting up cmp"); cmp.setup({ - view = cmp.config.view({ + view = { entries = { name = 'custom', selection_order = 'near_cursor' } - }), + }, + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, sources = cmp.config.sources({ { name = 'buffer' }, { name = 'nvim_lsp' }, + { name = 'luasnip' }, { name = 'path' }, + { name = 'git' }, }), + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.confirm(), + [''] = cmp.mapping.complete(), + -- [''] = cmp.mapping.complete(), + [''] = cmp.config.next, + [''] = cmp.config.prev, + }) + }) + + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline { + [''] = cmp.config.disable, + [''] = cmp.config.disable, + }, + sources = { + { name = 'buffer' } + } + }) + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline { + [''] = cmp.config.disable, + [''] = cmp.config.disable, + }, + -- mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + }, { + { name = 'buffer' }, + }) }) end }, @@ -458,6 +511,6 @@ return require('lazy').setup({ }, { defaults = { - lazy = false, + lazy = true, } }); diff --git a/config/nvim/lua/setup/rtools.lua b/config/nvim/lua/setup/rtools.lua index d256a084..e79e62fd 100644 --- a/config/nvim/lua/setup/rtools.lua +++ b/config/nvim/lua/setup/rtools.lua @@ -196,7 +196,6 @@ local opts = { }, check = { }, - -- inlayHints.closureReturnTypeHints.enable inlayHints = { closureReturnTypeHints = { enable = true,