fix sqls bug, add start.sh
This commit is contained in:
+5
-1
@@ -2,7 +2,7 @@
|
||||
-- https://github.com/mattn/efm-langserver
|
||||
return {
|
||||
init_options = { documentFormatting = true },
|
||||
filetypes = { 'python', 'json', 'css' },
|
||||
filetypes = { 'python', 'json', 'css', 'yaml' },
|
||||
settings = {
|
||||
rootMarkers = { ".git/" },
|
||||
languages = {
|
||||
@@ -15,6 +15,10 @@ return {
|
||||
{ formatCommand = "fixjson", formatStdin = true }
|
||||
|
||||
},
|
||||
-- yarn global add yaml-lint
|
||||
yaml = {
|
||||
{ formatCommand = "yamllint -f parsable -", formatStdin = true }
|
||||
},
|
||||
css = {
|
||||
-- yarn global add prettier
|
||||
{ formatCommand = "prettier --tab-width=4 ${--single-quote:singleQuote} --parser css", formatStdin = true }
|
||||
|
||||
@@ -35,6 +35,7 @@ local servers = {
|
||||
pyright = require "lsp.base",
|
||||
rust_analyzer = require "lsp.base",
|
||||
tailwindcss = require "lsp.tailwind",
|
||||
sqls = require "lsp.sql",
|
||||
efm = require "lsp.efm"
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env lua
|
||||
--
|
||||
-- sql.lua
|
||||
-- Copyright (C) 2022 veypi <i@veypi.com>
|
||||
--
|
||||
-- Distributed under terms of the Apache license.
|
||||
--
|
||||
|
||||
|
||||
|
||||
return {
|
||||
settings = {
|
||||
sqls = {
|
||||
connections = {
|
||||
{
|
||||
driver = 'mysql',
|
||||
dataSourceName = 'root:123456@tcp(127.0.0.1:3306)/test',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
on_attach = function(client)
|
||||
-- sqls there seem a bug when format file
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
client.resolved_capabilities.document_range_formatting = false
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
-- print(vim.inspect(client))
|
||||
end,
|
||||
}
|
||||
@@ -53,7 +53,6 @@ return require('packer').startup(function()
|
||||
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
|
||||
use 'ybian/smartim'
|
||||
|
||||
use 'aperezdc/vim-template'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user