Compare commits

..

No commits in common. "3633ac65657a4f6d1a0e3ef4fcc9d6f2d3354f6a" and "2da33ff01189737b4e7d90e79fc3c9db6cbe5ef5" have entirely different histories.

8 changed files with 63 additions and 33 deletions

View file

@ -10,7 +10,6 @@
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"cosmic-ui": { "branch": "main", "commit": "ab7de388576eaac02ce7bc2389e55b8e207aad12" }, "cosmic-ui": { "branch": "main", "commit": "ab7de388576eaac02ce7bc2389e55b8e207aad12" },
"dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" }, "dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
@ -34,10 +33,9 @@
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
"telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" }, "telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"toggleterm.nvim": { "branch": "main", "commit": "e76134e682c1a866e3dfcdaeb691eb7b01068668" },
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" },
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
"vim-heritage": { "branch": "main", "commit": "574baeb0679681a710adce5110a0d8b2ae1c2637" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
} }

View file

@ -2,6 +2,7 @@ local M = {}
local augroup_name = 'CosmicNvimLspFormat' local augroup_name = 'CosmicNvimLspFormat'
local config = require('config') local config = require('config')
local u = require('utils') local u = require('utils')
local lsp_utils = require('utils.lsp')
local lsp_mappings = require('lsp.mappings') local lsp_mappings = require('lsp.mappings')
M.augroup = vim.api.nvim_create_augroup(augroup_name, { clear = true }) M.augroup = vim.api.nvim_create_augroup(augroup_name, { clear = true })
@ -22,7 +23,9 @@ function M.on_attach(client, bufnr)
if client.supports_method('textDocument/formatting') then if client.supports_method('textDocument/formatting') then
-- set up :LspFormat for clients that are capable -- set up :LspFormat for clients that are capable
vim.cmd(string.format("command! -nargs=? LspFormat lua require('utils.lsp').buf_format(%s, <q-args>)", bufnr)) vim.cmd(
string.format("command! -nargs=? LspFormat lua require('utils.lsp').buf_format(%s, <q-args>)", bufnr)
)
-- set up auto format on save -- set up auto format on save
vim.api.nvim_clear_autocmds({ vim.api.nvim_clear_autocmds({

View file

@ -1,6 +1,6 @@
local map = require('utils').set_keymap local map = require('utils').set_keymap
-- quickfix mappings -- Quickfix mappings
map('n', '<leader>ck', ':cexpr []<cr>', { desc = 'Clear list' }) map('n', '<leader>ck', ':cexpr []<cr>', { desc = 'Clear list' })
map('n', '<leader>cc', ':cclose <cr>', { desc = 'Close list' }) map('n', '<leader>cc', ':cclose <cr>', { desc = 'Close list' })
map('n', '<leader>co', ':copen <cr>', { desc = 'Open list' }) map('n', '<leader>co', ':copen <cr>', { desc = 'Open list' })
@ -35,7 +35,3 @@ map('n', '<C-Up>', ':resize -2<CR>', { desc = 'Resize -2' })
map('n', '<C-Down>', ':resize +2<CR>', { desc = 'Resize +2' }) map('n', '<C-Down>', ':resize +2<CR>', { desc = 'Resize +2' })
map('n', '<C-Left>', ':vertical resize -2<CR>', { desc = 'Vertical Resize -2' }) map('n', '<C-Left>', ':vertical resize -2<CR>', { desc = 'Vertical Resize -2' })
map('n', '<C-Right>', ':vertical resize +2<CR>', { desc = 'Vertical Resize +2' }) map('n', '<C-Right>', ':vertical resize +2<CR>', { desc = 'Vertical Resize +2' })
-- easy insertion of trailing ; and , from insert mode.
map('i', ';;', '<Esc>A;<Esc>')
map('i', ',,', '<Esc>A;<Esc>')

57
lua/plugins/dashboard.lua Normal file
View file

@ -0,0 +1,57 @@
local icons = require('utils.icons')
local g = vim.g
return {
'glepnir/dashboard-nvim',
config = function()
g.dashboard_default_executive = 'telescope'
g.dashboard_session_directory = vim.fn.stdpath('data') .. '/sessions'
g.dashboard_custom_section = {
find_file = {
description = { icons.file1 .. ' Find File <leader>ff' },
command = 'lua require("plugins.telescope.mappings").project_files()',
},
file_explorer = {
description = { icons.file2 .. ' File Manager <C-n> ' },
command = 'NvimTreeToggle',
},
find_string = {
description = { icons.word .. ' Grep String <leader>fs' },
command = 'Telescope grep_string',
},
last_session = {
description = { icons.clock .. ' Load Session <leader>sl' },
command = 'lua vim.cmd(":silent RestoreSession")',
},
}
g.dashboard_custom_footer = { '💫 github.com/CosmicNvim/CosmicNvim' }
require('dashboard').setup({
-- config
config = {
header = {
'',
'',
'',
'',
'',
'',
' ██████╗ ██████╗ ███████╗███╗ ███╗██╗ ██████╗███╗ ██╗██╗ ██╗██╗███╗ ███╗',
'██╔════╝██╔═══██╗██╔════╝████╗ ████║██║██╔════╝████╗ ██║██║ ██║██║████╗ ████║',
'██║ ██║ ██║███████╗██╔████╔██║██║██║ ██╔██╗ ██║██║ ██║██║██╔████╔██║',
'██║ ██║ ██║╚════██║██║╚██╔╝██║██║██║ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║',
'╚██████╗╚██████╔╝███████║██║ ╚═╝ ██║██║╚██████╗██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║',
' ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝',
'',
'',
'',
},
footer = { '💫 github.com/CosmicNvim/CosmicNvim' },
},
})
end,
event = 'VimEnter',
}

View file

@ -1,12 +0,0 @@
return {
'j-hui/fidget.nvim',
opts = {
notification = {
override_vim_notify = true,
},
progress = {
poll_rate = 10,
},
},
lazy = false,
}

View file

@ -1,4 +0,0 @@
return {
'tpope/vim-eunuch',
lazy = false,
}

View file

@ -1,4 +0,0 @@
return {
'jessarcher/vim-heritage',
lazy = false,
}

View file

@ -7,10 +7,6 @@ require('lazy').setup('plugins', {
border = config.border, border = config.border,
size = { width = 0.7, height = 0.7 }, size = { width = 0.7, height = 0.7 },
}, },
install = {
missing = true,
colorscheme = { 'tokyonight' },
},
performance = { performance = {
rtp = { rtp = {
disabled_plugins = { disabled_plugins = {