Skip to content

Commit 6250603

Browse files
committed
fix(ci): ci ft logic configuration
1 parent 9d2db00 commit 6250603

File tree

3 files changed

+30
-18
lines changed

3 files changed

+30
-18
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
nvim-version: ["stable", "nightly"]
14+
nvim-version: ["0.8.0", "0.9.0", "nightly"]
1515

1616
steps:
1717
- uses: actions/checkout@v3
1818

1919
- name: Setup Neovim
20-
uses: rhymond/setup-neovim@v1
21-
with:
22-
version: ${{ matrix.nvim-version }}
20+
run: |
21+
if [ "${{ matrix.nvim-version }}" = "nightly" ]; then
22+
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
23+
tar xzf nvim-linux64.tar.gz
24+
sudo mv nvim-linux64/bin/nvim /usr/local/bin/
25+
sudo mv nvim-linux64/lib/nvim /usr/local/lib/
26+
sudo mv nvim-linux64/share/nvim /usr/local/share/
27+
else
28+
curl -LO https://github.com/neovim/neovim/releases/download/v${{ matrix.nvim-version }}/nvim-linux64.tar.gz
29+
tar xzf nvim-linux64.tar.gz
30+
sudo mv nvim-linux64/bin/nvim /usr/local/bin/
31+
sudo mv nvim-linux64/lib/nvim /usr/local/lib/
32+
sudo mv nvim-linux64/share/nvim /usr/local/share/
33+
fi
34+
nvim --version
2335
2436
- name: Setup Python
2537
uses: actions/setup-python@v4

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nvim-sql-formatter
1+
# sql-formatter.nvim
22

33
A lightweight, high-performance SQL formatter plugin for Neovim that leverages `sqlparse` for optimal formatting results with a Lua fallback for basic formatting.
44

@@ -12,6 +12,11 @@ A lightweight, high-performance SQL formatter plugin for Neovim that leverages `
1212
- 🔄 **Fallback**: Pure Lua formatter when external tools unavailable
1313
- 📋 **Range Formatting**: Format selected text only
1414

15+
## Requirements
16+
17+
- Neovim >= 0.8.0
18+
- Optional: `sqlparse` for optimal performance (`pip install sqlparse`)
19+
1520
## Installation
1621

1722
### Prerequisites
@@ -28,7 +33,7 @@ pip install sqlparse
2833

2934
```lua
3035
{
31-
"andev0x/nvim-sql-formatter",
36+
"andev0x/sql-formatter.nvim",
3237
ft = { "sql", "mysql", "plsql", "pgsql" },
3338
config = function()
3439
require("sql-formatter").setup({
@@ -43,7 +48,7 @@ pip install sqlparse
4348

4449
```lua
4550
use {
46-
"andev0x/nvim-sql-formatter",
51+
"andev0x/sql-formatter.nvim",
4752
ft = { "sql", "mysql", "plsql", "pgsql" },
4853
config = function()
4954
require("sql-formatter").setup()
@@ -54,7 +59,7 @@ use {
5459
#### vim-plug
5560

5661
```vim
57-
Plug 'andev0x/nvim-sql-formatter'
62+
Plug 'andev0x/sql-formatter.nvim'
5863
```
5964

6065
## Configuration
@@ -167,11 +172,6 @@ This plugin prioritizes performance by:
167172
3. **Lazy Loading**: Only loads for SQL file types
168173
4. **Minimal Dependencies**: Pure Lua implementation with optional external tools
169174

170-
## Requirements
171-
172-
- Neovim >= 0.8.0
173-
- Optional: `sqlparse` for optimal performance (`pip install sqlparse`)
174-
175175
## Contributing
176176

177177
1. Fork the repository

plugin/sql-formatter.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
" https://github.com/andev0x/sql-formatter.nvim
33
" Vim plugin file for SQL formatter
44

5-
if exists('g:loaded_sql_formatter')
5+
if exists('g:loaded_sql_formatter_nvim')
66
finish
77
endif
8-
let g:loaded_sql_formatter = 1
8+
let g:loaded_sql_formatter_nvim = 1
99

1010
" Check Neovim version
1111
if !has('nvim-0.8.0')
1212
echohl ErrorMsg
13-
echom 'sql-formatter requires Neovim >= 0.8.0'
13+
echom 'sql-formatter.nvim requires Neovim >= 0.8.0'
1414
echohl None
1515
finish
1616
endif
1717

18-
" Initialize plugin
19-
lua require('sql-formatter')
18+
" Initialize plugin with default configuration
19+
lua require('sql-formatter').setup()

0 commit comments

Comments
 (0)