Not gook big commit...
This commit is contained in:
parent
f1b7a59595
commit
6829f75639
10 changed files with 162 additions and 61 deletions
37
conf/nvim/lua/plugins/cmp.lua
Normal file
37
conf/nvim/lua/plugins/cmp.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup {
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<S-Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
}
|
3
conf/nvim/lua/plugins/gitsigns.lua
Normal file
3
conf/nvim/lua/plugins/gitsigns.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
require('gitsigns').setup {
|
||||
keymaps = {}, -- NO default keybindings
|
||||
}
|
23
conf/nvim/lua/plugins/lsp.lua
Normal file
23
conf/nvim/lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- lsp installet
|
||||
--
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
|
||||
-- Register a handler that will be called for each installed server when it's
|
||||
-- ready (i.e. when installation is finished
|
||||
-- or if the server is already installed).
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {}
|
||||
|
||||
-- (optional) Customize the options passed to the server
|
||||
-- if server.name == "tsserver" then
|
||||
-- opts.root_dir = function() ... end
|
||||
-- end
|
||||
|
||||
-- This setup() function will take the provided server configuration and
|
||||
-- decorate it with the necessary properties before passing it onwards to
|
||||
-- lspconfig Refer to :
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
server:setup(opts)
|
||||
end)
|
29
conf/nvim/lua/plugins/lualine.lua
Normal file
29
conf/nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'base16',
|
||||
component_separators = { left = '|', right = '|'},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {}
|
||||
}
|
12
conf/nvim/lua/plugins/treesitter.lua
Normal file
12
conf/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
-- Tree sitter
|
||||
local ts = require 'nvim-treesitter.configs'
|
||||
|
||||
ts.setup {
|
||||
ensure_installed = 'maintained',
|
||||
sync_install = false,
|
||||
ignore_install = { 'erlang' },
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue