Merge branch 'dev' into logos
update lua LSP update nvim config
This commit is contained in:
commit
dca71a5a78
@ -12,13 +12,6 @@ require("statusline") -- ./lua/statusline.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
|
||||
require("plugin.compe") -- ./lua/plugin/compe.lua
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
-- License : GPLv3
|
||||
-- Description : neovim lsp config file
|
||||
|
||||
local lsp = {}
|
||||
|
||||
vim.fn.sign_define(
|
||||
"LspDiagnosticsSignError",
|
||||
{
|
||||
@ -63,3 +65,11 @@ vim.lsp.protocol.CompletionItemKind = {
|
||||
" ", -- Operator
|
||||
" ", -- TypeParameter
|
||||
}
|
||||
|
||||
function lsp.setup()
|
||||
local ft = vim.bo.filetype
|
||||
if ft == "cpp" then ft = "c" end
|
||||
require("lsp." .. ft) -- ./<ft>.lua
|
||||
end
|
||||
|
||||
return lsp
|
||||
|
@ -34,12 +34,15 @@ return require("packer").startup(function()
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"},
|
||||
opt = true,
|
||||
cmd = {"Telescope"}
|
||||
cmd = "Telescope"
|
||||
}
|
||||
|
||||
-- LSP
|
||||
use "neovim/nvim-lspconfig"
|
||||
use {
|
||||
"neovim/nvim-lspconfig",
|
||||
ft = { "c", "cpp", "lua", "python", "tex"},
|
||||
config = function() require("lsp").setup() end
|
||||
}
|
||||
|
||||
-- auto completion
|
||||
use "hrsh7th/nvim-compe"
|
||||
@ -47,8 +50,7 @@ return require("packer").startup(function()
|
||||
-- display colors directly in editor
|
||||
use {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
opt = true,
|
||||
cmd = {"ColorizerToggle"}
|
||||
cmd = "ColorizerToggle"
|
||||
}
|
||||
|
||||
end)
|
||||
|
@ -19,6 +19,7 @@ opt.wildoptions = "pum"
|
||||
g.loaded_netrw = 1 -- disable netrw
|
||||
|
||||
-- editor
|
||||
opt.lazyredraw = true
|
||||
opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
opt.scrolloff = 4
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9889dc0d1c9673575ebbfa62f3d47d59d0ff8664
|
||||
Subproject commit 8bd3d0987af29c71f5e6bfa884936dc99aa58293
|
Reference in New Issue
Block a user