This repository was archived by the owner on Jan 21, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathuser-practicalli.lua
More file actions
310 lines (282 loc) · 10.9 KB
/
user-practicalli.lua
File metadata and controls
310 lines (282 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
-- ------------------------------------------
-- Practicalli specific customisations
--
-- Startup dashboard banner
-- `fd` as alternate `ESC` key mapping (better-escape.nvim)
-- Everforest colorscheme
-- Custom global options & key mpapings (via astrocore)
-- ------------------------------------------
-- INFO: Create a `lua/plugins/your-name.lua` for significant changes
-- INFO: Files under `lua/plugins/*.lua` load in alphabetical order,
-- so plugin overrides should be the last file to load
-- INFO: Skip this config if `PRACTICALLI_ASTRO` environment variable set to false
local practicalli = vim.env.PRACTICALLI_ASTRO
if practicalli == "false" then return {} end
---@type LazySpec
return {
-- ------------------------------------------
-- Startup Dashboard
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" ██████╗ ██████╗ █████╗ ██████╗████████╗██╗ ██████╗ █████╗ ██╗ ██╗ ██╗",
" ██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██║██╔════╝██╔══██╗██║ ██║ ██║",
" ██████╔╝██████╔╝███████║██║ ██║ ██║██║ ███████║██║ ██║ ██║",
" ██╔═══╝ ██╔══██╗██╔══██║██║ ██║ ██║██║ ██╔══██║██║ ██║ ██║",
" ██║ ██║ ██║██║ ██║╚██████╗ ██║ ██║╚██████╗██║ ██║███████╗███████╗██║",
" ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝",
}
return opts
end,
},
-- ------------------------------------------
-- ------------------------------------------
-- `fd` alternative to the `ESC` key
{
"max397574/better-escape.nvim",
event = "InsertCharPre",
opts = {
timeout = vim.o.timeoutlen,
default_mappings = false,
mappings = {
i = { f = { d = "<Esc>" } },
c = { f = { d = "<Esc>" } },
t = { f = { d = "<Esc>" } },
v = { f = { d = "<Esc>" } },
s = { f = { d = "<Esc>" } },
},
},
},
-- ------------------------------------------
-- ------------------------------------------
-- Editor tools
--
{
"cappyzawa/trim.nvim",
opts = {
-- override default config
-- ft_blocklist = {"markdown"}, -- filetype not to trim
-- highlight = true,
-- highlight_bg = "#800080", -- or 'purple'
},
},
{ -- Show key presses in Neovim window
"nvzone/showkeys",
lazy = false,
cmd = "ShowkeysToggle",
opts = {
excluded_modes = { "i", "t" }, -- skip insert and terminal
position = "bottom-center",
show_count = true,
maxkeys = 4,
timeout = 4,
},
},
-- ------------------------------------------
-- ------------------------------------------
-- AstroCommunity Plugin Options:
--
-- Neogit: astrocommunity.git.neogit
{
"neogit",
dependencies = {
{ "nvim-lua/plenary.nvim", "sindrets/diffview.nvim" },
},
opts = {
disable_signs = true, -- duplicate signs if enabled
-- graph_style = "unicode", -- elegant commit graph
graph_style = "kitty", -- elegant commit graph
integrations = { diffview = true },
},
keys = {
-- Neogit status - overrides stage hunk astronvim mapping
{ "<leader>gs", "<cmd>Neogit<cr>", desc = "Status (Neogit)" },
},
},
-- Noice: astrocommunity.utility.noice-nvim
{
"noice.nvim",
opts = function(_, opts)
local utils = require "astrocore"
return utils.extend_tbl(opts, {
presets = {
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})
end,
},
-- nvim-notify controls how messages are displayed
{
"rcarriga/nvim-notify",
opts = {
top_down = false,
timeout = 2000, -- shorter display duration, default 3000
-- log messages level - default 5 (everything), 1 (minimum)
level = 3,
-- background_color = "#000000",
},
},
-- Zen-Mode: astrocommunity.editing-support.zen-mode-nvim
-- https://github.com/folke/zen-mode.nvim#%EF%B8%8F-configuration
{
"folke/zen-mode.nvim",
opts = {
plugins = {
options = {
enabled = true,
},
-- Kitty Terminal
kitty = {
enabled = true,
font = "+4", -- font size increment
},
},
},
},
-- ------------------------------------------
-- ------------------------------------------
-- Vertically aligned menu list
{
"folke/which-key.nvim",
opts = {
---@type false | "classic" | "modern" | "helix"
preset = "helix",
},
},
-- ------------------------------------------
-- ------------------------------------------
-- AstroNvim UI Plugin Options
{
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`
"AstroNvim/astroui",
---@type AstroUIOpts
opts = {
colorscheme = "everforest",
},
},
-- Configure Everforest theme
-- {
-- "neanias/everforest-nvim",
-- config = function()
-- require("everforest").setup {
-- transparent_background_level = 1,
-- }
-- end,
-- },
-- ------------------------------------------
-- ------------------------------------------
-- AstroNvim LSP Configuration
-- INFO: Remove to use Mason install of Clojure LSP rather than local install
-- INFO: Not required once PR merged: https://github.com/mason-org/mason-registry/pull/7896
-- {
-- "AstroNvim/astrolsp",
-- ---@type AstroLSPOpts
-- opts = {
-- servers = { "clojure_lsp" }, -- use locally installed Clojure LSP server
-- },
-- },
-- {
-- "williamboman/mason-lspconfig.nvim",
-- opts = function(_, opts)
-- -- Remove clojure_lsp from mason install (added by clojure pack)
-- opts.ensure_installed = vim.tbl_filter(function(s) return s ~= "clojure_lsp" end, opts.ensure_installed)
-- end,
-- },
-- ------------------------------------------
-- ------------------------------------------
-- AstroNvim Core Plugin Options and Key Mappings
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
options = {
-- configure general options: vim.opt.<key>
opt = {
spell = true, -- sets vim.opt.spell
wrap = true, -- sets vim.opt.wrap
guifont = "Fira Code:h16", -- neovide font family & size
},
-- configure global vim variables: vim.g
g = {
-- Neovim lanaguage provides - disable language integration not required
loaded_node_provider = 0,
loaded_perl_provider = 0,
loaded_python3_provider = 0,
loaded_ruby_provider = 0,
-- Leader key for Visual-Multi Cursors (Multiple Cursors)
VM_leader = "gm", -- Visual Multi Leader (multiple cursors - user plugin)
-- Conjure plugin overrides
-- comment pattern for eval to comment command
["conjure#eval#comment_prefix"] = ";; ",
-- Hightlight evaluated forms
["conjure#highlight#enabled"] = true,
-- show HUD REPL log at startup
["conjure#log#hud#enabled"] = false,
-- auto repl (babashka)
["conjure#client#clojure#nrepl#connection#auto_repl#enabled"] = false,
["conjure#client#clojure#nrepl#connection#auto_repl#hidden"] = true,
["conjure#client#clojure#nrepl#connection#auto_repl#cmd"] = nil,
["conjure#client#clojure#nrepl#eval#auto_require"] = false,
-- Test runner: "clojure", "clojuresCRipt", "kaocha"
["conjure#client#clojure#nrepl#test#runner"] = "kaocha",
-- Minimise very long lines slow down:
-- `g:conjure#log#treesitter` false (true by default)
-- ["conjure#log##treesitter"] = false,
-- `g:conjure#log#disable_diagnostics` true (disabled) by default
},
},
mappings = {
n = {
-- normal mode key bindings
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
-- whick-key sub-menu for Visual-Multi Cursors (Multiple Cursors)
["gm"] = { name = "Multiple Cursors" },
-- Toggle last open buffer
["<Leader><tab>"] = { "<cmd>b#<cr>", desc = "Last tab" },
-- Save prompting for file name
["<Leader>W"] = { ":write ", desc = "Save as file" },
-- mappings seen under group name "Buffer"
["<Leader>b"] = { name = "Buffers" },
["<Leader>bt"] = { name = "Tabs" },
["<Leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<Leader>btn"] = { "<cmd>tabNext<cr>", desc = "Next tab" },
["<Leader>bt<tab>"] = { "<cmd>tabprevious<cr>", desc = "Previous tab" },
-- ["<Leader>bD"] = { "<cmd>Bdelete<cr>", desc = "Delete buffer" },
-- Find Menu
-- browse via directory structure, create and modify paths
["<Leader>fe"] = { "<cmd>Telescope file_browser<cr>", desc = "Explorer" },
-- find word for specific file patterns
["<Leader>fg"] = {
"<cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<cr>",
desc = "Grep Word",
},
-- Editing
["zZ"] = { "<cmd>ZenMode<cr>", desc = " Zen mode" },
-- Git Menu
-- ["<Leader>gs"] = { "<cmd>Neogit<cr>", desc = " Status (Neogit)" },
-- ["<Leader>gs"] = false, -- disable git status
-- ["<Leader>gs"] = { function() require("neogit").open { kind = "tab" } end, desc = " Status (Neogit)" },
["<Leader>gH"] = { function() require("gitsigns").stage_hunk() end, desc = "Stage Git hunk" },
-- Gits.nvim key maps
["<Leader>ghg"] = { name = "Gist" },
["<Leader>ghgr"] = { "<cmd>GistCreate<cr>", desc = "Gist Region" },
["<Leader>ghgg"] = { "<cmd>GistCreateFromFile<cr>", desc = "Gist File" },
["<Leader>ghgl"] = { "<cmd>GistsList<cr>", desc = "List Gists" },
-- Showkeys plugin (visualise key presses in Neovim window)
["<Leader>uk"] = { "<cmd>ShowkeysToggle<cr>", desc = "Toggle Showkeys" },
},
t = {
-- terminal mode key bindings
},
v = {
-- visual mode key bindings
},
},
},
},
-- ------------------------------------------
}