so much stuff

This commit is contained in:
c 2023-01-10 13:58:14 -06:00
parent 191d1cd3ec
commit 9b3299e972
9 changed files with 293 additions and 113 deletions

View File

@ -0,0 +1,40 @@
-- Using this strictly to document for now. Actual mappings are in
-- lua/clint/keybindings.lua
local wk = require("which-key")
wk.register({
["<leader>"] = {
-- File related stuff
f = {
name = "+file",
f = "Find File",
s = "Live Search",
b = "File Browser (delete this?)",
},
-- Git related stuff
g = {
name = "+git",
g = "LazyGit",
f = "Git Files",
},
-- Misc
c = "Change Color Scheme",
y = "Yank to system clipboard",
Y = "Yank to system clipboard",
d = "Diagnostics",
e = "File Explorer",
s = "Find and Replace",
b = "Buffers",
h = "Registers",
o = "Object Explorer",
fo = "Format Current File",
-- LSP related stuff
r = "Rename Object",
K = "Hover",
gd = "Go to definition",
-- Debugging
B = "Set Breakpoint",
["<F5>"] = "Debug: Continue", -- this doesnt work
},
})

View File

@ -1,16 +1,4 @@
-- ├── init.lua
-- ├── ...
-- └── lua
-- ├── plugins
-- │ ├── init.lua
-- │ └── telescope.lua
-- └── clint
-- ├── init.lua
-- ├── lazy_bootstrap.lua
-- ├── maps.lua
-- └── options.lua
----------------------------------------------[[ Bootstrap Lazy ]]
vim.g.mapleader = '\\'
require("clint/lazy_bootstrap") -- bootstraps folke/lazy
@ -20,5 +8,9 @@ require("clint") -- loads lua/clint/init.lua
----------------------------------------------[[ Load Plugins ]]
require("lazy").setup("plugins") -- loads each lua/plugin/*
require("lazy").setup(
{
spec = "plugins",
install = { colorscheme = { "gruvbox", "habamax" } }
}
) -- loads each lua/plugin/*

View File

@ -2,7 +2,7 @@
vim.cmd("colorscheme gruvbox")
-- ignore background color for transparency
-- vim.cmd("highlight Normal guibg=none")
-- vim.cmd("highlight NonText guibg=none")
-- vim.cmd("highlight Normal ctermbg=none")
-- vim.cmd("highlight NonText ctermbg=none")
vim.cmd("highlight Normal guibg=none")
vim.cmd("highlight NonText guibg=none")
vim.cmd("highlight Normal ctermbg=none")
vim.cmd("highlight NonText ctermbg=none")

View File

@ -0,0 +1,6 @@
require("clint.keybindings")
require("clint.settings")
require("clint.colorscheme")
require("clint.lsp")
require("clint.statusline")
-- require("clint.debug")

View File

@ -34,8 +34,8 @@ keymap('n', '<space>', 'za', default_ops)
-- Telescope stuff
keymap('n', '<Leader>ff', ':Telescope find_files hidden=true<CR>', default_ops)
keymap('n', '<Leader>gf', ':Telescope git_files<CR>', default_ops)
keymap('n', '<Leader>lg', ':Telescope live_grep<CR>', default_ops)
keymap('n', '<Leader>fs', ':Telescope live_grep<CR>', default_ops)
keymap('n', '<Leader>fr', ':Telescope oldfiles<CR>', default_ops)
keymap('n', '<Leader>d', ':Telescope diagnostics<CR>', default_ops)
keymap('n', '<Leader>h', ':Telescope neoclip<CR>', default_ops)
keymap('n', '<Leader>b', ':Telescope buffers<CR>', default_ops)
@ -52,6 +52,8 @@ keymap("n", "<C-u>", "<C-u>zz", default_ops)
keymap("n", "n", "nzzzv", default_ops)
keymap("n", "N", "Nzzzv", default_ops)
keymap("n", "G", "Gzz", default_ops)
keymap("n", "{", "{zz", default_ops)
keymap("n", "}", "}zz", default_ops)
-- Yank to system clipboard
keymap("n", "<leader>y", [["+y]], default_ops)
@ -63,7 +65,15 @@ keymap("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
-- Git
keymap('n', '<Leader>gg', ':LazyGit<CR>', default_ops)
keymap('n', '<Leader>gf', ':Telescope git_files<CR>', default_ops)
-- File Explorer
keymap('n', '<Leader>e', ':NeoTreeFocusToggle<CR>', default_ops)
-- Object Explorer
keymap('n', '<Leader>o', ':SymbolsOutline<CR>', default_ops)
-- Debugging
keymap('n', '<Leader>B', ":lua require'dap'.toggle_breakpoint()<CR>", default_ops)
keymap('n', '<F5>', ":lua require'dap'.continue()<CR>", default_ops)
keymap('n', '<Leader>D', ":lua require'dapui'.toggle()<CR>", default_ops)

View File

@ -1,19 +1,19 @@
local cmp = require'cmp'
local cmp = require 'cmp'
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local on_attach = function()
vim.keymap.set("n", "K", vim.lsp.buf.hover, {buffer=0})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {buffer=0})
vim.keymap.set("n", "<Leader>r", vim.lsp.buf.rename, {buffer=0})
vim.keymap.set("n", "<Leader>fo", vim.lsp.buf.format, {buffer=0})
end
vim.keymap.set("n", "K", vim.lsp.buf.hover, { buffer = 0 })
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = 0 })
vim.keymap.set("n", "<Leader>r", vim.lsp.buf.rename, { buffer = 0 })
vim.keymap.set("n", "<Leader>fo", vim.lsp.buf.format, { buffer = 0 })
end
require'lspconfig'.pyright.setup{
require 'lspconfig'.pyright.setup {
capabilities = capabilities,
on_attach = on_attach
}
require'lspconfig'.sumneko_lua.setup{
require 'lspconfig'.sumneko_lua.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {
@ -50,32 +50,31 @@ cmp.setup({
}, {
{ name = 'buffer' },
})
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
-- 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(':', {
-- 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' }
})
})
})

View File

@ -1,5 +1 @@
require("lazy").setup({
"folke/which-key.nvim",
{ "folke/neoconf.nvim", cmd = "Neoconf" },
"folke/neodev.nvim",
})
-- can delete this i think

View File

@ -1,21 +0,0 @@
local M = {
'nvim-telescope/telescope.nvim', branch = '0.1.x',
dependencies = {
{'nvim-lua/plenary.nvim'}
},
cmd = { "Telescope", "Tel" }, -- lazy loads on these commands
keys = { "<leader>f" }, -- lazy loads on this pattern
}
function M.config()
local telescope = require("telescope")
telescope.setup({})
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, {})
end
return M

View File

@ -0,0 +1,158 @@
return {
--------------------
-- LSP
--------------------
{ "williamboman/mason.nvim" },
{ "williamboman/mason-lspconfig.nvim" },
{ 'neovim/nvim-lspconfig' },
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-nvim-lua' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
{ 'hrsh7th/nvim-cmp' },
{ 'saadparwaiz1/cmp_luasnip' },
-- Linter
{ 'jose-elias-alvarez/null-ls.nvim',
config = function()
local nls = require("null-ls")
nls.setup({
sources = {
nls.builtins.diagnostics.selene,
},
})
end,
},
-- Debugging
{ 'mfussenegger/nvim-dap' },
{ 'rcarriga/nvim-dap-ui', config = true },
{ "mfussenegger/nvim-dap-python", config = true },
--------------------
-- Color schemes
--------------------
{ 'ayu-theme/ayu-vim' },
{ 'morhetz/gruvbox' },
{ 'dikiaap/minimalist' },
{ 'jacoborus/tender.vim' },
{ 'jpo/vim-railscasts-theme' },
{ 'rainux/vim-desert-warm-256' },
{ 'ajmwagar/vim-deus' },
{ "rebelot/kanagawa.nvim" },
--------------------
-- Utility
--------------------
-- Git
{ 'kdheepak/lazygit.nvim' },
-- Sessions
{ "tpope/vim-obsession" },
-- SuperTab
{ 'ervandew/supertab' },
-- Vim-surround
{ 'tpope/vim-surround' },
-- Slime, for tmux repl-ing
{ 'jpalardy/vim-slime' },
-- Telescope, fuzzy finding
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-telescope/telescope.nvim' },
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
{ "nvim-telescope/telescope-file-browser.nvim" },
-- Treesitter
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
-- Registry history
{
"AckslD/nvim-neoclip.lua",
dependencies = {
{ 'kkharji/sqlite.lua', module = 'sqlite' },
{ 'nvim-telescope/telescope.nvim' },
},
config = {
enable_persistent_history = true,
continuous_sync = true
},
},
-- Auto pairs
{ "windwp/nvim-autopairs", config = true }, -- See `config` under https://github.com/folke/lazy.nvim#-plugin-spec
-- Comment / uncomment
{ "numToStr/Comment.nvim", config = true },
-- Git Repo Telescope
{ 'cljoly/telescope-repo.nvim' },
-- Which-Key
{
"folke/which-key.nvim",
config = true,
},
-- File Explorer
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
},
-- Object Explorer
{ 'simrat39/symbols-outline.nvim',
config = {
auto_preview = true,
}
},
--------------------
-- Aesthetics
--------------------
-- airline
{ 'nvim-lualine/lualine.nvim' },
-- Devicons
{ 'kyazdani42/nvim-web-devicons' },
-- Indent lines
{ "lukas-reineke/indent-blankline.nvim" },
-- Cursor line
{ 'yamatsum/nvim-cursorline',
config =
{
cursorline = {
enable = true,
timeout = 0,
number = true,
},
cursorword = {
enable = false,
}
}
},
-- Greeter
{
'goolord/alpha-nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
-- config = function(},
-- require 'alpha'.setup(require 'alpha.themes.startify'.config},
-- end
},
}