Add SQL Prettier
This commit is contained in:
parent
c6a7eaada6
commit
e8e8347aed
@ -7,6 +7,7 @@ require('leap-config')
|
|||||||
require('lsp-config')
|
require('lsp-config')
|
||||||
require('lsp-lines-config')
|
require('lsp-lines-config')
|
||||||
require('lualine-config')
|
require('lualine-config')
|
||||||
|
require('neoformat-config')
|
||||||
require('noice-config')
|
require('noice-config')
|
||||||
require('numb-config')
|
require('numb-config')
|
||||||
require('telescope-config')
|
require('telescope-config')
|
||||||
|
10
nvim/config/lua/neoformat-config.lua
Normal file
10
nvim/config/lua/neoformat-config.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
vim.g.neoformat_sql_sqlformat = {
|
||||||
|
exe = "sqlformat",
|
||||||
|
args = { "--reindent", "-k", "upper", "-" },
|
||||||
|
stdin = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
pattern = { "*.sql" },
|
||||||
|
command = "Neoformat",
|
||||||
|
})
|
@ -33,9 +33,10 @@ in
|
|||||||
comment-nvim # Code Comments
|
comment-nvim # Code Comments
|
||||||
diffview-nvim # Diff View
|
diffview-nvim # Diff View
|
||||||
leap-nvim # Quick Movement
|
leap-nvim # Quick Movement
|
||||||
|
neo-tree-nvim # File Explorer
|
||||||
|
neoformat # Format
|
||||||
numb-nvim # Peek / Jump to Lines
|
numb-nvim # Peek / Jump to Lines
|
||||||
nvim-autopairs # Automatically Close Pairs (),[],{}
|
nvim-autopairs # Automatically Close Pairs (),[],{}
|
||||||
neo-tree-nvim # File Explorer
|
|
||||||
telescope-fzf-native-nvim # Faster Telescope
|
telescope-fzf-native-nvim # Faster Telescope
|
||||||
telescope-nvim # Fuzzy Finder
|
telescope-nvim # Fuzzy Finder
|
||||||
vim-nix # Nix Helpers
|
vim-nix # Nix Helpers
|
||||||
@ -75,6 +76,9 @@ in
|
|||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
nodePackages.vscode-html-languageserver-bin
|
nodePackages.vscode-html-languageserver-bin
|
||||||
|
|
||||||
|
# Parser
|
||||||
|
python310Packages.sqlparse
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
|
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
|
||||||
|
Loading…
Reference in New Issue
Block a user