forked from dam9000/kickstart-modular.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from burberrymyshirt/update
update
- Loading branch information
Showing
18 changed files
with
443 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Get the path to the current directory | ||
local colorschemes_path = vim.fn.fnamemodify(debug.getinfo(1, 'S').source:sub(2), ':h') | ||
|
||
-- Find all Lua files in the directory, excluding `setup.lua` | ||
local files = vim.fn.glob(colorschemes_path .. '/*.lua', false, true) | ||
|
||
-- Container for all plugin specifications | ||
local plugins = {} | ||
|
||
-- Iterate over the files and load each as a Lua module | ||
for _, file in ipairs(files) do | ||
local file_name = vim.fn.fnamemodify(file, ':t:r') -- Extract filename without extension | ||
if file_name ~= 'setup' then -- Skip `setup.lua` | ||
local success, spec = pcall(require, 'colorschemes.plugins.' .. file_name) | ||
if success then | ||
vim.list_extend(plugins, spec) -- Append plugin specs | ||
else | ||
vim.notify('Error loading colorscheme plugin: ' .. file_name, vim.log.levels.ERROR) | ||
end | ||
end | ||
end | ||
|
||
-- Return the aggregated plugins list | ||
return plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
return { | ||
|
||
{ | ||
'Mofiqul/vscode.nvim', | ||
priority = 999, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
return { | ||
{ | ||
'akinsho/bufferline.nvim', | ||
version = '*', | ||
dependencies = 'nvim-tree/nvim-web-devicons', | ||
opts = { | ||
options = { | ||
numbers = 'buffer_id', | ||
}, | ||
}, | ||
}, | ||
} | ||
-- return { | ||
-- { | ||
-- 'akinsho/bufferline.nvim', | ||
-- version = '*', | ||
-- dependencies = 'nvim-tree/nvim-web-devicons', | ||
-- opts = { | ||
-- options = { | ||
-- numbers = 'buffer_id', | ||
-- }, | ||
-- }, | ||
-- }, | ||
-- } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
return { | ||
{ -- Autoformat | ||
'stevearc/conform.nvim', | ||
lazy = false, | ||
keys = { | ||
{ | ||
'<leader>f', | ||
function() | ||
require('conform').format { async = true, lsp_fallback = true } | ||
end, | ||
mode = '', | ||
desc = '[F]ormat buffer', | ||
}, | ||
}, | ||
opts = { | ||
notify_on_error = false, | ||
format_on_save = function(bufnr) | ||
-- Disable "format_on_save lsp_fallback" for languages that don't | ||
-- have a well standardized coding style. You can add additional | ||
-- languages here or re-enable it for the disabled ones. | ||
local disable_filetypes = { c = true, cpp = true } | ||
return { | ||
timeout_ms = 500, | ||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], | ||
} | ||
end, | ||
formatters_by_ft = { | ||
lua = { 'stylua' }, | ||
go = { 'gofumpt', 'golines', 'goimports' }, | ||
-- Conform can also run multiple formatters sequentially | ||
-- python = { "isort", "black" }, | ||
-- | ||
-- You can use a sub-list to tell conform to run *until* a formatter | ||
-- is found. | ||
-- javascript = { { "prettierd", "prettier" } }, | ||
}, | ||
}, | ||
{ -- Autoformat | ||
'stevearc/conform.nvim', | ||
event = { 'BufWritePre' }, | ||
cmd = { 'ConformInfo' }, | ||
keys = { | ||
{ | ||
'<leader>f', | ||
function() | ||
require('conform').format { async = true, lsp_format = 'fallback' } | ||
end, | ||
mode = '', | ||
desc = '[F]ormat buffer', | ||
}, | ||
}, | ||
opts = { | ||
notify_on_error = false, | ||
format_on_save = function(bufnr) | ||
-- Disable "format_on_save lsp_fallback" for languages that don't | ||
-- have a well standardized coding style. You can add additional | ||
-- languages here or re-enable it for the disabled ones. | ||
local disable_filetypes = { c = true, cpp = true } | ||
local lsp_format_opt | ||
if disable_filetypes[vim.bo[bufnr].filetype] then | ||
lsp_format_opt = 'never' | ||
else | ||
lsp_format_opt = 'fallback' | ||
end | ||
return { | ||
timeout_ms = 500, | ||
lsp_format = lsp_format_opt, | ||
} | ||
end, | ||
formatters_by_ft = { | ||
lua = { 'stylua' }, | ||
go = { 'gofumpt', 'golines', 'goimports' }, | ||
|
||
-- Conform can also run multiple formatters sequentially | ||
-- python = { "isort", "black" }, | ||
-- | ||
-- You can use 'stop_after_first' to run the first available formatter from the list | ||
-- javascript = { "prettierd", "prettier", stop_after_first = true }, | ||
}, | ||
}, | ||
}, | ||
} | ||
-- vim: ts=2 sts=2 sw=2 et |
Oops, something went wrong.