2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-17 09:25:52 +00:00

Starting out with lsp-s

This commit is contained in:
Steffen Rademacker 2021-12-02 11:10:41 +01:00
parent b66369d5f0
commit ca0ff9c843
4 changed files with 33 additions and 19 deletions

View File

@ -13,6 +13,10 @@ ln -s ~/dotfiles/tmux.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
sh -c 'curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' sh -c 'curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# additional language-servers for nvim-lspconfig
npm i -g vscode-langservers-extracted
npm i -g stylelint-lsp
vim +PlugInstall vim +PlugInstall
vim +CocInstall\ coc-calc\ coc-css\ coc-eslint\ coc-html\ coc-json\ coc-markdownlint\ coc-pairs\ coc-phpls\ coc-snippets\ coc-stylelintplus\ coc-tsserver\ coc-yaml\ coc-yank vim +CocInstall\ coc-calc\ coc-css\ coc-eslint\ coc-html\ coc-json\ coc-markdownlint\ coc-pairs\ coc-phpls\ coc-snippets\ coc-stylelintplus\ coc-tsserver\ coc-yaml\ coc-yank
vim +TSInstall\ bash\ comment\ css\ dockerfile\ graphql\ html\ javascript\ jsdoc\ json\ jsonc\ lua\ php\ python\ regex\ scss\ tsx\ typescript\ vue\ yaml vim +TSInstall\ bash\ comment\ css\ dockerfile\ graphql\ html\ javascript\ jsdoc\ json\ jsonc\ lua\ php\ python\ regex\ scss\ tsx\ typescript\ vue\ yaml

View File

@ -1,7 +1,6 @@
// Installed extensions are: // Installed extensions are:
//////////////////////////// ////////////////////////////
// coc-calc // coc-calc
// coc-css
// coc-eslint8 // -- fall back to non-8 when supported offically // coc-eslint8 // -- fall back to non-8 when supported offically
// coc-html // coc-html
// coc-json // coc-json
@ -9,7 +8,6 @@
// coc-pairs // coc-pairs
// coc-phpls // coc-phpls
// coc-snippets // coc-snippets
// coc-stylelintplus
// coc-tsserver // coc-tsserver
// coc-yaml // coc-yaml
// coc-yank // coc-yank
@ -23,17 +21,9 @@
], ],
// linters config // linters config
"eslint.autoFixOnSave": true, "eslint.autoFixOnSave": true,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"wxss.validate": false,
"javascript.format.enabled": false, "javascript.format.enabled": false,
"javascript.validate.enable": false, "javascript.validate.enable": false,
"typescript.format.enabled": false, "typescript.format.enabled": false,
"stylelintplus.autoFixOnSave": true,
"stylelintplus.filetypes": [
"scss"
],
"suggest.minTriggerInputLength": 3, "suggest.minTriggerInputLength": 3,
"suggest.noselect": false, "suggest.noselect": false,
"suggest.enablePreselect": true, "suggest.enablePreselect": true,

View File

@ -8,6 +8,7 @@ Plug 'editorconfig/editorconfig-vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', { 'branch': 'release' } Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lualine/lualine.nvim' Plug 'nvim-lualine/lualine.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'tpope/vim-apathy' Plug 'tpope/vim-apathy'

View File

@ -1,21 +1,40 @@
" treesitter
lua << EOF lua << EOF
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
highlight = { highlight = {
enable = true enable = true,
}, },
indent = { indent = {
enable = true enable = true,
} },
}) })
EOF
" lualine
lua << EOF
require('lualine').setup({ require('lualine').setup({
options = { options = {
theme = 'nightfox' theme = 'nightfox',
} },
})
require('lspconfig').stylelint_lsp.setup({
settings = {
stylelintplus = {
-- TODO why this not working?!
autoFixOnFormat = true,
autoFixOnSave = true,
validateOnSave = true,
},
},
})
require('lspconfig').cssls.setup({
filetypes = { 'css', 'scss' },
settings = {
css = {
validate = false,
},
scss = {
validate = false,
},
},
}) })
EOF EOF