Error: "In included file: 'avr/pgmspace.h' file not found (clang pp_file_not_found)" on Neovim with Coc

huangapple go评论73阅读模式
英文:

Error: "In included file: 'avr/pgmspace.h' file not found (clang pp_file_not_found)" on Neovim with Coc

问题

我正在尝试为我的 Neovim 添加代码完成功能,以便使用 Platform.io 编程,但 clang 无法识别 Arduino.h 导入并指责 avr/pgmspace.h 头文件。

  • 我正在使用的插件是 Conqueror of Completion

  • 我已安装了 coc-clang

  • 我的 CocConfig 文件为空,我还尝试了 ccls 但没有成功。

  • 我的 Vim-Plug 扩展:

- neomake-platformio: OK
- coc.nvim: OK
- vim-pio: OK
- fzf.vim: OK
- fzf: OK
  • 我的 platformio.ini
; bla bla bla comments
[env:uno]
platform = atmelavr
board = uno
framework = arduino
  • 我的通过 pio run -t compiledb 创建的 compile_commands.json(我还尝试了 Bear 但不起作用)

如果您还有其他可能有用的信息,请告诉我。

英文:

I'm trying to add code completion to my Neovim to program some stuff with Platform.io but clang doesn't recognize the Arduino.h import and blames the avr/pgmspace.h header.

Error: "In included file: 'avr/pgmspace.h' file not found (clang pp_file_not_found)" on Neovim with Coc

  • The plugin I'm using is Conqueror of Completion

  • I have coc-clang installed

  • My CocConfig file is empty, I also tried ccls but no luck.

  • My Vim-Plug extensions

- neomake-platformio: OK
- coc.nvim: OK
- vim-pio: OK
- fzf.vim: OK
- fzf: OK
  • My platformio.ini
; bla bla bla comments
[env:uno]
platform = atmelavr
board = uno
framework = arduino
  • My compile_commands.json created via pio run -t compiledb (also tried Bear and it didn't work)
[
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/CDC.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/CDC.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/CDC.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial0.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial0.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial0.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial1.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial1.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial1.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial2.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial2.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial2.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/HardwareSerial3.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial3.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/HardwareSerial3.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/IPAddress.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/IPAddress.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/IPAddress.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/PluggableUSB.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/PluggableUSB.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/PluggableUSB.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Print.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Print.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Print.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Stream.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Stream.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Stream.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/Tone.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Tone.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/Tone.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/USBCore.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/USBCore.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/USBCore.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/WInterrupts.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WInterrupts.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WInterrupts.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/WMath.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WMath.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WMath.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/WString.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WString.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/WString.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/abi.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/abi.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/abi.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/hooks.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/hooks.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/hooks.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/main.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/main.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/main.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/FrameworkArduino/new.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/new.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/new.cpp"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_analog.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_analog.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_analog.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_digital.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_digital.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_digital.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-as -mmcu=atmega328p -o .pio/build/uno/FrameworkArduino/wiring_pulse.S.o /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.S",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.S"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_pulse.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_pulse.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-gcc -o .pio/build/uno/FrameworkArduino/wiring_shift.c.o -c -std=gnu11 -fno-fat-lto-objects -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard /Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_shift.c",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino/wiring_shift.c"
},
{
"command": "/Users/MY_USER_NAME/.platformio/packages/toolchain-atmelavr/bin/avr-g++ -o .pio/build/uno/src/main.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -mmcu=atmega328p -Os -Wall -ffunction-sections -fdata-sections -flto -DPLATFORMIO=60106 -DARDUINO_AVR_UNO -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DARDUINO=10808 -Iinclude -Isrc -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/cores/arduino -I/Users/MY_USER_NAME/.platformio/packages/framework-arduino-avr/variants/standard src/main.cpp",
"directory": "/Users/MY_USER_NAME/Projects/PIO_LCD",
"file": "/Users/MY_USER_NAME/Projects/PIO_LCD/src/main.cpp"
}
]

If there are any other information that you guys find that might be useful, let me know.

答案1

得分: 0

  1. 作为一个软件包管理器,我使用了MacPorts,即使你要求它通过sudo port install ccls安装ccls,它会安装为ccls-clang-10,所以自动完成引擎无法识别ccls命令。

  2. 我没有遵循ccls仓库提供的说明,特别是其中的一项要求你创建一个shell包装器,当你使用MacPorts时,这是必须的(或者你可以根据下一个问题中的内容更改命令)。

  3. 我使用了coc.nvim的配置,但它不起作用,经过一番搜索,我发现ccls仓库提供了一个coc.nvim的配置JSON,当我使用它时,一切都正常了!此外,如我在上面所述,看看"command": "ccls"是否适用于你的情况,也许我可以只使用它作为ccls-clang-10,它就能正常工作。

希望你找到这些信息有用,如果你看到这个的话。

英文:

I had 3 problems:

  1. as a package manager I was using MacPorts, even though you ask it to install ccls via sudo port install ccls it installs it as ccls-clang-10, so the completion engine does not recognize the ccls command.

  2. I didn't follow the instructions the ccls repo provides, especially the one that tells you to create a shell wrapper, when you use MacPorts, it's a must (or you could just change the command as you will see in the next problem)

  3. I was using coc.nvim's configuration and it just didn't work, after search a little I found that the ccls repo provides a config JSON for coc.nvim, when I used it BAM it was working! Also, as I stated above, look to see if the "command": "ccls" fits the one you have, maybe I could just used it as ccls-clang-10 and it would've worked.

I hope you find this useful, if you come across this.

huangapple
  • 本文由 发表于 2023年4月4日 07:49:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75924506.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定