Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
idk did stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeycorn committed Mar 31, 2024
1 parent fb8b157 commit a961250
Show file tree
Hide file tree
Showing 22 changed files with 409 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
## TODO
WK
TS
LSP
snip

17 changes: 0 additions & 17 deletions coc-settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
"rootPatterns": [".ccls-root", "compile_commands.json"],
"initializationOptions": {
"cache": {
"directory": ".ccls-cache"
},
"client": {
"snippetSupport": true
}
}
}
}
}
5 changes: 2 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
require('lazyLoader')
require('settings')
require('mappings')
require('lspLoader')

vim.cmd("colorscheme gruvboxed")

-- No coq???!1/11/1/1/1111!???
-- vim.cmd("COQnow -s")
-- Yes coq???!1/11/1/1/1111!???
vim.cmd("COQnow -s")
22 changes: 18 additions & 4 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
{
"coc.nvim": { "branch": "master", "commit": "ede39ea981f47222c5b1185592df7bb1875cec6d" },
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"coq.artifacts": { "branch": "artifacts", "commit": "9c5067a471322c6bb866545e88e5b28c82511865" },
"coq_nvim": { "branch": "coq", "commit": "c6f4505074674c5d7fdd3afbbd6164323fe20fd7" },
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
"grapple.nvim": { "branch": "main", "commit": "8648afb68bbee59b06c6a66436d6a6083daa569b" },
"gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" },
"gruvboxed": { "branch": "mega", "commit": "93f07d7893f94d850c9dfb6ae16bf84f3813022f" },
"kanagawa.nvim": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" },
"lazy-lsp.nvim": { "branch": "master", "commit": "d341dd528ad6c2199ab20911ed6b56db43af6e3a" },
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
"nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" },
"nvim-hlslens": { "branch": "main", "commit": "c42b4526e6d83b904eb5f3d50e68d7c2fc4be4b5" },
"nvim-lspconfig": { "branch": "master", "commit": "f4619ab31fc4676001ea05ae8200846e6e7700c7" },
"nvim-tree.lua": { "branch": "master", "commit": "e508bdc4184c33c6d9705c503cf7f0e029601788" },
"nvim-treesitter": { "branch": "master", "commit": "c65413f2ac20d1d4b91fe4eb32d9d25525b34b83" },
"nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
"nvim-treesitter": { "branch": "master", "commit": "6e0b031ebb212e7082bc3007f8b9614cb393465c" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}
7 changes: 7 additions & 0 deletions lua/lazyLoader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ end
-- temp leader
vim.g.mapleader = ' '

-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

-- optionally enable 24-bit colour
vim.opt.termguicolors = true

-- loads all plugins
lazy.setup("plugins")

Expand Down
Empty file removed lua/lspLoader.lua
Empty file.
23 changes: 22 additions & 1 deletion lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ local key_mapper = function(mode, key, result)
)
end

-- No crutches allowed
-- EDITOR BINDS


-- VIM has no crutches
key_mapper('', '<up>', '<nop>')
key_mapper('', '<down>', '<nop>')
key_mapper('', '<left>', '<nop>')
Expand All @@ -20,3 +23,21 @@ key_mapper('i', 'jK', '<ESC>')
key_mapper('v', 'jk', '<ESC>')
key_mapper('v', 'JK', '<ESC>')
key_mapper('v', 'jK', '<ESC>')

-- Telescope Binds
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>fm', builtin.man_pages, {})
vim.keymap.set('n', '<leader>fc', builtin.colorscheme, {})
vim.keymap.set('n', '<leader>fs', builtin.spell_suggest, {})

-- nvim tree Binds
vim.keymap.set('n', '<leader>tt', "<Cmd>NvimTreeToggle<CR>", {silent = true})
vim.keymap.set('n', '<leader>tf', "<Cmd>NvimTreeFocus<CR>", {silent = true})
vim.keymap.set('n', '<leader>tc', "<Cmd>NvimTreeCollapse<CR>", {silent = true})
vim.keymap.set('n', '<leader>tl', "<Cmd>NvimTreeFindFile<CR>", {silent = true})

-- hlslens Binds
126 changes: 126 additions & 0 deletions lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
return {
{
"neovim/nvim-lspconfig",
},
{
"hrsh7th/cmp-nvim-lsp",
},
{
"hrsh7th/cmp-buffer",
},
{
"hrsh7th/cmp-path",
config = function()
require("cmp").setup {
sources = {
{
name="path",
option = {},
}
}
}
end
},
{
"hrsh7th/cmp-cmdline",
},
{
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")

cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
-- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
end,
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
})
})

-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
}, {
{ name = 'buffer' },
})
})

-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})

-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})

-- Set up lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")

--[[ local lspconfig = require'lspconfig'
lspconfig.ccls.setup {
init_options = {
compilationDatabaseDirectory = "build";
index = {
threads = 0;
};
clang = {
excludeArgs = { "-frounding-math"} ;
};
}
} ]]--

-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
require('lspconfig')['ccls'].setup {
init_options = {
compilationDatabaseDirectory = "build";
index = {
threads = 0;
};
clang = {
excludeArgs = { "-frounding-math"} ;
};
}
}


end
}
}
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions lua/plugins/glow.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
{
"ellisonleao/glow.nvim",
config = true,
cmd = "Glow",
}
}
6 changes: 6 additions & 0 deletions lua/plugins/grapple.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
"cbochs/grapple.nvim",
dependencies = {
{ "nvim-tree/nvim-web-devicons", lazy = true }
},
}
8 changes: 8 additions & 0 deletions lua/plugins/hlslens.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
{
"kevinhwang91/nvim-hlslens",
config = function()
require("hlslens").setup({})
end
}
}
File renamed without changes.
26 changes: 26 additions & 0 deletions lua/plugins/luaSnip.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
return {
{
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
"saadparwaiz1/cmp_luasnip",
config = function ()
require'cmp'.setup {
snippet = {
expand = function(args)
require'luasnip'.lsp_expand(args.body)
end
},

sources = {
{ name = 'luasnip' },
-- more sources
},
}
end
}
}
62 changes: 62 additions & 0 deletions lua/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
return {
{
'nvim-lualine/lualine.nvim',
config = function()
local colors = {
blue = '#80a0ff',
cyan = '#79dac8',
black = '#080808',
white = '#c6c6c6',
red = '#ff5189',
violet = '#d183e8',
grey = '#303030',
}
local bubbles_theme = {
normal = {
a = { fg = colors.black, bg = colors.grey },
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.white },
},

insert = { a = { fg = colors.black, bg = colors.red } },
visual = { a = { fg = colors.black, bg = colors.blue } },
replace = { a = { fg = colors.black, bg = colors.cyan } },

inactive = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.black },
c = { fg = colors.white },
},
}
require('lualine').setup {
options = {
theme = bubbles_theme,
component_separators = '',
section_separators = { left = '', right = '' },
},
sections = {
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
lualine_b = { 'filename', 'branch' },
lualine_c = {
'%=', --[[ add your center compoentnts here in place of this comment ]]
},
lualine_x = {},
lualine_y = { 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
}
end
}
}
2 changes: 1 addition & 1 deletion lua/plugins/presence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ return {
event = "BufEnter",
config = function()
require("presence").setup({
neovim_image_text = "I can't close this help",
neovim_image_text = "I can't close vim help",
main_image = "file",
debounce_timeout = 5,
editing_text = "Editing %s",
Expand Down
Loading

0 comments on commit a961250

Please sign in to comment.