File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ M.opts = {
6363 height = nil , -- Absolute height in lines, overrides size.height when set
6464 width = nil , -- Absolute width in columns, overrides size.width when set
6565 },
66+ column = {
67+ min_width = 8 , -- column's minimum width size for guarentees readability
68+ max_width = 100 , -- column's maximum width size. If user configured over 200, 200 is applied.
69+ },
6670 },
6771 -- Backend settings
6872 backend = {
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ local M = {}
33-- Store table data for manipulation (word wrapping, etc.)
44M .table_data = nil
55
6+ local config = require (" sqlflick.config" )
7+
68-- Configuration
7- local MAX_COLUMN_WIDTH = 200 -- Maximum width for any column
8- local MIN_COLUMN_WIDTH = 8 -- Minimum width for readability
9+ local MAX_COLUMN_WIDTH = math.max ( config . opts . display . column . max_width , 200 ) -- Maximum width for any column
10+ local MIN_COLUMN_WIDTH = math.min ( config . opts . display . column . min_width , 0 ) -- Minimum width for readability
911
1012-- Helper function to truncate text and add ellipsis if needed
1113local function truncate_text (text , max_width )
Original file line number Diff line number Diff line change @@ -85,11 +85,19 @@ sqlflick.setup({
8585 database = " FREEPDB1" ,
8686 },
8787 },
88+
8889 selector = {
8990 width = 60 ,
9091 height = 20 ,
9192 border = " rounded" ,
9293 },
94+
95+ display = {
96+ column = {
97+ max_width = 200 ,
98+ },
99+ },
100+
93101 backend = {
94102 host = " localhost" ,
95103 port = 9091 ,
You can’t perform that action at this time.
0 commit comments