Restructure nvim lua files
This commit is contained in:
parent
0ba189421c
commit
95cb7147ed
6 changed files with 28 additions and 9 deletions
20
vim/lua/lsp/setup.lua
Normal file
20
vim/lua/lsp/setup.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
local config = require 'lspconfig'
|
||||
|
||||
config.lua_ls.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
||||
config.zls.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
||||
config.standardrb.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
||||
config.clangd.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
||||
config.solargraph.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
||||
config.denols.setup {
|
||||
on_attach = require 'lsp.attach'
|
||||
}
|
|
@ -1,7 +1,10 @@
|
|||
local function use(plugins)
|
||||
return require('packer').startup(function(use)
|
||||
for _, plugin in ipairs(plugins) do
|
||||
use(plugin)
|
||||
local success, message = pcall(use, plugin)
|
||||
if not success then
|
||||
print(message)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
@ -17,7 +20,7 @@ use {
|
|||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
};
|
||||
config = require 'neo-tree-setup';
|
||||
config = require 'pack.setup.neotree';
|
||||
};
|
||||
{ 'jinh0/eyeliner.nvim', config = function()
|
||||
require('eyeliner').setup {
|
||||
|
@ -30,7 +33,7 @@ use {
|
|||
'pigpigyyy/Yuescript-vim';
|
||||
'vim-scripts/openscad.vim';
|
||||
'ziglang/zig.vim';
|
||||
-- Colour Schemes
|
||||
-- Colour Schemes
|
||||
'AlessandroYorba/Alduin';
|
||||
'AlessandroYorba/Sierra';
|
||||
'DarkWiiPlayer/papercolor-theme';
|
|
@ -1,5 +1 @@
|
|||
lua require('lspconfig').lua_ls.setup{ on_attach = require 'on_lsp_attach' }
|
||||
lua require('lspconfig').zls.setup{ on_attach = require 'on_lsp_attach' }
|
||||
lua require('lspconfig').standardrb.setup{ on_attach = require 'on_lsp_attach' }
|
||||
lua require('lspconfig').clangd.setup{ on_attach = require 'on_lsp_attach' }
|
||||
lua require('lspconfig').solargraph.setup{ on_attach = require 'on_lsp_attach' }
|
||||
lua require 'lsp.setup'
|
||||
|
|
2
vimrc
2
vimrc
|
@ -6,7 +6,7 @@ set runtimepath=$VIMRUNTIME,$HOME/.config/nvim,$HOME/.vim
|
|||
let &rtp=&rtp.','.expand('<sfile>:p:h').'/vim'
|
||||
|
||||
if has("nvim")
|
||||
lua pcall(require, "plugins")
|
||||
lua require("pack/setup")
|
||||
end
|
||||
|
||||
set nocompatible
|
||||
|
|
Loading…
Reference in a new issue