From 7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 26 Oct 2022 00:00:35 +0200 Subject: Removed unnecessary files --- lua/plugins/colorscheme.lua | 2 +- lua/plugins/linecolor.lua | 112 -------- lua/plugins/lsp-colors.lua | 9 - lua/plugins/lspkind.lua | 47 ---- lua/plugins/lspsaga-22.10.23-13:08-bak.lua | 145 ---------- lua/plugins/lspsaga.lua | 46 ---- lua/plugins/lualine.lua | 423 ----------------------------- lua/plugins/luasnip-22.10.23-12:54-bak.lua | 161 ----------- lua/plugins/toggleterm.lua | 90 ------ 9 files changed, 1 insertion(+), 1034 deletions(-) delete mode 100644 lua/plugins/linecolor.lua delete mode 100644 lua/plugins/lsp-colors.lua delete mode 100644 lua/plugins/lspkind.lua delete mode 100644 lua/plugins/lspsaga-22.10.23-13:08-bak.lua delete mode 100644 lua/plugins/lspsaga.lua delete mode 100644 lua/plugins/lualine.lua delete mode 100644 lua/plugins/luasnip-22.10.23-12:54-bak.lua delete mode 100644 lua/plugins/toggleterm.lua (limited to 'lua/plugins') diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 3ded54c..dc0145d 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,6 +1,6 @@ -- Colorscheme -- ayu gruvbox molokai onedark srcery everblush vscode edge nightfly doom-one -local colorscheme = "doom-one" +local colorscheme = "onedark" local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then vim.notify("colorscheme " .. colorscheme .. " not found!") diff --git a/lua/plugins/linecolor.lua b/lua/plugins/linecolor.lua deleted file mode 100644 index 37550dd..0000000 --- a/lua/plugins/linecolor.lua +++ /dev/null @@ -1,112 +0,0 @@ ---local M = {} ---M.theme = function() --- -- I know I could just set bg = nil but I'm leaving this here in case I want custom colors in the future --- local colors = { --- nobg = nil, --- blue = "#87b0f9", --- mauve = "#cba6f7", --- red = "#f38ba8", --- green = "#a6e3a1", --- peach = "#fab387", --- white = "#c6d0f5", --- gray = "#a1a8c9", --- black = "#1e1e2e", --- } --- return { --- inactive = { --- a = { fg = colors.blue, bg = colors.nobg, gui = "bold" }, --- b = { fg = colors.white, bg = colors.black }, --- c = { fg = colors.gray, bg = colors.nobg }, --- }, --- visual = { --- a = { fg = colors.black, bg = colors.mauve, gui = "bold" }, --- b = { fg = colors.mauve, bg = colors.nobg }, --- c = { fg = colors.white, bg = colors.nobg }, --- }, --- replace = { --- a = { fg = colors.black, bg = colors.red, gui = "bold" }, --- b = { fg = colors.red, bg = colors.nobg }, --- c = { fg = colors.white, bg = colors.nobg }, --- }, --- normal = { --- a = { fg = colors.black, bg = colors.blue, gui = "bold" }, --- b = { fg = colors.black, bg = colors.green }, --- c = { fg = colors.white, bg = colors.black }, --- }, --- insert = { --- a = { fg = colors.black, bg = colors.green, gui = "bold" }, --- b = { fg = colors.teal, bg = colors.nobg }, --- c = { fg = colors.white, bg = colors.nobg }, --- }, --- command = { --- a = { fg = colors.black, bg = colors.peach, gui = "bold" }, --- b = { fg = colors.peach, bg = colors.nobg }, --- c = { fg = colors.white, bg = colors.nobg }, --- }, --- modified = { --- a = { fg = colors.black, bg = colors.peach, gui = "bold" }, --- b = { fg = colors.peach, bg = colors.peach }, --- c = { fg = colors.white, bg = colors.peach }, --- }, --- } ---end ---return M -local M = {} -M.theme = function() - --local colors = { - -- darkgray = "#16161d", - -- gray = "#727169", - -- innerbg = nil, - -- outerbg = "#16161D", - -- normal = "#7e9cd8", - -- insert = "#98bb6c", - -- visual = "#ffa066", - -- replace = "#e46876", - -- command = "#e6c384", - --} - local colors = { - darkgray = "#16161d", - gray = "#727169", - innerbg = nil, - outerbg = "#16161D", - normal = "#39BAE6", - insert = "#AAD94C", - visual = "#FA8D3F", - replace = "#F07171", - command = "#F2AE49", - } - return { - inactive = { - a = { fg = colors.gray, bg = colors.outerbg, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - }, - visual = { - a = { fg = colors.darkgray, bg = colors.visual, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - }, - replace = { - a = { fg = colors.darkgray, bg = colors.replace, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - }, - normal = { - a = { fg = colors.darkgray, bg = colors.normal, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - y = { fg = colors.gray, bg = colors.outerbg }, - }, - insert = { - a = { fg = colors.darkgray, bg = colors.insert, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - }, - command = { - a = { fg = colors.darkgray, bg = colors.command, gui = "bold" }, - b = { fg = colors.gray, bg = colors.outerbg }, - c = { fg = colors.gray, bg = colors.innerbg }, - }, - } -end -return M diff --git a/lua/plugins/lsp-colors.lua b/lua/plugins/lsp-colors.lua deleted file mode 100644 index 1398123..0000000 --- a/lua/plugins/lsp-colors.lua +++ /dev/null @@ -1,9 +0,0 @@ -local status, colors = pcall(require, "lsp-colors") -if (not status) then return end - -colors.setup { - Error = "#db4b4b", - Warning = "#e0af68", - Information = "#0db9d7", - Hint = "#10B981" -} diff --git a/lua/plugins/lspkind.lua b/lua/plugins/lspkind.lua deleted file mode 100644 index 72ca5c2..0000000 --- a/lua/plugins/lspkind.lua +++ /dev/null @@ -1,47 +0,0 @@ -local status, lspkind = pcall(require, "lspkind") -if (not status) then return end - -lspkind.init({ - -- enables text annotations - -- - -- default: true - mode = 'symbol', - - -- default symbol map - -- can be either 'default' (requires nerd-fonts font) or - -- 'codicons' for codicon preset (requires vscode-codicons font) - -- - -- default: 'default' - preset = 'codicons', - - -- override preset symbols - -- - -- default: {} - symbol_map = { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "ﰠ", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "塞", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "פּ", - Event = "", - Operator = "", - TypeParameter = "" - }, -}) diff --git a/lua/plugins/lspsaga-22.10.23-13:08-bak.lua b/lua/plugins/lspsaga-22.10.23-13:08-bak.lua deleted file mode 100644 index 0bf1ec7..0000000 --- a/lua/plugins/lspsaga-22.10.23-13:08-bak.lua +++ /dev/null @@ -1,145 +0,0 @@ -require "lspsaga".init_lsp_saga { - -- "single" | "double" | "rounded" | "bold" | "plus" - border_style = "rounded", - --border_style = "single", - saga_winblend = 30, - move_in_saga = { next = '', prev = '' }, - --move_in_saga = { prev = "k", next = "j" }, - scroll_in_preview = { - scroll_down = "", - scroll_up = "", - }, - diagnostic_header = { " ", " ", " ", " " }, - -- add bracket or something with diagnostic source, just have 2 elements - -- use emoji lightbulb in default - code_action_icon = "", - --code_action_icon = "ﯦ ", - -- if true can press number to execute the codeaction in codeaction window - code_action_num_shortcut = true, - -- same as nvim-lightbulb but async - code_action_lightbulb = { - enable = false, - sign = false, - sign_priority = 20, -- - virtual_text = false, - }, - finder_icons = { - def = " ", - ref = " ", - link = " ", - }, - -- preview lines of lsp_finder and definition preview - max_preview_lines = 5, - definition_action_keys = { - edit = '', - vsplit = '', - split = '', - tabe = '', - quit = '', - }, - -- definition_preview_quit = '', - -- finder_preview_hl_ns = 8, - finder_action_keys = { - open = { 'o', '' }, - vsplit = "v", - split = "s", - tabe = "t", - quit = "", - scroll_down = "", - scroll_up = "", -- quit can be a table - }, - code_action_keys = { - quit = "", - exec = "", - }, - rename_action_quit = "", - rename_in_select = true, - symbol_in_winbar = { - enable = true, - --in_custom = false, - in_custom = true, - separator = '  ', - --show_file = false, - show_file = true, - click_support = false, - --click_support = false, - }, - --show_outline = { - -- win_position = 'right', - -- --set special filetype win that outline window split.like NvimTree neotree - -- -- defx, db_ui - -- min_with = '', - -- win_width = 40, - -- auto_enter = false, - -- auto_preview = true, - -- virt_text = 'x', - -- jump_key = 'l', - -- -- auto refresh when change buffer - -- auto_refresh = true, - --}, - custom_kind = { - File = { " " }, - Module = { " " }, - Namespace = { "ﱕ " }, - Package = { " " }, - Class = { "ﴯ " }, - Method = { "" }, - Property = { "ﰠ " }, - Field = { "ﰠ " }, - Constructor = { " " }, - Enum = { " " }, - Interface = { " " }, - Function = { " " }, - Variable = { " " }, - Constant = { " " }, - String = { " " }, - Number = { " " }, - Boolean = { " " }, - Array = { " " }, - Object = { " " }, - Key = { "- " }, - Null = { " " }, - EnumMember = { " " }, - Struct = { " " }, - Event = { " " }, - Operator = { " " }, - TypeParameter = { " " }, - TypeAlias = { " " }, - Parameter = { " " }, - StaticMethod = { " " }, - Macro = { "廓" }, - }, -} - - -- Mappings. -local map = vim.api.nvim_set_keymap -local opts = { noremap = true, silent = true } - -map("n", "gd", "Lspsaga peek_definition", opts) ---map("n", "gp", "Lspsaga peek_definition", opts) -map("n", "gi", "Lspsaga lsp_finder", opts) -map("n", "gh", "Lspsaga hover_doc", opts) -map("n", "gs", "Lspsaga signature_help", opts) -map("n", "ga", "Lspsaga code_action", opts) -map("v", "ga", "Lspsaga range_code_action", opts) -map("n", "gl", "Lspsaga show_line_diagnostics", opts) ---map("n", "go", "Lspsaga open_floaterm zsh", opts) -map("n", ";D", "Lspsaga show_cursor_diagnostics", opts) -map("n", "", "Lspsaga rename", opts) -map("n", "gk", "Lspsaga diagnostic_jump_prev", opts) -map("n", "gj", "Lspsaga diagnostic_jump_next", opts) -map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) -map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) -map("t", "", "Lspsaga close_floaterm", opts) - ---vim.api.nvim_command("highlight LspFloatWinNormal guibg=none ") ---hi LspFloatWinNormal guibg=none - - --- vim.api.nvim_create_autocmd("BufEnter", { --- callback = function () --- if #vim.api.nvim_list_wins() == 1 and vim.bo.filetype == "lspsagaoutline" then --- vim.cmd "quit" --- end --- end --- }) diff --git a/lua/plugins/lspsaga.lua b/lua/plugins/lspsaga.lua deleted file mode 100644 index 4161ce9..0000000 --- a/lua/plugins/lspsaga.lua +++ /dev/null @@ -1,46 +0,0 @@ -return function() - local saga = require "lspsaga" - - saga.init_lsp_saga { - use_saga_diagnostic_sign = false, - finder_action_keys = { - vsplit = "v", - split = "s", - quit = { "q", "" }, - }, - code_action_icon = "💡", - code_action_prompt = { - enable = false, - sign = false, - virtual_text = false, - }, - } - - require("as.highlights").highlight("LspSagaLightbulb", { guifg = "NONE", guibg = "NONE" }) - --- as.vnoremap("ca", ":lua require('lspsaga.codeaction').range_code_action()") --- as.inoremap("", "lua require('lspsaga.signaturehelp').signature_help()") --- as.nnoremap("K", "lua require('lspsaga.hover').render_hover_doc()") --- -- scroll down hover doc --- as.nnoremap("", "lua require('lspsaga.action').smart_scroll_with_saga(1)") --- -- scroll up hover doc --- as.nnoremap("", "lua require('lspsaga.action').smart_scroll_with_saga(-1)") - - require("which-key").register { - ["rn"] = { require("lspsaga.rename").rename, "lsp: rename" }, - ["ca"] = { require("lspsaga.codeaction").code_action, "lsp: code action" }, - ["gp"] = { require("lspsaga.provider").preview_definition, "lsp: preview definition" }, - ["gh"] = { require("lspsaga.provider").lsp_finder, "lsp: finder" }, - -- jump diagnostic - ["]c"] = { require("lspsaga.diagnostic").lsp_jump_diagnostic_prev, "lsp: previous diagnostic" }, - ["[c"] = { require("lspsaga.diagnostic").lsp_jump_diagnostic_next, "lsp: next diagnostic" }, - } - - -- augroup("LspSagaCursorCommands", { - -- { - -- events = { "CursorHold" }, - -- targets = { "*" }, - -- command = "lua require('lspsaga.diagnostic').show_cursor_diagnostics()", - -- }, - -- }) -end diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua deleted file mode 100644 index 9d86e21..0000000 --- a/lua/plugins/lualine.lua +++ /dev/null @@ -1,423 +0,0 @@ -local lualine_status_ok, lualine = pcall(require, "lualine") -if not lualine_status_ok then - print("lualine.nvim is etiher broken or is not installed.") - return -end - ---local colors = require('tokyonight.colors').setup() ---local colors = { ---bg_dark = "#1f2335", ---bg = "#24283b", ---fg = "#c0caf5", ---fg_gutter = "#3b4261", ---green = "#a6e3a1", ---red = "#f38ba8", ---} - ---local colors = { --- gray = '#23232e', --- lightgray = '#5f6a8e', --- orange = '#ffb86c', --- purple = '#bd93f9', --- red = '#ff5555', --- yellow = '#f1fa8c', --- green = '#50fa7b', --- white = '#f8f8f2', --- black = '#282a36', ---} -local colors = { - nobg = nil, - blue = "#87b0f9", - mauve = "#cba6f7", - red = "#f38ba8", - green = "#a6e3a1", - peach = "#fab387", - white = "#c6d0f5", - gray = "#a1a8c9", - black = "#1e1e2e", - innerbg = nil, - outerbg = "#16161D", -} ---require("lualine").setup({ --- Your lua part of config goes here -require("lualine").setup({ - options = { - icons_enabled = true, - --theme = "auto", - theme = require("plugins.linecolor").theme(), - --theme = { - -- We are going to use lualine_c an lualine_x as left and - -- right section. Both are highlighte by c theme . So we - -- are just setting default looks o statusline - --normal = { c = { fg = colors.fg, bg = colors.bg } }, - --inactive = { c = { fg = colors.fg, bg = colors.bg } }, - --}, - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - --component_separators = { left = '|', right = '|'}, - --section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = true, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { - "branch", - { - "diff", - colored = true, - diff_color = { - added = "DiffAdd", - modified = "DiffChange", - removed = "DiffDelete", - }, - }, - { - "diagnostics", - - sources = { "nvim_lsp" }, - sections = { "error", "warn", "info" }, - - diagnostics_color = { - error = "DiagnosticError", - warn = "DiagnosticWarn", - info = "DiagnosticInfo", - }, - colored = true, - update_in_insert = false, - always_visible = false, - }, - }, - --lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { - --{"filetype", padding={right=0}, icon_only = true, component_separators = {left = "", right = ""}}, - --{"filename", padding={left=0}, color = {gui = "bold,italic"}}, - --{ "filetype", - -- icon_only = true, - --}, - { - "filename", - --color = {gui = "bold,italic", fg = '#ffaa88', bg = 'nil' }, - --component_separators = {left = "", right = ""}, - }, - }, - lualine_x = { "encoding", "fileformat", "filetype" }, - --lualine_x = { - -- {"encoding", color = { bg = colors.black }, component_separators = {left = "", right = ""}}, - -- {"fileformat", color = { bg = colors.black }, component_separators = {left = "", right = ""}}, - -- {"filetype", color = { bg = colors.black }, component_separators = {left = "", right = ""}}, - --}, - lualine_y = { "progress" }, - lualine_z = { "location" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = { "location" }, - lualine_y = {}, - lualine_z = {}, - }, - -- tabline = {}, - tabline = { - --lualine_a = { "mode" }, - --lualine_a = {custom_fname}, - lualine_a = { - { - "buffers", - show_filename_only = false, - show_modified_status = true, - mode = 4, - buffers_color = { - active = { bg = colors.nobg, fg = colors.black }, -- color for active buffer - --inactive = { bg = colors.white, fg = colors.fg_gutter }, -- color for inactive buffer - --active = { bg = colors.bg, fg = colors.white }, -- color for active buffer - --inactive = { bg = colors.bg_dark, fg = colors.fg_gutter }, -- color for inactive buffer - ----color = function() - ---- return { bg = vim.bo.modified and '#aa3355' or '#33aa88' } - ----end, - }, - symbols = { - modified = " ●", -- Text to show when the buffer is modified - alternate_file = "", -- Text to show to identify the alternate file - --directory = "", -- Text to show when the buffer is a directory - }, - max_length = vim.o.columns * 5 / 6, - --{{function() - -- local bg = 'hi! lualine_buffers_color' -- not modified - -- if vim.bo.modified then bg = '#c70039' -- unsaved - -- elseif not vim.bo.readonly then bg = 'hi! lualine_buffers_color' end -- readonly - -- vim.cmd('hi! lualine_buffers_color guibg='..bg) - --end, - --color = 'hi! lualine_buffers_color', - --}}, - }, - }, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - --lualine_z = { "tabs" }, - }, - --tabline = { - -- lualine_a = { "mode" }, - -- lualine_b = { "buffers" }, - -- lualine_c = { "branch" }, - -- --lualine_c = { "branch", "diff", "diagnostics" }, - -- lualine_x = {}, - -- lualine_y = {}, - -- lualine_z = { "tabs" }, - --}, - --winbar = { - -- lualine_a = {}, - -- lualine_b = {}, - -- lualine_c = {'filename'}, - -- lualine_x = {}, - -- lualine_y = {}, - -- lualine_z = {} - --}, - --inactive_winbar = { - -- lualine_a = {}, - -- lualine_b = {}, - -- lualine_c = {}, - -- lualine_x = {}, - -- lualine_y = {}, - -- lualine_z = {} - --}, - winbar = {}, - inactive_winbar = {}, - --extensions = {}, - extensions = { "quickfix" }, -}) ---require("lualine").statusline() ---require("lualine").tabline() ---if not lualine_status_ok then --- print("lualine.nvim is etiher broken or is not installed.") --- return ---end ---local lualine_status_ok, lualine = pcall(require, "lualine") ---if not lualine_status_ok then --- print("lualine.nvim is etiher broken or is not installed.") --- return ---end ---local utils = require("heirline.utils") - ---local M = {} - --- stylua: ignore start ---M.colours = {--{{{ ----- Color table for highlights ----- stylua: ignore ---local colors = { --- bg = '#2E3440', --- fg = '#E5E9F0', --- yellow = '#EBCB8B', --- cyan = '#88C0D0', --- darkblue = '#5E81AC', --- green = '#A3BE8C', --- orange = '#D08770', --- violet = '#B48EAD', --- magenta = '#B48EAD', --- blue = '#81A1C1', --- red = '#BF616A', ---} --- ---local conditions = { --- buffer_not_empty = function() --- return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 --- end, --- hide_in_width = function() --- return vim.fn.winwidth(0) > 80 --- end, --- check_git_workspace = function() --- local filepath = vim.fn.expand("%:p:h") --- local gitdir = vim.fn.finddir(".git", filepath .. ";") --- return gitdir and #gitdir > 0 and #gitdir < #filepath --- end, ---} - --- Config ---local config = { ---require('lualine').setup { --- options = { --- -- Disable sections and component separators --- component_separators = "", --- section_separators = "", --- theme = { --- -- We are going to use lualine_c an lualine_x as left and --- -- right section. Both are highlighte by c theme . So we --- -- are just setting default looks o statusline --- normal = { c = { fg = colors.fg, bg = colors.bg } }, --- inactive = { c = { fg = colors.fg, bg = colors.bg } }, --- }, --- disabled_filetypes = { "NvimTree" }, --- }, --- sections = { --- -- these are to remove the defaults --- lualine_a = {}, --- lualine_b = {}, --- lualine_y = {}, --- lualine_z = {}, --- -- These will be filled later --- lualine_c = {}, --- lualine_x = {}, --- }, --- inactive_sections = { --- -- these are to remove the defaults --- lualine_a = {}, --- lualine_b = {}, --- lualine_y = {}, --- lualine_z = {}, --- lualine_c = {}, --- lualine_x = {}, --- }, ---} --- ----- Inserts a component in lualine_c at left section ---local function ins_left(component) --- table.insert(lualine.sections.lualine_c, component) ---end --- ----- Inserts a component in lualine_x ot right section ---local function ins_right(component) --- table.insert(lualine.sections.lualine_x, component) ---end --- ---ins_left({ --- function() --- return "▊" --- end, --- color = { fg = colors.green }, -- Sets highlighting of component --- padding = { left = 0, right = 1 }, -- We don't need space before this ---}) --- ---ins_left({ --- -- mode component --- function() --- return "" --- end, --- color = function() --- -- auto change color according to neovims mode --- local mode_color = { --- n = colors.blue, --- i = colors.green, --- v = colors.violet, --- ["�"] = colors.blue, --- V = colors.blue, --- c = colors.magenta, --- no = colors.red, --- s = colors.orange, --- S = colors.orange, --- ic = colors.yellow, --- R = colors.violet, --- Rv = colors.violet, --- cv = colors.red, --- ce = colors.red, --- r = colors.cyan, --- rm = colors.cyan, --- ["r?"] = colors.cyan, --- ["!"] = colors.red, --- t = colors.red, --- } --- return { fg = mode_color[vim.fn.mode()] } --- end, --- padding = { right = 1 }, ---}) --- ---ins_left({ --- -- mode component --- "mode", --- color = function() --- -- auto change color according to neovims mode --- local mode_color = { --- n = colors.red, --- i = colors.green, --- v = colors.violet, --- ["�"] = colors.blue, --- V = colors.blue, --- c = colors.magenta, --- no = colors.red, --- s = colors.orange, --- S = colors.orange, --- ic = colors.yellow, --- R = colors.violet, --- Rv = colors.violet, --- cv = colors.red, --- ce = colors.red, --- r = colors.cyan, --- rm = colors.cyan, --- ["r?"] = colors.cyan, --- ["!"] = colors.red, --- t = colors.red, --- } --- return { fg = mode_color[vim.fn.mode()] } --- end, --- padding = { right = 1 }, ---}) --- ---ins_left({ --- "branch", --- icon = "", --- color = { fg = colors.violet, gui = "bold" }, ---}) --- ---ins_left({ --- "filename", --- cond = conditions.buffer_not_empty, --- color = { fg = colors.aqua, gui = "bold" }, ---}) --- ---ins_left({ --- -- filesize component --- "filesize", --- cond = conditions.buffer_not_empty, ---}) --- ----- Add components to right sections ---ins_right({ --- "o:encoding", -- option component same as &encoding in viml --- fmt = string.lower, -- I'm not sure why it's upper case either ;) --- cond = conditions.hide_in_width, --- color = { fg = colors.yellow }, ---}) --- ---ins_right({ --- "fileformat", --- fmt = string.upper, --- icons_enabled = true, -- I think icons are cool but Eviline doesn't have them. sigh --- color = { fg = colors.fg, gui = "bold" }, ---}) --- ---ins_right({ --- "filetype", ---}) --- ---ins_right({ "progress", color = { fg = colors.fg, gui = "bold" } }) --- ---ins_right({ --- "location", ---}) --- ---ins_right({ --- function() --- return "▊" --- end, --- color = { fg = colors.green }, --- padding = { left = 1 }, ---}) ---return M --- Now don't forget to initialize lualine ---require("lualine").setup(config) ---require"lualine".setup(config) ---lualine.setup(config) diff --git a/lua/plugins/luasnip-22.10.23-12:54-bak.lua b/lua/plugins/luasnip-22.10.23-12:54-bak.lua deleted file mode 100644 index 08f49ee..0000000 --- a/lua/plugins/luasnip-22.10.23-12:54-bak.lua +++ /dev/null @@ -1,161 +0,0 @@ -if vim.g.snippets ~= "luasnip" or not pcall(require, "luasnip") then - return -end ---local luasnip = require("luasnip") -local ls = require "luasnip" -- -local types = require "luasnip.util.types" -- ---local options = { -ls.config.set_config { - history = true, - updateevents = "TextChanged,TextChangedI", - -- Autosnippets: - enable_autosnippets = true, -- - ext_opts = { -- - [types.choiceNode] = { -- - active = { -- - virt_text = { { " « ", "NonTest" } }, -- - }, -- - }, -- - }, -- -} - ---local keymap = vim.keymap -local keymap = vim.api.nvim_set_keymap ---local keymap = vim.keymap.set --- is my jump backwards key. --- this always moves to the previous item within the snippet - ---keymap({ "i", "s" }, "", function() --- if ls.jumpable(-1) then --- ls.jump(-1) --- end ---end, { silent = true }) - --- is selecting within a list of options. --- This is useful for choice nodes (introduced in the forthcoming episode 2) ---keymap({"i"}, "", function() --- if ls.choice_active() then --- ls.change_choice(1) --- end ---end, { silent = true }) - - ---keymap("i", "", require "luasnip.extras.select_choice") - --- shorcut to source my luasnips file again, which will reload my snippets ---keymap("n", "s", "source ~/.config/nvim/lua/user/plugins/luasnip.lua") - --- ls.parser.parse_snippet(, ) ---ls.snippets = { --- all = { --- -- Available in any filetype --- ls.parser.parse_snippet("expand", "-- this is what was expanded!"), ---s.snippets = { --- all = { --- -- Available in any filetype --- ls.parser.parse_snippet("expand", "-- this is what was expanded!"), --- }, --- lua = { --- -- Lua specific snippets go here. --- ls.parser.parse_snippet("lf", "local $1 = function($2)\n $0\nend") --- }, --- ---}) -local snip = ls.snippet -local node = ls.snippet_node -local text = ls.text_node -local insert = ls.insert_node -local func = ls.function_node -local choice = ls.choice_node -local dynamicn = ls.dynamic_node - -local date = function() return {os.date('%Y-%m-%d')} end - -ls.add_snippets(nil, { - all = { - --snip({ - -- trig = "date", - -- namr = "Date", - -- dscr = "Date in the form of YYYY-MM-DD", - --}, { - -- func(date, {}), - --}), - snip({ - trig = "meta", - namr = "Metadata", - dscr = "Yaml metadata format for markdown" -}, -{ - text({"---", - "title: "}), insert(1, "note_title"), text({"", - "author: "}), insert(2, "author"), text({"", - "date: "}), func(date, {}), text({"", - "categories: ["}), insert(3, ""), text({"]", - "lastmod: "}), func(date, {}), text({"", - "tags: ["}), insert(4), text({"]", - "comments: true", - "---", ""}), - insert(0) - }), - }}) ---keymap("i", "", "lua require'luasnip'.jump(1)", opts) ---keymap("s", "", "lua require'luasnip'.jump(1)", opts) ---keymap("i", "", "lua require'luasnip'.jump(-1)", opts) ---local opts = { noremap = true, silent = true } ---local keymap = vim.api.nvim_set_keymap ---local keymap = vim.keymap ---local term_opts = { noremap = true, silent = false } --- local map = function(mode, l, r, opts) --- opts = opts or {} --- opts.silent = true --- opts.noremap = true --- keymap.set(mode, l, r, opts) --- end - - - ---keymap("i", "", "luasnip-expand-or-jump * lua require'luasnip'.expand_or_jump()", opts) ---keymap("i", "", "luasnip-jump-prev * lua require'luasnip'.jump(-1)", opts) ---keymap("s", "", "luasnip-expand-or-jump * lua require'luasnip'.expand_or_jump()", opts) ---keymap("s", "", "luasnip-jump-prev * lua require'luasnip'.jump(-1)", opts) ---keymap("i", "", "luasnip-next-choice * lua require'luasnip'.change_choice(1)", opts) ---keymap("s", "", "lua require'luasnip'.jump(-1)", opts) ---map("i", "", "luasnip-expand-or-jump") - ---! luasnip-expand-repeat * lua require'luasnip'.expand_repeat() ---! luasnip-delete-check * lua require'luasnip'.unlink_current_if_deleted() ---i luasnip-jump-prev * lua require'luasnip'.jump(-1) ---i luasnip-jump-next * lua require'luasnip'.jump(1) ---i luasnip-prev-choice * lua require'luasnip'.change_choice(-1) ---i luasnip-next-choice * lua require'luasnip'.change_choice(1) ---i luasnip-expand-snippet * lua require'luasnip'.expand() ---i luasnip-expand-or-jump * lua require'luasnip'.expand_or_jump() - ---- - - - - - - - - - ---luasnip.config.set_config(options) ---require("luasnip.loaders.from_vscode").lazy_load() ---require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } --- ---vim.api.nvim_create_autocmd("InsertLeave", { --- callback = function() --- if --- require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] --- and not require("luasnip").session.jump_active --- then --- require("luasnip").unlink_current() --- end --- end, ---}) - - - - diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua deleted file mode 100644 index 912729a..0000000 --- a/lua/plugins/toggleterm.lua +++ /dev/null @@ -1,90 +0,0 @@ -local status_ok, toggleterm = pcall(require, "toggleterm") -if not status_ok then - return -end - -toggleterm.setup({ - size = function(term) - if term.direction == "horizontal" then - return 12 - elseif term.direction == "vertical" then - return vim.o.columns * 0.3 - end - end, - --size = 20, - open_mapping = [[to]], - hide_numbers = true, - shade_filetypes = {}, - shade_terminals = false, - shading_factor = 1, - start_in_insert = true, - insert_mappings = true, - persist_size = true, - direction = "float", - --direction = "vertical", - --direction = "horizontal", - close_on_exit = true, - shell = vim.o.shell, - highlights = { - -- highlights which map to a highlight group name and a table of it's values - -- NOTE: this is only a subset of values, any group placed here will be set for the terminal window split - Normal = { - background = "#000000", - }, - }, - float_opts = { - width = 70, - height = 15, - winblend = 3, - border = "curved", - --winblend = 0, - highlights = { - border = "Normal", - background = "Normal", - }, - }, -}) - -function _G.set_terminal_keymaps() - local opts = { noremap = true } - --local opts = {buffer = 0} - vim.api.nvim_buf_set_keymap(0, "t", "", [[]], opts) - vim.api.nvim_buf_set_keymap(0, "t", "jj", [[]], opts) - vim.api.nvim_buf_set_keymap(0, "t", "", [[h]], opts) - vim.api.nvim_buf_set_keymap(0, "t", "", [[j]], opts) - vim.api.nvim_buf_set_keymap(0, "t", "", [[k]], opts) - vim.api.nvim_buf_set_keymap(0, "t", "", [[l]], opts) -end - -vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()") - -local Terminal = require("toggleterm.terminal").Terminal -local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) - -function _LAZYGIT_TOGGLE() - lazygit:toggle() -end - -local node = Terminal:new({ cmd = "node", hidden = true }) - -function _NODE_TOGGLE() - node:toggle() -end - -local ncdu = Terminal:new({ cmd = "ncdu", hidden = true }) - -function _NCDU_TOGGLE() - ncdu:toggle() -end - -local htop = Terminal:new({ cmd = "htop", hidden = true }) - -function _HTOP_TOGGLE() - htop:toggle() -end - -local python = Terminal:new({ cmd = "python", hidden = true }) - -function _PYTHON_TOGGLE() - python:toggle() -end -- cgit v1.2.3