Merge branch 'dev' into logos

update lua LSP
update nvim config
This commit is contained in:
David JULIEN 2021-07-23 00:45:58 +02:00
commit dca71a5a78
No known key found for this signature in database
GPG Key ID: 4B388E8BD9D47382
5 changed files with 19 additions and 13 deletions

View File

@ -12,13 +12,6 @@ require("statusline") -- ./lua/statusline.lua
require("polyjuice") -- ~/.local/src/polyjuice/lua/polyjuice.lua require("polyjuice") -- ~/.local/src/polyjuice/lua/polyjuice.lua
-- LSP
require("lsp") -- ./lua/lsp/init.lua
require("lsp.c") -- ./lua/lsp/c.lua
require("lsp.lua") -- ./lua/lsp/lua.lua
require("lsp.python") -- ./lua/lsp/python.lua
require("lsp.tex") -- ./lua/lsp/python.lua
-- auto complete -- auto complete
require("plugin.compe") -- ./lua/plugin/compe.lua require("plugin.compe") -- ./lua/plugin/compe.lua

View File

@ -3,6 +3,8 @@
-- License : GPLv3 -- License : GPLv3
-- Description : neovim lsp config file -- Description : neovim lsp config file
local lsp = {}
vim.fn.sign_define( vim.fn.sign_define(
"LspDiagnosticsSignError", "LspDiagnosticsSignError",
{ {
@ -63,3 +65,11 @@ vim.lsp.protocol.CompletionItemKind = {
"", -- Operator "", -- Operator
"", -- TypeParameter "", -- TypeParameter
} }
function lsp.setup()
local ft = vim.bo.filetype
if ft == "cpp" then ft = "c" end
require("lsp." .. ft) -- ./<ft>.lua
end
return lsp

View File

@ -34,12 +34,15 @@ return require("packer").startup(function()
use { use {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
requires = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"}, requires = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"},
opt = true, cmd = "Telescope"
cmd = {"Telescope"}
} }
-- LSP -- LSP
use "neovim/nvim-lspconfig" use {
"neovim/nvim-lspconfig",
ft = { "c", "cpp", "lua", "python", "tex"},
config = function() require("lsp").setup() end
}
-- auto completion -- auto completion
use "hrsh7th/nvim-compe" use "hrsh7th/nvim-compe"
@ -47,8 +50,7 @@ return require("packer").startup(function()
-- display colors directly in editor -- display colors directly in editor
use { use {
"norcalli/nvim-colorizer.lua", "norcalli/nvim-colorizer.lua",
opt = true, cmd = "ColorizerToggle"
cmd = {"ColorizerToggle"}
} }
end) end)

View File

@ -19,6 +19,7 @@ opt.wildoptions = "pum"
g.loaded_netrw = 1 -- disable netrw g.loaded_netrw = 1 -- disable netrw
-- editor -- editor
opt.lazyredraw = true
opt.splitright = true opt.splitright = true
opt.splitbelow = true opt.splitbelow = true
opt.scrolloff = 4 opt.scrolloff = 4

@ -1 +1 @@
Subproject commit 9889dc0d1c9673575ebbfa62f3d47d59d0ff8664 Subproject commit 8bd3d0987af29c71f5e6bfa884936dc99aa58293