diff options
Diffstat (limited to 'config/essentials/nvim/lua/user')
-rw-r--r-- | config/essentials/nvim/lua/user/cmp/init.lua | 6 | ||||
-rw-r--r-- | config/essentials/nvim/lua/user/cmp/rust.lua | 173 |
2 files changed, 176 insertions, 3 deletions
diff --git a/config/essentials/nvim/lua/user/cmp/init.lua b/config/essentials/nvim/lua/user/cmp/init.lua index 1306e98..1ca0a10 100644 --- a/config/essentials/nvim/lua/user/cmp/init.lua +++ b/config/essentials/nvim/lua/user/cmp/init.lua @@ -4,12 +4,12 @@ require("user.cmp.arduino") require("user.cmp.bash") require("user.cmp.clangd") require("user.cmp.cs") -require("user.cmp.html") require("user.cmp.css") +require("user.cmp.emmet") +require("user.cmp.html") require("user.cmp.java") require("user.cmp.js") -require("user.cmp.emmet") require("user.cmp.lua") require("user.cmp.php") require("user.cmp.python") -require("user.cmp.cs") +require("user.cmp.rust") diff --git a/config/essentials/nvim/lua/user/cmp/rust.lua b/config/essentials/nvim/lua/user/cmp/rust.lua new file mode 100644 index 0000000..46a97eb --- /dev/null +++ b/config/essentials/nvim/lua/user/cmp/rust.lua @@ -0,0 +1,173 @@ +require'lspconfig'.rust_analyzer.setup{ + settings = { + ['rust-analyzer'] = { + diagnostics = { + enable = false; + } + } + }, + capabilities = + { + experimental = { + serverStatusNotification = true + }, + general = { + positionEncodings = { "utf-16" } + }, + textDocument = { + callHierarchy = { + dynamicRegistration = false + }, + codeAction = { + codeActionLiteralSupport = { + codeActionKind = { + valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } + } + }, + dataSupport = true, + dynamicRegistration = true, + isPreferredSupport = true, + resolveSupport = { + properties = { "edit" } + } + }, + completion = { + completionItem = { + commitCharactersSupport = false, + deprecatedSupport = false, + documentationFormat = { "markdown", "plaintext" }, + preselectSupport = false, + snippetSupport = false + }, + completionItemKind = { + valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } + }, + contextSupport = false, + dynamicRegistration = false + }, + declaration = { + linkSupport = true + }, + definition = { + dynamicRegistration = true, + linkSupport = true + }, + diagnostic = { + dynamicRegistration = false + }, + documentHighlight = { + dynamicRegistration = false + }, + documentSymbol = { + dynamicRegistration = false, + hierarchicalDocumentSymbolSupport = true, + symbolKind = { + valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } + } + }, + formatting = { + dynamicRegistration = true + }, + hover = { + contentFormat = { "markdown", "plaintext" }, + dynamicRegistration = true + }, + implementation = { + linkSupport = true + }, + inlayHint = { + dynamicRegistration = true, + resolveSupport = { + properties = {} + } + }, + publishDiagnostics = { + dataSupport = true, + relatedInformation = true, + tagSupport = { + valueSet = { 1, 2 } + } + }, + rangeFormatting = { + dynamicRegistration = true + }, + references = { + dynamicRegistration = false + }, + rename = { + dynamicRegistration = true, + prepareSupport = true + }, + semanticTokens = { + augmentsSyntaxTokens = true, + dynamicRegistration = false, + formats = { "relative" }, + multilineTokenSupport = false, + overlappingTokenSupport = true, + requests = { + full = { + delta = true + }, + range = false + }, + serverCancelSupport = false, + tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" }, + tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" } + }, + signatureHelp = { + dynamicRegistration = false, + signatureInformation = { + activeParameterSupport = true, + documentationFormat = { "markdown", "plaintext" }, + parameterInformation = { + labelOffsetSupport = true + } + } + }, + synchronization = { + didSave = true, + dynamicRegistration = false, + willSave = true, + willSaveWaitUntil = true + }, + typeDefinition = { + linkSupport = true + } + }, + window = { + showDocument = { + support = true + }, + showMessage = { + messageActionItem = { + additionalPropertiesSupport = false + } + }, + workDoneProgress = true + }, + workspace = { + applyEdit = true, + configuration = true, + didChangeWatchedFiles = { + dynamicRegistration = true, + relativePatternSupport = true + }, + inlayHint = { + refreshSupport = true + }, + semanticTokens = { + refreshSupport = true + }, + symbol = { + dynamicRegistration = false, + symbolKind = { + valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } + } + }, + workspaceEdit = { + resourceOperations = { "rename", "create", "delete" } + }, + workspaceFolders = true + } + } +} |