Browse Source

gitsigns and zen mode

imac
Juni Kim 2 years ago
parent
commit
8b129ecd20
  1. 1
      after/plugin/gitsigns.lua
  2. 2
      after/plugin/treesitter.lua
  3. 7
      after/plugin/zenmode.lua
  4. 2
      lua/junikim/packer.lua
  5. 2
      lua/junikim/remap.lua
  6. 1
      lua/junikim/theme.lua

1
after/plugin/gitsigns.lua

@ -0,0 +1 @@
require('gitsigns').setup()

2
after/plugin/treesitter.lua

@ -35,7 +35,7 @@ require 'nvim-treesitter.configs'.setup {
highlight = { highlight = {
enable = true, enable = true,
disable = { "latex", "perl" },
disable = { "latex", "perl", "htmldjango" },
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
} }

7
after/plugin/zenmode.lua

@ -7,13 +7,16 @@ require("zen-mode").setup {
vim.keymap.set("n", "<leader>z", function() vim.keymap.set("n", "<leader>z", function()
require("zen-mode").toggle({ require("zen-mode").toggle({
window = { window = {
width = .85 -- width will be 85% of the editor width
width = 90
}, },
on_open = function(win) on_open = function(win)
vim.wo.relativenumber = false
vim.opt.wrap = true
vim.opt.relativenumber = false
end, end,
-- callback where you can add custom code when the Zen window closes -- callback where you can add custom code when the Zen window closes
on_close = function() on_close = function()
vim.opt.wrap = false
vim.opt.relativenumber = true
end, end,
}) })
end) end)

2
lua/junikim/packer.lua

@ -22,8 +22,8 @@ return require('packer').startup(function(use)
} }
} }
use 'vim-airline/vim-airline-themes'
use 'tpope/vim-fugitive' use 'tpope/vim-fugitive'
use 'lewis6991/gitsigns.nvim'
use { use {
'VonHeikemen/lsp-zero.nvim', 'VonHeikemen/lsp-zero.nvim',

2
lua/junikim/remap.lua

@ -42,7 +42,7 @@ vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>");
vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>"); vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>");
vim.keymap.set("n", "<leader>fmt", function() vim.keymap.set("n", "<leader>fmt", function()
vim.lsp.buf.formatting_sync()
vim.lsp.buf.format()
end) end)
if os.getenv("TMUX") ~= nil then if os.getenv("TMUX") ~= nil then

1
lua/junikim/theme.lua

@ -5,7 +5,6 @@ require('catppuccin').setup {
local day = 9 local day = 9
local night = 18 local night = 18
local hour = os.date("*t").hour local hour = os.date("*t").hour
print("hour" .. hour)
local themes = { "catppuccin-macchiato", "catppuccin-mocha" } local themes = { "catppuccin-macchiato", "catppuccin-mocha" }
local theme = 1 local theme = 1

Loading…
Cancel
Save