problems with LSP client plugin #26
Replies: 8 comments
-
When you open a Rust file, does Npp set the Rust language, i.e. does it show If you open |
Beta Was this translation helpful? Give feedback.
-
Hi:
See answers below.
Murray
…________________________________
From: Ekopalypse ***@***.***>
Sent: Sunday, December 8, 2024 1:17 PM
To: Ekopalypse/NppLspClient ***@***.***>
Cc: MurraySobol ***@***.***>; Author ***@***.***>
Subject: Re: [Ekopalypse/NppLspClient] problems with LSP client plugin (Issue #25)
When you open a Rust file, does Npp set the Rust language, i.e. does it show Rust file in the status bar?
* Yes it does.
Are you using the default theme or a different one?
*
AFAIK I am using the default theme.
If you are using a different one, you need to check if Settings->Style Configurator->Language has a Rust language and if the different styles are defined, i.e. if they use different colors and not one color definition for all.
*
This is my Style Configurator > Language
[cid:ad342f02-2c74-40a5-9f65-330e21619d17]
If you open Plugins->NppLspClient->Toggle console you will see the log messages.
Copy and paste them here.
* Here is the log messages:
[1733684668507860] start_client - no configured servers found
[1733684668552984] start_client - no configured servers found
[1733684668642454] start_client - no configured servers found
[1733684668658483] start_client - no configured servers found
[1733684668718958] Some(
Config {
general: General {
diag_indicator_id: 12,
highlight_indicator_id: 13,
highlight_indicator_color: 6611199,
calltip_foreground_color: None,
calltip_background_color: None,
enable_logging: false,
complete_always: Some(
false,
),
read_stderr: Some(
false,
),
default_foreground_color: None,
default_background_color: None,
default_font_name: None,
default_font_size: None,
default_selected_text_color: None,
},
lspservers: {
"rust": ServerConfig {
mode: "io",
executable: "C:\\rust-analyzer-x86_64-pc-windows-msvc\\rust-analyzer.exe",
args: None,
port: None,
host: None,
auto_start_server: false,
complete_always: Some(
false,
),
read_stderr: Some(
false,
),
settings: None,
initialization_options: Some(
"{\"completion\":{\"limit\": 1000}}",
),
explicit_shutdown: false,
},
},
console_dialog: ConsoleDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
selected_text_color: Some(
4290822336,
),
error_color: None,
warning_color: None,
incoming_color: None,
outgoing_color: None,
},
diagnostics_dialog: DiagnosticsDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
selected_text_color: Some(
4290822336,
),
error_color: None,
warning_color: None,
info_color: None,
hint_color: None,
},
symbols_dialog: SymbolsDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
selected_text_color: Some(
4290822336,
),
file_color: None,
module_color: None,
namespace_color: None,
package_color: None,
class_color: None,
method_color: None,
property_color: None,
field_color: None,
constructor_color: None,
enum_color: None,
interface_color: None,
function_color: None,
variable_color: None,
constant_color: None,
string_color: None,
number_color: None,
boolean_color: None,
array_color: None,
object_color: None,
key_color: None,
null_color: None,
enum_member_color: None,
struct_color: None,
event_color: None,
operator_color: None,
type_parameter_color: None,
},
references_dialog: ReferencesDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
selected_text_color: Some(
4290822336,
),
filename_color: None,
found_location_color: None,
reference_color: None,
clear_reference_view_always: None,
},
popup_dialog: PopupDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
timeout: Some(
5,
),
},
hover_dialog: HoverDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
use_hover_webview: Some(
true,
),
},
rename_dialog: RenameDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
auto_add_symbol: None,
},
action_dialog: ActionsDialogConfig {
font_name: Some(
"Courier New",
),
font_size: Some(
10,
),
foreground_color: Some(
0,
),
background_color: Some(
16777215,
),
},
},
)
[1733684668719913] Logging disabled
[1733684668720167] Allocated indicator IDs start from 9
[1733684669111355] start_client - no configured server found for xml
[1733684671433851] [1730944371360] C:\window_builder\src\main.rs is not of interest
—
Reply to this email directly, view it on GitHub<#25 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJWUNKZVB2EUT5DR7YESJNT2ESELZAVCNFSM6AAAAABTHLOOUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRWGI4TSNZYGI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Your |
Beta Was this translation helpful? Give feedback.
-
Hi (again!):
I started the server:
and got this message:
[1733731961914060] start_client - "C:\\rust-analyzer-x86_64-pc-windows-msvc\\rust-analyzer.exe"
[1733731961918032] rust language server started
Failed to load workspaces.
Failed to load workspaces.
[1733732071391828] start_client - no configured server found for normal text
Am I missing (again) 1 more setting??
Thanks
Murray
…________________________________
From: Ekopalypse ***@***.***>
Sent: Sunday, December 8, 2024 2:20 PM
To: Ekopalypse/NppLspClient ***@***.***>
Cc: MurraySobol ***@***.***>; Author ***@***.***>
Subject: Re: [Ekopalypse/NppLspClient] problems with LSP client plugin (Issue #25)
Your autostart is set to false which means you have to start the language server manually via plugins->NppLspClient->Start server for current language.
—
Reply to this email directly, view it on GitHub<#25 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJWUNK4W2H4IBV6QFEJOX332ESLZBAVCNFSM6AAAAABTHLOOUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRWGM2DANZXGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You need to use Npps "Folder as Workspace dialog (FAW)". I.e Lsp servers such as rust-analyzer need to know where the root directory of the current project is located, in the case of rust-analyzer this is the directory where the cargo.toml file is located, so that they know what and how something needs to be compiled. |
Beta Was this translation helpful? Give feedback.
-
Hi:
I think that I don't understand.
Your image:
[https://github-production-user-asset-6210df.s3.amazonaws.com/47723516/393774280-3f48cb8e-8bc1-4ea2-be0b-ed99a3244133.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241209T181957Z&X-Amz-Expires=300&X-Amz-Signature=239900d241b4bc2416ca11ff8cd8ab1bb025809e1e991e37dbfb4f9ece5c4e46&X-Amz-SignedHeaders=host]
Does that mean I need to create a new project: lsp_plugin_rs?
And then set up the cargo.toml file as in your image??
Thanks
Murray
…________________________________
From: Ekopalypse ***@***.***>
Sent: Monday, December 9, 2024 4:24 AM
To: Ekopalypse/NppLspClient ***@***.***>
Cc: MurraySobol ***@***.***>; Author ***@***.***>
Subject: Re: [Ekopalypse/NppLspClient] problems with LSP client plugin (Issue #25)
You need to use Npps "Folder as Workspace dialog (FAW)". I.e
E3201E73-4AD2-4D22-8EF2-A4A1ED7784E5.png (view on web)<https://github.com/user-attachments/assets/3f48cb8e-8bc1-4ea2-be0b-ed99a3244133>
Lsp servers such as rust-analyzer need to know where the root directory of the current project is located, in the case of rust-analyzer this is the directory where the cargo.toml file is located, so that they know what and how something needs to be compiled.
This information is provided with the initialization request sent by the client by determining the root nodes from the FAW dialog.
—
Reply to this email directly, view it on GitHub<#25 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJWUNK6CZWHWEP7KNAU2FND2EVOUFAVCNFSM6AAAAABTHLOOUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRXGM3TKMRVG4>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
No, that was just an example. You need to add your project directory to the FAW, the directory that contains the root cargo.toml file of your project. To create a rust binary (aka exe) you call Then you add this folder, in my case it is |
Beta Was this translation helpful? Give feedback.
-
I assume that there are no more unanswered questions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Your comment was:
This sounds like Rust is not part of your Notepad++ setup because keyword coloring is done by Npp/Scintilla and is not part of the language server protocol and if that is the case, then the NppLspClient plugin will not work with Rust files.
Notepad++ debug info:
Notepad++ v8.7.4 (64-bit)
Build time : Dec 4 2024 - 23:50:05
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
Placeholders : OFF
DirectWrite : OFF
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : OFF
OS Name : Windows 11 Pro (64-bit)
OS Version : 24H2
OS Build : 26100.2454
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)
NppLspClient (0.0.31)
rustnpp (1.0.2)
I also checked the langs.xml file for the Rust section, it is there:
abstract as async become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self static struct super trait true try type typeof unsafe unsized use virtual where while yield
bool char f32 f64 i128 i16 i32 i64 i8 isize str u128 u16 u32 u64 u8 usize
Self
You also mentioned adding log files, where are they located??
Beta Was this translation helpful? Give feedback.
All reactions