Open haasn opened 4 years ago
If you run :NeotagsVerbosity before you switch buffer you should be able to see what's going on 👍
After switching buffers, no proper highlighting:
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_d_cPreProcTag | syntax keyword _Neotags_c_d_cPreProcTag VK CHECK PL_DEF PL_ERR PL_MAX PL_MIN PL_INFO PL_WARN TA_PRIV VK_NAME PL_DEBUG PL_FATAL PL_TRACE TA_FREEP VK_ALLOC pl_assert TARRAY_GROW talloc_free PL_ARRAY_SIZE VK_NULL_HANDLE talloc_zero_priv talloc_zero_array VK_AMD_display_native_hdr VK_EXT_swapchain_colorspace | hi
def link _Neotags_c_d_cPreProcTag cPreProcTag
354: (0.0017s) END => Updated highlight for _Neotags_c_d_cPreProcTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_e_cEnumTag | syntax keyword _Neotags_c_e_cEnumTag VK_SUCCESS PL_COLOR_TRC_PQ PL_ALPHA_UNKNOWN PL_COLOR_TRC_HLG VK_SUBOPTIMAL_KHR PL_COLOR_LEVELS_PC PL_COLOR_PRIM_ADOBE PL_COLOR_SYSTEM_RGB PL_COLOR_TRC_LINEAR VK_FORMAT_UNDEFINED PL_ALPHA_INDEPENDENT PL_COLOR_PRIM_DCI_P3 PL_COLOR_TRC_BT_1886 PL_COLOR_TRC_GAMMA22 PL_FMT_CAP_BLIT
TABLE PL_COLOR_PRIM_BT_2020 PL_FMT_CAP_RENDERABLE PL_ALPHA_PREMULTIPLIED VK_FORMAT_B8G8R8_UNORM VK_FORMAT_R8G8B8_UNORM PL_COLOR_PRIM_DISPLAY_P3 VK_ERROR_OUT_OF_DATE_KHR VK_FORMAT_B8G8R8A8_UNORM VK_FORMAT_R8G8B8A8_UNORM VK_PRESENT_MODE_FIFO_KHR VK_ACCESS_MEMORY_READ_BIT VK_FORMAT_R16G16B16_UNORM VK_IMAGE_LAYOUT_UNDEFINED VK_SHARING_MODE_EXCLUSIVE VK_FORMAT_R
16G16B16_SFLOAT VK_FORMAT_R32G32B32_SFLOAT VK_FORMAT_R64G64B64_SFLOAT VK_COLOR_SPACE_HDR10_HLG_EXT VK_FORMAT_R16G16B16A16_UNORM VK_FORMAT_R16G16B16A16_SFLOAT VK_FORMAT_R32G32B32A32_SFLOAT VK_FORMAT_R64G64B64A64_SFLOAT VK_COLOR_SPACE_DOLBYVISION_EXT VK_COLOR_SPACE_BT709_LINEAR_EXT VK_COLOR_SPACE_HDR10_ST2084_EXT VK_COLOR_SPACE_PASS_THROUGH_EXT VK_FORMAT_A8B8
G8R8_UNORM_PACK32 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR VK_IMAGE_USAGE_TRANSFER_DST_BIT VK_COLOR_SPACE_BT2020_LINEAR_EXT VK_COLOR_SPACE_DCI_P3_LINEAR_EXT VK_COLOR_SPACE_DISPLAY_NATIVE_AMD VK_COLOR_SPACE_SRGB_NONLINEAR_KHR VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT VK_COLOR_SPACE_BT709_NONLINEAR_EXT VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR VK_F
ORMAT_A2B10G10R10_UNORM_PACK32 VK_FORMAT_A2R10G10B10_UNORM_PACK32 VK_STRUCTURE_TYPE_HDR_METADATA_EXT VK_STRUCTURE_TYPE_PRESENT_INFO_KHR VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EX
T VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR | hi def link _Neotags_c_e_cEnumTag cEnumTag
354: (0.0016s) END => Updated highlight for _Neotags_c_e_cEnumTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_f_cFunctionTag | syntax keyword _Neotags_c_f_cFunctionTag destroy VkResult present_cb vk_res_str pl_gpu_flush vk_cmd_queue vk_sw_resize vk_wait_idle vk_sw_destroy vk_sw_latency pl_tex_destroy pl_vulkan_hold pl_vulkan_wrap vk_sw_recreate pl_vk_steal_cmd vk_cmd_callback vk_dev_callback pick_surf_format vk_poll_commands vk_rotat
e_queues destroy_swapchain pl_vulkan_release vk_flush_commands vk_sw_start_frame vk_map_color_space vk_sw_hdr_metadata vk_sw_submit_frame vk_sw_swap_buffers update_swapchain_info pl_color_transfer_is_hdr pl_swapchain_hdr_metadata pl_vulkan_create_swapchain pl_vulkan_swapchain_suboptimal | hi def link _Neotags_c_f_cFunctionTag cFunctionTag
354: (0.0015s) END => Updated highlight for _Neotags_c_f_cFunctionTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_g_cEnumTypeTag | syntax match _Neotags_c_g_cEnumTypeTag /\%(enum\s\+\)\@5<=\%(VkResult\|pl_fmt_caps\|pl_alpha_mode\|VkColorSpaceKHR\|VkPresentModeKHR\)\>/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_g_cEnumTypeTag cEnumTypeTa
g
354: (0.0015s) END => Updated highlight for _Neotags_c_g_cEnumTypeTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_s_cStructTag | syntax match _Neotags_c_s_cStructTag /\%(struct\s\+\)\@7<=\%(ctx\|priv\|image\|format\|pl_fmt\|pl_gpu\|pl_tex\|vk_cmd\|vk_ctx\|pl_sw_fns\|pl_vulkan\|vk_format\|VkExtent2D\|vk_cmdpool\|pl_swapchain\|pl_color_repr\|pl_color_space\|pl_hdr_metadata\|VkHdrMetadataEXT\|VkPresentInfoKHR\|VkFormatProperties\|VkSurfaceF
ormatKHR\|__anon5b70f9f50108\|pl_swapchain_frame\|VkSemaphoreCreateInfo\|pl_vulkan_wrap_params\|VkSurfaceCapabilitiesKHR\|VkSwapchainCreateInfoKHR\|pl_vulkan_swapchain_params\)\>/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_s_cStructTag cStructTag
354: (0.0301s) END => Updated highlight for _Neotags_c_s_cStructTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_t_cTypeTag | syntax match _Neotags_c_t_cTypeTag /\C\<\%(vk_cb\|VkResult\|uint32_t\|VkExtent2D\|VkColorSpaceKHR\|VkHdrMetadataEXT\|VkPresentInfoKHR\|VkPresentModeKHR\|VkImageUsageFlags\|VkFormatProperties\|VkSurfaceFormatKHR\|VkSemaphoreCreateInfo\|VkCompositeAlphaFlagsKHR\|VkSurfaceCapabilitiesKHR\|VkSwapchainCreateInfoKHR\|V
kSurfaceTransformFlagsKHR\)\>\%(\.\|->\)\@!/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_t_cTypeTag cTypeTag
354: (0.0303s) END => Updated highlight for _Neotags_c_t_cTypeTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_u_cUnionTag | hi def link _Neotags_c_u_cUnionTag cUnionTag
354: (0.0299s) END => Updated highlight for _Neotags_c_u_cUnionTag
Highlighting for buffer 23
Updating from cache
silent! syntax clear _Neotags_c_v_cGlobalVar | syntax keyword _Neotags_c_v_cGlobalVar vk ctx gpu surf images swapchain vulkan_swapchain pl_color_space_monitor pl_color_space_unknown | hi def link _Neotags_c_v_cGlobalVar cGlobalVar
354: (0.0015s) END => Updated highlight for _Neotags_c_v_cGlobalVar
256: (0.2537s) END => applied syntax for c
Finished all => (0.2822s)
When toggling neotags off and on, proper highlighting:
Disabling neotags.
['silent! syntax clear _Neotags_c_d_cPreProcTag', 'silent! syntax clear _Neotags_c_e_cEnumTag', 'silent! syntax clear _Neotags_c_f_cFunctionTag', 'silent! syntax clear _Neotags_c_g_cEnumTypeTag', 'silent! syntax clear _Neotags_c_s_cStructTag', 'silent! syntax clear _Neotags_c_t_cTypeTag', 'silent! syntax clear _Neotags_c_u_cUnionTag', 'silent! syntax clear
_Neotags_c_v_cGlobalVar']
Re-enabling neotags.
Using tags file /home/nand/.vim_tags/__home__nand__dev__placebo.tags.gz
run_ctags -> 1
updating vim-tagfile
383: (0.0596s) END => Finished updating file list
=============== Executing C code ===============
Cmd is: ['/home/nand/.vim_tags/bin/neotags', 'gzip:/home/nand/.vim_tags/__home__nand__dev__placebo.tags.gz', 'c', 'c', 'defgstuv', '1', 47163, '', 'pf', '/home/nand/dev/placebo/src/vulkan/context.c']
Returned 210 items
ERR: Program ID: C
ERR: neotags: Recognized ft as language "c".
ERR: neotags: Attempting to read tag file /home/nand/.vim_tags/__home__nand__dev__placebo.tags.gz
ERR: neotags: Sorting through 103946 tags with 32 cpus.
Neotags: Elapsed time for reading file: 0.079294s
Highlighting for buffer 23
silent! syntax clear _Neotags_c_d_cPreProcTag | syntax keyword _Neotags_c_d_cPreProcTag VK PL_DEF PL_MIN FEATURE PL_INFO TA_PRIV VK_NAME pl_info pl_warn PL_DEBUG PL_FATAL TA_FREEP VK_ALLOC pl_debug pl_fatal VKAPI_PTR pl_assert PRINTF_VER PRINT_UUID VK_DEV_FUN talloc_new VK_INST_FUN VK_LOAD_FUN talloc_free VK_UUID_SIZE talloc_array talloc_steal PL_ARRAY_SIZE
TARRAY_APPEND VK_HAVE_WIN32 VK_NULL_HANDLE VK_VERSION_MAJOR VK_VERSION_MINOR VK_VERSION_PATCH talloc_zero_priv VK_HAVE_PROC_ADDR talloc_zero_array VK_API_VERSION_1_0 VK_API_VERSION_1_1 VK_EXT_validation_features VK_KHR_SWAPCHAIN_EXTENSION_NAME VK_EXT_DEBUG_UTILS_EXTENSION_NAME VK_EXT_DEBUG_REPORT_EXTENSION_NAME VK_EXT_HDR_METADATA_EXTENSION_NAME VK_EXT_PCI
_BUS_INFO_EXTENSION_NAME VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME VK_EXT_VALIDATION_FEATURES_SPEC_VERSION VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME VK_E
XT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME | hi def link _Neotags_c_d_cPreProcTag cPreProcTag
354: (0.0018s) END => Updated highlight for _Neotags_c_d_cPreProcTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_e_cEnumTag | syntax keyword _Neotags_c_e_cEnumTag PL_LOG_ERR VK_SUCCESS PL_LOG_INFO PL_LOG_WARN PL_LOG_DEBUG PL_LOG_TRACE PL_GPU_CAP_COMPUTE VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT VK_PHYSICAL_DEVICE_TYPE_CPU VK_DEBUG_REPORT_DEBUG_BIT_EXT VK_DEBUG_REPORT_ERROR_BIT_EXT VK_PHYSICAL_DEVICE_TYPE_OTHER VK_
DEBUG_REPORT_WARNING_BIT_EXT VK_STRUCTURE_TYPE_APPLICATION_INFO VK_DEBUG_REPORT_INFORMATION_BIT_EXT VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT VK_STRUCTURE_TYPE_DEVICE_QUEU
E_CREATE_INFO VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT VK_DEBUG_UTILS_MESSAGE_SE
VERITY_WARNING_BIT_EXT VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT VK_VALIDATION_FEATURE_ENA
BLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT | hi def link _Neotags_c_e_cEnumTag cEnumTag
354: (0.0014s) END => Updated highlight for _Neotags_c_e_cEnumTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_f_cFunctionTag | syntax keyword _Neotags_c_f_cFunctionTag data name count pl_msg find_qf VkResult add_qinfo vk_obj_str vk_res_str device_init vk_wait_idle supports_surf pl_gpu_destroy vk_dbg_utils_cb pl_gpu_create_vk pl_vulkan_create vk_dbg_report_cb pl_vk_inst_create pl_vulkan_destroy vk_cmdpool_create vk_signal_destroy pl_v
k_inst_destroy vk_cmdpool_destroy vkGetInstanceProcAddr get_proc_addr_fallback pl_vulkan_choose_device | hi def link _Neotags_c_f_cFunctionTag cFunctionTag
354: (0.0013s) END => Updated highlight for _Neotags_c_f_cFunctionTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_g_cEnumTypeTag | syntax match _Neotags_c_g_cEnumTypeTag /\%(enum\s\+\)\@5<=\%(types\|offset\|VkResult\|VkObjectType\|pl_log_level\|VkPhysicalDeviceType\|VkDebugReportObjectTypeEXT\|VkValidationFeatureEnableEXT\|VkDebugUtilsMessageSeverityFlagBitsEXT\)\>/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2
,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_g_cEnumTypeTag cEnumTypeTag
354: (0.0014s) END => Updated highlight for _Neotags_c_g_cEnumTypeTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_s_cStructTag | syntax match _Neotags_c_s_cStructTag /\%(struct\s\+\)\@7<=\%(ctx\|priv\|pl_vk\|vk_ctx\|vk_ext\|vk_fun\|pl_vulkan\|pl_context\|pl_vk_inst\|vk_cmdpool\|pl_glsl_desc\|pl_vulkan_queue\|pl_vulkan_params\|VkApplicationInfo\|VkLayerProperties\|pl_vk_inst_params\|VkDeviceCreateInfo\|__anon9ef8fc1c0108\|__anon9ef8fc1c02
08\|__anon9ef8fc1c0308\|__anon9ef8fc1c0408\|VkInstanceCreateInfo\|VkExtensionProperties\|VkDeviceQueueCreateInfo\|VkQueueFamilyProperties\|VkValidationFeaturesEXT\|pl_vulkan_device_params\|VkPhysicalDeviceFeatures\|VkPhysicalDeviceProperties2\|VkDebugUtilsObjectNameInfoEXT\|VkDebugReportCallbackCreateInfoEXT\|VkDebugUtilsMessengerCreateInfoEXT\|VkDebugUtils
MessengerCallbackDataEXT\)\>/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_s_cStructTag cStructTag
354: (0.0237s) END => Updated highlight for _Neotags_c_s_cStructTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_t_cTypeTag | syntax match _Neotags_c_t_cTypeTag /\C\<\%(int32_t\|uint8_t\|VkBool32\|VkResult\|uint32_t\|uint64_t\|ptrdiff_t\|pl_gpu_caps\|VkObjectType\|VkQueueFlags\|VkApplicationInfo\|VkLayerProperties\|PFN_vkVoidFunction\|VkDeviceCreateInfo\|VkInstanceCreateInfo\|VkPhysicalDeviceType\|VkDebugReportFlagsEXT\|VkExtensionPrope
rties\|VkDeviceQueueCreateInfo\|VkQueueFamilyProperties\|VkValidationFeaturesEXT\|VkPhysicalDeviceFeatures\|PFN_vkGetInstanceProcAddr\|VkDebugReportObjectTypeEXT\|VkPhysicalDeviceProperties2\|VkValidationFeatureEnableEXT\|VkDebugUtilsObjectNameInfoEXT\|VkPhysicalDeviceProperties2KHR\|VkDebugUtilsMessageTypeFlagsEXT\|VkPhysicalDeviceIDPropertiesKHR\|VkDebugR
eportCallbackCreateInfoEXT\|VkDebugUtilsMessengerCreateInfoEXT\|VkDebugUtilsMessengerCallbackDataEXT\|VkDebugUtilsMessageSeverityFlagBitsEXT\)\>\%(\.\|->\)\@!/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded,cCppOut2,cCppInElse2,cCppOutIf2,pythonDocTest,pythonDocTest2 display | hi def link _Neotags_c_t_cTypeTag cTypeTag
354: (0.0289s) END => Updated highlight for _Neotags_c_t_cTypeTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_u_cUnionTag | hi def link _Neotags_c_u_cUnionTag cUnionTag
354: (0.0296s) END => Updated highlight for _Neotags_c_u_cUnionTag
Highlighting for buffer 23
silent! syntax clear _Neotags_c_v_cGlobalVar | syntax keyword _Neotags_c_v_cGlobalVar vk ctx gpu data surf vk_dev_funs vk_inst_funs vk_device_extensions vk_instance_extensions pl_vulkan_default_params pl_vk_inst_default_params | hi def link _Neotags_c_v_cGlobalVar cGlobalVar
354: (0.0013s) END => Updated highlight for _Neotags_c_v_cGlobalVar
256: (0.3557s) END => applied syntax for c
Finished all => (0.3843s)
Maybe you can tell what's going on? It seems like it just gets the wrong set of tags for that particular buffer. Maybe the "updating from cache" thing is the root of the issue here? Like, it either doesn't properly recognize that the cache is no longer valid since this is a different buffer, or it doesn't properly generate the cache to begin with?
Yeah, it looks like there is some issue with the cache. I will try to replicate it and check.
In case it helps, I usually switch buffers using the ctrlp
extension, which is what I think has the highest rate of triggering this issue? Sometimes switching between different split windows fixes it, but this time it didn't. (Which is why I was able to produce the log)
I'm not really sure how to debug this, or provide consistent or clear reproduction advice.
Sometimes I noticed that neotags simply doesn't highlight anything. Forcing it off and on again (
:NeotagsToggle()
twice) fixes it. As does switching to a different buffer and back (sometimes).I use a lot of split buffers (
:vsp
etc.), maybe that has something to do with it?I don't notice anything odd in
:messages
. I haven't had time to investigate this properly yet.