commit 136dc3390256b1078ed8fe5af25a03b78e173dc4
parent fffbea80dcf597bf1dc01ffdd567dd9ccc58aa8a
Author: Benjamin Paul <bpaul@bpaul.xyz>
Date: Mon, 21 Feb 2022 15:56:10 +1000
Some work on neovim which is not complete
Diffstat:
6 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua
@@ -4,5 +4,5 @@ require 'map'
require 'commands'
--if packer_plugins["lush.nvim"] and packer_plugins["lush.nvim"].loaded then
- load 'colours'
+ --load 'colours'
--end
diff --git a/nvim/.config/nvim/lua/map.lua b/nvim/.config/nvim/lua/map.lua
@@ -26,3 +26,6 @@ vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
+
+-- TODO
+-- LSP mappings
diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua
@@ -4,6 +4,10 @@ vim.cmd 'packadd packer.nvim'
--vim._update_package_paths()
+-- TODO
+-- modulize more
+-- e.g. rust-tools should only initialize for rust files
+
require 'packer' .startup(function()
use 'wbthomason/packer.nvim'
@@ -24,7 +28,9 @@ require 'packer' .startup(function()
use 'mattn/calendar-vim'
use { 'neovim/nvim-lspconfig', config = function() require 'plugins/lsp' end }
+ use 'simrat39/rust-tools.nvim'
+ -- TODO Switch to nvim-cmp
use { 'hrsh7th/nvim-compe', config = function() require 'plugins/compe' end }
use { 'L3MON4D3/LuaSnip', config = function() require 'plugins/luasnip' end }
@@ -56,4 +62,5 @@ require 'packer' .startup(function()
use 'nvim-telescope/telescope-packer.nvim'
use 'nvim-telescope/telescope-snippets.nvim'
use 'nvim-telescope/telescope-symbols.nvim'
+ use 'nvim-telescope/telescope-ui-select.nvim'
end)
diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua
@@ -1,3 +1,9 @@
require'lspconfig'.ccls.setup{}
require'lspconfig'.hls.setup{}
+
+-- rust
+require'lspconfig'.rust_analyzer.setup{}
+require'rust-tools'.setup({})
+
require'lspconfig'.texlab.setup{}
+require'lspconfig'.sumneko_lua.setup{}
diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua
@@ -38,7 +38,17 @@ require'telescope'.setup{
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
+ extensions = {
+ ["ui-select"] = {
+ require'telescope.themes'.get_dropdown {
+ -- idk what goes here
+ }
+ }
+ },
+
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
}
}
+
+require'telescope'.load_extension'ui-select'
diff --git a/nvim/.config/nvim/plugins/theme/lua/lush_theme/theme.lua b/nvim/.config/nvim/plugins/theme/lua/lush_theme/theme.lua
@@ -116,7 +116,7 @@ local theme = lush(function()
-- NormalFloat { }, -- Normal text in floating windows.
-- NormalNC { }, -- normal text in non-current windows
Pmenu { bg = bg.lighten(20), fg = fg.darken(20) }, -- Popup menu: normal item.
- -- PmenuSel { }, -- Popup menu: selected item.
+ PmenuSel { bg = Pmenu.bg.darken(20), fg = Pmenu.fg.darken(10) }, -- Popup menu: selected item.
-- PmenuSbar { }, -- Popup menu: scrollbar.
-- PmenuThumb { }, -- Popup menu: Thumb of the scrollbar.
-- Question { }, -- |hit-enter| prompt and yes/no questions