mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-04 01:55:08 +02:00
add support LspInstall where possible
This commit is contained in:
parent
36e9fdf69e
commit
f52a6870a7
13 changed files with 67 additions and 36 deletions
|
@ -1,2 +1,5 @@
|
|||
-- npm i -g bash-language-server
|
||||
require'lspconfig'.bashls.setup {on_attach = require'lsp'.common_on_attach}
|
||||
require'lspconfig'.bashls.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start"},
|
||||
on_attach = require'lsp'.common_on_attach
|
||||
}
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
-- npm install -g vscode-css-languageserver-bin
|
||||
require'lspconfig'.cssls.setup {on_attach = require'lsp'.common_on_attach}
|
||||
require'lspconfig'.cssls.setup {
|
||||
cmd = {
|
||||
"node", DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
|
||||
"--stdio"
|
||||
},
|
||||
on_attach = require'lsp'.common_on_attach
|
||||
}
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
-- npm install -g dockerfile-language-server-nodejs
|
||||
require'lspconfig'.dockerls.setup {on_attach = require'lsp'.common_on_attach}
|
||||
require'lspconfig'.dockerls.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
root_dir = vim.loop.cwd
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ local markdownPandocFormat = {formatCommand = 'pandoc -f markdown -t gfm -sp --t
|
|||
|
||||
require"lspconfig".efm.setup {
|
||||
-- init_options = {initializationOptions},
|
||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||
init_options = {documentFormatting = true, codeAction = false},
|
||||
filetypes = {"lua", "python", "javascriptreact", "javascript", "sh", "html", "css", "json", "yaml", "markdown"},
|
||||
settings = {
|
||||
|
|
|
@ -2,4 +2,8 @@
|
|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
require'lspconfig'.html.setup {on_attach = require'lsp'.common_on_attach, capabilities = capabilities}
|
||||
require'lspconfig'.html.setup {
|
||||
cmd = {"node", DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
-- npm install -g vscode-json-languageserver
|
||||
require'lspconfig'.jsonls.setup {
|
||||
cmd = {
|
||||
"node", DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
|
||||
"--stdio"
|
||||
},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
|
||||
end
|
||||
}
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
-- npm install -g vim-language-server
|
||||
require'lspconfig'.vimls.setup {on_attach = require'lsp'.common_on_attach}
|
||||
require'lspconfig'.vimls.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
-- npm install -g yaml-language-server
|
||||
require'lspconfig'.yamlls.setup{
|
||||
-- on_attach = require'lsp'.common_on_attach,
|
||||
cmd = {DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
}
|
||||
|
|
|
@ -23,9 +23,10 @@ require'compe'.setup {
|
|||
nvim_lua = {kind = " "},
|
||||
spell = {kind = " "},
|
||||
tags = false,
|
||||
snippets_nvim = {kind = " "},
|
||||
-- snippets_nvim = {kind = " "},
|
||||
-- ultisnips = {kind = " "},
|
||||
treesitter = {kind = " "},
|
||||
emoji = {kind = " ﲃ "}
|
||||
emoji = {kind = " ﲃ ", filetypes={"markdown"}}
|
||||
-- for emoji press : (idk if that in compe tho)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,11 +44,13 @@ return require('packer').startup(function(use)
|
|||
use 'ChristianChiarulli/java-snippets'
|
||||
use 'ChristianChiarulli/python-snippets'
|
||||
|
||||
|
||||
-- Treesitter
|
||||
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
|
||||
use 'nvim-treesitter/nvim-treesitter-refactor'
|
||||
use 'nvim-treesitter/playground'
|
||||
use 'p00f/nvim-ts-rainbow'
|
||||
use { 'lukas-reineke/indent-blankline.nvim', branch = 'lua'}
|
||||
|
||||
-- Icons
|
||||
use 'kyazdani42/nvim-web-devicons'
|
||||
|
@ -113,10 +115,8 @@ return require('packer').startup(function(use)
|
|||
use 'junegunn/goyo.vim'
|
||||
use 'andymass/vim-matchup'
|
||||
use 'windwp/nvim-autopairs'
|
||||
use 'blackcauldron7/surround.nvim'
|
||||
|
||||
-- TODO put this back when stable for indent lines
|
||||
use { 'lukas-reineke/indent-blankline.nvim', branch = 'lua'}
|
||||
-- vim.g.indent_blankline_space_char = ''
|
||||
-- use 'b3nj5m1n/kommentary'
|
||||
-- use {
|
||||
|
@ -129,7 +129,12 @@ return require('packer').startup(function(use)
|
|||
-- use 'mhinz/vim-startify'
|
||||
-- use 'cstrap/python-snippets'
|
||||
-- use 'ylcnfrht/vscode-python-snippet-pack'
|
||||
-- use 'SirVer/ultisnips'
|
||||
-- use 'norcalli/snippets.nvim'
|
||||
-- use {'akinsho/nvim-bufferline.lua', requires = 'kyazdani42/nvim-web-devicons'}
|
||||
-- use 'SirVer/ultisnips'
|
||||
-- use 'honza/vim-snippets'
|
||||
-- vim.g.UltiSnipsExpandTrigger="<CR>"
|
||||
-- vim.g.UltiSnipsJumpForwardTrigger="<Tab>"
|
||||
-- vim.g.UltiSnipsJumpBackwardTrigger="<S-Tab>"
|
||||
-- use 'blackcauldron7/surround.nvim'
|
||||
end)
|
||||
|
|
|
@ -3,6 +3,7 @@ vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|.
|
|||
vim.o.hidden = true -- Required to keep multiple buffers open multiple buffers
|
||||
vim.wo.wrap = false -- Display long lines as just one line
|
||||
vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
|
||||
vim.cmd('syntax on') -- move to next line with theses keys
|
||||
vim.o.pumheight = 10 -- Makes popup menu smaller
|
||||
vim.o.fileencoding = "utf-8" -- The encoding written to file
|
||||
vim.o.cmdheight = 2 -- More space for displaying messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue