Refactor directory structure
This commit is contained in:
parent
b9d1194133
commit
82abe92d8b
8 changed files with 41 additions and 9 deletions
|
@ -1,10 +1,10 @@
|
||||||
require 'autocmd'
|
require 'autocmd'
|
||||||
require 'keybinds'
|
require 'keybinds'
|
||||||
require 'pluginmanager'
|
|
||||||
require 'settings'
|
require 'settings'
|
||||||
|
require 'pluginmanager'
|
||||||
|
|
||||||
-- Plugin configurations
|
-- Plugin configurations
|
||||||
require 'plugins/airline'
|
--require 'pluginconf.airline'
|
||||||
require 'plugins/lsp'
|
require 'pluginconf.completion'
|
||||||
require 'plugins/nerdtree'
|
require 'pluginconf.lsp'
|
||||||
require 'plugins/treesitter'
|
require 'pluginconf.treesitter'
|
||||||
|
|
|
@ -9,3 +9,7 @@ map('n', '<C-t>', '<cmd>NERDTreeToggle<CR>')
|
||||||
-- FZF
|
-- FZF
|
||||||
map('n', '<C-f>', '<cmd>Files<CR>')
|
map('n', '<C-f>', '<cmd>Files<CR>')
|
||||||
map('n', '<C-g>', '<cmd>Rg<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>"')
|
||||||
|
|
3
home/.config/nvim/lua/pluginconf/completion.lua
Normal file
3
home/.config/nvim/lua/pluginconf/completion.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
local o = vim.o
|
||||||
|
|
||||||
|
o.completeopt = 'menuone,noinsert,noselect'
|
29
home/.config/nvim/lua/pluginconf/lsp.lua
Normal file
29
home/.config/nvim/lua/pluginconf/lsp.lua
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
vim.cmd "autocmd BufEnter * lua require'completion'.on_attach()"
|
|
|
@ -1,3 +0,0 @@
|
||||||
local cmd = vim.cmd
|
|
||||||
|
|
||||||
require'lspconfig'.rust_analyzer.setup {}
|
|
Loading…
Add table
Add a link
Reference in a new issue