From 5b0e1565edd1cded01199725059bd8ff5c5ac31e Mon Sep 17 00:00:00 2001 From: Blallo Date: Mon, 9 May 2022 17:54:16 +0200 Subject: [PATCH] Change theme and enable treesitter autotagger --- lua/config/theme.lua | 15 ++-- lua/config/treesitter.lua | 41 ++++++----- lua/plugins.lua | 140 +++++++++++++++++++------------------ plugin/packer_compiled.lua | 24 ++++--- 4 files changed, 117 insertions(+), 103 deletions(-) diff --git a/lua/config/theme.lua b/lua/config/theme.lua index 958522c..b9a61bc 100644 --- a/lua/config/theme.lua +++ b/lua/config/theme.lua @@ -1,6 +1,6 @@ -local cmd = vim.cmd -local utils = require 'config.utils' -local let = utils.let +-- local cmd = vim.cmd +-- local utils = require 'config.utils' +-- local let = utils.let -- Nortia -- cmd([[ @@ -29,7 +29,7 @@ end} require('lualine').setup({ options = { - theme = "tokyonight", + -- theme = "melange", -- theme = "github" -- section_separators = {'', ''}, -- component_separators = {'', ''} @@ -51,6 +51,7 @@ require('lualine').setup({ -- }) -- vim.g.tokyonight_style = "storm" -- vim.g.tokyonight_style = "day" -vim.g.tokyonight_style = "night" -vim.g.tokyonight_italic_functions = true -cmd[[colorscheme tokyonight]] +-- vim.g.tokyonight_style = "night" +-- vim.g.tokyonight_italic_functions = true +vim.opt.termguicolors = true +vim.cmd("colorscheme melange") diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua index bdbebdb..430b971 100644 --- a/lua/config/treesitter.lua +++ b/lua/config/treesitter.lua @@ -1,22 +1,25 @@ require('nvim-treesitter.configs').setup { - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", + autotag = { + enable = true, + }, + highlight = { + enable = true, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, + indent = { + enable = true }, - }, - indent = { - enable = true - }, } diff --git a/lua/plugins.lua b/lua/plugins.lua index d2b5d10..a3dd876 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -2,92 +2,96 @@ local packer = nil vim.lsp.set_log_level("debug") local function init() - if packer == nil then - packer = require 'packer' - packer.init { disable_commands = true } - end + if packer == nil then + packer = require 'packer' + packer.init { disable_commands = true } + end - local use = packer.use - packer.reset() + local use = packer.use + packer.reset() - -- Packer can manage itself - use 'wbthomason/packer.nvim' + -- Packer can manage itself + use 'wbthomason/packer.nvim' - -- nvim-mapper to explore mappings - use { - "lazytanuki/nvim-mapper", - config = function() require("nvim-mapper").setup{} end, - before = "telescope.nvim" - } + -- nvim-mapper to explore mappings + use { + "lazytanuki/nvim-mapper", + config = function() require("nvim-mapper").setup {} end, + before = "telescope.nvim" + } - -- telescope.nvim - use { - 'nvim-telescope/telescope.nvim', - requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}, - config = function() require("telescope").load_extension("mapper") end - } + -- telescope.nvim + use { + 'nvim-telescope/telescope.nvim', + requires = { { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' } }, + config = function() require("telescope").load_extension("mapper") end + } - -- Highlight - use { - 'nvim-treesitter/nvim-treesitter', - requires = { - 'nvim-treesitter/nvim-treesitter-refactor', - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - run = ':TSUpdate', - } + -- Highlight + use { + 'nvim-treesitter/nvim-treesitter', + requires = { + 'nvim-treesitter/nvim-treesitter-refactor', + 'nvim-treesitter/nvim-treesitter-textobjects', + }, + run = ':TSUpdate', + } - -- Colortheme - -- use 'rktjmp/lush.nvim' - -- use 'alaric/nortia.nvim' - -- use 'morhetz/gruvbox' - -- use 'vim-airline/vim-airline' - -- use 'vim-airline/vim-airline-themes' - -- use 'projekt0n/github-nvim-theme' - use 'folke/tokyonight.nvim' - use { - 'nvim-lualine/lualine.nvim', - requires = {'kyazdani42/nvim-web-devicons', opt = true} - } + -- Colortheme + -- use 'rktjmp/lush.nvim' + -- use 'alaric/nortia.nvim' + -- use 'morhetz/gruvbox' + -- use 'vim-airline/vim-airline' + -- use 'vim-airline/vim-airline-themes' + -- use 'projekt0n/github-nvim-theme' + -- use 'folke/tokyonight.nvim' + use 'savq/melange' + use { + 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true } + } - -- Coc - use { - 'neoclide/coc.nvim', - branch = 'master', - run = 'yarn install --frozen-lockfile', - } + -- Coc + use { + 'neoclide/coc.nvim', + branch = 'master', + run = 'yarn install --frozen-lockfile', + } - -- Wrapping/delimiters - use 'andymass/vim-matchup' - -- use 'machakann/vim-sandwich' + -- Wrapping/delimiters + use 'andymass/vim-matchup' + -- use 'machakann/vim-sandwich' - -- Undo tree - use 'mbbill/undotree' + -- Undo tree + use 'mbbill/undotree' - -- LSP stuff - use 'neovim/nvim-lspconfig' + -- LSP stuff + use 'neovim/nvim-lspconfig' - -- Split maximizer - use 'szw/vim-maximizer' + -- Split maximizer + use 'szw/vim-maximizer' - -- Auto pair - use 'jiangmiao/auto-pairs' + -- Auto pair + use 'jiangmiao/auto-pairs' - -- Nginx syntax - use 'chr4/nginx.vim' + -- Nginx syntax + use 'chr4/nginx.vim' - -- Zig syntax - use 'ziglang/zig.vim' + -- Zig syntax + use 'ziglang/zig.vim' - -- Black, python formatter - use 'psf/black' + -- Black, python formatter + use 'psf/black' + + -- Autotag completer + use 'windwp/nvim-ts-autotag' end local plugins = setmetatable({}, { - __index = function(_, key) - init() - return packer[key] - end, + __index = function(_, key) + init() + return packer[key] + end, }) return plugins diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 356544c..42abc4f 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -89,6 +89,11 @@ _G.packer_plugins = { path = "/home/leo/.local/share/nvim/site/pack/packer/start/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" }, + melange = { + loaded = true, + path = "/home/leo/.local/share/nvim/site/pack/packer/start/melange", + url = "https://github.com/savq/melange" + }, ["nginx.vim"] = { loaded = true, path = "/home/leo/.local/share/nvim/site/pack/packer/start/nginx.vim", @@ -120,6 +125,11 @@ _G.packer_plugins = { path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects", url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" }, + ["nvim-ts-autotag"] = { + loaded = true, + path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag", + url = "https://github.com/windwp/nvim-ts-autotag" + }, ["nvim-web-devicons"] = { loaded = true, path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", @@ -146,11 +156,6 @@ _G.packer_plugins = { path = "/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, - ["tokyonight.nvim"] = { - loaded = true, - path = "/home/leo/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", - url = "https://github.com/folke/tokyonight.nvim" - }, undotree = { loaded = true, path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree", @@ -174,18 +179,19 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: nvim-mapper -time([[Config for nvim-mapper]], true) -try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper") -time([[Config for nvim-mapper]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\2\nK\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\vmapper\19load_extension\14telescope\frequire\0", "config", "telescope.nvim") time([[Config for telescope.nvim]], false) +-- Config for: nvim-mapper +time([[Config for nvim-mapper]], true) +try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper") +time([[Config for nvim-mapper]], false) if should_profile then save_profiles() end end) if not no_errors then + error_msg = error_msg:gsub('"', '\\"') vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') end