Enable language server for Svelte
This commit is contained in:
parent
23b5067b0a
commit
fb0efc7954
@ -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')
|
||||
|
8
dot_config/nvim/lua/lang/svelte.lua
Normal file
8
dot_config/nvim/lua/lang/svelte.lua
Normal 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" }
|
||||
}
|
@ -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')
|
||||
|
@ -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
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user