From 1e8e67a6eb1a85611f3bdd74a129d5f95d4fe94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=88=D0=BE=D0=B2=D0=B0=D0=BD=20=D0=82=D0=BE=D0=BA=D0=B8?= =?UTF-8?q?=D1=9B-=D0=A8=D1=83=D0=BC=D0=B0=D1=80=D0=B0=D1=86?= Date: Sun, 4 Feb 2024 00:25:41 +0100 Subject: [PATCH] Back up work --- .gitignore | 0 LICENSE | 0 README.md | 0 init.lua | 0 lua/options/colors.lua | 0 lua/options/init.lua | 0 lua/options/keybind.lua | 49 -------------- lua/options/opts.lua | 0 lua/plugins/bufferline.lua | 73 +++++++++++++++++++++ lua/plugins/devicons.lua | 0 lua/plugins/drop.lua | 0 lua/plugins/gitsigns.lua | 12 ++-- lua/plugins/harpoon.lua | 0 lua/plugins/hlblocks.lua | 25 ++++--- lua/plugins/init.lua | 6 +- lua/plugins/lazy.lua | 130 ++++++------------------------------- lua/plugins/lsp-zero.lua | 19 +++++- lua/plugins/lualine.lua | 0 lua/plugins/mini.lua | 0 lua/plugins/nvimtree.lua | 0 lua/plugins/treesitter.lua | 12 ++++ lua/plugins/veil.lua | 61 ----------------- lua/plugins/wilder.lua | 7 +- pictures/errors.png | Bin pictures/git.png | Bin pictures/hlchunks.png | Bin pictures/lsp-cmp.png | Bin pictures/nvimtree.png | Bin pictures/trixy-white.png | Bin pictures/trixy.png | Bin pictures/veil.png | Bin pictures/zen.png | Bin 32 files changed, 153 insertions(+), 241 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 init.lua mode change 100644 => 100755 lua/options/colors.lua mode change 100644 => 100755 lua/options/init.lua mode change 100644 => 100755 lua/options/keybind.lua mode change 100644 => 100755 lua/options/opts.lua create mode 100755 lua/plugins/bufferline.lua mode change 100644 => 100755 lua/plugins/devicons.lua mode change 100644 => 100755 lua/plugins/drop.lua mode change 100644 => 100755 lua/plugins/gitsigns.lua mode change 100644 => 100755 lua/plugins/harpoon.lua mode change 100644 => 100755 lua/plugins/hlblocks.lua mode change 100644 => 100755 lua/plugins/init.lua mode change 100644 => 100755 lua/plugins/lazy.lua mode change 100644 => 100755 lua/plugins/lsp-zero.lua mode change 100644 => 100755 lua/plugins/lualine.lua mode change 100644 => 100755 lua/plugins/mini.lua mode change 100644 => 100755 lua/plugins/nvimtree.lua mode change 100644 => 100755 lua/plugins/treesitter.lua delete mode 100644 lua/plugins/veil.lua mode change 100644 => 100755 lua/plugins/wilder.lua mode change 100644 => 100755 pictures/errors.png mode change 100644 => 100755 pictures/git.png mode change 100644 => 100755 pictures/hlchunks.png mode change 100644 => 100755 pictures/lsp-cmp.png mode change 100644 => 100755 pictures/nvimtree.png mode change 100644 => 100755 pictures/trixy-white.png mode change 100644 => 100755 pictures/trixy.png mode change 100644 => 100755 pictures/veil.png mode change 100644 => 100755 pictures/zen.png diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/init.lua b/init.lua old mode 100644 new mode 100755 diff --git a/lua/options/colors.lua b/lua/options/colors.lua old mode 100644 new mode 100755 diff --git a/lua/options/init.lua b/lua/options/init.lua old mode 100644 new mode 100755 diff --git a/lua/options/keybind.lua b/lua/options/keybind.lua old mode 100644 new mode 100755 index 00bd523..b7ba50e --- a/lua/options/keybind.lua +++ b/lua/options/keybind.lua @@ -8,49 +8,11 @@ local cmap = vim.keymap.set local options = { noremap = true } local cmd_options = { noremap = true, silent = true } -local tele = require('telescope.builtin') -local neogit = require('neogit') - - - --- Launch panel if nothing is typed after z -cmap("n", "z", "Telekasten panel") - --- Most used functions -cmap("n", "zf", "Telekasten find_notes") -cmap("n", "zg", "Telekasten search_notes") -cmap("n", "zt", "Telekasten goto_today") -cmap("n", "zn", "Telekasten new_note") -cmap("n", "zc", "Telekasten show_calendar") -cmap("n", "zb", "Telekasten show_backlinks") - --- Call insert link automatically when we start typing a link -cmap("i", "[[", "Telekasten insert_link") - - - --- open git integration -map("n", "g", "Neogit kind=split", options) - - - --- TELESCOPE -cmap("n", "ff", tele.find_files, options) -map("n", "fh", "Telescope find_files hidden=true", options) -cmap("n", "fg", tele.git_files, options) - -cmap("n", "fs", function() - tele.grep_string({ search = vim.fn.input("Grep > ") }); -end) - - -- slef explanitory map("n", "tw", "lua MiniTrailspace.trim()", options) map("n", "fm", "NvimTreeToggle", options) map("n", "tt", "12 split Tnew", options) -map("n", "zt", "Twilight", options) -map("n", "zz", "ZenMode", options) -- remap keys so that they dont skip camelCase @@ -60,12 +22,6 @@ map("n", "e", "CamelCaseMotion_e", cmd_options) map("n", "ge", "CamelCaseMotion_ge", cmd_options) --- Dashboard and pomodoro -map("n", "v", "Veil", options) -map("n", "p", "NomoMenu", options) - - - -- this little guy helps you move text, really helpful map("v", "J", ":m '>+1gv=gv", options) map("v", "K", ":m '<-2gv=gv", options) @@ -97,8 +53,3 @@ map("n", "j", "lprevzz", options) -- search and replace every instance of word under cursor cmap("n", "s", [[:%s/\<\>//gI]]) - --- take a break ! -map("n", "mr", "CellularAutomaton make_it_rain", options) - - diff --git a/lua/options/opts.lua b/lua/options/opts.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua new file mode 100755 index 0000000..f362692 --- /dev/null +++ b/lua/plugins/bufferline.lua @@ -0,0 +1,73 @@ + local bufferline = require('bufferline') + bufferline.setup { + options = { + mode = "buffers", -- set to "tabs" to only show tabpages instead + style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal, + themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default + numbers = "none" , + close_command = "bdelete! %d", -- can be a string | function, | false see "Mouse actions" + right_mouse_command = "bdelete! %d", -- can be a string | function | false, see "Mouse actions" + left_mouse_command = "buffer %d", -- can be a string | function, | false see "Mouse actions" + middle_mouse_command = nil, -- can be a string | function, | false see "Mouse actions" + indicator = { + icon = '/', -- this should be omitted if indicator style is not 'icon' + style = 'icon' , + }, + buffer_close_icon = '󰅖', + modified_icon = '●', + close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + --- name_formatter can be used to change the buffer's label in the bufferline. + --- Please note some names can/will break the + --- bufferline so use this at your discretion knowing that it has + --- some limitations that will *NOT* be fixed. + max_name_length = 25, + max_prefix_length = 15, -- prefix used when a buffer is de-duplicated + truncate_names = true, -- whether or not tab names should be truncated + tab_size = 25, + diagnostics = false, + diagnostics_update_in_insert = false, + -- The diagnostics indicator can be set to nil to keep the buffer name highlight but delete the highlighting + -- NOTE: this will be called a lot so don't do any heavy processing here + offsets = { + { + filetype = "NvimTree", + text = "File Explorer" , + text_align = "center", + separator = true + } + }, + color_icons = true , -- whether or not to add the filetype icon highlights + get_element_icon = function(element) + -- element consists of {filetype: string, path: string, extension: string, directory: string} + -- This can be used to change how bufferline fetches the icon + -- for an element e.g. a buffer or a tab. + -- e.g. + local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false }) + return icon, hl + -- or + end, + show_buffer_icons = true , -- disable filetype icons for buffers + show_buffer_close_icons = true , + show_close_icon = true , + show_tab_indicators = true , + show_duplicate_prefix = true , -- whether to show duplicate buffer prefix + persist_buffer_sort = true, -- whether or not custom sorted buffers should persist + move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position + -- can also be a table containing 2 custom separators + -- [focused and unfocused]. eg: { '|', '|' } + separator_style = "thin" , + enforce_regular_tabs = false , + always_show_bufferline = true , + hover = { + enabled = true, + delay = 200, + reveal = {'close'} + }, + sort_by = 'insert_at_end', function(buffer_a, buffer_b) + -- add custom logic + return buffer_a.modified > buffer_b.modified + end + } + } diff --git a/lua/plugins/devicons.lua b/lua/plugins/devicons.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/drop.lua b/lua/plugins/drop.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua old mode 100644 new mode 100755 index c8d0a02..04f7b99 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,11 +1,11 @@ require('gitsigns').setup { signs = { - add = { text = '▊' }, - change = { text = '▊' }, - delete = { text = '▊' }, - topdelete = { text = '▊' }, - changedelete = { text = '▊' }, - untracked = { text = '|' }, + add = { text = '▍' }, + change = { text = '▍' }, + delete = { text = '▍' }, + topdelete = { text = '▍' }, + changedelete = { text = '▍' }, + untracked = { text = '▎' }, }, signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/hlblocks.lua b/lua/plugins/hlblocks.lua old mode 100644 new mode 100755 index c533c6a..e90fa48 --- a/lua/plugins/hlblocks.lua +++ b/lua/plugins/hlblocks.lua @@ -4,8 +4,17 @@ require('hlchunk').setup({ --chars = { "│", "¦", "┆", "┊", }, -- more code can be found in https://unicodeplus.com/ style = { + "#888888", + "#666666", + "#444444", "#333333", - }, + "#333333", + "#333333", + "#333333", + "#333333", + } + + }, blank = { @@ -14,17 +23,17 @@ require('hlchunk').setup({ chunk = { chars = { - horizontal_line = "─", - vertical_line = "│", - left_top = "╭", - left_bottom = "╰", - right_arrow = ">", + horizontal_line = "", + vertical_line = "", + left_top = "", + left_bottom = "", + right_arrow = "", }, - style = "#00ffff", + style = "#FF7F00", }, line_num = { - style = "#00ffff", + style = "#FFFFFF", }, }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua old mode 100644 new mode 100755 index 476a7c5..215c2dc --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,13 +1,11 @@ require("plugins.lazy") require("plugins.treesitter") -require("plugins.drop") -require("plugins.mini") require("plugins.lsp-zero") require("plugins.devicons") require("plugins.lualine") -require("plugins.veil") -require("plugins.harpoon") +-- require("plugins.harpoon") require("plugins.hlblocks") require("plugins.gitsigns") require("plugins.nvimtree") +require("plugins.bufferline") require("plugins.wilder") diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua old mode 100644 new mode 100755 index 8b9d0c4..ab2d9ad --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -22,70 +22,34 @@ require("lazy").setup({ -- colorscheme "EdenEast/nightfox.nvim", + "luckasRanarison/tree-sitter-hypr", + 'lambdalisue/nerdfont.vim', + 'gelguy/wilder.nvim', { - 'gelguy/wilder.nvim', - config = function() - local wilder = require('wilder') - wilder.setup({modes = {':', '/', '?'}}) - wilder.set_option('renderer', wilder.renderer_mux({ - [':'] = wilder.popupmenu_renderer({ - highlighter = wilder.basic_highlighter(), - }), - ['/'] = wilder.wildmenu_renderer({ - highlighter = wilder.basic_highlighter(), - }), - })) - - - wilder.set_option('renderer', wilder.popupmenu_renderer( - wilder.popupmenu_palette_theme({ - -- 'single', 'double', 'rounded' or 'solid' - -- can also be a list of 8 characters, see :h wilder#popupmenu_palette_theme() for more details - border = 'rounded', - max_height = '75%', -- max height of the palette - min_height = 0, -- set to the same as 'max_height' for a fixed height window - prompt_position = 'top', -- 'top' or 'bottom' to set the location of the prompt - reverse = 0, -- set to 1 to reverse the order of the list, use in combination with 'prompt_position' - }) - )) - end, - }, - - - -- Journaling and notes! with a calendar ! - { - "renerocksai/telekasten.nvim", + "rbong/vim-flog", + cmd = { "Flog", "Flogsplit", "Floggit" }, dependencies = { - "nvim-telescope/telescope.nvim", - "renerocksai/calendar-vim" + "tpope/vim-fugitive", }, - config = function () - require("telekasten").setup({ - home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here - }) - end }, - -- Focus more ! - "folke/twilight.nvim", - "folke/zen-mode.nvim", + 'kassio/neoterm', -- it's annoying that w skips the whole word, so let's fix it "bkad/camelcasemotion", -- very good file jumping system - "ThePrimeagen/harpoon", + { + "ThePrimeagen/harpoon", + dependencies = "nvim-lua/plenary.nvim", + version = "harpoon2" + }, -- arbitrarily comment "tpope/vim-commentary", - -- this one is just fun - "eandrju/cellular-automaton.nvim", - - - -- indicate what has changed in git repo "lewis6991/gitsigns.nvim", -- like magit for emacs @@ -107,13 +71,6 @@ require("lazy").setup({ }, - -- Debugger UI - { - "rcarriga/nvim-dap-ui", - dependencies = {"mfussenegger/nvim-dap"} - }, - - -- Surround text with quotes etc { "kylechui/nvim-surround", @@ -152,68 +109,23 @@ require("lazy").setup({ } }, - - { - "NvChad/nvim-colorizer.lua", - config = function() - require('colorizer').setup() - end, - }, - - - -- LEARN HJKL DAMMIT - { - "m4xshen/hardtime.nvim", - lazy = true, - opts = {} - }, - - - -- dashboard and start page - { - "willothy/veil.nvim", - dependencies = { - "nvim-telescope/telescope.nvim", - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-file-browser.nvim" - }, - }, - - - -- size does not matter - { - "echasnovski/mini.nvim", - version = false, - }, - - -- need that syntax highlight amirite { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, - - -- the name says it all + -- using lazy.nvim { - "SirVer/ultisnips", - lazy = true + "akinsho/bufferline.nvim", + version = "*", + dependencies = 'nvim-tree/nvim-web-devicons', + config = function () + vim.opt.termguicolors = true + require("bufferline").setup{} + end }, - -- That shmexy latex plugin - { - "lervag/vimtex", - lazy = true - }, - - - -- Cool screensaver !! - { - "folke/drop.nvim", - event = "VimEnter", - }, - - -- this is pure magic, i love this guy { "VonHeikemen/lsp-zero.nvim", @@ -221,7 +133,7 @@ require("lazy").setup({ dependencies = { -- LSP Support {"neovim/nvim-lspconfig"}, -- Required - {"williamboman/mason.nvim"}, -- Optional + { "williamboman/mason.nvim"}, -- Optional {"williamboman/mason-lspconfig.nvim"}, -- Optional -- Autocompletion diff --git a/lua/plugins/lsp-zero.lua b/lua/plugins/lsp-zero.lua old mode 100644 new mode 100755 index 293a662..cd8efa6 --- a/lua/plugins/lsp-zero.lua +++ b/lua/plugins/lsp-zero.lua @@ -9,15 +9,28 @@ end) -- (Optional) Configure lua language server for neovim require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) + +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391', 'E303', 'E226'}, + maxLineLength = 120 + } + } + } + } +} + + lsp.setup() - - - -- You need to setup `cmp` after lsp-zero local cmp = require('cmp') local cmp_action = require('lsp-zero').cmp_action() + cmp.setup({ mapping = { -- `Enter` key to confirm completion diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua old mode 100644 new mode 100755 diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua old mode 100644 new mode 100755 index 37c746e..c97f69a --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -13,3 +13,15 @@ require'nvim-treesitter.configs'.setup { enable = true, }, } + + + +local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +parser_config.hypr = { + install_info = { + url = "https://github.com/luckasRanarison/tree-sitter-hypr", + files = { "src/parser.c" }, + branch = "master", + }, + filetype = "hypr", +} diff --git a/lua/plugins/veil.lua b/lua/plugins/veil.lua deleted file mode 100644 index ab9be21..0000000 --- a/lua/plugins/veil.lua +++ /dev/null @@ -1,61 +0,0 @@ -local current_day = os.date("%A") - -local builtin = require("veil.builtin") - - - -require("veil").setup({ - sections = { - builtin.sections.animated(builtin.headers.frames_days_of_week[current_day], { - hl = { fg = "#5de4c7" }, - }), - - builtin.sections.buttons({ - { - icon = "", - text = "Config", - shortcut = "c", - callback = function() - require("telescope").extensions.file_browser.file_browser({ - path = vim.fn.stdpath("config"), - }) - end, - }, - - { - icon = "", - text = "Find Files", - shortcut = "f", - callback = function() - require("telescope.builtin").find_files() - end, - }, - - { - icon = "", - text = "Grep", - shortcut = "g", - callback = function() - require("telescope.builtin").live_grep() - end, - }, - - { - icon = "", - text = "Buffers", - shortcut = "b", - callback = function() - require("telescope.builtin").buffers() - end, - }, - }), - - builtin.sections.oldfiles(), - }, - - startup = true, - listed = true -}) - - - diff --git a/lua/plugins/wilder.lua b/lua/plugins/wilder.lua old mode 100644 new mode 100755 index f6ceb99..b906f61 --- a/lua/plugins/wilder.lua +++ b/lua/plugins/wilder.lua @@ -7,9 +7,13 @@ wilder.setup({modes = {':', '/', '?'}}) wilder.set_option('renderer', wilder.renderer_mux({ [':'] = wilder.popupmenu_renderer({ highlighter = wilder.basic_highlighter(), + left = {' ', wilder.popupmenu_devicons()}, + right = {' ', wilder.popupmenu_scrollbar()}, }), ['/'] = wilder.wildmenu_renderer({ highlighter = wilder.basic_highlighter(), + left = {' ', wilder.popupmenu_devicons()}, + right = {' ', wilder.popupmenu_scrollbar()}, }), })) @@ -19,5 +23,6 @@ wilder.set_option('renderer', wilder.popupmenu_renderer({ highlighter = wilder.basic_highlighter(), left = {' ', wilder.popupmenu_devicons()}, right = {' ', wilder.popupmenu_scrollbar()}, - max_height = '30%', + max_height = '20%', + min_width = '100%' })) diff --git a/pictures/errors.png b/pictures/errors.png old mode 100644 new mode 100755 diff --git a/pictures/git.png b/pictures/git.png old mode 100644 new mode 100755 diff --git a/pictures/hlchunks.png b/pictures/hlchunks.png old mode 100644 new mode 100755 diff --git a/pictures/lsp-cmp.png b/pictures/lsp-cmp.png old mode 100644 new mode 100755 diff --git a/pictures/nvimtree.png b/pictures/nvimtree.png old mode 100644 new mode 100755 diff --git a/pictures/trixy-white.png b/pictures/trixy-white.png old mode 100644 new mode 100755 diff --git a/pictures/trixy.png b/pictures/trixy.png old mode 100644 new mode 100755 diff --git a/pictures/veil.png b/pictures/veil.png old mode 100644 new mode 100755 diff --git a/pictures/zen.png b/pictures/zen.png old mode 100644 new mode 100755