# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-09-25 18:20+0300\n" "PO-Revision-Date: 2025-08-02 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Yaml Front Matter Hash Value: description #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:1 #, no-wrap msgid "Use Language Servers for development in the FreeBSD src tree to get precise go-to-definition and completion results." msgstr "Используйте языковые серверы для разработки в дереве исходного кода FreeBSD, чтобы получать точные результаты при переходах к определениям функций и переменных и при автодополнениях." #. type: Title = #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:1 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:13 #, no-wrap msgid "Use Language Servers for Development in the FreeBSD Src Tree" msgstr "Использование разработчиками языковых серверов в дереве исходного кода FreeBSD" #. type: Title == #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:47 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:50 msgid "" "This guide is about setting up a FreeBSD src tree with language servers " "performing source code indexing. The guide describes the steps for Vim/" "NeoVim and VSCode. If you use a different text editor you can use this guide " "as a reference and search the equivalent commands for your preferred editor." msgstr "" "Это руководство посвящено настройке дерева исходных кодов FreeBSD с " "использованием языковых серверов для индексации исходного кода. В " "руководстве описаны шаги для Vim/NeoVim и VSCode. Если вы используете другой " "текстовый редактор, вы можете использовать это руководство в качестве " "справочника и найти эквивалентные команды для вашего любимого редактора." #. type: Title == #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:52 #, no-wrap msgid "Requirements" msgstr "Требования" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:55 msgid "" "In order to follow this guide we need to install certain requirements. We " "need a Language server, `ccls` or `clangd`, and optionally a compilation " "database." msgstr "" "Для следования этому руководству необходимо установить определённые " "требования. Нам понадобится языковой сервер, `ccls` или `clangd`, а также, " "опционально, база данных компиляции." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:57 msgid "" "The installation of the Language server can be performed via `pkg` or via " "ports. If we chose `clangd` we need to install `llvm`." msgstr "" "Установка языкового сервера может быть выполнена через `pkg` или через " "порты. Если мы выберем `clangd`, нам нужно установить `llvm`." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:59 msgid "Using `pkg` to install `ccls`:" msgstr "Использование `pkg` для установки `ccls`:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:63 #, no-wrap msgid "# pkg install ccls\n" msgstr "# pkg install ccls\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:66 msgid "" "If we want to use `clangd` we need to install `llvm` (The example command " "uses `llvm15` but choose the version you desire):" msgstr "" "Если мы хотим использовать `clangd`, нам необходимо установить `llvm` (в " "примере команды используется `llvm15`, но вы можете выбрать нужную версию):" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:70 #, no-wrap msgid "# pkg install llvm15\n" msgstr "# pkg install llvm15\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:73 msgid "" "To install via ports choose a favorite combination of tools from each " "category below:" msgstr "" "Для установки через порты выберите предпочтительную комбинацию инструментов " "из каждой категории ниже:" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:75 msgid "Language server implementations" msgstr "Реализации языковых серверов" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:76 msgid "package:devel/ccls[]" msgstr "package:devel/ccls[]" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:77 msgid "" "package:devel/llvm12[] (Other versions are okay, but newer is better. " "Replace `clangd12` with clangdN in case other versions are used.)" msgstr "" "package:devel/llvm12[] (Другие версии также подходят, но чем новее, тем " "лучше. Замените `clangd12` на clangdN в случае использования других версий.)" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:78 msgid "Editors" msgstr "Редакторы" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:79 msgid "package:editors/vim[]" msgstr "package:editors/vim[]" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:80 msgid "package:editors/neovim[]" msgstr "package:editors/neovim[]" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:81 msgid "package:editors/vscode[]" msgstr "package:editors/vscode[]" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:82 msgid "Compilation database generator" msgstr "Генератор базы данных компиляции" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:83 msgid "package:devel/python[] (For llvm's scan-build-py implementation)" msgstr "package:devel/python[] (Для реализации scan-build-py из llvm)" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:84 msgid "package:devel/py-pip[] (For rizsotto's scan-build implementation)" msgstr "package:devel/py-pip[] (Для реализации scan-build от rizsotto)" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:85 msgid "package:devel/bear[]" msgstr "package:devel/bear[]" #. type: Title == #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:87 #, no-wrap msgid "Editor settings" msgstr "Настройки редактора" #. type: Title === #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:90 #, no-wrap msgid "Vim/Neovim" msgstr "Vim/Neovim" #. type: Title ==== #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:92 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:178 #, no-wrap msgid "LSP client plugins" msgstr "Плагины клиента LSP" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:96 msgid "" "The built-in plugin manager is used for both editors in this example. The " "LSP client plugin used is link:https://github.com/prabirshrestha/vim-" "lsp[prabirshrestha/vim-lsp]." msgstr "" "Встроенный менеджер плагинов используется для обоих редакторов в этом " "примере. Плагин LSP-клиента, который используется, — это link:https://" "github.com/prabirshrestha/vim-lsp[prabirshrestha/vim-lsp]." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:98 msgid "To set up the LSP client plugin for Neovim:" msgstr "Для настройки клиентского плагина LSP для Neovim:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:103 #, no-wrap msgid "" "# mkdir -p ~/.config/nvim/pack/lsp/start\n" "# git clone https://github.com/prabirshrestha/vim-lsp ~/.config/nvim/pack/lsp/start/vim-lsp\n" msgstr "" "# mkdir -p ~/.config/nvim/pack/lsp/start\n" "# git clone https://github.com/prabirshrestha/vim-lsp ~/.config/nvim/pack/lsp/start/vim-lsp\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:106 msgid "and for Vim:" msgstr "и для Vim:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:111 #, no-wrap msgid "" "# mkdir -p ~/.vim/pack/lsp/start\n" "# git clone https://github.com/prabirshrestha/vim-lsp ~/.vim/pack/lsp/start/vim-lsp\n" msgstr "" "# mkdir -p ~/.vim/pack/lsp/start\n" "# git clone https://github.com/prabirshrestha/vim-lsp ~/.vim/pack/lsp/start/vim-lsp\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:114 msgid "" "To enable the LSP client plugin in the editor, add the following snippet " "into [.filepath]#~/.config/nvim/init.vim# when using Neovim, or " "[.filepath]#~/.vim/vimrc# when using Vim:" msgstr "" "Чтобы включить плагин LSP-клиента в редакторе, добавьте следующий фрагмент в " "[.filepath]#~/.config/nvim/init.vim# при использовании Neovim или в " "[.filepath]#~/.vim/vimrc# при использовании Vim:" #. type: Block title #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:115 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:203 #, no-wrap msgid "For ccls" msgstr "Для ccls" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:127 #, no-wrap msgid "" "au User lsp_setup call lsp#register_server({\n" " \\ 'name': 'ccls',\n" " \\ 'cmd': {server_info->['ccls']},\n" " \\ 'allowlist': ['c', 'cpp', 'objc'],\n" " \\ 'initialization_options': {\n" " \\ 'cache': {\n" " \\ 'hierarchicalPath': v:true\n" " \\ }\n" " \\ }})\n" msgstr "" "au User lsp_setup call lsp#register_server({\n" " \\ 'name': 'ccls',\n" " \\ 'cmd': {server_info->['ccls']},\n" " \\ 'allowlist': ['c', 'cpp', 'objc'],\n" " \\ 'initialization_options': {\n" " \\ 'cache': {\n" " \\ 'hierarchicalPath': v:true\n" " \\ }\n" " \\ }})\n" #. type: Block title #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:129 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:188 #, no-wrap msgid "For clangd" msgstr "Для clangd" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:138 #, no-wrap msgid "" "au User lsp_setup call lsp#register_server({\n" " \\ 'name': 'clangd',\n" " \\ 'cmd': {server_info->['clangd15', '--background-index', '--header-insertion=never']},\n" " \\ 'allowlist': ['c', 'cpp', 'objc'],\n" " \\ 'initialization_options': {},\n" " \\ })\n" msgstr "" "au User lsp_setup call lsp#register_server({\n" " \\ 'name': 'clangd',\n" " \\ 'cmd': {server_info->['clangd15', '--background-index', '--header-insertion=never']},\n" " \\ 'allowlist': ['c', 'cpp', 'objc'],\n" " \\ 'initialization_options': {},\n" " \\ })\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:141 msgid "" "Depending on the version that you installed for `clangd` you might need to " "update the `server-info` to point to the correct binary." msgstr "" "В зависимости от установленной версии `clangd` может потребоваться обновить " "`server-info`, чтобы указать на правильный бинарный файл." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:144 msgid "" "Please refer to link:https://github.com/prabirshrestha/vim-lsp/blob/master/" "README.md#registering-servers[] to learn about setting up key bindings and " "code completion. The official site of clangd is link:https://" "clangd.llvm.org[], and the repository link of ccls is link:https://" "github.com/MaskRay/ccls/[]." msgstr "" "Обратитесь к link:https://github.com/prabirshrestha/vim-lsp/blob/master/" "README.md#registering-servers[], чтобы узнать о настройке сочетаний клавиш и " "автодополнения кода. Официальный сайт clangd находится по ссылке " "link:https://clangd.llvm.org[], а репозиторий ccls — link:https://github.com/" "MaskRay/ccls/[]." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:147 msgid "" "Below are the reference settings of keybindings and code completions. Put " "the following snippet into [.filepath]#~/.config/nvim/init.vim#, or " "[.filepath]#~/.vim/vimrc# for Vim users to use it:" msgstr "" "Ниже приведены эталонные настройки сочетаний клавиш и автодополнения кода. " "Поместите следующий фрагмент в [.filepath]#~/.config/nvim/init.vim# или " "[.filepath]#~/.vim/vimrc# для пользователей Vim, чтобы использовать его:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:154 #, no-wrap msgid "" "function! s:on_lsp_buffer_enabled() abort\n" " setlocal omnifunc=lsp#complete\n" " setlocal completeopt-=preview\n" " setlocal keywordprg=:LspHover\n" msgstr "" "function! s:on_lsp_buffer_enabled() abort\n" " setlocal omnifunc=lsp#complete\n" " setlocal completeopt-=preview\n" " setlocal keywordprg=:LspHover\n" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:168 #, no-wrap msgid "" " nmap (lsp-definition)\n" " nmap ] (lsp-peek-definition)\n" " nmap (lsp-peek-definition)\n" " nmap gr (lsp-references)\n" " nmap (lsp-next-reference)\n" " nmap (lsp-previous-reference)\n" " nmap gI (lsp-implementation)\n" " nmap go (lsp-document-symbol)\n" " nmap gS (lsp-workspace-symbol)\n" " nmap ga (lsp-code-action)\n" " nmap gR (lsp-rename)\n" " nmap gm (lsp-signature-help)\n" "endfunction\n" msgstr "" " nmap (lsp-definition)\n" " nmap ] (lsp-peek-definition)\n" " nmap (lsp-peek-definition)\n" " nmap gr (lsp-references)\n" " nmap (lsp-next-reference)\n" " nmap (lsp-previous-reference)\n" " nmap gI (lsp-implementation)\n" " nmap go (lsp-document-symbol)\n" " nmap gS (lsp-workspace-symbol)\n" " nmap ga (lsp-code-action)\n" " nmap gR (lsp-rename)\n" " nmap gm (lsp-signature-help)\n" "endfunction\n" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:173 #, no-wrap msgid "" "augroup lsp_install\n" " au!\n" " autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()\n" "augroup END\n" msgstr "" "augroup lsp_install\n" " au!\n" " autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()\n" "augroup END\n" #. type: Title === #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:176 #, no-wrap msgid "VSCode" msgstr "VSCode" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:183 msgid "" "LSP client plugins are required to launch the language server daemon. Press " "`Ctrl+Shift+X` to show the extension online search panel. Enter `llvm-vs-" "code-extensions.vscode-clangd` when running clangd, or `ccls-project.ccls` " "when running ccls." msgstr "" "Для работы демона языкового сервера необходимы клиентские плагины LSP. " "Нажмите `Ctrl+Shift+X`, чтобы открыть панель поиска расширений в сети. " "Введите `llvm-vs-code-extensions.vscode-clangd` при использовании clangd или " "`ccls-project.ccls` при использовании ccls." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:187 msgid "" "Then, press `Ctrl+Shift+P` to show the editor commands palette. Enter " "`Preferences: Open Settings (JSON)` into the palette and hit `Enter` to open " "[.filepath]#settings.json#. Depending on the language server " "implementations, put one of the following JSON key/value pairs in " "[.filepath]#settings.json#:" msgstr "" "Затем нажмите `Ctrl+Shift+P`, чтобы открыть палитру команд редактора. " "Введите `Preferences: Open Settings (JSON)` в палитру и нажмите `Enter`, " "чтобы открыть [.filepath]#settings.json#. В зависимости от реализации " "языкового сервера, добавьте одну из следующих пар ключ/значение JSON в " "[.filepath]#settings.json#:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:201 #, no-wrap msgid "" "[\n" " /* Begin of your existing configurations */\n" " ...\n" " /* End of your existing configurations */\n" " \"clangd.arguments\": [\n" " \"--background-index\",\n" " \"--header-insertion=never\"\n" " ],\n" " \"clangd.path\": \"clangd12\"\n" "]\n" msgstr "" "[\n" " /* Begin of your existing configurations */\n" " ...\n" " /* End of your existing configurations */\n" " \"clangd.arguments\": [\n" " \"--background-index\",\n" " \"--header-insertion=never\"\n" " ],\n" " \"clangd.path\": \"clangd12\"\n" "]\n" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:212 #, no-wrap msgid "" "[\n" " /* Begin of your existing configurations */\n" " ...\n" " /* End of your existing configurations */\n" " \"ccls.cache.hierarchicalPath\": true\n" "]\n" msgstr "" "[\n" " /* Begin of your existing configurations */\n" " ...\n" " /* End of your existing configurations */\n" " \"ccls.cache.hierarchicalPath\": true\n" "]\n" #. type: Title == #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:215 #, no-wrap msgid "Compilation database" msgstr "База данных компиляции" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:221 msgid "" "A Compilation database contains an array of compile command objects. Each " "object specifies a way of compiling a source file. The compilation database " "file is usually [.filename]#compile_commands.json#. The database is used by " "language server implementations for indexing purpose." msgstr "" "База данных компиляции содержит массив объектов команд компиляции. Каждый " "объект определяет способ компиляции исходного файла. Файл базы данных " "компиляции обычно называется [.filename]#compile_commands.json#. База данных " "используется реализациями языковых серверов для целей индексирования." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:223 msgid "" "Please refer to link:https://clang.llvm.org/docs/" "JSONCompilationDatabase.html#format[] for details on the format of the " "compilation database file." msgstr "" "Пожалуйста, обратитесь к link:https://clang.llvm.org/docs/" "JSONCompilationDatabase.html#format[] для получения подробностей о формате " "файла базы данных компиляции." #. type: Title === #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:225 #, no-wrap msgid "Generators" msgstr "Генераторы" #. type: Title ==== #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:228 #, no-wrap msgid "Using scan-build-py" msgstr "Использование scan-build-py" #. type: Title ===== #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:230 #, no-wrap msgid "Installation" msgstr "Установка" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:234 msgid "" "`intercept-build` tool from scan-build-py is used to generate compilation " "database." msgstr "" "Инструмент `intercept-build` из scan-build-py используется для создания базы " "данных компиляции." #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:237 msgid "" "Install package:devel/python[] to get python interpreter first. To get " "`intercept-build` from LLVM:" msgstr "" "Установите пакет package:devel/python[], чтобы получить интерпретатор " "python. Для получения `intercept-build` из LLVM:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:241 #, no-wrap msgid "# git clone https://github.com/llvm/llvm-project /path/to/llvm-project\n" msgstr "# git clone https://github.com/llvm/llvm-project /path/to/llvm-project\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:244 msgid "" "where [.filename]#/path/to/llvm-project/# is your desired path for the " "repository. Make an alias in the shell configuration file for convenience:" msgstr "" "где [.filename]#/path/to/llvm-project/# — это желаемый путь для репозитория. " "Для удобства создайте алиас в файле конфигурации оболочки:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:248 #, no-wrap msgid "alias intercept-build='/path/to/llvm-project/clang/tools/scan-build-py/bin/intercept-build'\n" msgstr "alias intercept-build='/path/to/llvm-project/clang/tools/scan-build-py/bin/intercept-build'\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:254 msgid "" "link:https://github.com/rizsotto/scan-build[rizsotto/scan-build] can be used " "instead of LLVM's scan-build-py. The LLVM's scan-build-py was rizsotto/scan-" "build merged into the LLVM tree. This implementation can be installed by " "`pip install --user scan-build`. The `intercept-build` script is in " "[.filename]#~/.local/bin# by default." msgstr "" "link:https://github.com/rizsotto/scan-build[rizsotto/scan-build] можно " "использовать вместо LLVM's scan-build-py. LLVM's scan-build-py был объединён " "в дерево LLVM из rizsotto/scan-build. Эту реализацию можно установить с " "помощью `pip install --user scan-build`. Скрипт `intercept-build` по " "умолчанию находится в [.filename]#~/.local/bin#." #. type: Title ===== #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:255 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:271 #, no-wrap msgid "Usage" msgstr "Использование" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:258 msgid "" "In the top-level directory of the FreeBSD src tree, generate the compilation " "database with `intercept-build`:" msgstr "" "В корневом каталоге исходного кода FreeBSD создайте базу данных компиляции с " "помощью `intercept-build`:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:262 #, no-wrap msgid "# intercept-build --append make buildworld buildkernel -j`sysctl -n hw.ncpu`\n" msgstr "# intercept-build --append make buildworld buildkernel -j`sysctl -n hw.ncpu`\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:267 msgid "" "The `--append` flag tells the `intercept-build` to read an existing " "compilation database (if a compilation database exists) and append the " "results to the database. Entries with duplicated command keys are merged. " "The generated compilation database by default is saved in the current " "working directory as [.filename]#compile_commands.json#." msgstr "" "Флаг `--append` указывает `intercept-build` прочитать существующую базу " "данных компиляции (если она существует) и добавить результаты в базу данных. " "Записи с дублирующимися ключами команд объединяются. Сгенерированная база " "данных компиляции по умолчанию сохраняется в текущей рабочей директории как " "[.filename]#compile_commands.json#." #. type: Title ==== #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:269 #, no-wrap msgid "Using devel/bear" msgstr "Использование devel/bear" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:274 msgid "" "In the top-level directory of the FreeBSD src tree, to generate compilation " "database with `bear`:" msgstr "" "В корневом каталоге исходного кода FreeBSD, чтобы создать базу данных " "компиляции с помощью `bear`:" #. type: delimited block . 4 #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:278 #, no-wrap msgid "# bear --append -- make buildworld buildkernel -j`sysctl -n hw.ncpu`\n" msgstr "# bear --append -- make buildworld buildkernel -j`sysctl -n hw.ncpu`\n" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:283 msgid "" "The `--append` flag tells `bear` to read an existing compilation database if " "it is present, and append the results to the database. Entries with " "duplicated command keys are merged. The generated compilation database by " "default is saved in the current working directory as " "[.filename]#compile_commands.json#." msgstr "" "Флаг `--append` указывает `bear` прочитать существующую базу данных " "компиляции, если она есть, и добавить результаты в неё. Записи с " "дублирующимися ключами команд объединяются. Сгенерированная база данных " "компиляции по умолчанию сохраняется в текущей рабочей директории как " "[.filename]#compile_commands.json#." #. type: Title == #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:285 #, no-wrap msgid "Final" msgstr "Последние шаги" #. type: Plain text #: documentation/content/en/articles/freebsd-src-lsp/_index.adoc:289 msgid "" "Once the compilation database is generated, open any source files in the " "FreeBSD src tree and LSP server daemon will be launched as well in " "background. Opening source files in the src tree for the first time takes " "significantly longer time before the LSP server is able to give a complete " "result, due to initial background indexing by the LSP server compiling all " "the listed entries in the compilation database. The language server daemon " "however does not index the source files not appearing in the compilation " "database, thus no complete results are shown on source files not being " "compiled during the `make`." msgstr "" "После создания базы данных компиляции откройте любой исходный файл в дереве " "исходного кода FreeBSD, и серверный демон LSP также запустится в фоновом " "режиме. Первое открытие исходных файлов в дереве src занимает значительно " "больше времени, прежде чем сервер LSP сможет предоставить полный результат, " "из-за первоначального фонового индексирования сервером LSP, который " "компилирует все перечисленные записи в базе данных компиляции. Однако демон " "языкового сервера не индексирует исходные файлы, отсутствующие в базе данных " "компиляции, поэтому полные результаты не отображаются для исходных файлов, " "которые не компилировались во время выполнения `make`."