From 57bd63e94801a028d40d7e44b7b2ada28cca8f1d Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 13 Aug 2022 04:07:58 -0700 Subject: [PATCH] nvim: add nvim-tree, enable night theme (rather than storm) --- .config/nvim/lua/blake/lsp.lua | 14 ++++++-------- .config/nvim/lua/blake/plugins.lua | 29 +++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.config/nvim/lua/blake/lsp.lua b/.config/nvim/lua/blake/lsp.lua index 5254821..a9cbb82 100644 --- a/.config/nvim/lua/blake/lsp.lua +++ b/.config/nvim/lua/blake/lsp.lua @@ -2,10 +2,9 @@ local M = {} -- lsp_signature >>> M.signature = function() - cfg = { + require "lsp_signature".setup({ toggle_key = '' - } - require "lsp_signature".setup(cfg) + }) end -- <<< -- lspinstall >>> @@ -196,7 +195,7 @@ M.cmp = function() } } - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + -- Use buffer source for `/` and `?` cmp.setup.cmdline('/', search_config) cmp.setup.cmdline('?', search_config) @@ -204,9 +203,8 @@ M.cmp = function() cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } + { name = 'path' }, + { name = 'cmdline' }, }) }) end -- <<< @@ -256,7 +254,7 @@ M.lspconfig = function() -- cmp things >>> local capabilities - if cmp ~= nil then -- only load this if cmp is loaded + if packer_plugins["nvim-cmp"] and packer_plugins["nvim-cmp"].loaded then -- only load this if cmp is loaded capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) end -- <<< diff --git a/.config/nvim/lua/blake/plugins.lua b/.config/nvim/lua/blake/plugins.lua index 7547e8f..92450b5 100644 --- a/.config/nvim/lua/blake/plugins.lua +++ b/.config/nvim/lua/blake/plugins.lua @@ -52,7 +52,9 @@ return require('packer').startup({function() use { -- tokyonight.nvim: tokyonight theme 'folke/tokyonight.nvim', config = function() - -- vim.g.onedark_transparent_background = true + vim.g.tokyonight_style = "night" + vim.g.tokyonight_italic_functions = true + vim.g.tokyonight_sidebars = { "nvimtree", "qf", "vista_kind", "terminal", "packer" } vim.cmd [[ au ColorScheme tokyonight hi TabLine gui=none guibg='#1D202F' guifg='#565F89' " all tabs color au ColorScheme tokyonight hi TabLineSel guibg='#24283B' guifg='#C0CAF5' " Highlighted tab color @@ -221,7 +223,8 @@ return require('packer').startup({function() use { -- virtual-text: Print Variable names while debugging 'theHamsta/nvim-dap-virtual-text', config = function() - require("nvim-dap-virtual-text").setup() + -- calling this with a parameter to keep lua language server from complaining + require("nvim-dap-virtual-text").setup({context_commentstring = {enable = true,}}) end } use { -- nvim-dap-ui: a UI for nvim-dap @@ -310,6 +313,16 @@ return require('packer').startup({function() -- use { -- targets.vim: fix ci' and other things to work right -- 'wellle/targets.vim', -- } + use { -- nvim-tree: File explorer + 'kyazdani42/nvim-tree.lua', + requires = { 'kyazdani42/nvim-web-devicons' }, + tag = 'nightly', + config = function() + require("nvim-tree").setup({ + diagnostics = { enable = true, }, + }) + end + } -- Conveniences use { -- sort motion: (gs) @@ -491,10 +504,14 @@ return require('packer').startup({function() -- } end, config = { - display = { open_fn = require('packer.util').float }, - -- Move to lua dir so impatient.nvim can cache it - compile_path = vim.fn.stdpath('config')..'/lua/packer_compiled.lua', + -- Floating window + display = { open_fn = require('packer.util').float }, + -- Move to lua dir so impatient.nvim can cache it + compile_path = vim.fn.stdpath('config')..'/lua/packer_compiled.lua', + -- Don't ask before removing plugins + autoremove = true, }}) --- vim command to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$ +-- how to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$ + -- vim:fdm=marker:fmr={,}:fdl=1:expandtab:tabstop=3:sw=3