From d27da21cef6a5a260098100ad95efdb5f7e71b5b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 13:49:16 +0530 Subject: [PATCH 1/4] add json lsp --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 6450824..a5323b5 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust python bash" +default_lsp_langs="css html ts rust python bash json" lsp_langs="" choose_langs() { @@ -103,6 +103,10 @@ install_css() { install_node_deps vscode-css-languageserver-bin } +install_json() { + install_node_deps vscode-json-languageserver +} + install_rust() { if [[ ! -e ~/.local/bin/rust-analyzer ]]; then mkdir -p ${LSP_BIN_PATH} From e54aca98ee08db33345356e1f6e55e15457d3f37 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 13:52:38 +0530 Subject: [PATCH 2/4] added some mappings --- lua/mappings.lua | 13 ++++++++----- lua/zenmode.lua | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 5afeb33..70fde6a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -9,19 +9,20 @@ end local opt = {} -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them! ---[[ +--[[ remove this line map("n", "dd", [=[ "_dd ]=], opt) map("v", "dd", [=[ "_dd ]=], opt) map("v", "x", [=[ "_x ]=], opt) -]] + this line too ]] -- OPEN TERMINALS -- -map("n", "", [[vnew term://bash ]], opt) -- open term over right -map("n", "", [[ split term://bash | resize 10 ]], opt) -- open term bottom +map("n", "", [[vnew term://bash ]], opt) -- over right +map("n", "", [[ split term://bash | resize 10 ]], opt) -- bottom +map("n", "t", [[ tabnew | term ]], opt) -- newtab --- COPY EVERYTHING -- +-- COPY EVERYTHING in the file-- map("n", "", [[ %y+]], opt) -- toggle numbers --- @@ -30,3 +31,5 @@ map("n", "n", [[ set nu!]], opt) -- toggle truezen.nvim's ataraxis and minimalist mode map("n", "z", [[ TZAtaraxis]], opt) map("n", "m", [[ TZMinimalist]], opt) + +map("n", "", [[ w ]], opt) -- save diff --git a/lua/zenmode.lua b/lua/zenmode.lua index 6f985db..b9d49ff 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -30,7 +30,7 @@ true_zen.setup( hidden_signcolumn = "no", shown_number = true, shown_relativenumber = false, - shown_signcolumn = "no" + shown_signcolumn = "yes" }, ataraxis = { just_do_it_for_me = false, From d7f10904b6c45b815e25bd4b32c5f561bd71a36d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 15:53:59 +0530 Subject: [PATCH 3/4] bufferline.nvim : changed some colors , cleaned it! --- lua/top-bufferline.lua | 85 +++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index bcf5048..fa36fbb 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -1,4 +1,4 @@ --- colors +-- define some colors local bar_fg = "#565c64" local activeBuffer_fg = "#c8ccd4" @@ -7,71 +7,96 @@ require "bufferline".setup { options = { buffer_close_icon = "", modified_icon = "", - close_icon = "", + close_icon = " ", left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, max_prefix_length = 13, tab_size = 20, - enforce_regular_tabs = true, + show_tab_indicators = true, + enforce_regular_tabs = false, view = "multiwindow", show_buffer_close_icons = true, - separator_style = "thin" + separator_style = "thin", + mappings = "true" }, + + -- bar colors!! highlights = { - background = { - guifg = bar_fg, - guibg = "#282c34" - }, fill = { guifg = bar_fg, - guibg = "#282c34" + guibg = "#252931" }, - -- focused window + background = { + guifg = bar_fg, + guibg = "#252931" + }, + + -- buffer buffer_selected = { guifg = activeBuffer_fg, guibg = "#1e222a", gui = "bold" }, + buffer_visible = { + guifg = "#9298a0", + guibg = "#252931" + }, + + -- tabs over right + tab = { + guifg = "#9298a0", + guibg = "#30343c" + }, + tab_selected = { + guifg = "#30343c", + guibg = "#9298a0" + }, + tab_close = { + guifg = "#f9929b", + guibg = "#252931" + }, + + -- buffer separators + separator = { + guifg = "#252931", + guibg = "#252931" + }, separator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, - -- unfocused opened window - buffer_visible = { - guifg = "#9298a0", - guibg = "#282c34" - }, separator_visible = { - guifg = "#282c34", - guibg = "#282c34" - }, - separator = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#252931", + guibg = "#252931" }, + indicator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#252931", + guibg = "#252931" }, + + -- modified files (but not saved) modified_selected = { guifg = "#A3BE8C", guibg = "#1e222a" + }, + modified_visible = { + guifg = "#BF616A", + guibg = "#23272f" } } } local opt = {silent = true} - local map = vim.api.nvim_set_keymap vim.g.mapleader = " " ---command that adds new buffer and moves to it -map("n", "", [[tabnew]], opt) +-- MAPPINGS +map("n", "", [[tabnew]], opt) -- new tab +map("n", "", [[bdelete]], opt) -- close tab ---removing a buffer -map("n", "", [[bdelete]], opt) - --- tabnew and tabprev +-- move between tabs map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) + From c7d1ba69271833b20109d51d55e66e36e6b9e9d4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 23:06:22 +0530 Subject: [PATCH 4/4] bufferline : add offsets --- lua/top-bufferline.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index fa36fbb..30062e4 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -5,6 +5,7 @@ local activeBuffer_fg = "#c8ccd4" require "bufferline".setup { options = { + offsets = {{filetype = "NvimTree", text = "Explorer"}}, buffer_close_icon = "", modified_icon = "", close_icon = " ", @@ -20,7 +21,6 @@ require "bufferline".setup { separator_style = "thin", mappings = "true" }, - -- bar colors!! highlights = { fill = { @@ -31,7 +31,6 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#252931" }, - -- buffer buffer_selected = { guifg = activeBuffer_fg, @@ -42,21 +41,19 @@ require "bufferline".setup { guifg = "#9298a0", guibg = "#252931" }, - -- tabs over right tab = { guifg = "#9298a0", guibg = "#30343c" }, - tab_selected = { + tab_selected = { guifg = "#30343c", guibg = "#9298a0" }, - tab_close = { + tab_close = { guifg = "#f9929b", guibg = "#252931" }, - -- buffer separators separator = { guifg = "#252931", @@ -70,12 +67,10 @@ require "bufferline".setup { guifg = "#252931", guibg = "#252931" }, - indicator_selected = { guifg = "#252931", guibg = "#252931" }, - -- modified files (but not saved) modified_selected = { guifg = "#A3BE8C", @@ -99,4 +94,3 @@ map("n", "", [[bdelete]], opt) -- close tab -- move between tabs map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) -