{"id":18229,"date":"2025-07-15T10:00:08","date_gmt":"2025-07-15T01:00:08","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=18229"},"modified":"2025-07-14T17:59:43","modified_gmt":"2025-07-14T08:59:43","slug":"%e3%82%a8%e3%83%87%e3%82%a3%e3%82%bf%e3%81%ae%e9%ab%98%e6%a9%9f%e8%83%bd%e5%8c%96%e3%82%92%e6%94%af%e3%81%88%e3%82%8blsp%e3%81%ae%e4%bb%95%e7%b5%84%e3%81%bf","status":"publish","type":"post","link":"https:\/\/www.ecomottblog.com\/?p=18229","title":{"rendered":"\u30a8\u30c7\u30a3\u30bf\u306e\u9ad8\u6a5f\u80fd\u5316\u3092\u652f\u3048\u308bLSP\u306e\u4ed5\u7d44\u307f"},"content":{"rendered":"<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u958b\u767a\u306b\u304a\u3044\u3066\u30a8\u30c7\u30a3\u30bf\u306e\u6a5f\u80fd\u306f\u958b\u767a\u901f\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff\u3057\u3066\u304d\u307e\u3059\u3002<br \/>\nVisual Studio Code\u3084Neovim\u306e\u3088\u3046\u306a\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u306f\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306e\u69cb\u6587\u30a8\u30e9\u30fc\u306e\u8868\u793a\u3084\u5b9a\u7fa9\u7b87\u6240\u306e\u53c2\u7167\u7b49\u306e\u6a5f\u80fd\u306f\u958b\u767a\u52b9\u7387\u3092\u9ad8\u3081\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u6a5f\u80fd\u306e\u80cc\u5f8c\u3067\u306fLSP(Language Server Protocol)\u306b\u3088\u308b\u3001\u30a8\u30c7\u30a3\u30bf\u3068\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3068\u306e\u901a\u4fe1\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3068\u306e\u901a\u4fe1\u306f\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u884c\u3063\u3066\u304f\u308c\u308b\u305f\u3081\u3001\u3069\u306e\u3088\u3046\u306b\u52d5\u3044\u3066\u3044\u308b\u304b\u666e\u6bb5\u306f\u3042\u307e\u308a\u610f\u8b58\u3059\u308b\u3053\u3068\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u671f\u5f85\u3057\u305f\u3088\u3046\u306b\u52d5\u4f5c\u3057\u306a\u3044\u5834\u5408\u7b49\u3001\u4ed5\u7d44\u307f\u3092\u77e5\u3063\u3066\u304a\u304f\u3053\u3068\u3067\u539f\u56e0\u306e\u7279\u5b9a\u306b\u3064\u306a\u304c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u672c\u8a18\u4e8b\u3067\u306fLSP\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u8aac\u660e\u3057\u3001\u305d\u306e\u5f8c\u306b\u5b9f\u969b\u306e\u30a8\u30c7\u30a3\u30bf\u306e\u52d5\u304d\u3092\u898b\u308b\u3053\u3068\u3067\u3001\u30a8\u30c7\u30a3\u30bf\u306e\u88cf\u5074\u3067\u52d5\u3044\u3066\u3044\u308b\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u89e6\u308c\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>LSP\u3068\u306f\u4f55\u304b<\/h2>\n<p>LSP\u306fLanguage Server Protocol\u306e\u7565\u3067\u3001\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3084\u30ea\u30f3\u30bf\u30fc\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u30fc\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3068\u30a8\u30c7\u30a3\u30bf\u3068\u306e\u9023\u643a\u3092\u884c\u3046\u305f\u3081\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u3059\u3002<\/p>\n<p>LSP\u304c\u4e16\u306b\u51fa\u308b\u524d\u306f\u30a8\u30c7\u30a3\u30bf\u3068\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3068\u306e\u6a19\u6e96\u306e\u901a\u4fe1\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30a8\u30c7\u30a3\u30bf\u3054\u3068\u306b\u72ec\u81ea\u306b\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3057\u3066\u304a\u308a\u3001\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u306e\u518d\u5229\u7528\u304c\u96e3\u3057\u3044\u72b6\u6cc1\u3060\u3063\u305f\u3088\u3046\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057LSP\u306e\u767b\u5834\u306b\u3088\u308a\u3001LSP\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a8\u30c7\u30a3\u30bf\u3067\u3042\u308c\u3070\u3001\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3092\u4fee\u6b63\u3059\u308b\u3053\u3068\u306a\u304f\u518d\u5229\u7528\u304c\u7c21\u5358\u306b\u884c\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u306fVisual Studio Code\u3084Neovim\u7b49LSP\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/docs.basedpyright.com\/latest\/\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.basedpyright.com\/latest\/<\/a><br \/>\n<a href=\"https:\/\/clangd.llvm.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/clangd.llvm.org\/<\/a><\/p>\n<h2>LSP\u3068\u30a8\u30c7\u30a3\u30bf\u3001\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a<\/h2>\n<p>\u4ee5\u4e0b\u306fLSP\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<br \/>\n<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/visualstudio\/extensibility\/language-server-protocol?view=vs-2022\" target=\"_blank\" rel=\"noopener\">https:\/\/learn.microsoft.com\/ja-jp\/visualstudio\/extensibility\/language-server-protocol?view=vs-2022<\/a><br \/>\n\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308bLSP\u306e\u901a\u4fe1\u30b7\u30fc\u30b1\u30f3\u30b9\u56f3\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-18231\" src=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence.png\" alt=\"\" width=\"883\" height=\"366\" srcset=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence.png 883w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence-300x124.png 300w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence-768x318.png 768w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence-304x126.png 304w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2025\/07\/language-server-sequence-282x117.png 282w\" sizes=\"(max-width: 883px) 100vw, 883px\" \/><\/p>\n<p>\u30a8\u30c7\u30a3\u30bf\u304cDevelopment Tool\u3001\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb\u304cLanguage Server(LS)\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001LSP\u3067\u306f\u89e3\u6790\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u30c4\u30fc\u30eb\u304c\u72ec\u7acb\u3057\u305f\u30b5\u30fc\u30d0\u3068\u3057\u3066\u52d5\u4f5c\u3057\u3066\u304a\u308a\u3001\u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1\u3067\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u306e\u8981\u6c42\u3092\u53d7\u4fe1\u3001\u7d50\u679c\u3092\u8fd4\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070Neovim\u306e\u5834\u5408\u306f\u6a19\u6e96\u5165\u51fa\u529b\u306b\u3088\u308aLS\u3068\u306e\u901a\u4fe1\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>LS\u3092\u624b\u52d5\u3067\u8d77\u52d5\u3057\u3066\u307f\u308b<\/h2>\n<p>LS\u304c\u72ec\u7acb\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u3068\u3057\u3066\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u898b\u308b\u305f\u3081\u306b\u3001\u4f8b\u3068\u3057\u3066python\u5411\u3051\u306eLS(basedpyright)\u3092\u624b\u52d5\u3067\u8d77\u52d5\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u901a\u5e38\u306f\u30a8\u30c7\u30a3\u30bf\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$ python -m venv lsp_test\n$ cd lsp_test\n$ source bin\/active\n$ pip install basedpyright\n<\/pre>\n<p>basedpyright\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u306e\u5f8c\u30d7\u30ed\u30bb\u30b9\u304c\u5165\u529b\u5f85\u3061\u306e\u72b6\u614b\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">(python3.9.2) 130 test@atde9:~\/work\/venv\/python3.9.2$ basedpyright-langserver --stdio\nContent-Length: 123\n\n{\"jsonrpc\":\"2.0\",\"method\":\"window\/logMessage\",\"params\":{\"type\":3,\"message\":\"basedpyright language server 1.29.5 starting\"}}Content-Length: 189\n\n{\"jsonrpc\":\"2.0\",\"method\":\"window\/logMessage\",\"params\":{\"type\":3,\"message\":\"Server root directory: file:\/\/\/home\/test\/work\/venv\/python3.9.2\/lib\/python3.9\/site-packages\/basedpyright\/dist\"}}\n<\/pre>\n<p>\u3053\u3053\u3067\u306fjson\u5f62\u5f0f\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/h2>\n<p>LSP\u306e\u901a\u4fe1\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30d8\u30c3\u30c0\u90e8\u5206\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u3068\u306b\u5206\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d8\u30c3\u30c0\u90e8\u5206\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u672b\u5c3e\u306b\u306f\u2018\\r\\n\u2019\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u3068\u306e\u533a\u5207\u308a\u306f\u2018\\r\\n\u2019\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4e0a\u8a18\u3067\u306f\u30d8\u30c3\u30c0\u90e8\u5206\u306bContent-Length\u306e\u307f\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u306f{&#8220;jsonrpc&#8221;\u3067\u59cb\u307e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u306e\u8a18\u8ff0\u306fJSON-RPC\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30f3\u30c4\u30b5\u30a4\u30ba\u306f\u30d8\u30c3\u30c0\u90e8\u5206\u306eContent-Length\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u672b\u5c3e\u306b\u6539\u884c\u306f\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001 \u4e0a\u8a18\u51fa\u529b\u3067\u306f<\/p>\n<pre class=\"lang:default decode:true\">{\"jsonrpc\":\"2.0\",\"method\":\"window\/logMessage\",\"params\":{\"type\":3,\"message\":\"basedpyright language server 1.29.5 starting\"}}Content-Length: 189\n<\/pre>\n<p>\u306e\u3088\u3046\u306b1\u3064\u76ee\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u3059\u3050\u5f8c\u306b\u4e8c\u3064\u76ee\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306eContent-Length: 189\u304c\u7d9a\u304f\u5f62\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u51fa\u529b\u4f8b\u3067\u306fmethod\u3068\u3057\u3066window\/logMessage\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0bLSP\u306e\u4ed5\u69d8\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u3053\u308c\u306fLS\u5074\u304b\u3089\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5bfe\u3057\u3066message\u306e\u5185\u5bb9\u3092\u30ed\u30b0\u3068\u3057\u3066\u9001\u4fe1\u3059\u308b\u305f\u3081\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3042\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specifications\/lsp\/3.17\/specification\/#window_logMessage\" target=\"_blank\" rel=\"noopener\">https:\/\/microsoft.github.io\/language-server-protocol\/specifications\/lsp\/3.17\/specification\/#window_logMessage<\/a><\/p>\n<blockquote><p>The log message notification is sent from the server to the client to ask the client to log a particular message.<\/p><\/blockquote>\n<h2>\u30a8\u30c7\u30a3\u30bf\u3068\u89e3\u6790\u30c4\u30fc\u30eb\u9593\u306eLSP\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6d41\u308c<\/h2>\n<p>LS\u304c\u72ec\u7acb\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u3068\u3057\u3066\u8d77\u52d5\u3059\u308b\u3053\u3068\u3092\u898b\u307e\u3057\u305f\u304c\u3001\u6b21\u306b\u5b9f\u969b\u306b\u30a8\u30c7\u30a3\u30bf\u304b\u3089LS\u306e\u89e3\u6790\u6a5f\u80fd\u3092\u4f7f\u3046\u5834\u5408\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6d41\u308c\u3092\u898b\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u4ee5\u964d\u306fNeovim(v0.11.0)\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306e\u4f8b\u3092\u304a\u898b\u305b\u3057\u307e\u3059\u3002<br \/>\n\u4e00\u822c\u7684\u306b\u306f\u89e3\u6790\u7528\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u64cd\u4f5c\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u3053\u3053\u3067\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30e2\u30fc\u30c9\u304b\u3089\u89e3\u6790\u6a5f\u80fd\u3092\u5b9f\u884c\u3057\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>Neovim\u3067\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30e2\u30fc\u30c9\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306bLSP\u306e\u30ed\u30b0\u30ec\u30d9\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u8a73\u7d30\u306aLSP\u306e\u901a\u4fe1\u30ed\u30b0\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">:lua vim.lsp.set_log_level(\"TRACE\")\n<\/pre>\n<p>\u30ed\u30b0\u306e\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">:= vim.lsp.get_log_path()\n<\/pre>\n<p>\u4ee5\u4e0b\u306fNeovim\u304b\u3089a.py\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u305f\u969b\u306e\u30ed\u30b0\u3067\u3059\u3002\u5927\u91cf\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u6d41\u308c\u308b\u305f\u3081\u3001\u4e00\u90e8\u306e\u307f\u629c\u7c8b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">[TRACE][2025-07-10 16:53:14] ...m\/lsp\/client.lua:543  \"LSP[basedpyright]\" \"init_params\"   { capabilities = { general = { positionEncodings = { \"utf-8\", \"utf-16\", \"utf-32\" } }, 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\", \"command\" } } }, codeLens = { dynamicRegistration = false, resolveSupport = { properties = { \"command\" } } }, completion = { completionItem = { commitCharactersSupport = false, deprecatedSupport = true, documentationFormat = { \"markdown\", \"plaintext\" }, preselectSupport = false, resolveSupport = { properties = { \"additionalTextEdits\", \"command\" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, 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 } }, completionList = { itemDefaults = { \"editRange\", \"insertTextFormat\", \"insertTextMode\", \"data\" } }, contextSupport = true, 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 } } }, foldingRange = { dynamicRegistration = false, foldingRange = { collapsedText = true }, lineFoldingOnly = true }, formatting = { dynamicRegistration = true }, hover = { contentFormat = { \"markdown\", \"plaintext\" }, dynamicRegistration = true }, implementation = { linkSupport = true }, inlayHint = { dynamicRegistration = true, resolveSupport = { properties = { \"textEdits\", \"tooltip\", \"location\", \"command\" } } }, publishDiagnostics = { dataSupport = true, relatedInformation = true, tagSupport = { valueSet = { 1, 2 } } }, rangeFormatting = { dynamicRegistration = true, rangesSupport = 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 = true } }, workDoneProgress = true }, workspace = { applyEdit = true, configuration = true, didChangeConfiguration = { dynamicRegistration = false }, didChangeWatchedFiles = { dynamicRegistration = false, 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 } }, clientInfo = { name = \"Neovim\", version = \"0.11.0+v0.11.0\" }, processId = 1967525, rootPath = \"\/home\/test\/work\/\", rootUri = \"file:\/\/\/home\/test\/work\/\", trace = \"off\", workDoneToken = \"1\", workspaceFolders = { { name = \"\/home\/test\/work\/\", uri = \"file:\/\/\/home\/test\/work\/\" } } }\n[TRACE][2025-07-10 16:53:14] ...m\/lsp\/client.lua:1105   \"notification\"  \"window\/logMessage\" { message = \"basedpyright language server 1.28.5 starting\", type = 3 }\n[DEBUG][2025-07-10 16:53:14] ...\/vim\/lsp\/rpc.lua:391    \"rpc.receive\"   { jsonrpc = \"2.0\", method = \"window\/logMessage\", params = { message = \"Server root directory: file:\/\/\/home\/test\/.local\/share\/nvim\/mason\/packages\/basedpyright\/venv\/lib\/python3.9\/site-packages\/basedpyright\/dist\", type = 3 } }\n<\/pre>\n<p>\u30ed\u30b0\u3092\u78ba\u8a8d\u3059\u308b\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u30a8\u30c7\u30a3\u30bf\u306e\u64cd\u4f5c\u306e\u4f8b\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306apython\u306e\u30b3\u30fc\u30c9\u4e0a\u3067\u4f5c\u696d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">def    func():\n    print(\"Function f called\")\n\ndef main():\n    func()\n<\/pre>\n<p>\u3053\u3053\u3067\u306fpython\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u305f\u969b\u306b\u3001Neovim\u304b\u3089basedpyright\u3092\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002<br \/>\nNeovim\u306eLSP\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u8a73\u3057\u304f\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u8a2d\u5b9a\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u5272\u611b\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/neovim.io\/doc\/user\/lsp.html\" target=\"_blank\" rel=\"noopener\">https:\/\/neovim.io\/doc\/user\/lsp.html<\/a><\/p>\n<h3>\u4f8b\uff1a\u95a2\u6570\u5ba3\u8a00\u3078\u306e\u30b8\u30e3\u30f3\u30d7<\/h3>\n<p>\u3053\u3053\u30675\u884c\u76ee\u306efunc()\u4e0a\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u7f6e\u3044\u305f\u72b6\u614b\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u30ab\u30fc\u30bd\u30eb\u914d\u4e0b\u306e\u30b7\u30f3\u30dc\u30eb\u306e\u5ba3\u8a00\u7b87\u6240\u3078\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306a\u306e\u3067\u3001\u30ab\u30fc\u30bd\u30eb\u306f1\u884c\u76ee\u306e\u5148\u982d\u304b\u30898\u6587\u5b57\u76ee\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">:lua vim.lsp.buf.declaration()\n<\/pre>\n<p>\u6b21\u306bLSP\u306e\u30ed\u30b0\u3092\u898b\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">[DEBUG][2025-07-10 17:42:36] ...\/vim\/lsp\/rpc.lua:277  \"rpc.send\"  { id = 382, jsonrpc = \"2.0\", method = \"textDocument\/declaration\", params = { position = { character = 4, line = 4 }, textDocument = { uri = \"file:\/\/\/home\/test\/work\/\/a.py\" } } }\n[DEBUG][2025-07-10 17:42:36] ...\/vim\/lsp\/rpc.lua:391    \"rpc.receive\"   { id = 382, jsonrpc = \"2.0\", result = { { range = { [\"end\"] = { character = 11, line = 0 }, start = { character = 7, line = 0 } }, uri = \"file:\/\/\/home\/test\/work\/\/a.py\" } } }\n<\/pre>\n<p>\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u306e\u8981\u6c42(rpc.send)\u3092\u898b\u308b\u3068method=&#8221;textDocument\/declaration&#8221;\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306f\u4ee5\u4e0b\u306eLSP\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u8a72\u5f53\u3057\u3001\u6307\u5b9a\u3057\u305f\u7b87\u6240\u306b\u3042\u308b\u30b7\u30f3\u30dc\u30eb\u306e\u5b9a\u7fa9\u5834\u6240\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specifications\/lsp\/3.17\/specification\/#textDocument_declaration\" target=\"_blank\" rel=\"noopener\">https:\/\/microsoft.github.io\/language-server-protocol\/specifications\/lsp\/3.17\/specification\/#textDocument_declaration<\/a><\/p>\n<blockquote><p>The go to declaration request is sent from the client to the server to resolve the declaration location of a symbol at a given text document position.<\/p><\/blockquote>\n<p>params\u306b\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">params = { position = { character = 4, line = 4 }, textDocument = { uri = \"file:\/\/\/home\/test\/work\/\/a.py\" } }\n<\/pre>\n<p>textDocument\u5185\u306euri\u306f\u30d5\u30a1\u30a4\u30eb\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5834\u6240\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001position\u4e2d\u306eline\u306f\u30d5\u30a1\u30a4\u30eb\u5148\u982d\u304b\u3089\u306e\u884c\u6570\u3001character\u306f\u884c\u5148\u982d\u304b\u3089\u306e\u6587\u5b57\u6570\u3092\u793a\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3089\u306f0\u30d9\u30fc\u30b9\u306e\u305f\u3081\u3001\u3053\u3053\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u5148\u982d\u304b\u30895\u884c\u76ee\u306e\u5148\u982d\u304b\u30895\u6587\u5b57\u76ee\u3092\u6307\u3057\u3066\u304a\u308a\u3001\u4e0a\u8a18\u306e<\/p>\n<pre class=\"lang:default decode:true\">:lua vim.lsp.buf.declaration()\n<\/pre>\n<p>\u5b9f\u884c\u6642\u306e\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306bLS\u304b\u3089\u306e\u5fdc\u7b54(rpc.receive)\u3092\u898b\u3066\u307f\u308b\u3068\u3001<\/p>\n<pre class=\"lang:default decode:true\">id = 382\n<\/pre>\n<p>\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\nid\u306f\u5bfe\u5fdc\u3059\u308b\u8981\u6c42\u306eid\u3092\u793a\u3059\u306e\u3067\u3001\u5148\u307b\u3069\u306e\u8981\u6c42\u306b\u5bfe\u3059\u308b\u5fdc\u7b54\u3067\u3042\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u5fdc\u7b54\u7d50\u679c\u306eresult\u3092\u898b\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">result = { { range = { [\"end\"] = { character = 11, line = 0 }, start = { character = 7, line = 0 } }, uri = \"file:\/\/\/home\/test\/work\/\/a.py\" } } }\n<\/pre>\n<p>uri\u3067\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b9\u306f\u4e0a\u8a18\u306ea.py\u3092\u793a\u3057\u3066\u304a\u308a\u3001start\u306f1\u884c\u76ee\u306e8\u6587\u5b57\u76ee\u3001end\u306f1\u884c\u76ee\u306e12\u6587\u5b57\u76ee\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u7bc4\u56f2\u304cfunc\u306e\u5b9a\u7fa9\u4f4d\u7f6e\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<h3>LSP\u306b\u3088\u308b\u518d\u5229\u7528\u6027\u306e\u5411\u4e0a<\/h3>\n<p>\u3053\u308c\u307e\u3067\u306e\u6d41\u308c\u304b\u3089Neovim\u306f\u5b9a\u7fa9\u7b87\u6240\u3078\u30b8\u30e3\u30f3\u30d7\u3057\u305f\u3044\u30b7\u30f3\u30dc\u30eb\u306e\u4f4d\u7f6e\u60c5\u5831\u3092LS\u3078\u9001\u4fe1\u3057\u3001\u305d\u308c\u306b\u5bfe\u3057\u3066LS\u306f\u5b9a\u7fa9\u7b87\u6240\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u5fdc\u7b54\u3068\u3057\u3066\u8fd4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n\u305d\u306e\u5f8c\u306bNeovim\u304c\u5fdc\u7b54\u7d50\u679c\u306b\u8a72\u5f53\u3059\u308b\u7b87\u6240\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u79fb\u52d5\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u91cd\u8981\u306a\u306e\u306f\u3053\u308c\u3089\u8981\u6c42\u3001\u5fdc\u7b54\u306e\u4ed5\u69d8\u306fLSP\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\u3001Neovim\u3068\u4eca\u56de\u306e\u4f8b\u3067\u4f7f\u7528\u3057\u305f\u9759\u7684\u89e3\u6790\u30c4\u30fc\u30eb(basedpyright)\u56fa\u6709\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u306f\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001<\/p>\n<pre class=\"lang:default decode:true\">method = \"textDocument\/declaration\"\n<\/pre>\n<p>\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a8\u30c7\u30a3\u30bf\u3067\u3042\u308c\u3070\u3001\u540c\u3058\u3088\u3046\u306bLS\u3092\u4f7f\u7528\u3057\u3066\u5b9a\u7fa9\u7b87\u6240\u3078\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u4eca\u56de\u306f\u30b7\u30f3\u30dc\u30eb\u306e\u5b9a\u7fa9\u7b87\u6240\u3078\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u6a5f\u80fd\u306e\u307f\u3092\u898b\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u30db\u30d0\u30fc\u306b\u3088\u308b\u60c5\u5831\u8868\u793a\u3084\u81ea\u52d5\u88dc\u5b8c\u7b49\u3001\u305d\u306e\u4ed6\u306e\u958b\u767a\u3092\u52b9\u7387\u5316\u3057\u3066\u304f\u308c\u308b\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3082\u540c\u69d8\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u3001LSP\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a8\u30c7\u30a3\u30bf\u3084LS\u3067\u3042\u308c\u3070\u3001\u7d44\u307f\u5408\u308f\u305b\u3092\u5909\u3048\u3066\u3082\u304a\u4e92\u3044\u3092\u610f\u8b58\u305b\u305a\u306b\u52d5\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u30a8\u30c7\u30a3\u30bf\u9593\u3067\u89e3\u6790\u30c4\u30fc\u30eb\u306e\u518d\u5229\u7528\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u30a8\u30c7\u30a3\u30bf\u306e\u80cc\u5f8c\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308bLSP\u306e\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u7c21\u5358\u3067\u3059\u304c\u898b\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\nLSP\u306f\u4e00\u822c\u7684\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u7528\u306b\u4f7f\u7528\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u4ee5\u5916\u306b\u3082\u4f8b\u3048\u3070\u3001systemd\u306e\u30e6\u30cb\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u7528\u306eLS\u3084<br \/>\n<a href=\"https:\/\/github.com\/JFryy\/systemd-lsp\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/JFryy\/systemd-lsp<\/a><br \/>\nnginx\u306e\u8a2d\u5b9a\u7528\u306eLS\u3082\u5b58\u5728\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/pappasam\/nginx-language-server\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/pappasam\/nginx-language-server<\/a><\/p>\n<p>LSP\u306e\u4ed5\u7d44\u307f\u304c\u5206\u304b\u308c\u3070\u8272\u3005\u306a\u7528\u9014\u5411\u3051\u306bLS\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4f7f\u7528\u3057\u305f\u3044LS\u304c\u307e\u3060\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u81ea\u5206\u3067\u4f5c\u6210\u3057\u3066\u307f\u308b\u3053\u3068\u3067\u958b\u767a\u52b9\u7387\u3092\u4e0a\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u958b\u767a\u306b\u304a\u3044\u3066\u30a8\u30c7\u30a3\u30bf\u306e\u6a5f\u80fd\u306f\u958b\u767a\u901f\u5ea6\u306b\u5927\u304d\u304f\u5f71\u97ff\u3057\u3066\u304d\u307e\u3059\u3002 Visual Studio Code\u3084Neovim\u306e\u3088\u3046\u306a\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u306f\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306e\u69cb\u6587\u30a8\u30e9\u30fc\u306e\u8868\u793a\u3084\u5b9a\u7fa9\u7b87\u6240 [&hellip;]<\/p>\n","protected":false},"author":114,"featured_media":18231,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[329,330],"_links":{"self":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/18229"}],"collection":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18229"}],"version-history":[{"count":13,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/18229\/revisions"}],"predecessor-version":[{"id":18244,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/18229\/revisions\/18244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/18231"}],"wp:attachment":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}