Refactor directory structure

This commit is contained in:
Marko Korhonen 2021-01-30 22:52:22 +02:00
parent b9d1194133
commit 82abe92d8b
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5
8 changed files with 41 additions and 9 deletions

View file

@ -1,10 +1,10 @@
require 'autocmd'
require 'keybinds'
require 'pluginmanager'
require 'settings'
require 'pluginmanager'
-- Plugin configurations
require 'plugins/airline'
require 'plugins/lsp'
require 'plugins/nerdtree'
require 'plugins/treesitter'
--require 'pluginconf.airline'
require 'pluginconf.completion'
require 'pluginconf.lsp'
require 'pluginconf.treesitter'

View file

@ -9,3 +9,7 @@ map('n', '<C-t>', '<cmd>NERDTreeToggle<CR>')
-- FZF
map('n', '<C-f>', '<cmd>Files<CR>')
map('n', '<C-g>', '<cmd>Rg<CR>')
-- Completion
map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"')
map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<S-Tab>"')

View file

@ -0,0 +1,3 @@
local o = vim.o
o.completeopt = 'menuone,noinsert,noselect'

View file

@ -0,0 +1,29 @@
require'lspconfig'.rust_analyzer.setup {
on_attach = require'completion'.on_attach
}
local sumneko_binary = '/usr/bin/lua-language-server'
require'lspconfig'.sumneko_lua.setup {
cmd = {sumneko_binary},
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';')
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'}
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
}
}
}
}
}

View file

@ -1 +0,0 @@
vim.cmd "autocmd BufEnter * lua require'completion'.on_attach()"

View file

@ -1,3 +0,0 @@
local cmd = vim.cmd
require'lspconfig'.rust_analyzer.setup {}