1
0

Enable language server for Svelte

This commit is contained in:
Jip J. Dekker 2022-04-23 13:42:27 +10:00
parent 23b5067b0a
commit fb0efc7954
No known key found for this signature in database
GPG Key ID: 517DF4A00618C9C3
4 changed files with 14 additions and 5 deletions

View File

@ -70,6 +70,7 @@ return require('packer').startup(function(use)
require('lang.go')
require('lang.python')
require('lang.rust')
require('lang.svelte')
require('lang.tex')
require('lang.yaml')
require('lang.zinc')

View File

@ -0,0 +1,8 @@
local lsp_settings = require('support.lsp')
local nvim_lsp = require('lspconfig')
nvim_lsp.svelte.setup {
on_attach = lsp_settings.on_attach,
capabilities = lsp_settings.capabilites,
filetypes = { "javascript", "typescript", "svelte" }
}

View File

@ -83,10 +83,10 @@ vim.opt.smartindent = true
vim.opt.expandtab = false
-- Code Folding
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.opt.foldminlines = 5
vim.opt.foldnestmax = 2
-- vim.opt.foldmethod = 'expr'
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
-- vim.opt.foldminlines = 5
-- vim.opt.foldnestmax = 2
-- Save when lost focus
vim.cmd('au FocusLost * silent! wa')

View File

@ -38,7 +38,7 @@ end
local conf_treesitter = function()
require'nvim-treesitter.configs'.setup {
ensure_installed = 'maintained',
ensure_installed = 'all',
highlight = {
enable = true, -- false will disable the whole extension
},