From c26f6a6bf5de292edf47bfb366935558a4b38cb3 Mon Sep 17 00:00:00 2001 From: "Andrew R. M." Date: Tue, 6 Feb 2024 18:29:51 -0500 Subject: [PATCH] More neovim testing --- .gitmodules | 3 ++ vim/.config/nvim/init.lua | 0 vim/.config/nvim/init.vim | 70 +++++++++++++++++++++++++++ vim/.vim/nvim-bundle/indent-blankline | 1 + vim/.vimrc | 7 +-- 5 files changed, 78 insertions(+), 3 deletions(-) delete mode 100644 vim/.config/nvim/init.lua create mode 160000 vim/.vim/nvim-bundle/indent-blankline diff --git a/.gitmodules b/.gitmodules index 9c666e7..47067ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,3 +49,6 @@ [submodule "vim/.vim/nvim-bundle/nvim-lspconfig"] path = vim/.vim/nvim-bundle/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig.git +[submodule "vim/.vim/nvim-bundle/indent-blankline"] + path = vim/.vim/nvim-bundle/indent-blankline + url = https://github.com/lukas-reineke/indent-blankline.nvim.git diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua deleted file mode 100644 index e69de29..0000000 diff --git a/vim/.config/nvim/init.vim b/vim/.config/nvim/init.vim index 58dddd4..82134b8 100644 --- a/vim/.config/nvim/init.vim +++ b/vim/.config/nvim/init.vim @@ -2,8 +2,78 @@ set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath source ~/.vimrc +lua <lua vim.lsp.buf.hover()') + + -- Jump to the definition + bufmap('n', 'gd', 'lua vim.lsp.buf.definition()') + + -- Jump to declaration + bufmap('n', 'gD', 'lua vim.lsp.buf.declaration()') + + -- Lists all the implementations for the symbol under the cursor + bufmap('n', 'gi', 'lua vim.lsp.buf.implementation()') + + -- Jumps to the definition of the type symbol + bufmap('n', 'go', 'lua vim.lsp.buf.type_definition()') + + -- Lists all the references + bufmap('n', 'gr', 'lua vim.lsp.buf.references()') + + -- Displays a function's signature information + bufmap('n', 'gs', 'lua vim.lsp.buf.signature_help()') + + -- Renames all references to the symbol under the cursor + bufmap('n', '', 'lua vim.lsp.buf.rename()') + + -- Selects a code action available at the current cursor position + bufmap('n', '', 'lua vim.lsp.buf.code_action()') + + -- Show diagnostics in a floating window + bufmap('n', 'gl', 'lua vim.diagnostic.open_float()') + + -- Move to the previous diagnostic + bufmap('n', '[d', 'lua vim.diagnostic.goto_prev()') + + -- Move to the next diagnostic + bufmap('n', ']d', 'lua vim.diagnostic.goto_next()') + end +}) +EOF + +nnoremap ib IBLToggle + " Beginner keybinds for telescope nnoremap ff Telescope find_files nnoremap fg Telescope live_grep nnoremap fb Telescope buffers nnoremap fh Telescope help_tags + +" lua print('this also works') + +command! LuaRuntimePath lua print(vim.inspect(vim.api.nvim_list_runtime_paths())) diff --git a/vim/.vim/nvim-bundle/indent-blankline b/vim/.vim/nvim-bundle/indent-blankline new file mode 160000 index 0000000..12e9204 --- /dev/null +++ b/vim/.vim/nvim-bundle/indent-blankline @@ -0,0 +1 @@ +Subproject commit 12e92044d313c54c438bd786d11684c88f6f78cd diff --git a/vim/.vimrc b/vim/.vimrc index c944871..d128b31 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -6,7 +6,7 @@ set nocompatible "{- PLUGIN MANAGER -}" " Load pathogen, the plugin manager, which then loads all plugins " runtime bundle/pathogen/autoload/pathogen.vim - execute pathogen#infect() + execute pathogen#infect('bundle/{}', 'nvim-bundle/{}') "{- COMMANDS -}" @@ -31,7 +31,7 @@ set nocompatible "{- INTERFACE -}" " Colors and syntax highlighting " - colorscheme dim + colorscheme halfdab set background=dark filetype plugin on syntax on @@ -103,7 +103,8 @@ set nocompatible set complete+=kspell " Match the longest completion option then display menu - set completeopt=menuone,longest + "set completeopt=menuone,longest + set completeopt=menu,menuone,noselect " Use UTF-8 " set encoding=utf-8