From 41e059ac2b90f4eb781d1552dd98fb1d90546371 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 20 Apr 2021 09:45:14 +0530 Subject: [PATCH] add TrueZen.nvim plugin --- README.md | 2 ++ init.lua | 7 +++++-- lua/mappings/lua.lua | 6 ++++++ lua/nvimTree/lua.lua | 4 ---- lua/pluginsList/lua.lua | 31 ++++++++++++++++++++----------- lua/treesitter/lua.lua | 8 +++++--- lua/zenmode/lua.lua | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 lua/zenmode/lua.lua diff --git a/README.md b/README.md index e716f7b..67ad166 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,8 @@ I'd install it first and add its setup line : - Shift n toggle line number - Ctrl a copies everything in the current file - select any text + y copies the selected text +- leader + z toggle truezen.nvim's Ataraxis mode +- leader + n toggle line number - leader + f b open all buffers , with telescope - leader + f p search and preview images with telescope - leader + f f find files in the current DIR , with telescope diff --git a/init.lua b/init.lua index fea08aa..170dd09 100644 --- a/init.lua +++ b/init.lua @@ -42,8 +42,8 @@ g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_first_indent_level = false -require("treesitter.lua") -require("mappings.lua") +require "treesitter.lua" +require "mappings.lua" -- highlights -- cmd "hi LineNr guifg=#42464e guibg=NONE" @@ -84,3 +84,6 @@ cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") cmd "hi clear CursorLine" cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf" + +-- setup for TrueZen.nvim +require "zenmode.lua" diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index aa3b5df..aef5e6e 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -15,3 +15,9 @@ map("n", "", [[ split term://bash | resize 10 ]], opt) -- open ter -- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) + +-- toggle numbers --- +map("n", "n", [[ set nu!]], opt) + +-- toggle truezen.nvim's ataraxis mode +map("n", "z", [[ TZAtaraxis]], opt) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 851c8fa..4f2553e 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -5,8 +5,6 @@ cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true - - g.nvim_tree_side = "left" g.nvim_tree_width = 25 g.nvim_tree_ignore = {".git", "node_modules", ".cache"} @@ -88,8 +86,6 @@ g.nvim_tree_bindings = { ["q"] = get_lua_cb("close") } - - cmd "hi NvimTreeFolderIcon guifg = #61afef" cmd "hi NvimTreeFolderName guifg = #61afef" cmd "hi NvimTreeIndentMarker guifg=#383c44" diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 55874d8..fbc106f 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -7,27 +7,36 @@ return require("packer").startup( use {"wbthomason/packer.nvim", opt = true} use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + -- color related stuff use "norcalli/nvim-base16.lua" - use "kyazdani42/nvim-web-devicons" - use "kyazdani42/nvim-tree.lua" + use "norcalli/nvim-colorizer.lua" + + -- lsp stuff + use "nvim-treesitter/nvim-treesitter" + use "neovim/nvim-lspconfig" + use "hrsh7th/nvim-compe" + use "onsails/lspkind-nvim" + use "sbdchd/neoformat" use "nvim-lua/plenary.nvim" + use "lewis6991/gitsigns.nvim" use "akinsho/nvim-bufferline.lua" use "glepnir/galaxyline.nvim" - use "907th/vim-auto-save" - use "nvim-treesitter/nvim-treesitter" - use "norcalli/nvim-colorizer.lua" - use "ryanoasis/vim-devicons" - use "sbdchd/neoformat" - use "neovim/nvim-lspconfig" - use "hrsh7th/nvim-compe" use "windwp/nvim-autopairs" use "alvan/vim-closetag" - use "tweekmonster/startuptime.vim" - use "onsails/lspkind-nvim" + + -- file managing , picker etc + use "kyazdani42/nvim-tree.lua" + use "kyazdani42/nvim-web-devicons" + use "ryanoasis/vim-devicons" use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" + + -- misc + use "tweekmonster/startuptime.vim" + use "907th/vim-auto-save" + use "kdav5758/TrueZen.nvim" use "karb94/neoscroll.nvim" end ) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index 1608a44..274668b 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -6,9 +6,11 @@ ts_config.setup { "html", "css", "bash", - "cpp", - "rust", - "lua" + "lua", + "json" + -- "cpp", + -- "rust", + -- "python" }, highlight = { enable = true, diff --git a/lua/zenmode/lua.lua b/lua/zenmode/lua.lua new file mode 100644 index 0000000..5843173 --- /dev/null +++ b/lua/zenmode/lua.lua @@ -0,0 +1,33 @@ +require("true-zen").setup( + { + true_false_commands = false, + cursor_by_mode = false, + bottom = { + hidden_laststatus = 0, + hidden_ruler = false, + hidden_showmode = false, + hidden_showcmd = false, + hidden_cmdheight = 1, + shown_laststatus = 2, + shown_ruler = true, + shown_showmode = false, + shown_showcmd = false, + shown_cmdheight = 1 + }, + top = { + hidden_showtabline = 0, + shown_showtabline = 2 + }, + left = { + hidden_number = false, + hidden_relativenumber = false, + hidden_signcolumn = "no", + shown_number = true, + shown_relativenumber = false, + shown_signcolumn = "no" + }, + ataraxis = { + left_right_padding = 40 + } + } +)