From 227e74353f86ce6e25a5f713dc74443a4cbb07f3 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Tue, 4 Jul 2023 23:44:53 -0400 Subject: [PATCH] Better postgresql highlighting, just highlighting --- lua/install-plugins.lua | 8 ++++++++ lua/plugins/nvim-treesitter.lua | 1 + lua/plugins/pgsql-vim.lua | 1 + 3 files changed, 10 insertions(+) create mode 100644 lua/plugins/pgsql-vim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index 5ddbfa7..6aab320 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -456,6 +456,14 @@ return require('packer').startup(function(use) use 'eandrju/cellular-automaton.nvim' use 'nyoom-engineering/oxocarbon.nvim' use 'folke/tokyonight.nvim' + use { + 'lifepillar/pgsql.vim', + ft = { 'sql' }, + config = function() + require('plugins.pgsql-vim') + end, + } + use 'NoahTheDuke/vim-just' -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 5088b9e..f24a18d 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -7,6 +7,7 @@ require('nvim-treesitter.configs').setup { highlight = { enable = true, + disable = { 'sql' }, -- since pgsql.vim is currently better at highlighting }, incremental_selection = { enable = true, diff --git a/lua/plugins/pgsql-vim.lua b/lua/plugins/pgsql-vim.lua new file mode 100644 index 0000000..6a4407d --- /dev/null +++ b/lua/plugins/pgsql-vim.lua @@ -0,0 +1 @@ +vim.g.sql_type_default = 'pgsql';