diff --git a/.gitignore b/.gitignore index e033bc6..a4fa4cf 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +lua/ lazy-lock.json diff --git a/README.md b/README.md index c5338ee..ffb5548 100755 --- a/README.md +++ b/README.md @@ -5,20 +5,23 @@ -# Trixy is a begginer friendy distro of NeoVim, that aims to be powerful while remaining minimal. +# Opinionated configuration for NeoVim, aiming to be powerful whilst being minimal. ## Notable plugins and features include : -- improved camelCase navigation wit w, b, e etc -- `hlchunk.nvim` used for highlighting current scope -- `nvim-tree` for file tree view +- Whole configuration is written in `fennel` - lisp that compiles into lua +- `lazy.nvim` for plugin management +- `tangerine` for fennel compilation +- `hibiscus` for neovim fennel macros +- `markview.nvim` for amazing markdown previewing +- `oil.nvim` for buffer filesystem manipulation - `lsp-zero` as a language server setup, simply briliant - ... # Installation ``` -$ git clone https://gitlab.com/sumarac/trixy ~/.config/nvim/ +$ git clone https://gitlab.com/zeitgeizt/trixy ~/.config/nvim/ nvim +"Lazy sync" ``` It should pull Lazy.nvim itself, and also all of the plugins. Run :Mason to install your Language Servers of choice. diff --git a/fnl/options/colors.fnl b/fnl/options/colors.fnl new file mode 100644 index 0000000..fe3901e --- /dev/null +++ b/fnl/options/colors.fnl @@ -0,0 +1 @@ +(vim.cmd "colorscheme carbonfox") diff --git a/fnl/options/init.fnl b/fnl/options/init.fnl new file mode 100755 index 0000000..146112e --- /dev/null +++ b/fnl/options/init.fnl @@ -0,0 +1,6 @@ +(local dir :options.) +(fn modul [name] (.. dir name)) + +(require (modul :colors)) +(require (modul :keybind)) +(require (modul :opts)) diff --git a/fnl/options/keybind.fnl b/fnl/options/keybind.fnl new file mode 100755 index 0000000..39d9c3c --- /dev/null +++ b/fnl/options/keybind.fnl @@ -0,0 +1,37 @@ +(require-macros :hibiscus.core) +(require-macros :hibiscus.vim) + +(g! mapleader " ") + + +(map! [n :noremap] : "Telescope buffers") + +(map! [n :noremap] :tw "lua MiniTrailspace.trim()") + +(map! [n :noremap] :fo "Oil") +(map! [n :noremap] :ff "Telescope find_files") +(map! [n :noremap] :fs "Telescope current_buffer_fuzzy_find") +(map! [n :noremap] :gs "Telescope git_status") +(map! [n :noremap] :gg "Telescope live_grep") + +; remap keys so that they dont skip camelCase +(map! [n :noremap :silent] :w "CamelCaseMotion_w") +(map! [n :noremap :silent] :b "CamelCaseMotion_b") +(map! [n :noremap :silent] :e "CamelCaseMotion_e") +(map! [n :noremap :silent] :ge "CamelCaseMotion_ge") + +; this little guy helps you move text, really helpful +(map! [v :noremap] :J ":m '>+1gv=gv") +(map! [v :noremap] :K ":m '<-2gv=gv") + +; Cursor always stays on center +(map! [n :noremap] :J "mzJ`z") +(map! [n :noremap] : "zz") +(map! [n :noremap] : "zz") +(map! [n :noremap] :n "nzzzv") +(map! [n :noremap] :N "Nzzzv") + +(map! [x :noremap] :p (fn [] [:_dP])) +(map! [x :noremap] :p (fn [] [:+dP])) +(map! [n :noremap] :s ":%s/\\<\\>//gI") +(map! [nv :noremap] :d (fn [] [:_d])) diff --git a/fnl/options/opts.fnl b/fnl/options/opts.fnl new file mode 100644 index 0000000..1ca36e2 --- /dev/null +++ b/fnl/options/opts.fnl @@ -0,0 +1,39 @@ +(import-macros {: set!} :hibiscus.vim) + +(set! number true) ; enable line number +(set! relativenumber true) ; enable relative line number +(set! undofile true) ; persistent undo +(set! backup false) ; disable backup +(set! autowrite true) ; auto write buffer when it's not focused +(set! ignorecase true) ; case insensitive on search.. +(set! list true) ; display listchars +(set! smartindent true) ; smarter indentation +(set! splitright true) ; split right instead of left +(set! splitkeep :screen) ; stabilize split +(set! startofline false) ; don't go to the start of the line when moving to another file +(set! swapfile false) ; disable swapfile +(set! termguicolors true) ; true colours for better experience +(set! wrap false) ; don't wrap lines +(set! backupcopy :yes) ; fix weirdness for stuff that replaces the entire file when hot reloading + +(set! smarttab false) +(set! tabstop 4) +(set! softtabstop 4) +(set! shiftwidth 4) + +(set! compatible false) ; disable compatibility with old vi +(set! showmatch true) ; show matches while searching for text +(set! hlsearch true) ; highlight text that has been searched +(set! incsearch true) ; incramentally search +(set! autoindent true) +(set! wildmode "longest,list") +(set! mouse :v) +(set! mouse :a) +(set! clipboard :unnamedplus) ; use system clipboard +(set! ttyfast true) +(set! cursorline true) +(set! splitbelow true) +(set! autochdir true) +(set! signcolumn :yes:1) +(set! shell :/bin/zsh) +(set! splitright false) diff --git a/fnl/plugins/devicons.fnl b/fnl/plugins/devicons.fnl new file mode 100755 index 0000000..8effdd2 --- /dev/null +++ b/fnl/plugins/devicons.fnl @@ -0,0 +1,33 @@ +(local plug (require :nvim-web-devicons)) + +(plug.setup [ + :strict true + :default true + :color_icons true + + :override [ + :zsh [ + :icon "" + :color "#428850" + :cterm_color "65" + :name "zsh" + ] + ] + + :override_by_filename [ + :.gitignore [ + :icon "" + :color "#f1502f" + :name "gitignore" + ] + ] + + :override_by_extension [ + :log [ + :icon "" + :color "#81e043" + :name "Log" + ] + ] + +]) diff --git a/fnl/plugins/gitsigns.fnl b/fnl/plugins/gitsigns.fnl new file mode 100755 index 0000000..0bf8bac --- /dev/null +++ b/fnl/plugins/gitsigns.fnl @@ -0,0 +1,46 @@ +(local gitsigns (require :gitsigns)) + +(gitsigns.setup { + :signs { + :add [:text :▍] + :change [:text :▍] + :delete [:text :▍] + :topdelete [:text :▍] + :changedelete [:text :▍] + :untracked [:text :▍] + } + + :signcolumn true + :numhl false + :linehl false + :word_diff false + + :watch_gitdir { + :follow_files true + } + + + :attach_to_untracked true + :current_line_blame false + + :current_line_blame_opts { + :virt_text true + :virt_text_pos :eol + :delay 1000 + :ignore_whitespace false + } + + :current_line_blame_formatter ", - " + :sign_priority 6 + :update_debounce 100 + :status_formatter nil + :max_file_length 40000 + + :preview_config { + :border :single + :style :minimal + :relative :cursor + :row 0 + :col 1 + } +}) diff --git a/fnl/plugins/harpoon.fnl b/fnl/plugins/harpoon.fnl new file mode 100644 index 0000000..8cb3899 --- /dev/null +++ b/fnl/plugins/harpoon.fnl @@ -0,0 +1,18 @@ +(import-macros {: map!} :hibiscus.vim) + +(local harpoon (require :harpoon)) +(harpoon.setup) + +(map! [n :noremap] :ha (fn [] (harpoon.list:append))) + +(map! [n :noremap] : (fn [] (harpoon.ui.toggle_quick_menu (harpoon.list)))) + +(map! [n :noremap] : (fn [] (harpoon.list:select 1))) +(map! [n :noremap] : (fn [] (harpoon.list:select 2))) +(map! [n :noremap] : (fn [] (harpoon.list:select 3))) +(map! [n :noremap] : (fn [] (harpoon.list:select 4))) + +;; Toggle previous & next buffers stored within Harpoon list +(map! [n :noremap] : (fn [] (harpoon.list:prev))) +(map! [n :noremap] : (fn [] (harpoon.list:next))) + diff --git a/fnl/plugins/hlblocks.fnl b/fnl/plugins/hlblocks.fnl new file mode 100755 index 0000000..8d26f36 --- /dev/null +++ b/fnl/plugins/hlblocks.fnl @@ -0,0 +1,39 @@ +(local hlchunk (require :hlchunk)) + +(hlchunk.setup { + :indent { + :chars { "." "." "." "." } + + :style { + :#888888 + :#666666 + :#444444 + :#333333 + :#333333 + :#333333 + :#333333 + :#333333 + } + } + + :blank { + :enable false + } + + :chunk { + :chars { + :horizontal_line "" + :vertical_line "" + :left_top "" + :left_bottom "" + :right_arrow "" + } + + :style :#FF7F00 + } + + :line_num { + :style :#FFFFFF + } + +}) diff --git a/fnl/plugins/init.fnl b/fnl/plugins/init.fnl new file mode 100755 index 0000000..30b9c5d --- /dev/null +++ b/fnl/plugins/init.fnl @@ -0,0 +1,15 @@ +(local dir :plugins.) +(fn modul [name] (.. dir name)) + +(require (modul :lazy)) +(require (modul :devicons)) +(require (modul :gitsigns)) +(require (modul :harpoon)) +(require (modul :hlblocks)) +(require (modul :lsp-zero)) +(require (modul :lualine)) +(require (modul :mini)) +(require (modul :oil)) +(require (modul :telescope)) +(require (modul :treesitter)) +(require (modul :wilder)) diff --git a/fnl/plugins/lazy.fnl b/fnl/plugins/lazy.fnl new file mode 100755 index 0000000..825d1ba --- /dev/null +++ b/fnl/plugins/lazy.fnl @@ -0,0 +1,91 @@ +(local lazypath (.. (vim.fn.stdpath :data) :/lazy/lazy.nvim)) + +(if (not (vim.loop.fs_stat lazypath)) + (vim.fn.system + [:git :clone :--filter=blob:none :https://github.com/folke/lazy.nvim.git :--branch=stable lazypath])) + +(vim.opt.rtp:prepend lazypath) + +(local lazy (require :lazy)) +(local plug 1) +(local opt 1) + +(lazy.setup [ + :EdenEast/nightfox.nvim + :lambdalisue/nerdfont.vim + :gelguy/wilder.nvim + + :bkad/camelcasemotion + :lewis6991/gitsigns.nvim + + { + plug :stevearc/oil.nvim + :dependencies [ + {plug :nvim-tree/nvim-web-devicons} + ] + } + + { + plug :nvim-telescope/telescope.nvim + :tag "0.1.8" + :dependencies [ + {plug :nvim-lua/plenary.nvim} + ] + } + + { + plug :OXY2DEV/markview.nvim + :dependencies [ + {plug :nvim-treesitter/nvim-treesitter} + {plug :nvim-tree/nvim-web-devicons} + ] + } + + { + plug :shellRaining/hlchunk.nvim + :event [ + {opt :UIEnter} + ] + } + + { + plug :ThePrimeagen/harpoon + :branch :harpoon2 + :dependencies [ + {plug :nvim-lua/plenary.nvim} + ] + } + + { + plug :nvim-lualine/lualine.nvim + :dependencies [ + {plug :nvim-tree/nvim-web-devicons} + ] + } + + { + plug :nvim-treesitter/nvim-treesitter + :build ":TSUpdate" + } + + { + plug :VonHeikemen/lsp-zero.nvim + :branch "v3.x" + :dependencies [ + {plug :neovim/nvim-lspconfig} + {plug :williamboman/mason.nvim} + {plug :williamboman/mason-lspconfig.nvim} + + {plug :hrsh7th/nvim-cmp} + {plug :hrsh7th/cmp-nvim-lsp} + {plug :L3MON4D3/LuaSnip} + ] + } + + { + plug :echasnovski/mini.nvim + :version false + } +]) + + diff --git a/lua/plugins/lazy.lua b/fnl/plugins/lazyinlua.bak similarity index 100% rename from lua/plugins/lazy.lua rename to fnl/plugins/lazyinlua.bak diff --git a/fnl/plugins/lsp-zero.fnl b/fnl/plugins/lsp-zero.fnl new file mode 100755 index 0000000..2de5905 --- /dev/null +++ b/fnl/plugins/lsp-zero.fnl @@ -0,0 +1,43 @@ +(local mason (require :mason)) +(mason.setup) + +(local lsp (require :lsp-zero)) +(lsp.preset) + +(local lspconfig (require :lspconfig)) +(lspconfig.lua_ls.setup (lsp.nvim_lua_ls)) + +(local cmp (require :cmp)) +(local cmp_action (lsp.cmp_action)) + + +(lsp.on_attach (fn [client bufnr] lsp.default_keymaps {:buffer bufnr})) + +(lspconfig.pylsp.setup { + :setings { + :pylsp { + :plugins { + :pycodestyle { + :ignore [:W391 :E303 :E226] + :maxLineLength 120 }}}}}) + +(lsp.setup) + +(cmp.setup { + :mapping { + : (cmp.mapping.confirm {:select true}) + + : (cmp.mapping (fn [fallback] + (if (cmp.visible) + (cmp.select_next_item) + (fallback)) [:i :s] )) + + : (cmp.mapping (fn [fallback] + (if (cmp.visible) + (cmp.select_prev_item) + (fallback)) [:i :s] )) + + : cmp.mapping.complete + + : cmp_action.luasnip_jump_forward + : cmp_action.luasnip_jump_backward }}) diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl new file mode 100755 index 0000000..5c16f9c --- /dev/null +++ b/fnl/plugins/lualine.fnl @@ -0,0 +1,257 @@ +(local lualine (require :lualine)) +(lualine.setup) + +; TODO: create a new theme + +; OLD THEME : + +; local lualine = require('lualine') +; +; local colors = { +; bg = '#202328', +; fg = '#bbc2cf', +; yellow = '#ECBE7B', +; cyan = '#008080', +; darkblue = '#081633', +; green = '#98be65', +; orange = '#FF8800', +; violet = '#a9a1e1', +; magenta = '#c678dd', +; blue = '#51afef', +; red = '#ec5f67', +; } +; +; +; 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 = { +; options = { +; component_separators = '', +; section_separators = '', +; theme = { +; +; normal = { +; c = { +; fg = colors.fg, +; bg = colors.bg +; } +; }, +; +; inactive = { +; c = { +; fg = colors.fg, +; bg = colors.bg +; } +; }, +; +; }, +; }, +; +; +; sections = { +; lualine_a = {}, +; lualine_b = {}, +; lualine_y = {}, +; lualine_z = {}, +; lualine_c = {}, +; lualine_x = {}, +; }, +; inactive_sections = { +; lualine_a = {}, +; lualine_b = {}, +; lualine_y = {}, +; lualine_z = {}, +; lualine_c = {}, +; lualine_x = {}, +; }, +; } +; +; local function ins_left(component) +; table.insert(config.sections.lualine_c, component) +; end +; +; local function ins_right(component) +; table.insert(config.sections.lualine_x, component) +; end +; +; ins_left { +; function() +; return '▊' +; end, +; +; color = { fg = colors.blue }, +; +; padding = { +; left = 0, +; right = 1 +; }, +; } +; +; +; +; ins_left { +; function() +; -- return '' +; return '' +; end, +; color = function() +; local mode_color = { +; n = colors.blue, +; i = colors.red, +; v = colors.green, +; [''] = colors.orange, +; V = colors.green, +; c = colors.magenta, +; no = colors.red, +; s = colors.orange, +; S = colors.orange, +; [''] = 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 { +; 'diff', +; +; symbols = { +; added = ' ', +; modified = ' ', +; removed = ' ' +; }, +; +; diff_color = { +; added = { fg = colors.green }, +; modified = { fg = colors.orange }, +; removed = { fg = colors.red }, +; }, +; +; cond = conditions.hide_in_width, +; } +; +; +; +; ins_left { +; 'diagnostics', +; +; sources = { 'nvim_diagnostic' }, +; +; symbols = { +; error = ' ', +; warn = ' ', +; info = ' ' +; }, +; +; diagnostics_color = { +; color_error = { fg = colors.red }, +; color_warn = { fg = colors.yellow }, +; color_info = { fg = colors.cyan }, +; }, +; } +; +; ins_left { +; function() +; return '%=' +; end, +; } +; +; +; ins_left { +; 'filename', +; cond = conditions.buffer_not_empty, +; +; color = { +; fg = colors.magenta, +; gui = 'bold' +; }, +; } +; +; +; ins_right { +; 'filetype', +; colored = true, +; icon_only = false, +; icon = { align = 'right' } +; } +; +; ins_right { +; 'progress', +; +; color = { +; fg = colors.fg, +; gui = 'bold' +; } +; } +; +; +; ins_right { +; 'o:encoding', +; +; fmt = string.upper, +; cond = conditions.hide_in_width, +; +; color = { +; fg = colors.green, +; gui = 'bold' +; }, +; } +; +; +; ins_right { +; 'fileformat', +; +; fmt = string.upper, +; icons_enabled = false, +; +; color = { +; fg = colors.green, +; gui = 'bold' +; }, +; } +; +; +; ins_right { +; function() +; return '▊' +; end, +; +; color = { fg = colors.blue }, +; padding = { left = 1 }, +; } +; +; lualine.setup(config) diff --git a/fnl/plugins/mini.fnl b/fnl/plugins/mini.fnl new file mode 100644 index 0000000..0fd7d40 --- /dev/null +++ b/fnl/plugins/mini.fnl @@ -0,0 +1,14 @@ +(local cursorword (require :mini.cursorword)) +(cursorword.setup) + +(local trailspace (require :mini.trailspace)) +(trailspace.setup) + +(local pairs (require :mini.pairs)) +(pairs.setup) + +(local clue (require :mini.clue)) +(clue.setup) + +(local surround (require :mini.surround)) +(surround.setup) diff --git a/fnl/plugins/oil.fnl b/fnl/plugins/oil.fnl new file mode 100644 index 0000000..e96ab3c --- /dev/null +++ b/fnl/plugins/oil.fnl @@ -0,0 +1,2 @@ +(local oil (require :oil)) +(oil.setup) diff --git a/fnl/plugins/telescope.fnl b/fnl/plugins/telescope.fnl new file mode 100644 index 0000000..54dfd22 --- /dev/null +++ b/fnl/plugins/telescope.fnl @@ -0,0 +1,2 @@ +(local telescope (require :telescope)) +(telescope.setup) diff --git a/fnl/plugins/treesitter.fnl b/fnl/plugins/treesitter.fnl new file mode 100755 index 0000000..01be86d --- /dev/null +++ b/fnl/plugins/treesitter.fnl @@ -0,0 +1,28 @@ +(local configs (require :nvim-treesitter.configs)) +(local parsers (require :nvim-treesitter.parsers)) + +(configs.setup { + :ensure_installed [ + :c + :lua + :vim + :vimdoc + :query + :haskell + :go + :bash + :python + :fennel + :hyprlang + ] + + :sync_install false + :auto_install true + + :highlight { + :enable true + } +}) + +(vim.filetype.add { + :pattern { :.*/hypr/.*%.conf :hyprlang }}) diff --git a/fnl/plugins/wilder.fnl b/fnl/plugins/wilder.fnl new file mode 100755 index 0000000..875d11b --- /dev/null +++ b/fnl/plugins/wilder.fnl @@ -0,0 +1,24 @@ +(local wilder (require :wilder)) + +(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.popupmenu_renderer { + :highlighter wilder.basic_highlighter + :left [ "" wilder.popupmenu_devicons ] + :right [ "" wilder.popupmenu_scrollbar ] + }) +})) + +(wilder.set_option :renderer + (wilder.popupmenu_renderer + { :max_height :20% + :min_width :100% })) diff --git a/init.fnl b/init.fnl new file mode 100644 index 0000000..2925c4c --- /dev/null +++ b/init.fnl @@ -0,0 +1,59 @@ +; ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗ +; ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝ +; ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝ +; ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝ +; ██║ ██║ ██║██║██╔╝ ██╗ ██║ +; ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═ + +; Listen up, you motherfuckers, +; Those Ivy League dopes, they wanna +; mock us. Tell 'em all this is war. +; And not fighting a war is for suckers. + +(import-macros {: g! : set!} :hibiscus.vim) + +; When using neovide, use these settings +(when vim.g.neovide (do + (set! guifont "FiraCode Nerd Font:h14") + (g! neovide_scale_factor 1.0) + (g! neovide_refresh_rate 120) + (g! neovide_refresh_rate_idle 5) + (g! neovide_cursor_antialiasing true) + (g! neovide_cursor_animate_in_insert_mode true) + (g! neovide_cursor_vfx_mode "ripple"))) + +; Skip loading of following neovim builtins +(local default_plugins { + :2html_plugin + :getscript + :getscriptPlugin + :gzip + :logipat + :netrw + :netrwPlugin + :netrwSettings + :netrwFileHandlers + :matchit + :tar + :tarPlugin + :rrhelper + :spellfile_plugin + :vimball + :vimballPlugin + :zip + :zipPlugin + :tutor + :rplugin + :syntax + :synmenu + :optwin + :compiler + :bugreport + :ftplugin }) + +(each [id plug (ipairs default_plugins)] + (g! (.. :loaded plug) 1)) + + +(require :plugins) +(require :options) diff --git a/init.lua b/init.lua index c3eb692..178ca06 100755 --- a/init.lua +++ b/init.lua @@ -1,37 +1,35 @@ --- _.gd8888888bp._ --- ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗ .g88888888888888888p. --- ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝ .d8888P"" ""Y8888b. --- ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝ "Y8P" "Y8P' --- ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝ `. ,' --- ██║ ██║ ██║██║██╔╝ ██╗ ██║ \ .-. / --- ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ \ (___) / --- .------------------._______________________:__________j --- / | | |`-.,_ --- \###################|######################|###########|,-'` --- `------------------' : ___ l --- / ( ) \ --- / `-' \ --- ,' `. --- Listen up, you motherfuckers, .d8b. .d8b. --- Those Ivy League dopes, they wanna "Y8888p.. ,.d8888P" --- mock us. Tell 'em all this is war. "Y88888888888888888P" --- And not fighting a war is for suckers. ""YY8888888PP"" +-- needed to fix deprecation warning +vim.tbl_islist = vim.islist +-- bootstrap tangerine and hibiscus in order to have fennel support +local function bootstrap(url, ref) + local name = url:gsub(".*/", "") + local path --- Setup Lazy.nvim and plugins -require("plugins") + path = vim.fn.stdpath("data") .. "/lazy/" .. name + vim.opt.rtp:prepend(path) --- Setup standard neovim options -require("options") + if vim.fn.isdirectory(path) == 0 then + print(name .. ": installing in data dir...") + vim.fn.system {"git", "clone", url, path} + if ref then + vim.fn.system {"git", "-C", path, "checkout", ref} + end -if vim.g.neovide then - vim.o.guifont = "FiraCode Nerd Font:h14" - vim.g.neovide_scale_factor = 1.0 - vim.g.neovide_refresh_rate = 120 - vim.g.neovide_refresh_rate_idle = 5 - vim.g.neovide_cursor_antialiasing = true - vim.g.neovide_cursor_animate_in_insert_mode = true - vim.g.neovide_cursor_vfx_mode = "ripple" + vim.cmd "redraw" + print(name .. ": finished installing") + end end + +bootstrap("https://github.com/udayvir-singh/tangerine.nvim") +bootstrap("https://github.com/udayvir-singh/hibiscus.nvim") + + +require "tangerine".setup { + compiler = { + verbose = false, + hooks = { "onsave", "oninit" } + } +} diff --git a/lua/options/colors.lua b/lua_bak/options/colors.lua similarity index 100% rename from lua/options/colors.lua rename to lua_bak/options/colors.lua diff --git a/lua/options/harpoon.lua b/lua_bak/options/harpoon.lua similarity index 100% rename from lua/options/harpoon.lua rename to lua_bak/options/harpoon.lua diff --git a/lua/options/init.lua b/lua_bak/options/init.lua similarity index 100% rename from lua/options/init.lua rename to lua_bak/options/init.lua diff --git a/lua/options/keybind.lua b/lua_bak/options/keybind.lua similarity index 100% rename from lua/options/keybind.lua rename to lua_bak/options/keybind.lua diff --git a/lua/options/opts.lua b/lua_bak/options/opts.lua similarity index 100% rename from lua/options/opts.lua rename to lua_bak/options/opts.lua diff --git a/lua/plugins/devicons.lua b/lua_bak/plugins/devicons.lua similarity index 100% rename from lua/plugins/devicons.lua rename to lua_bak/plugins/devicons.lua diff --git a/lua/plugins/gitsigns.lua b/lua_bak/plugins/gitsigns.lua similarity index 100% rename from lua/plugins/gitsigns.lua rename to lua_bak/plugins/gitsigns.lua diff --git a/lua/plugins/harpoon.lua b/lua_bak/plugins/harpoon.lua similarity index 100% rename from lua/plugins/harpoon.lua rename to lua_bak/plugins/harpoon.lua diff --git a/lua/plugins/hlblocks.lua b/lua_bak/plugins/hlblocks.lua similarity index 100% rename from lua/plugins/hlblocks.lua rename to lua_bak/plugins/hlblocks.lua diff --git a/lua/plugins/init.lua b/lua_bak/plugins/init.lua similarity index 100% rename from lua/plugins/init.lua rename to lua_bak/plugins/init.lua diff --git a/lua_bak/plugins/lazy.lua b/lua_bak/plugins/lazy.lua new file mode 100755 index 0000000..a213ec5 --- /dev/null +++ b/lua_bak/plugins/lazy.lua @@ -0,0 +1,115 @@ +local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' + +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release + lazypath, + }) +end + +vim.opt.rtp:prepend(lazypath) + +require('lazy').setup({ + + 'EdenEast/nightfox.nvim', + 'luckasRanarison/tree-sitter-hypr', + + 'lambdalisue/nerdfont.vim', + 'gelguy/wilder.nvim', + + 'bkad/camelcasemotion', + 'lewis6991/gitsigns.nvim', + + { + 'nvim-telescope/telescope.nvim', + tag = '0.1.8', + dependencies = { + 'nvim-lua/plenary.nvim' + } + }, + + { + 'stevearc/oil.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons' + }, + }, + + { + 'kylechui/nvim-surround', + version = '*', -- Use for stability; omit to use `main` branch for the latest features + config = function() + require('nvim-surround').setup() + end + }, + + { + 'OXY2DEV/markview.nvim', + config = function() + require('markview').setup() + end, + dependencies = { + -- You may not need this if you don't lazy load + -- Or if the parsers are in your $RUNTIMEPATH + "nvim-treesitter/nvim-treesitter", + + "nvim-tree/nvim-web-devicons" + }, + }, + + { + 'shellRaining/hlchunk.nvim', + event = { + 'UIEnter' + }, + }, + + { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { + 'nvim-lua/plenary.nvim' + } + }, + + { + 'nvim-lualine/lualine.nvim', + dependencies = + { + 'nvim-tree/nvim-web-devicons', + opt = true + } + }, + + { + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate' + }, + + { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v3.x', + dependencies = { + -- LSP Support + 'neovim/nvim-lspconfig', + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + + -- Autocompletion + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-nvim-lsp', + 'L3MON4D3/LuaSnip', + } + }, + + { + 'echasnovski/mini.nvim', + version = false + }, +}) + +vim.opt.laststatus=2 diff --git a/lua/plugins/lsp-zero.lua b/lua_bak/plugins/lsp-zero.lua similarity index 100% rename from lua/plugins/lsp-zero.lua rename to lua_bak/plugins/lsp-zero.lua diff --git a/lua/plugins/lualine.lua b/lua_bak/plugins/lualine.lua similarity index 100% rename from lua/plugins/lualine.lua rename to lua_bak/plugins/lualine.lua diff --git a/lua/plugins/mini.lua b/lua_bak/plugins/mini.lua similarity index 100% rename from lua/plugins/mini.lua rename to lua_bak/plugins/mini.lua diff --git a/lua/plugins/oil.lua b/lua_bak/plugins/oil.lua similarity index 100% rename from lua/plugins/oil.lua rename to lua_bak/plugins/oil.lua diff --git a/lua/plugins/telescope.lua b/lua_bak/plugins/telescope.lua similarity index 100% rename from lua/plugins/telescope.lua rename to lua_bak/plugins/telescope.lua diff --git a/lua/plugins/treesitter.lua b/lua_bak/plugins/treesitter.lua similarity index 100% rename from lua/plugins/treesitter.lua rename to lua_bak/plugins/treesitter.lua diff --git a/lua/plugins/wilder.lua b/lua_bak/plugins/wilder.lua similarity index 100% rename from lua/plugins/wilder.lua rename to lua_bak/plugins/wilder.lua