diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-11-12 09:25:07 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-11-12 09:25:07 +0000 |
commit | 57dcd8648a80cf632d7295afa1e6e3912a8b2930 (patch) | |
tree | cab217d894cc92c454d24d7f45a24d2c94133589 /.config/nvim | |
parent | 0387a327d11da95d273fbd8ecf368cf0b93a3875 (diff) | |
download | dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar.gz dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar.bz2 dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar.lz dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar.xz dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.tar.zst dotfiles-57dcd8648a80cf632d7295afa1e6e3912a8b2930.zip |
Fix tmux colours and add gitsigns to neovim
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/general.lua | 21 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 69 | ||||
-rw-r--r-- | .config/nvim/lua/statusline.lua | 4 |
3 files changed, 87 insertions, 7 deletions
diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua index 088312a..17b6885 100644 --- a/.config/nvim/lua/general.lua +++ b/.config/nvim/lua/general.lua @@ -9,18 +9,29 @@ vim.opt.backupcopy = "yes" vim.opt.undolevels = 1000 vim.opt.wrap = false -vim.opt.tabstop = 4 -vim.opt.softtabstop = -1 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true -vim.opt.autoindent = true +-- vim.opt.tabstop = 4 +-- vim.opt.softtabstop = -1 +-- vim.opt.shiftwidth = 4 +-- vim.opt.expandtab = true +-- vim.opt.autoindent = true + +vim.cmd [[autocmd FileType typescript setlocal shiftwidth=2 softtabstop=2 expandtab]] +vim.cmd [[autocmd FileType typescriptreact setlocal shiftwidth=2 softtabstop=2 expandtab]] +vim.cmd [[autocmd FileType css setlocal shiftwidth=2 softtabstop=2 expandtab]] +vim.cmd [[autocmd FileType html setlocal shiftwidth=2 softtabstop=2 expandtab]] +vim.cmd [[autocmd FileType json setlocal shiftwidth=2 softtabstop=2 expandtab]] +vim.cmd [[autocmd FileType cs setlocal shiftwidth=4 softtabstop=4 expandtab]] + +vim.cmd [[filetype indent off]] -- Comment the following lines to disable whitespace characters vim.opt.list = true vim.opt.listchars:append("space:⋅") vim.opt.listchars:append("eol:↴") vim.opt.listchars:append("tab:-->") + vim.cmd [[colorscheme dracula]] +vim.cmd [[hi Normal guibg=NONE ctermbg=NONE]] vim.opt.spell = false vim.opt.spelllang = "en" diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index b2ca11d..29ddc09 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -60,6 +60,7 @@ local PKGS = { { url = "https://github.com/sigmaSd/deno-nvim.git" }; { url = "https://github.com/ray-x/lsp_signature.nvim.git" }; { url = "https://github.com/Hoffs/omnisharp-extended-lsp.nvim.git" }; + { url = "https://github.com/lewis6991/gitsigns.nvim.git" }; -- Dev container { url = "https://codeberg.org/esensar/nvim-dev-container.git" }; @@ -189,6 +190,74 @@ local function init_plugins() require("mini.surround").setup({}) + require("gitsigns").setup { + signs = { + add = { + hl = "GitSignsAdd"; + text = "│"; + numhl = "GitSignsAddNr"; + linehl = "GitSignsAddLn"; + }; + change = { + hl = "GitSignsChange"; + text = "│"; + numhl = "GitSignsChangeNr"; + linehl = "GitSignsChangeLn"; + }; + delete = { + hl = "GitSignsDelete"; + text = "_"; + numhl = "GitSignsDeleteNr"; + linehl = "GitSignsDeleteLn"; + }; + topdelete = { + hl = "GitSignsDelete"; + text = "‾"; + numhl = "GitSignsDeleteNr"; + linehl = "GitSignsDeleteLn"; + }; + changedelete = { + hl = "GitSignsChange"; + text = "~"; + numhl = "GitSignsChangeNr"; + linehl = "GitSignsChangeLn"; + }; + untracked = { + hl = "GitSignsAdd"; + text = "┆"; + numhl = "GitSignsAddNr"; + linehl = "GitSignsAddLn"; + }; + }; + signcolumn = true; -- Toggle with `:Gitsigns toggle_signs` + numhl = true; -- Toggle with `:Gitsigns toggle_numhl` + linehl = false; -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false; -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { interval = 1000; follow_files = true }; + attach_to_untracked = true; + current_line_blame = true; -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true; + virt_text_pos = "eol"; -- 'eol' | 'overlay' | 'right_align' + delay = 0; + ignore_whitespace = false; + }; + current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>"; + sign_priority = 6; + update_debounce = 100; + status_formatter = nil; -- Use default + max_file_length = 40000; -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = "single"; + style = "minimal"; + relative = "cursor"; + row = 0; + col = 1; + }; + yadm = { enable = false }; + } + end return { diff --git a/.config/nvim/lua/statusline.lua b/.config/nvim/lua/statusline.lua index 3265b2c..d5a7ad8 100644 --- a/.config/nvim/lua/statusline.lua +++ b/.config/nvim/lua/statusline.lua @@ -4,8 +4,8 @@ require("lualine").setup { options = { icons_enabled = true; theme = "auto"; - --component_separators = { left = ""; right = "" }; - --section_separators = { left = ""; right = "" }; + -- component_separators = { left = ""; right = "" }; + -- section_separators = { left = ""; right = "" }; component_separators = { left = ""; right = "" }; section_separators = { left = ""; right = "" }; disabled_filetypes = {}; |