mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-12 10:24:43 +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
|
@ -151,6 +151,8 @@ To set up your particular debugger, look here:
|
|||
**HIGH PRIORITY**
|
||||
|
||||
Move user config into `config.lua`
|
||||
ts-comment string for react
|
||||
update lang-servers to use LspInstall
|
||||
|
||||
From here I will update for bug fixes and implement low priority
|
||||
features when I have time
|
||||
|
@ -159,7 +161,6 @@ features when I have time
|
|||
|
||||
- list all binaries needed for formatters and linters
|
||||
- add badges to readme
|
||||
- json config file (luajson)
|
||||
- Implement what I can from this java config:
|
||||
[link](https://github.com/mfussenegger/nvim-jdtls/wiki/Sample-Configurations)
|
||||
- better ui for code actions - formatting
|
||||
|
@ -172,10 +173,8 @@ features when I have time
|
|||
- what is `fzy`
|
||||
- https://github.com/pwntester/octo.nvim
|
||||
- configure surround
|
||||
- move to ultisnips
|
||||
- maybe incorporate ultisnips
|
||||
|
||||
**PLUGIN BUGS**
|
||||
|
||||
- html snippets are broken with vsnip
|
||||
- keep and eye on indent guides plugin for thin lines
|
||||
- better auto-import (jsx)
|
||||
|
|
|
@ -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,10 +1,15 @@
|
|||
-- 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})
|
||||
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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -o nounset # error when referencing undefined variable
|
||||
set -o errexit # exit when command fails
|
||||
|
||||
|
@ -60,8 +62,7 @@ installpynvim() {
|
|||
}
|
||||
|
||||
installpacker() {
|
||||
git clone https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
}
|
||||
|
||||
cloneconfig() {
|
||||
|
@ -133,7 +134,6 @@ which node >/dev/null && echo "node installed, moving on..." || asktoinstallnode
|
|||
# install pynvim
|
||||
pip3 list | grep pynvim >/dev/null && echo "pynvim installed, moving on..." || installpynvim
|
||||
|
||||
|
||||
if [ -a "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then
|
||||
echo 'packer already installed'
|
||||
else
|
||||
|
@ -149,8 +149,6 @@ else
|
|||
echo 'export PATH=$HOME/.config/nvcode/utils/bin:$PATH' >>~/.bashrc
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "I recommend you also install and activate a font from here: https://github.com/ryanoasis/nerd-fonts"
|
||||
|
||||
echo "I also recommend you add 'set preview_images_method ueberzug' to ~/.config/ranger/rc.conf"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue