mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 03:37:10 -04:00
add neovim stuffs
This commit is contained in:
parent
8440966ad8
commit
b278df15c2
3
.config/nvim/ftplugin/go.lua
Normal file
3
.config/nvim/ftplugin/go.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
vim.opt_local.expandtab = false
|
||||||
|
vim.opt_local.tabstop = 4
|
||||||
|
vim.opt_local.shiftwidth = 4
|
3
.config/nvim/ftplugin/lua.lua
Normal file
3
.config/nvim/ftplugin/lua.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.softtabstop = 2
|
||||||
|
vim.opt_local.shiftwidth = 2
|
3
.config/nvim/ftplugin/sh.lua
Normal file
3
.config/nvim/ftplugin/sh.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.softtabstop = 4
|
||||||
|
vim.opt_local.shiftwidth = 4
|
24
.config/nvim/init.lua
Normal file
24
.config/nvim/init.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
'git',
|
||||||
|
'clone',
|
||||||
|
'--filter=blob:none',
|
||||||
|
'https://github.com/folke/lazy.nvim.git',
|
||||||
|
'--branch=stable',
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require('lazy').setup('plugins')
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format { async = false }
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
59
.config/nvim/lua/plugins/lsp.lua
Normal file
59
.config/nvim/lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
local servers = {
|
||||||
|
-- Lua
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
format = {
|
||||||
|
defaultConfig = {
|
||||||
|
quote_style = 'single'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- JSON
|
||||||
|
jsonls = {},
|
||||||
|
|
||||||
|
-- Shell
|
||||||
|
bashls = {
|
||||||
|
filetypes = { 'sh', 'zsh', }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Go
|
||||||
|
gopls = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
build = ':MasonUpdate',
|
||||||
|
config = function()
|
||||||
|
require('mason').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
config = function()
|
||||||
|
local servers_keys = {}
|
||||||
|
for k, _ in pairs(servers) do
|
||||||
|
table.insert(servers_keys, k)
|
||||||
|
end
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup {
|
||||||
|
ensure_installed = servers_keys
|
||||||
|
}
|
||||||
|
|
||||||
|
local lsp = require('lspconfig')
|
||||||
|
for server, params in pairs(servers) do
|
||||||
|
lsp[server].setup(params)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
14
.config/nvim/lua/plugins/ui.lua
Normal file
14
.config/nvim/lua/plugins/ui.lua
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
event = 'VeryLazy'
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'f-person/git-blame.nvim',
|
||||||
|
opts = {
|
||||||
|
highlight_group = 'NonText'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue