From 3adcf542289a0883924ae9b9be8b898c36702c95 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 11 Jun 2023 07:54:59 -0400 Subject: Add some Vim plugins --- .../vim-devicons/pythonx/vim_devicons/__init__.py | 2 ++ .../pythonx/vim_devicons/powerline/__init__.py | 2 ++ .../pythonx/vim_devicons/powerline/segments.py | 28 ++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py (limited to '.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons') diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py @@ -0,0 +1,2 @@ +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py @@ -0,0 +1,2 @@ +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py new file mode 100644 index 0000000..f92f4ee --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# vim:se fenc=utf8 noet: +from __future__ import (unicode_literals, division, absolute_import, print_function) + +try: + import vim +except ImportError: + vim = {} + +from powerline.bindings.vim import (vim_get_func, buffer_name) +from powerline.theme import requires_segment_info + +@requires_segment_info +def webdevicons(pl, segment_info): + webdevicons = vim_get_func('WebDevIconsGetFileTypeSymbol') + name = buffer_name(segment_info) + return [] if not webdevicons else [{ + 'contents': webdevicons(name), + 'highlight_groups': ['webdevicons', 'file_name'], + }] + +@requires_segment_info +def webdevicons_file_format(pl, segment_info): + webdevicons_file_format = vim_get_func('WebDevIconsGetFileFormatSymbol') + return [] if not webdevicons_file_format else [{ + 'contents': webdevicons_file_format(), + 'highlight_groups': ['webdevicons_file_format', 'file_format'], + }] -- cgit v1.2.3