Compare commits

...

12 commits
2.0 ... master

21 changed files with 534 additions and 747 deletions

View file

@ -1,10 +1,3 @@
<p align="center">
<img src="pics/trixy.jpg" />
</p>
# Opinionated configuration for NeoVim, aiming to be powerful whilst being minimal. # Opinionated configuration for NeoVim, aiming to be powerful whilst being minimal.
@ -21,7 +14,9 @@
# Installation # Installation
``` ```
$ git clone https://gitlab.com/zeitgeizt/trixy ~/.config/nvim/ # doas pacman -S fennel
$ git clone https://git.bonsai.cool/brk/trixy ~/.config/nvim/
nvim +"Lazy sync" nvim +"Lazy sync"
``` ```
It should pull Lazy.nvim itself, and also all of the plugins. Run :Mason to install your Language Servers of choice. It should pull Lazy.nvim itself, and also all of the plugins. Run :Mason to install your Language Servers of choice.

View file

@ -1 +1,85 @@
(vim.cmd "colorscheme carbonfox") (import-macros {: set! : exec!} :hibiscus.vim)
(local espresso (require :catppuccin))
(local color_overrides
{ :macchiato
{ :rosewater :#F5B8AB
:flamingo :#F29D9D
:pink :#AD6FF7
:mauve :#FF8F40
:red :#E66767
:maroon :#EB788B
:peach :#FAB770
:yellow :#FACA64
:green :#70CF67
:teal :#4CD4BD
:sky :#61BDFF
:sapphire :#4BA8FA
:blue :#00BFFF
:lavender :#00BBCC
:text :#C1C9E6
:subtext1 :#A3AAC2
:subtext0 :#8E94AB
:overlay2 :#7D8296
:overlay1 :#676B80
:overlay0 :#464957
:surface2 :#3A3D4A
:surface1 :#2F313D
:surface0 :#1D1E29
:base :#0b0b0b
:mantle :#11111a
:crust :#191926 } })
(local integrations
{ :cmp true
:gitsigns true
:treesitter true
:telescope
{ :enabled true
:style :nvchad }
:mini
{ :enabled true} })
(espresso.setup
{ :flavour :macchiato
:color_overrides color_overrides
:integrations integrations })
(set! background :dark)
(exec! [colorscheme catppuccin])
(vim.api.nvim_set_hl 0 :Normal {:bg :none})
(vim.api.nvim_set_hl 0 :NormalFloat {:bg :none})
(vim.api.nvim_set_hl 0 :FloatBorder {:bg :none})
(vim.api.nvim_set_hl 0 :Pmenu {:bg :none})
; (local highlight_overrides
; { :all
; (fn [colors]
; :CurSearch { :bg colors.sky }
; :IncSearch { :bg colors.sky }
; :CursorLineNr { :fg colors.blue :style [:bold] }
; :DashboardFooter { :fg colors.overlay0 }
; :TreesitterContextBottom { :style {} }
; :WinSeparator { :fg colors.overlay0 :style [:bold] }
; :Headline { :style [:bold] }
; :Headline1 { :fg colors.blue :style [:bold] }
; :Headline2 { :fg colors.pink :style [:bold] }
; :Headline3 { :fg colors.lavender :style [:bold] }
; :Headline4 { :fg colors.green :style [:bold] }
; :Headline5 { :fg colors.peach :style [:bold] }
; :Headline6 { :fg colors.flamingo :style [:bold] }
; :rainbow1 { :fg colors.blue :style [:bold] }
; :rainbow2 { :fg colors.pink :style [:bold] }
; :rainbow3 { :fg colors.lavender :style [:bold] }
; :rainbow4 { :fg colors.green :style [:bold] }
; :rainbow5 { :fg colors.peach :style [:bold] }
; :rainbow6 { :fg colors.flamingo :style [:bold] }
; "@markup.italic" { :fg colors.blue :style [:italic] }
; "@markup.strong" { :fg colors.blue :style [:bold] } )})

View file

@ -3,16 +3,22 @@
(g! mapleader " ") (g! mapleader " ")
(map! [n :noremap] :<leader>gd "<cmd>lua vim.lsp.buf.hover()<CR>")
(map! [n :noremap] :<C-space> "<cmd>Telescope buffers<CR>") ; trim those bastards
(map! [n :noremap] :<leader>tw "<cmd>lua MiniTrailspace.trim()<CR>") (map! [n :noremap] :<leader>tw "<cmd>lua MiniTrailspace.trim()<CR>")
(map! [n :noremap] :<leader>fo "<cmd>Oil<CR>") ; Telescope mappings
(map! [n :noremap] :<leader>fb "<cmd>Telescope buffers<CR>")
(map! [n :noremap] :<leader>ff "<cmd>Telescope find_files<CR>") (map! [n :noremap] :<leader>ff "<cmd>Telescope find_files<CR>")
(map! [n :noremap] :<leader>fs "<cmd>Telescope current_buffer_fuzzy_find<CR>") (map! [n :noremap] :<leader>fs "<cmd>Telescope current_buffer_fuzzy_find<CR>")
(map! [n :noremap] :<leader>gs "<cmd>Telescope git_status<CR>") (map! [n :noremap] :<leader>gs "<cmd>Telescope git_status<CR>")
(map! [n :noremap] :<leader>gg "<cmd>Telescope live_grep<CR>") (map! [n :noremap] :<leader>fg "<cmd>Telescope live_grep<CR>")
(map! [n :noremap] :<leader>fh "<cmd>Telescope help_tags<CR>")
(map! [n :noremap] :<leader>fk "<cmd>Telescope keymaps<CR>")
(map! [n :noremap] :<leader>tt "<cmd>terminal<CR>")
(map! [t :noremap] :<Esc> "<C-\\><C-n>")
(map! [n :noremap] :<C-Space> "<cmd>bprev<CR>")
; remap keys so that they dont skip camelCase ; remap keys so that they dont skip camelCase
(map! [n :noremap :silent] :w "<Plug>CamelCaseMotion_w") (map! [n :noremap :silent] :w "<Plug>CamelCaseMotion_w")
@ -31,7 +37,7 @@
(map! [n :noremap] :n "nzzzv") (map! [n :noremap] :n "nzzzv")
(map! [n :noremap] :N "Nzzzv") (map! [n :noremap] :N "Nzzzv")
(map! [x :noremap] :p (fn [] [:_dP])) ; interface with system clipboard
(map! [x :noremap] :<leader>p (fn [] [:+dP])) (map! [nvx :noremap :silent] :<leader>y "\"+y")
(map! [n :noremap] :<leader>s ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>") (map! [nvx :noremap :silent] :<leader>Y "\"+yy")
(map! [nv :noremap] :<leader>d (fn [] [:_d])) (map! [nvx :noremap :silent] :<leader>p "\"+p")

View file

@ -1,39 +1,81 @@
(import-macros {: set!} :hibiscus.vim) (import-macros {: set! : g! : exec!} :hibiscus.vim)
(set! number true) ; enable line number (set! number true) ; enable line number
(set! relativenumber true) ; enable relative line number (set! relativenumber true) ; enable relative line number
(set! undofile true) ; persistent undo (set! undofile true) ; persistent undo
(set! backup false) ; disable backup (set! backup false) ; disable backup
(set! autowrite true) ; auto write buffer when it's not focused (set! autowrite true) ; auto write buffer when it's not focused
(set! ignorecase true) ; case insensitive on search.. (set! ignorecase true) ; case insensitive on search..
(set! list true) ; display listchars (set! list true) ; display listchars
(set! smartindent true) ; smarter indentation (set! smartindent false) ; smarter indentation
(set! splitright true) ; split right instead of left (set! splitright true) ; split right instead of left
(set! splitkeep :screen) ; stabilize split (set! splitkeep :screen) ; stabilize split
(set! startofline false) ; don't go to the start of the line when moving to another file (set! startofline false) ; don't go to the start of the line when moving to another file
(set! swapfile false) ; disable swapfile (set! swapfile false) ; disable swapfile
(set! termguicolors true) ; true colours for better experience (set! termguicolors true) ; true colours for better experience
(set! wrap false) ; don't wrap lines (set! wrap false) ; don't wrap lines
(set! backupcopy :yes) ; fix weirdness for stuff that replaces the entire file when hot reloading (set! backupcopy :yes) ; fix weirdness for stuff that replaces the entire file when hot reloading
(set! smarttab false) (set! smarttab false)
(set! tabstop 4) (set! tabstop 4)
(set! softtabstop 4) (set! softtabstop 4)
(set! shiftwidth 4) (set! shiftwidth 4)
(set! expandtab true)
(set! compatible false) ; disable compatibility with old vi (set! compatible false) ; disable compatibility with old vi
(set! showmatch true) ; show matches while searching for text (set! showmatch true) ; show matches while searching for text
(set! hlsearch true) ; highlight text that has been searched (set! hlsearch true) ; highlight text that has been searched
(set! incsearch true) ; incramentally search (set! incsearch true) ; incramentally search
(set! autoindent true) (set! autoindent true)
(set! wildmode "longest,list") (set! wildmode "longest,list")
(set! inccommand :split)
; (lua "opt.formatoptions:remove \"o\"")
(set! mouse :v) (set! mouse :v)
(set! mouse :a) (set! mouse :a)
(set! clipboard :unnamedplus) ; use system clipboard (set! clipboard :unnamedplus) ; use system clipboard
(set! ttyfast true) (set! ttyfast true)
(set! cursorline true) (set! cursorline true)
(set! splitbelow true) (set! splitbelow true)
(set! autochdir true) ; (set! autochdir true)
(set! signcolumn :yes:1) (set! signcolumn :yes:1)
(set! shell :/bin/zsh)
(set! splitright false) (set! showmode false)
(set! cmdheight 0)
(vim.cmd "syntax match keyword \"\\<lambda\\>\" conceal cchar=λ")
(set! conceallevel 1)
; 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 [_ plug (ipairs default_plugins)]
(g! (.. :loaded plug) 1))

View file

@ -0,0 +1,6 @@
(import-macros {: set!} :hibiscus.vim)
(set! termguicolors true)
(local colorizer (require :nvim-highlight-colors))
(colorizer.setup)

View file

@ -1,33 +1,25 @@
(local plug (require :nvim-web-devicons)) (local plug (require :nvim-web-devicons))
(plug.setup [ (plug.setup [
:strict true :strict true
:default true :default true
:color_icons true :color_icons true
:override [ :override
:zsh [ [ :zsh
:icon "" [ :icon ""
:color "#428850" :color "#428850"
:cterm_color "65" :cterm_color "65"
:name "zsh" :name "zsh" ]]
]
]
:override_by_filename [ :override_by_filename
:.gitignore [ [ :.gitignore
:icon "" [ :icon ""
:color "#f1502f" :color "#f1502f"
:name "gitignore" :name "gitignore" ]]
]
]
:override_by_extension [ :override_by_extension
:log [ [ :log
:icon "" [ :icon ""
:color "#81e043" :color "#81e043"
:name "Log" :name "Log" ]] ])
]
]
])

View file

@ -1,46 +1,40 @@
(local gitsigns (require :gitsigns)) (local gitsigns (require :gitsigns))
(gitsigns.setup { (gitsigns.setup {
:signs { :signs
:add [:text :▍] { :add {:text :▍}
:change [:text :▍] :change {:text :▍}
:delete [:text :▍] :delete {:text :▍}
:topdelete [:text :▍] :topdelete {:text :▍}
:changedelete [:text :▍] :changedelete {:text :▍}
:untracked [:text :▍] :untracked {:text :▍} }
}
:signcolumn true :signcolumn true
:numhl false :numhl false
:linehl false :linehl false
:word_diff false :word_diff false
:watch_gitdir { :watch_gitdir { :follow_files true }
:follow_files true
}
:attach_to_untracked true :attach_to_untracked true
:current_line_blame false :current_line_blame false
:current_line_blame_opts { :current_line_blame_opts
:virt_text true { :virt_text true
:virt_text_pos :eol :virt_text_pos :eol
:delay 1000 :delay 1000
:ignore_whitespace false :ignore_whitespace false }
}
:current_line_blame_formatter "<author>, <author_time:%Y-%m-%d> - <summary>" :current_line_blame_formatter "<author>, <author_time:%Y-%m-%d> - <summary>"
:sign_priority 6 :sign_priority 6
:update_debounce 100 :update_debounce 100
:status_formatter nil :status_formatter nil
:max_file_length 40000 :max_file_length 40000
:preview_config { :preview_config
:border :single { :border :single
:style :minimal :style :minimal
:relative :cursor :relative :cursor
:row 0 :row 0
:col 1 :col 1 } })
}
})

View file

@ -1,39 +0,0 @@
(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
}
})

27
fnl/plugins/hlchunk.fnl Executable file
View file

@ -0,0 +1,27 @@
(local hlchunk (require :hlchunk))
(hlchunk.setup {
:indent {
:enable true
:chars [ "." "." "." "." ]
:style
{ :#888888
:#666666
:#444444
:#333333
:#333333
:#333333
:#333333
:#333333 } }
:blank { :enable false }
:chunk { :enable false }
:line_num {
:enable false
:style :#ADBC9F
}
})

39
fnl/plugins/incline.fnl Normal file
View file

@ -0,0 +1,39 @@
(local incline (require :incline))
(incline.setup
{ :highlight
{ :groups
{ :InclineNormal
{ :default true
:group :lualine_a_normal }
:InclineNormalNC
{ :default true
:group :Comment } }}
:window
{ :margin
{ :vertical 0
:horizontal 1 }}
; :render
; (fn [props]
; (let
; [
; filename (vim.fn.fnamemodify (vim.api.nvim_buf_get_name props.buf) ::t)
; [icon color] (require :nvim-web-devicons).get_icon_color filename
; ]
;
; ([
; { icon
; { :guifg color } }
;
; [(if icon " " "")]
;
; [filename] ]) ))
})
; render = function(props)
; local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
; local icon, color = require("nvim-web-devicons").get_icon_color(filename)
; return { { icon, guifg = color }, { icon and " " or "" }, { filename } }
; end,

View file

@ -2,14 +2,11 @@
(fn modul [name] (.. dir name)) (fn modul [name] (.. dir name))
(require (modul :lazy)) (require (modul :lazy))
(require (modul :treesitter))
(require (modul :devicons)) (require (modul :devicons))
(require (modul :gitsigns)) (require (modul :gitsigns))
(require (modul :harpoon))
(require (modul :hlblocks))
(require (modul :lsp-zero)) (require (modul :lsp-zero))
(require (modul :lualine)) (require (modul :lualine))
(require (modul :mini)) (require (modul :mini))
(require (modul :oil))
(require (modul :telescope)) (require (modul :telescope))
(require (modul :treesitter)) (require (modul :incline))
(require (modul :wilder))

View file

@ -8,84 +8,88 @@
(local lazy (require :lazy)) (local lazy (require :lazy))
(local plug 1) (local plug 1)
(local opt 1) (local key 1)
(local callback 2)
(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
}
])
(local plugins [
:udayvir-singh/tangerine.nvim
:udayvir-singh/hibiscus.nvim
{ plug :nvim-treesitter/nvim-treesitter
:build ":TSUpdate"
:branch :master
:lazy false }
; :lambdalisue/nerdfont.vim
; :brenoprata10/nvim-highlight-colors
{ plug :catppuccin/nvim
:name :catppuccin
:priority 1000 }
:gelguy/wilder.nvim
:bkad/camelcasemotion
:lewis6991/gitsigns.nvim
{ plug :b0o/incline.nvim
:event [:BufReadPre] }
:echasnovski/mini.nvim
{ plug :svampkorg/moody.nvim
:event [:ModeChanged :BufWinEnter :WinEnter]
:opts [] }
{ plug :nvim-telescope/telescope-fzf-native.nvim
:build :make }
{ plug :nvim-telescope/telescope.nvim
:tag :0.1.8
:dependencies [:nvim-lua/plenary.nvim] }
; { plug :OXY2DEV/markview.nvim
; :dependencies
; [ :nvim-treesitter/nvim-treesitter
; :nvim-tree/nvim-web-devicons ] }
{ plug :ThePrimeagen/harpoon
:branch :harpoon2
:dependencies [:nvim-lua/plenary.nvim] }
{ plug :nvim-lualine/lualine.nvim
:dependencies [:nvim-tree/nvim-web-devicons] }
{ plug :VonHeikemen/lsp-zero.nvim
:branch "v3.x"
:dependencies
[ :neovim/nvim-lspconfig
:williamboman/mason.nvim
:williamboman/mason-lspconfig.nvim
:hrsh7th/nvim-cmp
:hrsh7th/cmp-nvim-lsp
:L3MON4D3/LuaSnip ]}
{ plug :m4xshen/hardtime.nvim
:dependencies
[ :MunifTanjim/nui.nvim
:nvim-lua/plenary.nvim ] }
{ plug :nvzone/typr
:dependencies [ :nvzone/volt]
:cmd [ :Typr :Typrstats ] }
{ plug :folke/which-key.nvim
:event :VeryLazy
:keys [{ key :<leader>?
callback (fn []
((. (require :which-key) :show) {:global false}))
:desc "Buffer Local Keymaps (which-key)"}] }
])
(lazy.setup plugins)
(local hardtime (require :hardtime))
(hardtime.setup)

View file

@ -1,115 +0,0 @@
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

View file

@ -1,43 +1,64 @@
(local mason (require :mason))
(mason.setup)
(local lsp (require :lsp-zero)) (local lsp (require :lsp-zero))
(lsp.preset) (lsp.preset)
(local lspconfig (require :lspconfig)) (local lspconfig (require :lspconfig))
(lspconfig.lua_ls.setup (lsp.nvim_lua_ls)) (lspconfig.lua_ls.setup (lsp.nvim_lua_ls))
(local mason (require :mason))
(mason.setup)
(local mason-lspc (require :mason-lspconfig))
(mason-lspc.setup
{ :ensure-installed
[ :fennel-ls
:lua-language-server
:python-lsp-server
:ltex-ls
:zls
:rust-analyzer ]
:automatic_installation true })
(local cmp (require :cmp)) (local cmp (require :cmp))
(local cmp_action (lsp.cmp_action)) (local cmp_action (lsp.cmp_action))
(lsp.on_attach (fn [client bufnr] lsp.default_keymaps {:buffer bufnr})) (lsp.on_attach (fn [_ bufnr] lsp.default_keymaps {:buffer bufnr}))
(lspconfig.pylsp.setup { (lspconfig.pylsp.setup
:setings { { :setings { :pylsp { :plugins { :pycodestyle
:pylsp { { :ignore [:W391 :E303 :E226]
:plugins { :maxLineLength 120 } }}}})
:pycodestyle {
:ignore [:W391 :E303 :E226]
:maxLineLength 120 }}}}})
(lsp.setup) (lsp.setup)
(cmp.setup { (local fennel-ls lspconfig.fennel_ls)
:mapping { (fennel-ls.setup {})
:<CR> (cmp.mapping.confirm {:select true})
:<Tab> (cmp.mapping (fn [fallback] (local rustan lspconfig.rust_analyzer)
(if (cmp.visible) (rustan.setup {})
(cmp.select_next_item)
(fallback)) [:i :s] ))
:<S-Tab> (cmp.mapping (fn [fallback] (lspconfig.racket_langserver.setup {})
(if (cmp.visible) (lspconfig.zls.setup {})
(cmp.select_prev_item)
(fallback)) [:i :s] ))
:<C-Space> cmp.mapping.complete
:<C-f> cmp_action.luasnip_jump_forward (cmp.setup
:<C-b> cmp_action.luasnip_jump_backward }}) { :mapping
{ :<CR> (cmp.mapping.confirm {:select true})
:<Tab> (cmp.mapping
(fn [fallback]
(if (cmp.visible)
(cmp.select_next_item)
(fallback)) [:i :s] ))
:<S-Tab> (cmp.mapping
(fn [fallback]
(if (cmp.visible)
(cmp.select_prev_item)
(fallback)) [:i :s] ))
:<C-Space> cmp.mapping.complete
:<C-f> cmp_action.luasnip_jump_forward
:<C-b> cmp_action.luasnip_jump_backward }})

View file

@ -1,257 +1,11 @@
(local lualine (require :lualine)) (local lualine (require :lualine))
(lualine.setup)
; TODO: create a new theme (lualine.setup
{ :options
{ :section_separators
{ :left :
:right : }
; OLD THEME : :component_separators
{ :left :
; local lualine = require('lualine') :right : }} })
;
; 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)

View file

@ -1,14 +1,13 @@
(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)) (local clue (require :mini.clue))
(clue.setup) (local cursorword (require :mini.cursorword))
(local pairs (require :mini.pairs))
(local starter (require :mini.starter))
(local surround (require :mini.surround)) (local surround (require :mini.surround))
(local trailspace (require :mini.trailspace))
(clue.setup)
(cursorword.setup)
(pairs.setup)
(starter.setup)
(surround.setup) (surround.setup)
(trailspace.setup)

View file

@ -1,2 +1,11 @@
(local telescope (require :telescope)) (local telescope (require :telescope))
(telescope.setup)
(telescope.setup
{ :extansions
{ :fzf
{ :fuzzy true
:override_generic_sorter true
:override_file_sorter true
:case_mode :smart_case } }})
(telescope.load_extension :fzf)

View file

@ -1,28 +1,32 @@
(local configs (require :nvim-treesitter.configs)) (local configs (require :nvim-treesitter.configs))
(local parsers (require :nvim-treesitter.parsers)) ; (local parsers (require :nvim-treesitter.parsers))
(configs.setup { (configs.setup
:ensure_installed [ { :ensure_installed
:c [ :c
:lua :bash
:vim :c_sharp
:vimdoc :fennel
:query :go
:haskell :haskell
:go :lua
:bash :python
:python :query
:fennel :rust
:hyprlang :vim
] :vimdoc
:hyprlang ]
:sync_install false :sync_install false
:auto_install true :auto_install true
:highlight { :highlight
:enable true { :enable true }})
}
})
(vim.filetype.add { (vim.filetype.add
:pattern { :.*/hypr/.*%.conf :hyprlang }}) { :pattern
{ :.*/hypr/.*%.conf :hyprlang }})
(vim.filetype.add
{ :pattern
{ :*.tex :latex }})

View file

@ -1,24 +1,24 @@
(local wilder (require :wilder)) ; (local wilder (require :wilder))
;
(wilder.setup { ; (wilder.setup {
:modes [":" "/" "?"] ; :modes [":" "/" "?"]
}) ; })
;
(wilder.set_option :renderer (wilder.renderer_mux { ; (wilder.set_option :renderer (wilder.renderer_mux {
":" (wilder.popupmenu_renderer { ; ":" (wilder.popupmenu_renderer {
:highlighter wilder.basic_highlighter ; :highlighter wilder.basic_highlighter
:left [ " " wilder.popupmenu_devicons ] ; :left [ " " wilder.popupmenu_devicons ]
:right [ " " wilder.popupmenu_scrollbar ] ; :right [ " " wilder.popupmenu_scrollbar ]
}) ; })
;
"/" (wilder.popupmenu_renderer { ; "/" (wilder.popupmenu_renderer {
:highlighter wilder.basic_highlighter ; :highlighter wilder.basic_highlighter
:left [ "" wilder.popupmenu_devicons ] ; :left [ "" wilder.popupmenu_devicons ]
:right [ "" wilder.popupmenu_scrollbar ] ; :right [ "" wilder.popupmenu_scrollbar ]
}) ; })
})) ; }))
;
(wilder.set_option :renderer ; (wilder.set_option :renderer
(wilder.popupmenu_renderer ; (wilder.popupmenu_renderer
{ :max_height :20% ; { :max_height :20%
:min_width :100% })) ; :min_width :100% }))

View file

@ -1,58 +1,26 @@
; ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗ ; ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗
; ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝ ; ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝
; ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝ ; ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝
; ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝ ; ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝
; ██║ ██║ ██║██║██╔╝ ██╗ ██║ ; ██║ ██║ ██║██║██╔╝ ██╗ ██║
; ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═ ; ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═
; Listen up, you motherfuckers, ; Listen up, you motherfuckers,
; Those Ivy League dopes, they wanna ; Those Ivy League dopes, they wanna
; mock us. Tell 'em all this is war. ; mock us. Tell 'em all this is war.
; And not fighting a war is for suckers. ; And not fighting a war is for suckers.
(import-macros {: g! : set!} :hibiscus.vim) ; (import-macros {: g! : set!} :hibiscus.vim)
; When using neovide, use these settings ; When using neovide, use these settings
(when vim.g.neovide (do ; (when vim.g.neovide (do
(set! guifont "FiraCode Nerd Font:h14") ; (set! guifont "FiraCode Nerd Font:h14")
(g! neovide_scale_factor 1.0) ; (g! neovide_scale_factor 1.0)
(g! neovide_refresh_rate 120) ; (g! neovide_refresh_rate 120)
(g! neovide_refresh_rate_idle 5) ; (g! neovide_refresh_rate_idle 5)
(g! neovide_cursor_antialiasing true) ; (g! neovide_cursor_antialiasing true)
(g! neovide_cursor_animate_in_insert_mode true) ; (g! neovide_cursor_animate_in_insert_mode true)
(g! neovide_cursor_vfx_mode "ripple"))) ; (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 :plugins)

View file

@ -4,23 +4,23 @@ vim.tbl_islist = vim.islist
-- bootstrap tangerine and hibiscus in order to have fennel support -- bootstrap tangerine and hibiscus in order to have fennel support
local function bootstrap(url, ref) local function bootstrap(url, ref)
local name = url:gsub(".*/", "") local name = url:gsub(".*/", "")
local path local path
path = vim.fn.stdpath("data") .. "/lazy/" .. name path = vim.fn.stdpath("data") .. "/lazy/" .. name
vim.opt.rtp:prepend(path) vim.opt.rtp:prepend(path)
if vim.fn.isdirectory(path) == 0 then if vim.fn.isdirectory(path) == 0 then
print(name .. ": installing in data dir...") print(name .. ": installing in data dir...")
vim.fn.system {"git", "clone", url, path} vim.fn.system {"git", "clone", url, path}
if ref then if ref then
vim.fn.system {"git", "-C", path, "checkout", ref} vim.fn.system {"git", "-C", path, "checkout", ref}
end end
vim.cmd "redraw" vim.cmd "redraw"
print(name .. ": finished installing") print(name .. ": finished installing")
end end
end end
bootstrap("https://github.com/udayvir-singh/tangerine.nvim") bootstrap("https://github.com/udayvir-singh/tangerine.nvim")
@ -28,8 +28,8 @@ bootstrap("https://github.com/udayvir-singh/hibiscus.nvim")
require "tangerine".setup { require "tangerine".setup {
compiler = { compiler = {
verbose = false, verbose = false,
hooks = { "onsave", "oninit" } hooks = { "onsave", "oninit" }
} }
} }