From 78c8196daa95ad449cc8dae142c9bf681c7ffc53 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 3 Sep 2022 00:01:15 +0300 Subject: [PATCH] Nvim: Change colorscheme to kanagawa and some other minor tweaks --- home/.config/nvim/lua/plugins/cmp.lua | 4 +- home/.config/nvim/lua/plugins/colorscheme.lua | 55 +----------------- home/.config/nvim/lua/plugins/init.lua | 56 ++++++++----------- home/.config/nvim/lua/plugins/lualine.lua | 2 +- 4 files changed, 28 insertions(+), 89 deletions(-) diff --git a/home/.config/nvim/lua/plugins/cmp.lua b/home/.config/nvim/lua/plugins/cmp.lua index a4a17579..45ffa55b 100644 --- a/home/.config/nvim/lua/plugins/cmp.lua +++ b/home/.config/nvim/lua/plugins/cmp.lua @@ -47,8 +47,8 @@ return function() end }, sources = { - {name = 'nvim_lsp'}, {name = 'luasnip'}, {name = 'path'}, - {name = 'git'}, {name = 'buffer'} + {name = 'buffer'}, {name = 'git'}, {name = 'luasnip'}, + {name = 'nvim_lsp'}, {name = 'nvim_lua'}, {name = 'path'} } } diff --git a/home/.config/nvim/lua/plugins/colorscheme.lua b/home/.config/nvim/lua/plugins/colorscheme.lua index f28d9bdb..a7a407bf 100644 --- a/home/.config/nvim/lua/plugins/colorscheme.lua +++ b/home/.config/nvim/lua/plugins/colorscheme.lua @@ -1,54 +1 @@ -return function() - require('catppuccin').setup({ - transparent_background = false, - term_colors = false, - compile = { - enabled = true, - path = vim.fn.stdpath 'cache' .. '/catppuccin' - }, - styles = { - comments = {'italic'}, - functions = {'italic'}, - keywords = {'italic'}, - strings = {}, - variables = {} - }, - integrations = { - treesitter = true, - native_lsp = { - enabled = true, - virtual_text = { - errors = {'italic'}, - hints = {'italic'}, - warnings = {'italic'}, - information = {'italic'} - }, - underlines = { - errors = {'underline'}, - hints = {'underline'}, - warnings = {'underline'}, - information = {'underline'} - } - }, - lsp_trouble = false, - lsp_saga = false, - gitgutter = true, - gitsigns = false, - telescope = true, - nvimtree = {enabled = false, show_root = false}, - which_key = false, - indent_blankline = {enabled = true, colored_indent_levels = false}, - dashboard = false, - neogit = false, - vim_sneak = false, - fern = false, - barbar = false, - bufferline = false, - markdown = false, - lightspeed = false, - ts_rainbow = false, - hop = false - } - }) - vim.cmd [[colorscheme catppuccin]] -end +return function() vim.cmd("colorscheme kanagawa") end diff --git a/home/.config/nvim/lua/plugins/init.lua b/home/.config/nvim/lua/plugins/init.lua index ca13a686..7f02d7d1 100644 --- a/home/.config/nvim/lua/plugins/init.lua +++ b/home/.config/nvim/lua/plugins/init.lua @@ -8,7 +8,7 @@ if fn.empty(fn.glob(install_path)) > 0 then 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) - vim.cmd [[packadd packer.nvim]] + vim.cmd [[packadd packer.nvim]] print('Installed Packer') end @@ -20,27 +20,21 @@ require('packer').startup(function() use {'wbthomason/packer.nvim'} -- Colorscheme - use { - 'catppuccin/nvim', - as = 'catppuccin', - config = require('plugins.colorscheme') - } - - -- Startup screen/dashboard - use 'glepnir/dashboard-nvim' - - -- Git in signcolumn - use 'airblade/vim-gitgutter' + use {'rebelot/kanagawa.nvim', config = require('plugins.colorscheme')} -- Statusline use { - 'hoob3rt/lualine.nvim', + 'nvim-lualine/lualine.nvim', requires = {'kyazdani42/nvim-web-devicons', opt = true}, - config = function() - require('lualine').setup {options = {theme = 'catppuccin'}} - end + config = require('plugins.lualine') } + -- Startup screen/dashboard + use 'glepnir/dashboard-nvim' + + -- Git in signcolumn + use 'airblade/vim-gitgutter' + -- Tabline/bufferline use { 'akinsho/nvim-bufferline.lua', @@ -82,9 +76,7 @@ require('packer').startup(function() -- Display possible keybinds use { 'folke/which-key.nvim', - config = function() - require('which-key').setup {spelling = {enabled = true}} - end + config = require('plugins.which-key') } -- Read editorconfig settings @@ -97,6 +89,7 @@ require('packer').startup(function() } use { 'williamboman/mason-lspconfig.nvim', + requires = {'ii14/emmylua-nvim'}, -- vim api documentation for lua lsp config = function() require('mason-lspconfig').setup {automatic_installation = true} end @@ -115,13 +108,14 @@ require('packer').startup(function() use { 'hrsh7th/nvim-cmp', requires = { - {'hrsh7th/cmp-nvim-lsp'}, -- LSP source - {'hrsh7th/cmp-path'}, -- Path source - {'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim"}, -- Git source {'hrsh7th/cmp-buffer'}, -- Buffer source - {'saadparwaiz1/cmp_luasnip'}, -- Snippets source + {'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim"}, -- Git source {'L3MON4D3/LuaSnip'}, -- Snippets plugin - {'rafamadriz/friendly-snippets'} -- Snippets collection + {'hrsh7th/cmp-nvim-lsp'}, -- LSP source + {'hrsh7th/cmp-nvim-lua'}, -- Neovim Lua API documentation + {'hrsh7th/cmp-path'}, -- Path source + {'rafamadriz/friendly-snippets'}, -- Snippets collection + {'saadparwaiz1/cmp_luasnip'} -- Snippets source }, config = require('plugins.cmp') } @@ -171,15 +165,13 @@ require('packer').startup(function() -- Vim <3 Asciidoctor use 'habamax/vim-asciidoctor' - - -- Edit GPG encrypted files transparently - use 'jamessan/vim-gnupg' - -- If Packer was just installed, - -- sync plugins - if Packer_bootstrap then - require('packer').sync() - end + -- Edit GPG encrypted files transparently + use 'jamessan/vim-gnupg' + + -- If Packer was just installed, + -- sync plugins + if Packer_bootstrap then require('packer').sync() end end) diff --git a/home/.config/nvim/lua/plugins/lualine.lua b/home/.config/nvim/lua/plugins/lualine.lua index 815d2d96..de86f563 100644 --- a/home/.config/nvim/lua/plugins/lualine.lua +++ b/home/.config/nvim/lua/plugins/lualine.lua @@ -1 +1 @@ -require'lualine'.setup {options = {theme = 'catppuccin'}} +return function() require('lualine').setup() end