.config/nvim/lua/plugins/filetype.lua

Sun, 05 Mar 2023 18:47:45 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 05 Mar 2023 18:47:45 -0500
changeset 1062
77bf3b44f6f9
parent 1060
c20cb89a2ee9
child 1064
fcfa295076a8
permissions
-rw-r--r--

Add format-on-write for elixir and go

1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 local g = vim.g
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 -- >> Perl
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 g.perl_include_pod = 1
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 g.perl_sub_signatures = 1
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 g.perl_sync_dist = 300
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 g.perl_compiler_force_warnings = 0
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 return {
1057
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
10 {
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
11 'nvim-treesitter/nvim-treesitter',
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
12 build = function()
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
13 require('nvim-treesitter.install').update({ with_sync = true })
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
14 end,
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
15 config = function()
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
16 require('nvim-treesitter.configs').setup({
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
17 highlight = { enable = true },
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
18 indent = { enable = true },
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
19 ensure_installed = {
1058
c8754b0414b9 add bundled languages to avoid errors
Meredith Howard <mhoward@roomag.org>
parents: 1057
diff changeset
20 'c',
1060
c20cb89a2ee9 Add "comment" parser
Meredith Howard <mhoward@roomag.org>
parents: 1058
diff changeset
21 'comment',
1057
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
22 'eex',
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
23 'elixir',
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
24 'heex',
1058
c8754b0414b9 add bundled languages to avoid errors
Meredith Howard <mhoward@roomag.org>
parents: 1057
diff changeset
25 'help',
c8754b0414b9 add bundled languages to avoid errors
Meredith Howard <mhoward@roomag.org>
parents: 1057
diff changeset
26 'lua',
1057
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
27 'surface',
1058
c8754b0414b9 add bundled languages to avoid errors
Meredith Howard <mhoward@roomag.org>
parents: 1057
diff changeset
28 'vim',
1057
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
29 },
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
30 })
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
31 end,
3c42989e695b Add treesitter for elixir support
Meredith Howard <mhoward@roomag.org>
parents: 1027
diff changeset
32 },
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 'Shougo/vinarise.vim',
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 'asciidoc/vim-asciidoc',
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 {'vim-perl/vim-perl', branch = 'dev'},
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 'yko/mojo.vim',
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37 }

mercurial