mirror of
https://github.com/Ajetski/dotfiles.git
synced 2025-09-30 13:53:17 -09:00
migrate to lualine, twilight, and zenmode
This commit is contained in:
parent
0c6103c6f2
commit
33b561cda8
@ -24,7 +24,7 @@ font_family JetBrainsMono Nerd Font
|
|||||||
#: italic_font Operator Mono Book Italic
|
#: italic_font Operator Mono Book Italic
|
||||||
#: bold_italic_font Operator Mono Medium Italic
|
#: bold_italic_font Operator Mono Medium Italic
|
||||||
|
|
||||||
# font_size 11.0
|
font_size 16.0
|
||||||
|
|
||||||
#: Font size (in pts)
|
#: Font size (in pts)
|
||||||
|
|
||||||
@ -756,7 +756,7 @@ font_family JetBrainsMono Nerd Font
|
|||||||
#: Fade the text in inactive windows by the specified amount (a number
|
#: Fade the text in inactive windows by the specified amount (a number
|
||||||
#: between zero and one, with zero being fully faded).
|
#: between zero and one, with zero being fully faded).
|
||||||
|
|
||||||
hide_window_decorations yes
|
hide_window_decorations titlebar-only
|
||||||
|
|
||||||
#: Hide the window decorations (title-bar and window borders) with
|
#: Hide the window decorations (title-bar and window borders) with
|
||||||
#: yes. On macOS, titlebar-only can be used to only hide the titlebar.
|
#: yes. On macOS, titlebar-only can be used to only hide the titlebar.
|
||||||
@ -1200,7 +1200,7 @@ background_opacity .7
|
|||||||
|
|
||||||
#: Relative paths are resolved from the kitty configuration directory.
|
#: Relative paths are resolved from the kitty configuration directory.
|
||||||
|
|
||||||
# allow_remote_control no
|
allow_remote_control socket-only
|
||||||
|
|
||||||
#: Allow other programs to control kitty. If you turn this on, other
|
#: Allow other programs to control kitty. If you turn this on, other
|
||||||
#: programs can control all aspects of kitty, including sending text
|
#: programs can control all aspects of kitty, including sending text
|
||||||
@ -1227,7 +1227,7 @@ background_opacity .7
|
|||||||
#: yes
|
#: yes
|
||||||
#: Remote control requests are always accepted.
|
#: Remote control requests are always accepted.
|
||||||
|
|
||||||
# listen_on none
|
listen_on unix:/tmp/kitty
|
||||||
|
|
||||||
#: Listen to the specified UNIX socket for remote control connections.
|
#: Listen to the specified UNIX socket for remote control connections.
|
||||||
#: Note that this will apply to all kitty instances. It can be
|
#: Note that this will apply to all kitty instances. It can be
|
||||||
|
@ -25,7 +25,6 @@ vim.call('plug#begin', '~/.config/nvim/plugged')
|
|||||||
Plug 'tpope/vim-sensible' -- some good default configs, we love tpope :)
|
Plug 'tpope/vim-sensible' -- some good default configs, we love tpope :)
|
||||||
Plug 'tpope/vim-surround' -- add surround motion (s), example: to change the surrounding double quotes to single quotes type: cs"'
|
Plug 'tpope/vim-surround' -- add surround motion (s), example: to change the surrounding double quotes to single quotes type: cs"'
|
||||||
Plug 'tpope/vim-repeat'
|
Plug 'tpope/vim-repeat'
|
||||||
Plug 'junegunn/goyo.vim' -- zen mode
|
|
||||||
Plug('junegunn/fzf', { ['do'] = vim.fn['fzf#install'] })
|
Plug('junegunn/fzf', { ['do'] = vim.fn['fzf#install'] })
|
||||||
Plug('nvim-treesitter/nvim-treesitter', { ['do'] = vim.fn['TSUpdate'] }) -- add support for text objects
|
Plug('nvim-treesitter/nvim-treesitter', { ['do'] = vim.fn['TSUpdate'] }) -- add support for text objects
|
||||||
Plug 'JoosepAlviste/nvim-ts-context-commentstring'
|
Plug 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||||
@ -44,8 +43,10 @@ Plug 'terrortylor/nvim-comment'
|
|||||||
Plug 'dense-analysis/ale' -- async runtime for formatting
|
Plug 'dense-analysis/ale' -- async runtime for formatting
|
||||||
Plug 'nvim-tree/nvim-tree.lua'
|
Plug 'nvim-tree/nvim-tree.lua'
|
||||||
Plug 'nvim-tree/nvim-web-devicons'
|
Plug 'nvim-tree/nvim-web-devicons'
|
||||||
--Plug 'kyazdani42/nvim-web-devicons'
|
Plug 'nvim-lualine/lualine.nvim'
|
||||||
--Plug('akinsho/bufferline.nvim', { ['tag'] = 'v3.*' })
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
|
Plug 'folke/twilight.nvim'
|
||||||
|
Plug 'folke/zen-mode.nvim'
|
||||||
|
|
||||||
-- Git Integration
|
-- Git Integration
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
@ -65,10 +66,6 @@ Plug 'L3MON4D3/LuaSnip' -- Snippets plugin
|
|||||||
Plug 'mfussenegger/nvim-dap'
|
Plug 'mfussenegger/nvim-dap'
|
||||||
Plug 'rcarriga/nvim-dap-ui'
|
Plug 'rcarriga/nvim-dap-ui'
|
||||||
|
|
||||||
-- Airline
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
|
|
||||||
-- Lang Support
|
-- Lang Support
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'pantharshit00/vim-prisma'
|
Plug 'pantharshit00/vim-prisma'
|
||||||
@ -81,20 +78,72 @@ vim.call('plug#end')
|
|||||||
-- set colorscheme
|
-- set colorscheme
|
||||||
vim.cmd(':colorscheme dogrun')
|
vim.cmd(':colorscheme dogrun')
|
||||||
vim.cmd(':highlight LineNr ctermfg=grey')
|
vim.cmd(':highlight LineNr ctermfg=grey')
|
||||||
|
vim.cmd(':hi Twilight ctermfg=8')
|
||||||
-- setup Airline
|
require("twilight").setup {
|
||||||
vim.cmd('let g:airline#extensions#tabline#enabled = 1')
|
dimming = {
|
||||||
--vim.cmd("let g:airline#extensions#tabline#left_sep = ' '")
|
alpha = 0.25, -- amount of dimming
|
||||||
--vim.cmd("let g:airline#extensions#tabline#left_alt_sep = '|'")
|
color = { "Normal", "#ffffff" },
|
||||||
vim.cmd("let g:airline_theme='minimalist'")
|
term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
|
||||||
vim.cmd[[let g:airline_left_sep = '']]
|
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
|
||||||
vim.cmd[[let g:airline_left_alt_sep = '']]
|
},
|
||||||
vim.cmd[[let g:airline_right_sep = '']]
|
context = 10, -- amount of lines we will try to show around the current line
|
||||||
vim.cmd[[let g:airline_right_alt_sep = '']]
|
treesitter = true, -- use treesitter when available for the filetype
|
||||||
--vim.cmd[[let g:airline_symbols.branch = '']]
|
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
||||||
--vim.cmd[[let g:airline_symbols.readonly = '']]
|
"function",
|
||||||
--vim.cmd[[let g:airline_symbols.linenr = '']]
|
"method",
|
||||||
|
"table",
|
||||||
|
"if_statement",
|
||||||
|
},
|
||||||
|
exclude = {}, -- exclude these filetypes
|
||||||
|
}
|
||||||
|
require("zen-mode").setup {
|
||||||
|
window = {
|
||||||
|
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||||
|
-- height and width can be:
|
||||||
|
-- * an absolute number of cells when > 1
|
||||||
|
-- * a percentage of the width / height of the editor when <= 1
|
||||||
|
-- * a function that returns the width or the height
|
||||||
|
width = 120, -- width of the Zen window
|
||||||
|
height = 1, -- height of the Zen window
|
||||||
|
-- by default, no options are changed for the Zen window
|
||||||
|
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||||
|
options = {
|
||||||
|
-- signcolumn = "no", -- disable signcolumn
|
||||||
|
-- number = false, -- disable number column
|
||||||
|
-- relativenumber = false, -- disable relative numbers
|
||||||
|
-- cursorline = false, -- disable cursorline
|
||||||
|
-- cursorcolumn = false, -- disable cursor column
|
||||||
|
-- foldcolumn = "0", -- disable fold column
|
||||||
|
-- list = false, -- disable whitespace characters
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
-- disable some global vim options (vim.o...)
|
||||||
|
-- comment the lines to not apply the options
|
||||||
|
options = {
|
||||||
|
enabled = true,
|
||||||
|
ruler = false, -- disables the ruler text in the cmd line area
|
||||||
|
showcmd = false, -- disables the command in the last line of the screen
|
||||||
|
},
|
||||||
|
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
||||||
|
gitsigns = { enabled = false }, -- disables git signs
|
||||||
|
tmux = { enabled = true }, -- disables the tmux statusline
|
||||||
|
-- this will change the font size on kitty when in zen mode
|
||||||
|
-- to make this work, you need to set the following kitty options:
|
||||||
|
-- - allow_remote_control socket-only
|
||||||
|
-- - listen_on unix:/tmp/kitty
|
||||||
|
kitty = {
|
||||||
|
enabled = false,
|
||||||
|
font = "+6", -- font size increment
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- callback where you can add custom code when the Zen window opens
|
||||||
|
on_open = function(win)
|
||||||
|
end,
|
||||||
|
-- callback where you can add custom code when the Zen window closes
|
||||||
|
on_close = function()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
-- setup svelte
|
-- setup svelte
|
||||||
vim.cmd("let g:svelte_preprocessor_tags = [ { 'name': 'ts', 'tag': 'script', 'as': 'typescript' } ]")
|
vim.cmd("let g:svelte_preprocessor_tags = [ { 'name': 'ts', 'tag': 'script', 'as': 'typescript' } ]")
|
||||||
@ -113,7 +162,7 @@ require 'nvim-treesitter.configs'.setup {
|
|||||||
require('nvim_comment').setup({
|
require('nvim_comment').setup({
|
||||||
hook = function()
|
hook = function()
|
||||||
if vim.api.nvim_buf_get_option(0, "filetype") == "svelte" then
|
if vim.api.nvim_buf_get_option(0, "filetype") == "svelte" then
|
||||||
require("ts_context_commentstring.internal").update_commentstring()
|
require("ts_context_commentstring.internal").update_commentstring{}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -121,6 +170,65 @@ require('nvim_comment').setup({
|
|||||||
-- setup hop
|
-- setup hop
|
||||||
require 'hop'.setup {}
|
require 'hop'.setup {}
|
||||||
|
|
||||||
|
-- setup lualine
|
||||||
|
local colors = {
|
||||||
|
blue = '#80a0ff',
|
||||||
|
cyan = '#79dac8',
|
||||||
|
black = '#080808',
|
||||||
|
white = '#c6c6c6',
|
||||||
|
red = '#ff5189',
|
||||||
|
violet = '#d183e8',
|
||||||
|
grey = '#303030',
|
||||||
|
}
|
||||||
|
|
||||||
|
local bubbles_theme = {
|
||||||
|
normal = {
|
||||||
|
a = { fg = colors.black, bg = colors.blue },
|
||||||
|
b = { fg = colors.white, bg = colors.grey },
|
||||||
|
c = { fg = colors.black, bg = colors.black },
|
||||||
|
},
|
||||||
|
|
||||||
|
insert = { a = { fg = colors.black, bg = colors.violet } },
|
||||||
|
visual = { a = { fg = colors.black, bg = colors.cyan } },
|
||||||
|
replace = { a = { fg = colors.black, bg = colors.red } },
|
||||||
|
|
||||||
|
inactive = {
|
||||||
|
a = { fg = colors.white, bg = colors.black },
|
||||||
|
b = { fg = colors.white, bg = colors.black },
|
||||||
|
c = { fg = colors.black, bg = colors.black },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
theme = bubbles_theme,
|
||||||
|
component_separators = '|',
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
{ 'mode', separator = { left = '' }, right_padding = 2 },
|
||||||
|
},
|
||||||
|
lualine_b = { 'filename', 'branch' },
|
||||||
|
lualine_c = { 'fileformat' },
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = { 'filetype', 'progress' },
|
||||||
|
lualine_z = {
|
||||||
|
{ 'location', separator = { right = '' }, left_padding = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = { 'filename' },
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = { 'location' },
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {},
|
||||||
|
}
|
||||||
|
|
||||||
-- setup comments
|
-- setup comments
|
||||||
require('nvim_comment').setup()
|
require('nvim_comment').setup()
|
||||||
|
|
||||||
@ -554,8 +662,7 @@ local loud_opts = { noremap = true }
|
|||||||
vim.keymap.set("n", "<c-s>", ":wa<cr>:echo 'File saved.'<cr>", loud_opts)
|
vim.keymap.set("n", "<c-s>", ":wa<cr>:echo 'File saved.'<cr>", loud_opts)
|
||||||
vim.api.nvim_set_keymap("n", "<C-h>", ":NvimTreeToggle<cr>" ,{silent = true, noremap = true})
|
vim.api.nvim_set_keymap("n", "<C-h>", ":NvimTreeToggle<cr>" ,{silent = true, noremap = true})
|
||||||
vim.keymap.set("n", "<leader>tt", ":TransparentToggle<cr>", opts)
|
vim.keymap.set("n", "<leader>tt", ":TransparentToggle<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>tzz", ":Goyo<cr>", opts)
|
vim.keymap.set("n", "<leader>tz", ":ZenMode<cr>", opts)
|
||||||
vim.keymap.set("n", "<leader>tzw", ":Goyo 160<cr>", opts)
|
|
||||||
vim.keymap.set("n", "<leader>tr", ":set relativenumber!<cr>")
|
vim.keymap.set("n", "<leader>tr", ":set relativenumber!<cr>")
|
||||||
vim.keymap.set("n", "<leader>ti", ":set invlist!<cr>")
|
vim.keymap.set("n", "<leader>ti", ":set invlist!<cr>")
|
||||||
vim.keymap.set("n", "tj", ":bn<cr>", opts)
|
vim.keymap.set("n", "tj", ":bn<cr>", opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user