mirror of
https://codeberg.org/frosty/init.lua.git
synced 2024-09-19 03:26:34 -04:00
regular update dunno
This commit is contained in:
parent
2ce35ffb6f
commit
22c59a447f
2
init.lua
2
init.lua
|
@ -1,9 +1,7 @@
|
|||
-- Call other files
|
||||
require('frosty.options')
|
||||
require('frosty.keymaps')
|
||||
require('frosty.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({
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = 250 })
|
||||
end
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = 250 })
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
callback = function()
|
||||
vim.lsp.buf.format()
|
||||
end
|
||||
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
|
||||
pattern = { 'lua' },
|
||||
callback = function()
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.tabstop = 2
|
||||
vim.o.expandtab = true
|
||||
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
|
||||
pattern = { 'sh', 'zsh' },
|
||||
callback = function()
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.tabstop = 4
|
||||
vim.o.expandtab = true
|
||||
end
|
||||
})
|
||||
|
|
|
@ -35,4 +35,9 @@ vim.keymap.set('n', '<leader>l', ':Lazy<CR>')
|
|||
vim.keymap.set('n', '<leader>gg', ':Neogit<CR>')
|
||||
vim.keymap.set('n', '<leader>gc', ':Neogit commit<CR>')
|
||||
|
||||
-- Alpha
|
||||
vim.keymap.set('n', '<leader>h', ':Alpha<CR>')
|
||||
|
||||
-- Visual block selection movement
|
||||
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv", { noremap = true })
|
||||
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv", { noremap = true })
|
||||
|
|
|
@ -2,5 +2,6 @@ vim.o.number = true
|
|||
vim.o.relativenumber = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.termguicolors = true
|
||||
vim.opt.showmode = false
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
vim.o.showmode = false
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.swapfile = false
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = { 'hrsh7th/cmp-nvim-lsp' },
|
||||
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim' },
|
||||
config = function()
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { 'lua_ls', 'rust_analyzer', 'bashls', 'gopls' }
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
|
@ -20,7 +25,10 @@ return {
|
|||
}
|
||||
})
|
||||
lspconfig['rust_analyzer'].setup({
|
||||
capabilities = capabilities,
|
||||
capabilities = capabilities
|
||||
})
|
||||
lspconfig['gopls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
lspconfig['bashls'].setup({
|
||||
capabilities = capabilities,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons', 'archibate/lualine-time' },
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
'NeogitOrg/neogit',
|
||||
tag = 'v0.0.1',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'sindrets/diffview.nvim', 'nvim-telescope/telescope.nvim' },
|
||||
config = true
|
||||
}
|
||||
|
|
|
@ -1,17 +1,27 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { 'rg', '--files', '--hidden', '-g', '!.git' }
|
||||
config = function()
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
n = {
|
||||
['q'] = actions.close
|
||||
}
|
||||
}
|
||||
},
|
||||
buffers = {
|
||||
show_all_buffers = true
|
||||
},
|
||||
mappings = {
|
||||
n = { ['q'] = require('telescope.actions').close },
|
||||
pickers = {
|
||||
find_files = {
|
||||
disable_devicons = true,
|
||||
find_command = { 'rg', '--files', '--hidden' }
|
||||
},
|
||||
buffers = {
|
||||
disable_devicons = true,
|
||||
show_all_buffers = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ return {
|
|||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
opts = {
|
||||
ensure_installed = { 'c', 'lua', 'vim', 'yaml', 'toml', 'markdown', 'vimdoc', 'bash', 'html', 'python', 'haskell', 'rust' },
|
||||
ensure_installed = { 'c', 'lua', 'vim', 'yaml', 'toml', 'markdown', 'vimdoc', 'bash', 'html', 'python', 'haskell', 'rust', 'go' },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
|
|
Loading…
Reference in a new issue