Add GDscript support to neovim, for Godot game engine
This commit is contained in:
parent
9f1192279a
commit
6560232167
|
@ -73,6 +73,7 @@
|
|||
--languages=+snippets
|
||||
# --languages=+Make
|
||||
--languages=+Vim
|
||||
--languages=+GDScript
|
||||
--languages=+xml
|
||||
--languages=+html
|
||||
# --languages=+java
|
||||
|
|
|
@ -154,13 +154,16 @@ let
|
|||
|
||||
telescope-ctags-outline = pkgs.vimUtils.buildVimPlugin rec {
|
||||
pname = "telescope-ctags-outline";
|
||||
version = "2023-08-21";
|
||||
version = "2024-03-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "fcying";
|
||||
repo = "${pname}.nvim";
|
||||
rev = "74745d8c08617f68ad88fd08ea4d342ca8549d8d";
|
||||
sha256 = "JOD36DukgJzqtNqAveQpc/LbsihYw6OgaX+bMXbSc8o=";
|
||||
rev = "d128c817589274c760c27c97500d392929f3c1dd";
|
||||
sha256 = "QCMweHVSQdb7XH8FhnAPrqdW/EUJBWAhFw4ZwwV283w=";
|
||||
};
|
||||
patches = [
|
||||
./neovim/patches/ctags-outline-exclude.patch
|
||||
];
|
||||
};
|
||||
|
||||
in {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
setlocal noexpandtab " insert tabs for <Tab>
|
||||
setlocal nolist " Do not "render" tabs
|
||||
setlocal commentstring=#\ %s
|
23
home/programs/neovim/patches/ctags-outline-exclude.patch
Normal file
23
home/programs/neovim/patches/ctags-outline-exclude.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
Force to render ctags if requested.
|
||||
Do not respect otherwise excludes.
|
||||
|
||||
diff --git a/lua/telescope/_extensions/ctags_outline.lua b/lua/telescope/_extensions/ctags_outline.lua
|
||||
index a6deef6..fb63b75 100644
|
||||
--- a/lua/telescope/_extensions/ctags_outline.lua
|
||||
+++ b/lua/telescope/_extensions/ctags_outline.lua
|
||||
@@ -126,11 +126,12 @@ local function outline(opts)
|
||||
table.insert(cmd, v.name)
|
||||
end
|
||||
else
|
||||
+ table.insert(cmd, '--exclude-exception=' .. vim.fn.expand('%:p'))
|
||||
table.insert(cmd, vim.fn.expand('%:p'))
|
||||
end
|
||||
|
||||
- --print(vim.inspect(ctags_conf))
|
||||
- --print(vim.inspect(cmd))
|
||||
+ -- print(vim.inspect(ctags_conf))
|
||||
+ -- print(vim.inspect(cmd))
|
||||
|
||||
opts.entry_maker = get_outline_entry(opts)
|
||||
opts.bufnr = vim.fn.bufnr()
|
||||
|
|
@ -39,6 +39,17 @@ let g:tagbar_type_fluid = {
|
|||
\ 'sort' : 0,
|
||||
\ }
|
||||
|
||||
let g:tagbar_type_gdscript = {
|
||||
\ 'ctagstype' : 'GDScript',
|
||||
\ 'kinds' : [
|
||||
\ 's:signals:0',
|
||||
\ 'C:constants:0',
|
||||
\ 'v:variables:0',
|
||||
\ 'm:methods:0',
|
||||
\ ],
|
||||
\ 'sort' : 0,
|
||||
\ }
|
||||
|
||||
let g:tagbar_type_snippets = {
|
||||
\ 'ctagstype' : 'snippets',
|
||||
\ 'kinds' : [
|
||||
|
|
|
@ -5,6 +5,7 @@ require('telescope').setup({
|
|||
ft_opt = {
|
||||
css = '--css-types=ics',
|
||||
fluid = '--xml-types=si',
|
||||
gdscript = '--GDScript-types=sCvm',
|
||||
markdown = '--Markdown-types=csStT',
|
||||
rst = '--reStructuredText-types=csSt',
|
||||
sql = '--SQL-types=tE',
|
||||
|
|
Loading…
Reference in a new issue