Change theme and enable treesitter autotagger

This commit is contained in:
sfigato 2022-05-09 17:54:16 +02:00
parent b4555918e1
commit 5b0e1565ed
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
4 changed files with 117 additions and 103 deletions

View File

@ -1,6 +1,6 @@
local cmd = vim.cmd -- local cmd = vim.cmd
local utils = require 'config.utils' -- local utils = require 'config.utils'
local let = utils.let -- local let = utils.let
-- Nortia -- Nortia
-- cmd([[ -- cmd([[
@ -29,7 +29,7 @@ end}
require('lualine').setup({ require('lualine').setup({
options = { options = {
theme = "tokyonight", -- theme = "melange",
-- theme = "github" -- theme = "github"
-- section_separators = {'', ''}, -- section_separators = {'', ''},
-- component_separators = {'', ''} -- component_separators = {'', ''}
@ -51,6 +51,7 @@ require('lualine').setup({
-- }) -- })
-- vim.g.tokyonight_style = "storm" -- vim.g.tokyonight_style = "storm"
-- vim.g.tokyonight_style = "day" -- vim.g.tokyonight_style = "day"
vim.g.tokyonight_style = "night" -- vim.g.tokyonight_style = "night"
vim.g.tokyonight_italic_functions = true -- vim.g.tokyonight_italic_functions = true
cmd[[colorscheme tokyonight]] vim.opt.termguicolors = true
vim.cmd("colorscheme melange")

View File

@ -1,22 +1,25 @@
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
highlight = { autotag = {
enable = true, 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). highlight = {
-- Using this option may slow down your editor, and you may see some duplicate highlights. enable = true,
-- Instead of true it can also be a list of languages -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
additional_vim_regex_highlighting = false, -- 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.
incremental_selection = { -- Instead of true it can also be a list of languages
enable = true, additional_vim_regex_highlighting = false,
keymaps = { },
init_selection = "gnn", incremental_selection = {
node_incremental = "grn", enable = true,
scope_incremental = "grc", keymaps = {
node_decremental = "grm", init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
indent = {
enable = true
}, },
},
indent = {
enable = true
},
} }

View File

@ -2,92 +2,96 @@ local packer = nil
vim.lsp.set_log_level("debug") vim.lsp.set_log_level("debug")
local function init() local function init()
if packer == nil then if packer == nil then
packer = require 'packer' packer = require 'packer'
packer.init { disable_commands = true } packer.init { disable_commands = true }
end end
local use = packer.use local use = packer.use
packer.reset() packer.reset()
-- Packer can manage itself -- Packer can manage itself
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
-- nvim-mapper to explore mappings -- nvim-mapper to explore mappings
use { use {
"lazytanuki/nvim-mapper", "lazytanuki/nvim-mapper",
config = function() require("nvim-mapper").setup{} end, config = function() require("nvim-mapper").setup {} end,
before = "telescope.nvim" before = "telescope.nvim"
} }
-- telescope.nvim -- telescope.nvim
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}, requires = { { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' } },
config = function() require("telescope").load_extension("mapper") end config = function() require("telescope").load_extension("mapper") end
} }
-- Highlight -- Highlight
use { use {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
requires = { requires = {
'nvim-treesitter/nvim-treesitter-refactor', 'nvim-treesitter/nvim-treesitter-refactor',
'nvim-treesitter/nvim-treesitter-textobjects', 'nvim-treesitter/nvim-treesitter-textobjects',
}, },
run = ':TSUpdate', run = ':TSUpdate',
} }
-- Colortheme -- Colortheme
-- use 'rktjmp/lush.nvim' -- use 'rktjmp/lush.nvim'
-- use 'alaric/nortia.nvim' -- use 'alaric/nortia.nvim'
-- use 'morhetz/gruvbox' -- use 'morhetz/gruvbox'
-- use 'vim-airline/vim-airline' -- use 'vim-airline/vim-airline'
-- use 'vim-airline/vim-airline-themes' -- use 'vim-airline/vim-airline-themes'
-- use 'projekt0n/github-nvim-theme' -- use 'projekt0n/github-nvim-theme'
use 'folke/tokyonight.nvim' -- use 'folke/tokyonight.nvim'
use { use 'savq/melange'
'nvim-lualine/lualine.nvim', use {
requires = {'kyazdani42/nvim-web-devicons', opt = true} 'nvim-lualine/lualine.nvim',
} requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
-- Coc -- Coc
use { use {
'neoclide/coc.nvim', 'neoclide/coc.nvim',
branch = 'master', branch = 'master',
run = 'yarn install --frozen-lockfile', run = 'yarn install --frozen-lockfile',
} }
-- Wrapping/delimiters -- Wrapping/delimiters
use 'andymass/vim-matchup' use 'andymass/vim-matchup'
-- use 'machakann/vim-sandwich' -- use 'machakann/vim-sandwich'
-- Undo tree -- Undo tree
use 'mbbill/undotree' use 'mbbill/undotree'
-- LSP stuff -- LSP stuff
use 'neovim/nvim-lspconfig' use 'neovim/nvim-lspconfig'
-- Split maximizer -- Split maximizer
use 'szw/vim-maximizer' use 'szw/vim-maximizer'
-- Auto pair -- Auto pair
use 'jiangmiao/auto-pairs' use 'jiangmiao/auto-pairs'
-- Nginx syntax -- Nginx syntax
use 'chr4/nginx.vim' use 'chr4/nginx.vim'
-- Zig syntax -- Zig syntax
use 'ziglang/zig.vim' use 'ziglang/zig.vim'
-- Black, python formatter -- Black, python formatter
use 'psf/black' use 'psf/black'
-- Autotag completer
use 'windwp/nvim-ts-autotag'
end end
local plugins = setmetatable({}, { local plugins = setmetatable({}, {
__index = function(_, key) __index = function(_, key)
init() init()
return packer[key] return packer[key]
end, end,
}) })
return plugins return plugins

View File

@ -89,6 +89,11 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/lualine.nvim", path = "/home/leo/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/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"] = { ["nginx.vim"] = {
loaded = true, loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nginx.vim", 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", path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
url = "https://github.com/nvim-treesitter/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"] = { ["nvim-web-devicons"] = {
loaded = true, loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", 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", path = "/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/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 = { undotree = {
loaded = true, loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree", path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree",
@ -174,18 +179,19 @@ _G.packer_plugins = {
} }
time([[Defining packer_plugins]], false) 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 -- Config for: telescope.nvim
time([[Config for telescope.nvim]], true) 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") 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) 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 if should_profile then save_profiles() end
end) end)
if not no_errors then 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') vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end end