nvim
This commit is contained in:
parent
0a89e2b691
commit
61508d9d1d
6 changed files with 116 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
**/fish_variables
|
**/fish_variables
|
||||||
|
nvim/intelephense-license
|
||||||
|
|
19
nvim/ftplugin/php/decrypt_intelephense_key.lua
Normal file
19
nvim/ftplugin/php/decrypt_intelephense_key.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
local key_file_path = vim.fn.stdpath('config') .. '/intelephense-license'
|
||||||
|
local f = io.open(key_file_path, 'r')
|
||||||
|
|
||||||
|
if f ~= nil then
|
||||||
|
f:close()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.notify("Decrypting intelephense license key", vim.log.levels.INFO)
|
||||||
|
|
||||||
|
vim.system(
|
||||||
|
{ "gpg", "--decrypt", "--output", key_file_path, key_file_path .. ".asc" },
|
||||||
|
{ text = true },
|
||||||
|
function(out)
|
||||||
|
if out.code ~= 0 then
|
||||||
|
print("Failed to decrypt intelephense key: " .. out.stderr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
17
nvim/intelephense-license.asc
Normal file
17
nvim/intelephense-license.asc
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hQIMA1LKEUCQW24hAQ/6An1uPrFBkhCBc1QTZQa5f/p6cg2IJOgqK45wLg4d70hE
|
||||||
|
eBVhkSCc8+YhYFcYjrMJ7GicEXmUPwUvoK9PF22N4IVHwFpi37n32hnwGkVOJiA7
|
||||||
|
0PwiJJeWJx3X+d6anElPYXNEtvGhp0zPneVnl/2n7Vk4sTWzBwcpGK0kpeXX0jnP
|
||||||
|
kAkuQZeGJ6F0vyujkjPgAFAsLRC6OtcAvTotqblD0VB4npnauDRwTZ17Iu9OHesF
|
||||||
|
s1fwPGhdzdKtxgRWsJ6/vBEwA00Hwym38O0g1zfJNZZI56Ki5BA52EhJMJyo0fyR
|
||||||
|
JdXyZPsat/za5AMJwNvZ/Gh3xyb51pQALrLwa7TdjjzAVJYFMOakxSicdXcLP+JE
|
||||||
|
F+JINiSfjPuFYcfTkmIN/ZzzPMnZZ9sVzB3ThNAqjRiVy3x1gxJOuMP25E8lCGwv
|
||||||
|
YKkyH34fL+lsh6ReVQfWLsLsiAOYFxgmcB049cvRPiaK02jA6CtjFJUXVooGtcrU
|
||||||
|
/4l799BRZRG+AufpdDZTYS3i6mc0tMEitORB87Ig8NM/JAN57GHJrm9pzIUsZr+h
|
||||||
|
9eB3YtI8kQJ1JQMFRnUTJJ6CRJ1AZ0zdcDCPMfFtYgWaz/2ojVAFp28+emi7w17Y
|
||||||
|
+n6p3Vvsd1frRH+jgaMtX6RNmLOzhxuUmDPi1BFNCMHC+lbZam/v3CFQ7iEMu6nS
|
||||||
|
SgE0WsDoN6AzNEQMJakn9dlJVqDojZyBCaii4EQhlABBO9lht5ATq0Crn7ulMRUI
|
||||||
|
MRfKG9B99BWdqKqWsDj6CAoEUh9pzlSgVs4I
|
||||||
|
=J2ym
|
||||||
|
-----END PGP MESSAGE-----
|
74
nvim/lua/intelephense_stubs.lua
Normal file
74
nvim/lua/intelephense_stubs.lua
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
return {
|
||||||
|
"apache",
|
||||||
|
"bcmath",
|
||||||
|
"bz2",
|
||||||
|
"calendar",
|
||||||
|
"com_dotnet",
|
||||||
|
"Core",
|
||||||
|
"ctype",
|
||||||
|
"curl",
|
||||||
|
"date",
|
||||||
|
"dba",
|
||||||
|
"dom",
|
||||||
|
"enchant",
|
||||||
|
"exif",
|
||||||
|
"FFI",
|
||||||
|
"fileinfo",
|
||||||
|
"filter",
|
||||||
|
"fpm",
|
||||||
|
"ftp",
|
||||||
|
"gd",
|
||||||
|
"gettext",
|
||||||
|
"gmp",
|
||||||
|
"hash",
|
||||||
|
"iconv",
|
||||||
|
"imap",
|
||||||
|
"intl",
|
||||||
|
"json",
|
||||||
|
"ldap",
|
||||||
|
"libxml",
|
||||||
|
"mbstring",
|
||||||
|
"meta",
|
||||||
|
"mysqli",
|
||||||
|
"oci8",
|
||||||
|
"odbc",
|
||||||
|
"openssl",
|
||||||
|
"pcntl",
|
||||||
|
"pcre",
|
||||||
|
"PDO",
|
||||||
|
"pdo_ibm",
|
||||||
|
"pdo_mysql",
|
||||||
|
"pdo_pgsql",
|
||||||
|
"pdo_sqlite",
|
||||||
|
"pgsql",
|
||||||
|
"Phar",
|
||||||
|
"posix",
|
||||||
|
"pspell",
|
||||||
|
"readline",
|
||||||
|
"Reflection",
|
||||||
|
"session",
|
||||||
|
"shmop",
|
||||||
|
"SimpleXML",
|
||||||
|
"snmp",
|
||||||
|
"soap",
|
||||||
|
"sockets",
|
||||||
|
"sodium",
|
||||||
|
"SPL",
|
||||||
|
"sqlite3",
|
||||||
|
"standard",
|
||||||
|
"superglobals",
|
||||||
|
"sysvmsg",
|
||||||
|
"sysvsem",
|
||||||
|
"sysvshm",
|
||||||
|
"tidy",
|
||||||
|
"tokenizer",
|
||||||
|
"xml",
|
||||||
|
"xmlreader",
|
||||||
|
"xmlrpc",
|
||||||
|
"xmlwriter",
|
||||||
|
"xsl",
|
||||||
|
"wordpress",
|
||||||
|
"Zend OPcache",
|
||||||
|
"zip",
|
||||||
|
"zlib",
|
||||||
|
}
|
|
@ -4,8 +4,9 @@ return {
|
||||||
cmd = { "ConformInfo" },
|
cmd = { "ConformInfo" },
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
javascript = { "prettierd" },
|
javascript = { "prettierd", stop_after_first = true },
|
||||||
typescript = { "prettierd" },
|
typescript = { "prettierd", stop_after_first = true },
|
||||||
|
typescriptreact = { "prettierd", stop_after_first = true },
|
||||||
php = { "pint" }
|
php = { "pint" }
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
|
|
|
@ -107,11 +107,12 @@ local function config()
|
||||||
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||||
},
|
},
|
||||||
intelephense = {
|
intelephense = {
|
||||||
|
init_options = { licenceKey = vim.fn.stdpath("config") .. "/intelephense-license" },
|
||||||
settings = {
|
settings = {
|
||||||
intelephense = {
|
intelephense = {
|
||||||
files = { maxSize = 1000000000 },
|
files = { maxSize = 1000000000 },
|
||||||
format = { enable = false },
|
format = { enable = false },
|
||||||
stubs = { "apache", "bcmath", "bz2", "calendar", "com_dotnet", "Core", "ctype", "curl", "date", "dba", "dom", "enchant", "exif", "FFI", "fileinfo", "filter", "fpm", "ftp", "gd", "gettext", "gmp", "hash", "iconv", "imap", "intl", "json", "ldap", "libxml", "mbstring", "meta", "mysqli", "oci8", "odbc", "openssl", "pcntl", "pcre", "PDO", "pdo_ibm", "pdo_mysql", "pdo_pgsql", "pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection", "session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium", "SPL", "sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm", "tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", "wordpress", "Zend OPcache", "zip", "zlib", },
|
stubs = require "intelephense_stubs",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue