diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2022-12-30 20:18:43 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2022-12-30 20:18:43 +0100 |
| commit | b1f815fe7d05b02555ae6aca655318db123ebcbe (patch) | |
| tree | 0dc0d204541d51ce17d4b0513e006a9fec3be4b7 /config/nvim | |
| parent | cd7f8b925d0d01d9510a8201f1276c6a560a7d63 (diff) | |
| download | dotfiles-b1f815fe7d05b02555ae6aca655318db123ebcbe.tar.gz dotfiles-b1f815fe7d05b02555ae6aca655318db123ebcbe.tar.bz2 dotfiles-b1f815fe7d05b02555ae6aca655318db123ebcbe.zip | |
Removed vim-easy-align since it doesn't work on neovim
Diffstat (limited to 'config/nvim')
| -rw-r--r-- | config/nvim/lua/plugins.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index ae8be6e..f82c5d7 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -2,7 +2,6 @@ vim.cmd [[ packadd packer.nvim ]] return require("packer").startup(function() use "wbthomason/packer.nvim" -- plugin manager (can manage itself) - use "junegunn/vim-easy-align" -- align use "AndrewRadev/sideways.vim" -- Move arguments sideways use "tpope/vim-eunuch" -- basic commands on current file (Rename/Remove) use "romainl/vim-cool" -- only highlight search matches when searching @@ -12,6 +11,7 @@ return require("packer").startup(function() use { "FooSoft/vim-argwrap", config = function() + local augroup = vim.api.nvim_create_augroup("cacharle_vim_argwrap_group", {}) vim.g.argwrap_tail_comma = 1 vim.api.nvim_create_autocmd( "Filetype", @@ -152,7 +152,7 @@ return require("packer").startup(function() }, diagnostics = { -- Get the language server to recognize the `vim` global - globals = {"vim"}, + globals = {"vim", "use"}, }, workspace = { -- Make the server aware of Neovim runtime files @@ -222,6 +222,11 @@ return require("packer").startup(function() ["<C-f>"] = cmp.mapping.scroll_docs(4), ["<Tab>"] = cmp.mapping.confirm({ select = true }), ["<C-n>"] = cmp.mapping(function(fallback) + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then |
