mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 03:37:10 -04:00
remove neovim, move to separate repo
This commit is contained in:
parent
998da4a3e9
commit
d166dafb08
|
@ -1,20 +0,0 @@
|
|||
-- Call other files
|
||||
require('options')
|
||||
require('keymaps')
|
||||
require('autocmds')
|
||||
|
||||
-- Initialize Lazy
|
||||
local lazy_path = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
if not (vim.uv or vim.loop).fs_stat(lazy_path) then
|
||||
vim.fn.system({
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
'--branch=stable',
|
||||
lazy_path
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazy_path)
|
||||
|
||||
require('lazy').setup({ spec = 'plugins' })
|
|
@ -1,29 +0,0 @@
|
|||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = 250 })
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
callback = function()
|
||||
vim.lsp.buf.format()
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'lua' },
|
||||
callback = function()
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.tabstop = 2
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'sh', 'zsh' },
|
||||
callback = function()
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.tabstop = 4
|
||||
end
|
||||
})
|
|
@ -1,38 +0,0 @@
|
|||
-- Set leader
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
-- Unset keymaps
|
||||
vim.keymap.set('n', '<Space>', '<Nop>')
|
||||
vim.keymap.set('n', 'Q', '<nop>')
|
||||
vim.keymap.set('n', 'q', '<nop>')
|
||||
|
||||
-- File management
|
||||
vim.keymap.set('n', '<leader>pf', '<Cmd>Telescope find_files<CR>')
|
||||
vim.keymap.set('n', '<leader>po', '<Cmd>Telescope oldfiles<CR>')
|
||||
vim.keymap.set('n', '<leader>pg', '<Cmd>Telescope live_grep<CR>')
|
||||
vim.keymap.set('n', '<leader>pe', '<Cmd>Ex<CR>')
|
||||
|
||||
-- Other Telescope commands
|
||||
vim.keymap.set('n', '<leader>pS', '<Cmd>Telescope search_history<CR>')
|
||||
vim.keymap.set('n', '<leader>ph', '<Cmd>Telescope command_history<CR>')
|
||||
|
||||
-- Buffer management
|
||||
vim.keymap.set('n', '<leader>pr', '<Cmd>Telescope buffers<CR>')
|
||||
vim.keymap.set('n', '<leader>ww', '<Cmd>bd<CR>')
|
||||
vim.keymap.set('n', '<leader>wW', '<Cmd>bd!<CR>')
|
||||
vim.keymap.set('n', '<leader>n', '<Cmd>enew<CR>')
|
||||
vim.keymap.set('n', '<Tab>', '<Cmd>bnext<CR>')
|
||||
vim.keymap.set('n', '<S-Tab>', '<Cmd>bprev<CR>')
|
||||
|
||||
-- File actions
|
||||
vim.keymap.set('n', '<leader>r', '<Cmd>w<CR>')
|
||||
vim.keymap.set('n', '<leader>R', '<Cmd>e $MYVIMRC<CR>')
|
||||
|
||||
-- Lazy
|
||||
vim.keymap.set('n', '<leader>l', '<Cmd>Lazy<CR>')
|
||||
|
||||
-- Neogit
|
||||
vim.keymap.set('n', '<leader>gg', '<Cmd>Neogit<CR>')
|
||||
vim.keymap.set('n', '<leader>gc', '<Cmd>Neogit commit<CR>')
|
||||
|
||||
vim.keymap.set('n', '<leader>h', '<Cmd>Alpha<CR>')
|
|
@ -1,6 +0,0 @@
|
|||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.termguicolors = true
|
||||
vim.opt.showmode = false
|
||||
vim.opt.clipboard = 'unnamedplus'
|
|
@ -1,198 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
lspconfig['lua_ls'].setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
defaultConfig = { quote_style = 'single' }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
lspconfig['rust_analyzer'].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig['bashls'].setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
filetypes = { 'sh', 'zsh' }
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = { 'neovim/nvim-lspconfig', 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' },
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
priority = 1000,
|
||||
init = function()
|
||||
vim.o.background = 'dark'
|
||||
vim.cmd('colorscheme gruvbox')
|
||||
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = 'ibl',
|
||||
opts = {
|
||||
scope = {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons', 'archibate/lualine-time' },
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
section_separators = '',
|
||||
component_separators = ''
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'goolord/alpha-nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local alpha = require('alpha')
|
||||
local dashboard = require('alpha.themes.dashboard')
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button('SPC p f', 'Find files'),
|
||||
dashboard.button('SPC p o', 'Recent files'),
|
||||
dashboard.button('SPC p e', 'File explorer'),
|
||||
dashboard.button('SPC p g', 'File grep'),
|
||||
dashboard.button('SPC l', 'Lazy'),
|
||||
dashboard.button('Z Q', 'Quit')
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
vim.cmd('autocmd FileType alpha setlocal nofoldenable')
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
opts = {
|
||||
ensure_installed = { 'c', 'lua', 'vim', 'yaml', 'toml', 'markdown', 'vimdoc', 'bash', 'html', 'python', 'haskell', 'rust' },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { 'rg', '--files', '--hidden', '-g', '!.git' }
|
||||
},
|
||||
buffers = {
|
||||
show_all_buffers = true
|
||||
},
|
||||
mappings = {
|
||||
n = { ['q'] = require('telescope.actions').close },
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
signs = false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
'NeogitOrg/neogit',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'sindrets/diffview.nvim', 'nvim-telescope/telescope.nvim' },
|
||||
config = true
|
||||
}
|
||||
}
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
/.config/service/*/supervise
|
||||
/.config/nvim/lazy-lock.json
|
||||
|
|
Loading…
Reference in a new issue