diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl new file mode 100644 index 0000000..c5d0bb9 --- /dev/null +++ b/.chezmoi.toml.tmpl @@ -0,0 +1,2 @@ +[diff] +reverse = true diff --git a/dot_vim/lua/cmp_setup.lua b/dot_vim/lua/cmp_setup.lua new file mode 100644 index 0000000..ff52e45 --- /dev/null +++ b/dot_vim/lua/cmp_setup.lua @@ -0,0 +1,110 @@ +local cmp = require 'cmp' +local lspkind = require('lspkind') + +--lspkind.init({ +---- disables text annotations +----with_text = false, +----with_text = true, + +---- defines how annotations are shown +---- default: symbol +---- options: 'text', 'text_symbol', 'symbol_text', 'symbol' +--mode = 'symbol', + +---- default symbol map +---- can be either 'default' or 'codicons' +--preset = 'default', + +---- override preset symbols +---- default: {} +----symbol_map = { +----Method = 'm', +----Function = 'f', +----Text = 'txt', +----Constructor = 'new', +----Variable = 'var', +----Class = 'cls', +----Interface = 'iface', +----Module = 'mod', +----Property = 'prop', +----Unit = 'unit', +----Value = 'val', +----Enum = 'enum', +----Keyword = 'kw', +----Snippet = 'sn', +----Color = 'color', +----File = 'file', +----Folder = 'fold', +----EnumMember = 'enum', +----Constant = 'const', +----Struct = 'struct', +----}, +--}) + + +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) + end, + }, + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol_text', -- show only symbol annotations + maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + -- can also be a function to dynamically calculate max width such as + -- maxwidth = function() return math.floor(0.45 * vim.o.columns) end, + ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + show_labelDetails = true, -- show labelDetails in menu. Disabled by default + + -- The function below will be called before any actual modifications from lspkind + -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) + before = function(entry, vim_item) + return vim_item + end + }) + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + + mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + --elseif luasnip.expand_or_jumpable() then + --luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + --elseif luasnip.jumpable(-1) then + --luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + -- { name = 'vsnip' }, -- For vsnip users. + -- { name = 'luasnip' }, -- For luasnip users. + -- { name = 'ultisnips' }, -- For ultisnips users. + { name = 'snippy' }, -- For snippy users. + --}, { + { name = 'buffer' }, + }) +}) diff --git a/dot_vim/lua/symlink_murdock.lua b/dot_vim/lua/symlink_murdock.lua new file mode 100644 index 0000000..b2372b1 --- /dev/null +++ b/dot_vim/lua/symlink_murdock.lua @@ -0,0 +1 @@ +/home/barak/src/gptool/murdock.lua diff --git a/dot_vimrc b/dot_vimrc index fb6e738..79d6829 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -384,7 +384,7 @@ syntax on " baraknew is my own colorscheme. I used to use slate or dante. "colorscheme baraknew "let g:codedark_conservative = 1 -let g:codedark_null_background=1 +let g:codedark_transparent=1 let g:codedark_italics=1 colorscheme codedark "colorscheme slate