diff --git a/config/eww/eww.scss b/config/eww/eww.scss new file mode 100644 index 0000000..637f00a --- /dev/null +++ b/config/eww/eww.scss @@ -0,0 +1,21 @@ +* { + all:unset; + font-family: "IosevkaTermSlab Nerd Font", "monospace"; + font-size: 15px; + font-weight: bold; +} + +.bar { + background-color: black; + color: #fafafa; +} + +.single-tag { + font-family: "Noto Sans CJK JP Black", "Iwata SeichouG W05 B", "monospace"; + background-color: #431407; + color: #fed7aa; + padding-left: 4px; + padding-right: 4px; + border-radius: 2px; +} + diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck new file mode 100644 index 0000000..b1d7064 --- /dev/null +++ b/config/eww/eww.yuck @@ -0,0 +1,55 @@ +(defwindow bar + :monitor 0 + :exclusive true + :class "bar" + :windowtype "dock" + :geometry (geometry :x "0%" + :y "0%" + :width "100%" + :height "20px" + :anchor "top center") + (bar)) + +; +; variables +; + +(defvar tags "[1,2,3,4,5]") +(defvar tagSymbols `["一","二","三","四","五"]`) + + +(defwidget bar [] + (centerbox + :orientation "h" + (left) + "This is *the* bar" + ":D")) + +; +; +; LEFT +; +; +(defwidget left [] + (box + :class "left-side" + :orientation "h" + :space-evenly false + :halign "start" + :spacing 3 + (tags))) + +; +; Widget that just prints all tags :D +; +(defwidget tags [] + (box + :spacing 4 + (for idx in tags + (tag :id idx + :symbol `${tagSymbols[idx - 1]}`)))) + +(defwidget tag [id symbol] + (box :class "single-tag" + {symbol})) + diff --git a/config/fish/config.fish b/config/fish/config.fish index 3cfd065..8eba419 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -36,8 +36,10 @@ set fish_cursor_visual block fish_add_path ~/.local/share/nvm/v22.13.0/bin/ # common alias -alias l="eza -l" -alias ll="eza -la" +alias l='eza --long --header --icons --group-directories-first' +alias ll='eza --all --long --header --icons --group-directories-first' +alias lt='eza --ignore-glob="node_modules" --tree --level=2 --header --icons --group-directories-first' +alias ltt='eza --ignore-glob="node_modules" --tree --header --icons --group-directories-first' # pnpm set -gx PNPM_HOME "/home/fernando/.local/share/pnpm" diff --git a/config/nvim/fnl/autocolors.fnl b/config/nvim/fnl/autocolors.fnl new file mode 100644 index 0000000..02375f9 --- /dev/null +++ b/config/nvim/fnl/autocolors.fnl @@ -0,0 +1,18 @@ +; +; This file is to be called AFTER the color plugins have been loaded +; +(fn set-theme-for-directory [] + (let [cwd (vim.fn.getcwd) + directory-themes {:acide/trazo-backend :github_light + :acide/trazo-frontend :onelight + :csharp :caret + :zig :ayu-dark}] + (var theme "randomhue") + (each [dir dir-theme (pairs directory-themes)] + (when (string.find cwd dir 1 true) (set theme dir-theme) (lua :break))) + (vim.cmd (.. "colorscheme " theme)))) + +(vim.api.nvim_create_autocmd [:DirChanged] + {:callback (fn [] (set-theme-for-directory))}) + +(set-theme-for-directory) diff --git a/config/nvim/fnl/config.fnl b/config/nvim/fnl/config.fnl index 832838f..09e41ef 100644 --- a/config/nvim/fnl/config.fnl +++ b/config/nvim/fnl/config.fnl @@ -1,8 +1,80 @@ +; My Neovim config, based on kickstart.nvim +; and rewritten in Fennel, because why not? + (set vim.g.mapleader " ") (set vim.g.maplocalleader " ") (set vim.g.have_nerd_font true) (set vim.opt.number true) (set vim.opt.relativenumber true) +(set vim.opt.mouse "a") +(set vim.opt.showmode false) +(vim.schedule (fn [] (set vim.opt.clipboard "unnamedplus"))) +(set vim.opt.breakindent true) +(set vim.opt.undofile true) +(set vim.opt.ignorecase true) +(set vim.opt.smartcase true) +(set vim.opt.signcolumn "yes") +(set vim.opt.updatetime 250) +(set vim.opt.timeoutlen 300) +(set vim.opt.splitright true) +(set vim.opt.splitbelow true) +(set vim.opt.list true) +(set vim.opt.listchars + {"tab" "» " "trail" "·" "nbsp" "␣"}) +(set vim.opt.inccommand "split") +(set vim.opt.cursorline true) +; Minimal number of screen lines to keep above/below +(set vim.opt.scrolloff 4) -(print "I have been setup :D") +; +; Setup carry over +; +; Keymaps for buffer switching +(vim.keymap.set :n :h "(cokeline-focus-prev)" + {:desc "Previous buffer"}) +(vim.keymap.set :n :l "(cokeline-focus-next)" + {:desc "Next buffer"}) +(vim.keymap.set :n :a ":e #" {:desc "[A]lternate buffer"}) +(vim.keymap.set :n :bd ":bd" {:desc "[B]uffer [D]elete"}) + +; cokeline +(for [i 1 9] + (vim.keymap.set :n (: "%s" :format i) + (: "(cokeline-focus-%s)" :format i) + {:desc (: "Switch to tab %s" :format i) :silent true})) + +(vim.keymap.set :n :H "(cokeline-switch-prev)" + {:desc "Previous buffer swap"}) +(vim.keymap.set :n :L "(cokeline-switch-next)" + {:desc "Next buffer swap"}) + +; neotree +(vim.keymap.set :n :tn ":Neotree focus toggle" + {:desc "[T]oggle [N]eotree"}) +(vim.keymap.set :n :tr ":Neotree reveal" + {:desc "[T]oggle Neotree [R]eveal"}) +(vim.keymap.set :n :tg ":Telescope git_status" + {:desc "[T]elescope [G]it status"}) +(vim.keymap.set :n : :nohlsearch) +(vim.keymap.set :n :q vim.diagnostic.setloclist + {:desc "Open diagnostic [Q]uickfix list"}) + +; Moving +(vim.keymap.set :n : : {:desc "Move focus to the left window"}) +(vim.keymap.set :n : : {:desc "Move focus to the right window"}) +(vim.keymap.set :n : : {:desc "Move focus to the lower window"}) +(vim.keymap.set :n : : {:desc "Move focus to the upper window"}) + +; Fold +(vim.keymap.set :n :z$ "$zf%" {:desc "Fold EOL & %"}) + +; Highlight when yanking (copying) text +(vim.api.nvim_create_autocmd :TextYankPost + {:callback (fn [] (vim.highlight.on_yank)) + :desc "Highlight when yanking (copying) text" + :group (vim.api.nvim_create_augroup :kickstart-highlight-yank + {:clear true})}) + + +(print "I have been setup with Fennel :D") diff --git a/config/nvim/fnl/plugins/barbecue.fnl b/config/nvim/fnl/plugins/barbecue.fnl new file mode 100644 index 0000000..e13cc45 --- /dev/null +++ b/config/nvim/fnl/plugins/barbecue.fnl @@ -0,0 +1,8 @@ +(local barbecue {1 :utilyre/barbecue.nvim + :dependencies [:SmiteshP/nvim-navic + :nvim-tree/nvim-web-devicons] + :name :barbecue + :opts {} + :version "*"}) + +[barbecue] diff --git a/config/nvim/fnl/plugins/cokeline.fnl b/config/nvim/fnl/plugins/cokeline.fnl new file mode 100644 index 0000000..af316a0 --- /dev/null +++ b/config/nvim/fnl/plugins/cokeline.fnl @@ -0,0 +1,66 @@ +(local cokeline {1 :willothy/nvim-cokeline + :config (fn [] + (local get-hex + (. (require :cokeline.hlgroups) :get_hl_attr)) + (local hlgroups (require :cokeline.hlgroups)) + (local yellow vim.g.terminal_color_3) + ((. (require :cokeline) :setup) {:components [{:text (fn [buffer] + (.. " " + buffer.index))} + {:fg (fn [buffer] + buffer.devicon.color) + :text (fn [buffer] + (.. " " + buffer.devicon.icon))} + {:fg (fn [] + (hlgroups.get_hl_attr :Comment + :fg)) + :italic true + :text (fn [buffer] + buffer.unique_prefix)} + {:text (fn [buffer] + buffer.filename) + :underline (fn [buffer] + (when (and buffer.is_hovered + (not buffer.is_focused)) + true))} + {:text " "} + {:on_click (fn [_ + _ + _ + _ + buffer] + (buffer:delete)) + :text (fn [buffer] + (when buffer.is_modified + (lua "return \"\"")) + (when buffer.is_hovered + (lua "return \"󰅙\"")) + "󰅖")} + {:text " "}] + :default_hl {:bg (fn [buffer] + (or (and buffer.is_focused + (get-hex :Normal + :fg)) + (get-hex :ColorColumn + :bg))) + :fg (fn [buffer] + (or (and buffer.is_focused + (get-hex :ColorColumn + :bg)) + (get-hex :Normal + :fg)))} + :sidebar {:components [{:bg (fn [] + (get-hex :NvimTreeNormal + :bg)) + :bold true + :fg yellow + :text (fn [buf] + buf.filetype)}] + :filetype [:NvimTree + :neo-tree]}})) + :dependencies [:nvim-lua/plenary.nvim + :nvim-tree/nvim-web-devicons + :stevearc/resession.nvim]}) + +[cokeline] diff --git a/config/nvim/fnl/plugins/colors.fnl b/config/nvim/fnl/plugins/colors.fnl new file mode 100644 index 0000000..ac46f0f --- /dev/null +++ b/config/nvim/fnl/plugins/colors.fnl @@ -0,0 +1,13 @@ +[ + "Mofiqul/dracula.nvim" + "olimorris/onedarkpro.nvim" + "projekt0n/github-nvim-theme" + "folke/tokyonight.nvim" + "arzg/vim-colors-xcode" + "rose-pine/neovim" + "Mofiqul/vscode.nvim" + "scottmckendry/cyberdream.nvim" + "Shatur/neovim-ayu" + "projekt0n/caret.nvim" + ] + diff --git a/config/nvim/fnl/plugins/editor.fnl b/config/nvim/fnl/plugins/editor.fnl new file mode 100644 index 0000000..89dcce7 --- /dev/null +++ b/config/nvim/fnl/plugins/editor.fnl @@ -0,0 +1,114 @@ +(local blankline + {1 :lukas-reineke/indent-blankline.nvim + :main :ibl + :opts {:indent {:char "▏"} + :scope {:show_end false :show_start false}}}) + +(local emmet + {1 :olrtg/nvim-emmet + :config (fn [] + (vim.keymap.set [:n :v] :xe + (. (require :nvim-emmet) + :wrap_with_abbreviation)))}) + +(local autoformat {1 :stevearc/conform.nvim + :cmd [:ConformInfo] + :event [:BufWritePre] + :keys [{1 :f + 2 (fn [] + ((. (require :conform) :format) {:async true + :lsp_format :fallback})) + :desc "[F]ormat buffer" + :mode ""}] + :opts {:format_on_save (fn [bufnr] + (local disable-filetypes + {:c true :cpp true}) + (var lsp-format-opt nil) + (if (. disable-filetypes + (. vim.bo bufnr :filetype)) + (set lsp-format-opt :never) + (set lsp-format-opt :fallback)) + {:lsp_format lsp-format-opt + :timeout_ms 500}) + :formatters_by_ft {:lua [:stylua]} + :notify_on_error false}}) + +(local autocomplete {1 :hrsh7th/nvim-cmp + :config (fn [] + (local cmp (require :cmp)) + (local luasnip (require :luasnip)) + (luasnip.config.setup {}) + (cmp.setup {:completion {:completeopt "menu,menuone,noinsert"} + :mapping (cmp.mapping.preset.insert {: (cmp.mapping.complete {}) + : (cmp.mapping.scroll_docs (- 4)) + : (cmp.mapping.scroll_docs 4) + : (cmp.mapping (fn [] + (when (luasnip.locally_jumpable (- 1)) + (luasnip.jump (- 1)))) + [:i + :s]) + : (cmp.mapping (fn [] + (when (luasnip.expand_or_locally_jumpable) + (luasnip.expand_or_jump))) + [:i + :s]) + : (cmp.mapping.select_next_item) + : (cmp.mapping.select_prev_item) + : (cmp.mapping.confirm {:select true})}) + :snippet {:expand (fn [args] + (luasnip.lsp_expand args.body))} + :sources [{:group_index 0 + :name :lazydev} + {:name :nvim_lsp} + {:name :luasnip} + {:name :path}]})) + :dependencies [{1 :L3MON4D3/LuaSnip + :build ((fn [] + (when (or (= (vim.fn.has :win32) + 1) + (= (vim.fn.executable :make) + 0)) + (lua "return ")) + "make install_jsregexp")) + :dependencies {}} + :saadparwaiz1/cmp_luasnip + :hrsh7th/cmp-nvim-lsp + :hrsh7th/cmp-path] + :event :InsertEnter}) + +(local comments {1 :folke/todo-comments.nvim + :dependencies [:nvim-lua/plenary.nvim] + :event :VimEnter + :opts {:signs false}}) + +(local mini {1 :echasnovski/mini.nvim + :config (fn [] + ((. (require :mini.ai) :setup) {:n_lines 500}) + ((. (require :mini.surround) :setup)) + (local statusline (require :mini.statusline)) + (statusline.setup {:use_icons vim.g.have_nerd_font}) + + (fn statusline.section_location [] + "%2l:%-2v"))}) + +(local autopairs {1 :windwp/nvim-autopairs + :config (fn [] + ((. (require :nvim-autopairs) :setup) {}) + (local cmp-autopairs + (require :nvim-autopairs.completion.cmp)) + (local cmp (require :cmp)) + (cmp.event:on :confirm_done + (cmp-autopairs.on_confirm_done))) + :dependencies [:hrsh7th/nvim-cmp] + :event :InsertEnter}) + +[ + blankline + emmet + autoformat + autocomplete + comments + mini + "tpope/vim-sleuth" ; Detect tabstop and shiftwidth automatically + autopairs + ] diff --git a/config/nvim/fnl/plugins/git.fnl b/config/nvim/fnl/plugins/git.fnl new file mode 100644 index 0000000..d6b0a30 --- /dev/null +++ b/config/nvim/fnl/plugins/git.fnl @@ -0,0 +1,103 @@ +(local git + {1 :lewis6991/gitsigns.nvim + :config (fn [] + ((. (require :gitsigns) :setup) {:on_attach (fn [bufnr] + (local gitsigns + (require :gitsigns)) + + (fn map [mode + l + r + opts] + (set-forcibly! opts + (or opts + {})) + (set opts.buffer + bufnr) + (vim.keymap.set mode + l + r + opts)) + + (map :n "]c" + (fn [] + (if vim.wo.diff + (vim.cmd.normal {1 "]c" + :bang true}) + (gitsigns.nav_hunk :next))) + {:desc "Next Git hunk"}) + (map :n "[c" + (fn [] + (if vim.wo.diff + (vim.cmd.normal {1 "[c" + :bang true}) + (gitsigns.nav_hunk :prev))) + {:desc "Previous Git hunk"}) + (map :n + :gs + gitsigns.stage_hunk + {:desc "[s]tage hunk"}) + (map :n + :gr + gitsigns.reset_hunk + {:desc "[r]eset hunk"}) + (map :v + :gs + (fn [] + (gitsigns.stage_hunk [(vim.fn.line ".") + (vim.fn.line :v)])) + {:desc "[S]tage hunk"}) + (map :v + :gr + (fn [] + (gitsigns.reset_hunk [(vim.fn.line ".") + (vim.fn.line :v)])) + {:desc "[R]eset hunk"}) + (map :n + :gS + gitsigns.stage_buffer + {:desc "[S]tage buffer"}) + (map :n + :gu + gitsigns.undo_stage_hunk + {:desc "[u]ndo stage hunk"}) + (map :n + :gR + gitsigns.reset_buffer + {:desc "[R]eset buffer"}) + (map :n + :gp + gitsigns.preview_hunk + {:desc "[p]review hunk"}) + (map :n + :gb + (fn [] + (gitsigns.blame_line {:full true})) + {:desc "[b]lame line"}) + (map :n + :tb + gitsigns.toggle_current_line_blame + {:desc "Toggle current line [b]lame"}) + (map :n + :gd + gitsigns.diffthis + {:desc "[d]iff this file"}) + (map :n + :gD + (fn [] + (gitsigns.diffthis "~")) + {:desc "[D]iff this ~"}) + (map :n + :td + gitsigns.toggle_deleted + {:desc "Toggle [d]eleted"}) + (map [:o :x] + :ih + ":Gitsigns select_hunk")) + :signs {:add {:text "+"} + :change {:text "~"} + :changedelete {:text "~"} + :delete {:text "_"} + :topdelete {:text "‾"}}}))}) + +[git] diff --git a/config/nvim/fnl/plugins/init.fnl b/config/nvim/fnl/plugins/init.fnl deleted file mode 100644 index 70e822c..0000000 --- a/config/nvim/fnl/plugins/init.fnl +++ /dev/null @@ -1,3 +0,0 @@ -(print ":D (happy) (fennel lazy module)") - -[] diff --git a/config/nvim/fnl/plugins/lsp.fnl b/config/nvim/fnl/plugins/lsp.fnl new file mode 100644 index 0000000..66cea74 --- /dev/null +++ b/config/nvim/fnl/plugins/lsp.fnl @@ -0,0 +1,159 @@ +(fn disable-formatting [client] + (set client.server_capabilities.documentFormattingProvider false) + (set client.server_capabilities.documentRangeFormattingProvider false)) + + +(local lazydev + {1 :folke/lazydev.nvim + :ft :lua + :opts {:library [{:path :luvit-meta/library :words ["vim%.uv"]}]}}) + +(local luvit-meta {1 "Bilal2453/luvit-meta" + :lazy true}) + +(local lspconfig {1 :neovim/nvim-lspconfig + :config (fn [] + ((. (require :lspconfig) :gleam :setup) {}) + ((. (require :lspconfig) :ts_ls :setup) {:on_attach (fn [client + bufnr] + (disable-formatting client))}) + ((. (require :lspconfig) :eslint :setup) {:on_attach (fn [client + bufnr] + (vim.api.nvim_create_autocmd :BufWritePre + {:buffer bufnr + :command :EslintFixAll}))}) + (vim.api.nvim_create_autocmd :LspAttach + {:callback (fn [event] + (fn map [keys + func + desc + mode] + (set-forcibly! mode + (or mode + :n)) + (vim.keymap.set mode + keys + func + {:buffer event.buf + :desc (.. "LSP: " + desc)})) + + (map :gd + (. (require :telescope.builtin) + :lsp_definitions) + "[G]oto [D]efinition") + (map :gr + (. (require :telescope.builtin) + :lsp_references) + "[G]oto [R]eferences") + (map :gI + (. (require :telescope.builtin) + :lsp_implementations) + "[G]oto [I]mplementation") + (map :D + (. (require :telescope.builtin) + :lsp_type_definitions) + "Type [D]efinition") + (map :ds + (. (require :telescope.builtin) + :lsp_document_symbols) + "[D]ocument [S]ymbols") + (map :ws + (. (require :telescope.builtin) + :lsp_dynamic_workspace_symbols) + "[W]orkspace [S]ymbols") + (map :rn + vim.lsp.buf.rename + "[R]e[n]ame") + (map :ca + vim.lsp.buf.code_action + "[C]ode [A]ction" + [:n + :x]) + (map :gD + vim.lsp.buf.declaration + "[G]oto [D]eclaration") + (local client + (vim.lsp.get_client_by_id event.data.client_id)) + (when (and client + (client.supports_method vim.lsp.protocol.Methods.textDocument_documentHighlight)) + (local highlight-augroup + (vim.api.nvim_create_augroup :kickstart-lsp-highlight + {:clear false})) + (vim.api.nvim_create_autocmd [:CursorHold + :CursorHoldI] + {:buffer event.buf + :callback vim.lsp.buf.document_highlight + :group highlight-augroup}) + (vim.api.nvim_create_autocmd [:CursorMoved + :CursorMovedI] + {:buffer event.buf + :callback vim.lsp.buf.clear_references + :group highlight-augroup}) + (vim.api.nvim_create_autocmd :LspDetach + {:callback (fn [event2] + (vim.lsp.buf.clear_references) + (vim.api.nvim_clear_autocmds {:buffer event2.buf + :group :kickstart-lsp-highlight})) + :group (vim.api.nvim_create_augroup :kickstart-lsp-detach + {:clear true})})) + (when (and client + (client.supports_method vim.lsp.protocol.Methods.textDocument_inlayHint)) + (map :th + (fn [] + (vim.lsp.inlay_hint.enable (not (vim.lsp.inlay_hint.is_enabled {:bufnr event.buf})))) + "[T]oggle Inlay [H]ints")) + (local opts + {:buffer event.buf}) + (vim.keymap.set :n + :gh + (fn [] + (vim.diagnostic.open_float)) + {:buffer event.buf + :desc "[h] Open floating diagnostic"})) + :group (vim.api.nvim_create_augroup :kickstart-lsp-attach + {:clear true})}) + (var capabilities + (vim.lsp.protocol.make_client_capabilities)) + (set capabilities + (vim.tbl_deep_extend :force capabilities + ((. (require :cmp_nvim_lsp) + :default_capabilities)))) + (local servers + {:astro {} + :clojure_lsp {} + :gopls {} + :lua_ls {:settings {:Lua {:completion {:callSnippet :Replace}}}} + :tailwindcss {} + :ts_ls {} + :zls {}}) + ((. (require :mason) :setup)) + (local ensure-installed + (vim.tbl_keys (or servers {}))) + (vim.list_extend ensure-installed [:stylua]) + ((. (require :mason-tool-installer) :setup) {:ensure_installed ensure-installed}) + ((. (require :mason-lspconfig) :setup) {:handlers [(fn [server-name] + (local server + (or (. servers + server-name) + {})) + (set server.capabilities + (vim.tbl_deep_extend :force + {} + capabilities + (or server.capabilities + {}))) + ((. (require :lspconfig) + server-name + :setup) server))]})) + :dependencies [{1 :williamboman/mason.nvim :config true} + :williamboman/mason-lspconfig.nvim + :WhoIsSethDaniel/mason-tool-installer.nvim + {1 :j-hui/fidget.nvim :opts {}} + :hrsh7th/cmp-nvim-lsp]}) + +[ + lazydev + luvit-meta + lspconfig + ] diff --git a/config/nvim/fnl/plugins/lualine.fnl b/config/nvim/fnl/plugins/lualine.fnl new file mode 100644 index 0000000..f76fe4f --- /dev/null +++ b/config/nvim/fnl/plugins/lualine.fnl @@ -0,0 +1,103 @@ +(local lualine {1 :nvim-lualine/lualine.nvim + :config (fn [] + (local lualine (require :lualine)) + (local colors + {:bg "#202328" + :blue "#51afef" + :cyan "#008080" + :darkblue "#081633" + :fg "#bbc2cf" + :green "#98be65" + :magenta "#c678dd" + :orange "#FF8800" + :red "#ec5f67" + :violet "#a9a1e1" + :yellow "#ECBE7B"}) + (local conditions + {:buffer_not_empty (fn [] + (not= (vim.fn.empty (vim.fn.expand "%:t")) + 1)) + :check_git_workspace (fn [] + (local filepath + (vim.fn.expand "%:p:h")) + (local gitdir + (vim.fn.finddir :.git + (.. filepath + ";"))) + (and (and gitdir + (> (length gitdir) + 0)) + (< (length gitdir) + (length filepath)))) + :hide_in_width (fn [] + (> (vim.fn.winwidth 0) 80))}) + (local config + {:inactive_sections {:lualine_a {} + :lualine_b {} + :lualine_c {} + :lualine_x {} + :lualine_y {} + :lualine_z {}} + :options {:component_separators "" + :section_separators "" + :theme :auto} + :sections {:lualine_a [{1 :mode + :color {:gui :bold} + :fmt (fn [name ctx] + (local first-letter + (string.sub name + 1 + 1)) + (local rest + (string.sub name + 2)) + (local str-lower + (string.lower rest)) + (.. first-letter + str-lower))}] + :lualine_b {} + :lualine_c {} + :lualine_x {} + :lualine_y {} + :lualine_z {}}}) + + (fn ins-left [component] + (table.insert config.sections.lualine_c component)) + + (fn ins-right [component] + (table.insert config.sections.lualine_x component)) + + (ins-left [:location]) + (ins-left {1 :diagnostics + :diagnostics_color {:error {:fg colors.red} + :info {:fg colors.cyan} + :warn {:fg colors.yellow}} + :sources [:nvim_diagnostic] + :symbols {:error " " + :info " " + :warn " "}}) + (ins-left [(fn [] "%=")]) + (ins-right [:filetype]) + (ins-right {1 "o:encoding" + :color {:fg colors.green :gui :bold} + :cond conditions.hide_in_width + :fmt string.upper}) + (ins-right {1 :fileformat + :color {:fg colors.green :gui :bold} + :fmt string.upper + :icons_enabled false}) + (ins-right {1 :branch + :color {:fg colors.violet :gui :bold} + :icon ""}) + (ins-right {1 :diff + :cond conditions.hide_in_width + :diff_color {:added {:fg colors.green} + :modified {:fg colors.orange} + :removed {:fg colors.red}} + :symbols {:added " " + :modified "󰝤 " + :removed " "}}) + (lualine.setup config)) + :dependencies [:nvim-tree/nvim-web-devicons]}) + +[lualine] diff --git a/config/nvim/fnl/plugins/neotree.fnl b/config/nvim/fnl/plugins/neotree.fnl new file mode 100644 index 0000000..cb82575 --- /dev/null +++ b/config/nvim/fnl/plugins/neotree.fnl @@ -0,0 +1,13 @@ +(local neotree {1 :nvim-neo-tree/neo-tree.nvim + :cmd :Neotree + :dependencies [:nvim-lua/plenary.nvim + :nvim-tree/nvim-web-devicons + :MunifTanjim/nui.nvim] + :keys [{1 "\\" + 2 ":Neotree reveal" + :desc "NeoTree reveal" + :silent true}] + :opts {:filesystem {:window {:mappings {"\\" :close_window}}}} + :version "*"}) + +[neotree] diff --git a/config/nvim/fnl/plugins/telescope.fnl b/config/nvim/fnl/plugins/telescope.fnl new file mode 100644 index 0000000..e9f69ff --- /dev/null +++ b/config/nvim/fnl/plugins/telescope.fnl @@ -0,0 +1,63 @@ +(local telescope {1 :nvim-telescope/telescope.nvim + :branch :0.1.x + :config (fn [] + ((. (require :telescope) :setup) {:defaults {:layout_config {:horizontal {:height 0.95 + :preview_width 0.5 + :width 0.95} + :vertical {:height 0.9 + :preview_height 0.7 + :width 0.7}} + :layout_strategy :vertical} + :extensions {:ui-select [((. (require :telescope.themes) + :get_dropdown))]}}) + (pcall (. (require :telescope) :load_extension) + :fzf) + (pcall (. (require :telescope) :load_extension) + :ui-select) + (local builtin (require :telescope.builtin)) + (vim.keymap.set :n :sh builtin.help_tags + {:desc "[S]earch [H]elp"}) + (vim.keymap.set :n :sk builtin.keymaps + {:desc "[S]earch [K]eymaps"}) + (vim.keymap.set :n :sf builtin.find_files + {:desc "[S]earch [F]iles"}) + (vim.keymap.set :n :ss builtin.builtin + {:desc "[S]earch [S]elect Telescope"}) + (vim.keymap.set :n :sw builtin.grep_string + {:desc "[S]earch current [W]ord"}) + (vim.keymap.set :n :sg builtin.live_grep + {:desc "[S]earch by [G]rep"}) + (vim.keymap.set :n :sd builtin.diagnostics + {:desc "[S]earch [D]iagnostics"}) + (vim.keymap.set :n :s. builtin.oldfiles + {:desc "[S]earch Recent Files (\".\" for repeat)"}) + (vim.keymap.set :n :/ builtin.buffers + {:desc "[/] Find existing buffers"}) + (vim.keymap.set :n :sc + (fn [] + (builtin.colorscheme ((. (require :telescope.themes) + :get_dropdown) {:previewer false + :winblend 20}))) + {:desc "[S]earch [C]olorschemes"}) + (vim.keymap.set :n : + builtin.current_buffer_fuzzy_find + {:desc "[ ] Fuzzily search in current buffer"}) + (vim.keymap.set :n :s/ + (fn [] + (builtin.live_grep {:grep_open_files true + :prompt_title "Live Grep in Open Files"})) + {:desc "[S]earch [/] in Open Files"}) + (vim.keymap.set :n :sn + (fn [] + (builtin.find_files {:cwd (vim.fn.stdpath :config)})) + {:desc "[S]earch [N]eovim files"})) + :dependencies [:nvim-lua/plenary.nvim + {1 :nvim-telescope/telescope-fzf-native.nvim + :build :make + :cond (fn [] (= (vim.fn.executable :make) 1))} + [:nvim-telescope/telescope-ui-select.nvim] + {1 :nvim-tree/nvim-web-devicons + :enabled vim.g.have_nerd_font}] + :event :VimEnter}) + +[telescope] diff --git a/config/nvim/fnl/plugins/treesitter.fnl b/config/nvim/fnl/plugins/treesitter.fnl new file mode 100644 index 0000000..2e3c782 --- /dev/null +++ b/config/nvim/fnl/plugins/treesitter.fnl @@ -0,0 +1,20 @@ +(local neotree {1 :nvim-treesitter/nvim-treesitter + :build ":TSUpdate" + :main :nvim-treesitter.configs + :opts {:auto_install true + :ensure_installed [:bash + :c + :diff + :html + :lua + :luadoc + :markdown + :markdown_inline + :query + :vim + :vimdoc] + :highlight {:additional_vim_regex_highlighting [:ruby] + :enable true} + :indent {:disable [:ruby] :enable true}}}) + +[neotree] diff --git a/config/nvim/fnl/plugins/whichkey.fnl b/config/nvim/fnl/plugins/whichkey.fnl new file mode 100644 index 0000000..c95d583 --- /dev/null +++ b/config/nvim/fnl/plugins/whichkey.fnl @@ -0,0 +1,41 @@ +(local whichkey + {1 :folke/which-key.nvim + :event :VimEnter + :opts {:icons {:keys (or (and vim.g.have_nerd_font {}) + {:BS " " + :C " " + :CR " " + :D " " + :Down " " + :Esc " " + :F1 : + :F10 : + :F11 : + :F12 : + :F2 : + :F3 : + :F4 : + :F5 : + :F6 : + :F7 : + :F8 : + :F9 : + :Left " " + :M " " + :NL " " + :Right " " + :S " " + :ScrollWheelDown " " + :ScrollWheelUp " " + :Space " " + :Tab " " + :Up " "}) + :mappings vim.g.have_nerd_font} + :spec [{1 :c :group "[C]ode" :mode [:n :x]} + {1 :d :group "[D]ocument"} + {1 :r :group "[R]ename"} + {1 :s :group "[S]earch"} + {1 :w :group "[W]orkspace"} + {1 :t :group "[T]oggle"}]}}) + +[whichkey] diff --git a/config/nvim/init.lua b/config/nvim/init.lua index eb14ff7..b662153 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -50,4 +50,5 @@ require("lazy").setup({ }, }) - +-- set color theme depending on the current folder +require("autocolors") diff --git a/config/river/init b/config/river/init index b7f7317..0d41591 100755 --- a/config/river/init +++ b/config/river/init @@ -53,7 +53,7 @@ riverctl map normal Super+Shift Comma send-to-output previous # focused window border riverctl border-width 4 -riverctl border-color-focused 0xc026d3ff +riverctl border-color-focused 0x581C87AA riverctl border-color-unfocused 0xff000000 @@ -195,3 +195,8 @@ rivertile -view-padding 6 -outer-padding 6 & # BAR # waybar & + +# +# wallpaper: TODO +# + diff --git a/deps.txt b/requirements.txt similarity index 79% rename from deps.txt rename to requirements.txt index 297a1d3..844ea6e 100644 --- a/deps.txt +++ b/requirements.txt @@ -9,6 +9,10 @@ docker docker-compose foot ghostty fuzzel river waybar tmux wlr-randr +# notifications +# https://wiki.archlinux.org/title/Desktop_notifications +libnotify mako + brightnessctl # Make sure you're in the video group: # sudo usermod -aG video $USER