Changeset ee24a4b in dotfiles


Ignore:
Timestamp:
Oct 27, 2022, 6:45:40 PM (2 years ago)
Author:
w96k <w96k@…>
Branches:
master
Children:
acdb8ab
Parents:
313ec50
Message:

Edit sql connections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emacs/.emacs.d/.emacs-config.org

    r313ec50 ree24a4b  
    974974      (define-key prog-mode-map (kbd "<f6>") 'xref-find-definitions)
    975975
     976      (add-hook 'sql-mode-hook 'lsp)
    976977      (add-hook 'php-mode-hook 'lsp)
    977978      (add-hook 'c-mode-hook 'lsp-mode)
     
    12381239#+BEGIN_SRC emacs-lisp :tangle init.el
    12391240  ;; Empty for now (was using emacsql)
    1240   (add-hook 'sql-mode-hook 'lsp)
    12411241  (setq lsp-sqls-server "~/go/bin/sqls")
    12421242
    1243   (setq lsp-sqls-workspace-config-path nil)
     1243  ;; (setq lsp-sqls-workspace-config-path nil)
    12441244
    12451245  (setq lsp-sqls-connections
    1246         '(((driver . "mysql") (dataSourceName . "dbuser:mangoworms@tcp(192.168.2206.6:3306)/profile24"))))
    1247 
    1248   (defun org-babel-edit-prep:sql (babel-info)
    1249     (setq-local buffer-file-name (->> babel-info caddr (alist-get :tangle)))
    1250     (setq-local lsp-buffer-uri (->> babel-info caddr (alist-get :tangle) lsp--path-to-uri))
    1251     (setq-local lsp-headerline-breadcrumb-enable nil)
    1252     (lsp))
     1246        '(((driver . "mysql") (dataSourceName . "dbuser:mangoworms@tcp(localhost:3306)/profile24"))))
    12531247#+END_SRC
    12541248
     
    12591253
    12601254  (setq sql-connection-alist
    1261       '((pool-a
    1262         (sql-product 'mysql)
    1263          (sql-server "192.168.220.6")
    1264         (sql-user "dbuser")
    1265         (sql-password "mangoworms")
    1266         (sql-database "profile24")
    1267         (sql-port 3306))))
     1255      '((profile24
     1256        (sql-product 'mysql)
     1257         (sql-server "localhost")
     1258        (sql-user "dbuser")
     1259        (sql-password "mangoworms")
     1260        (sql-database "profile24")
     1261        (sql-port 3306))))
    12681262#+end_src
    12691263
     
    13081302     (sql . t)
    13091303     (sqlite . t)))
     1304
     1305  (defun org-babel-edit-prep:sql (babel-info)
     1306    (setq-local buffer-file-name (->> babel-info caddr (alist-get :tangle)))
     1307    (setq-local lsp-buffer-uri (->> babel-info caddr (alist-get :tangle) lsp--path-to-uri))
     1308    (setq-local lsp-headerline-breadcrumb-enable nil)
     1309    (lsp))
    13101310
    13111311  (global-set-key (kbd "C-c l") 'org-store-link)
Note: See TracChangeset for help on using the changeset viewer.