From 7d7494b11618d23d5568f61124c8c27f64487532 Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Mon, 29 May 2023 17:44:42 -0500 Subject: who shaved all these yaks? --- .config/nvim/lua/autocomplete.lua | 39 ++++++++++++++++++++++++++++++--------- .config/nvim/lua/lsp.lua | 11 +++++++++-- .config/nvim/lua/plugins.lua | 3 +++ .zimrc | 24 ++++++++---------------- .zshrc | 5 ++++- 5 files changed, 54 insertions(+), 28 deletions(-) diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua index 775a407..a86e86b 100644 --- a/.config/nvim/lua/autocomplete.lua +++ b/.config/nvim/lua/autocomplete.lua @@ -21,6 +21,28 @@ [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping(function(fallback) + if vim.fn.pumvisible() == 1 then + feedkey("", "n") + elseif cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end, { + "i", + }), + [""] = cmp.mapping(function(fallback) + if vim.fn.pumvisible() == 1 then + feedkey("", "n") + elseif cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, { + "i", + }), }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, @@ -49,12 +71,11 @@ { name = 'buffer' } } }) - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 3e60028..5b7058c 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -56,10 +56,17 @@ require('go').setup({ on_attach = on_attach } }) +local lspconfig = require('lspconfig') + +lspconfig.zls.setup({ + server = { + on_attach = on_attach, + } +}) -- https://github.com/nikeee/dot-language-server -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dotls -require("lspconfig")['dotls'].setup({ +lspconfig['dotls'].setup({ server = { capabilities = capabilities, on_attach = on_attach, @@ -67,7 +74,7 @@ require("lspconfig")['dotls'].setup({ }) -require('lspconfig').yamlls.setup{ +lspconfig.yamlls.setup{ settings = { yaml = { -- FIX mapKeyOrder warning diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 36e43ad..33d87db 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -78,6 +78,9 @@ return require('packer').startup(function() use 'tpope/vim-vinegar' -- file browser use 'kyazdani42/nvim-web-devicons' -- icons when searching + -- zig + use 'ziglang/zig.vim' + -- go use 'ray-x/go.nvim' diff --git a/.zimrc b/.zimrc index 3855da5..06537f9 100644 --- a/.zimrc +++ b/.zimrc @@ -18,22 +18,6 @@ zmodule input zmodule termtitle # Utility aliases and functions. Adds colour to ls, grep and less. zmodule utility -# Adds aliases and better defaults for exa. -zmodule exa -# Configures fzf for faster fetching of files and directories names. -zmodule fzf - - -# -# Prompt -# - -# Exposes to prompts how long the last command took to execute, used by asciiship. -zmodule duration-info -# Exposes git repository status information to prompts, used by asciiship. -zmodule git-info -# A heavily reduced, ASCII-only version of the Spaceship and Starship prompts. -zmodule asciiship # # Completion @@ -59,3 +43,11 @@ zmodule zsh-users/zsh-history-substring-search zmodule zsh-users/zsh-autosuggestions # }}} End configuration added by Zim install +# Adds aliases and better defaults for exa. +zmodule exa +# Configures fzf for faster fetching of files and directories names. +zmodule fzf + + +zmodule joke/zim-starship +zmodule kiesman99/zim-zoxide diff --git a/.zshrc b/.zshrc index c76c0f9..cfc5c67 100644 --- a/.zshrc +++ b/.zshrc @@ -128,4 +128,7 @@ for key ('j') bindkey -M vicmd ${key} history-substring-search-down unset key # }}} End configuration added by Zim install -eval "$(starship init zsh)" + +alias cat=bat +alias find=fd +export PATH=~/.zig/bin:$PATH -- cgit v1.2.3-70-g09d2