Hey everyone!
I have been trying to get Sql Server working with lsp-mode for a while and im quite stumped. I've got Lsp-mode installed and lsp-mssql, i put in the connection details but when i open a sql file, lsp mode is activated however it does not seem to connect to server. I have a hunch it has to do with me leaving the username and password fields blank due to single sign on here at work but im not sure how to change it to single-sign-on/integrated. Does anyone have any suggestions? I have linked the mssql.log as well as the lsp-mode status showing sql server disconnected.
**MSSQL.log**
https://imgur.com/a/Gd6Rh6h
**.emacs**
(setq default-directory "~/")
(add-to-list 'default-frame-alist
'(font . "JuliaMono Medium-12.0"))
;; Customizations
;; Keyboard-centric user interface
(setq inhibit-startup-message t)
(tool-bar-mode -1)
;;(menu-bar-mode -1)
(scroll-bar-mode -1)
(set-fringe-mode 10)
(defalias 'yes-or-no-p 'y-or-n-p)
(setq initial-major-mode 'org-mode)
(setq initial-scratch-message nil)
(global-display-line-numbers-mode t)
;; Packages
;;Melpa
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(use-package helm
:init (helm-mode 1))
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package doom-modeline
:ensure t
:hook (after-init . doom-modeline-mode)
:init (doom-modeline-mode 1))
(use-package doom-themes
:ensure t
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-outrun-electric t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; for treemacs users
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
(use-package which-key
:config
(which-key-mode)
(setq which-key-idle-delay 1))
(setq sql-ms-program "sqlcmd")
(setq sql-product 'ms)
(use-package lsp-mode
:init
(setq lsp-keymap-prefix "C-c l")
:commands (lsp lsp-deferred)
:hook(((sql-mode python-mode) . lsp))
:config
(setq lsp-sqls-server "~/.emacs.d/sqls/sqls.exe")
(setq lsp-sqls-workspace-config-path nil))
;;(add-to-load-path "c:/users/***/emacs/.emacs.d/elpa/lsp-mssql/")
(require 'lsp-mssql)
(setq lsp-mssql-connections
[(:server "***"
:database ""
:user ""
:password ""
)])
(use-package lsp-ui
:commands lsp-ui-mode)
(use-package helm-lsp
:commands helm-lsp-workspace-symbol)
(use-package lsp-treemacs
:commands lsp-treemacs-errors-list)
(use-package dap-mode
:ensure t)
(use-package python-mode
:mode "\\.py\\'"
:config
(setq python-indent-level 2))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(lsp-log-io t)
'(package-selected-packages
'(lsp-mssql yasnippet-snippets company treemacs auto-compile which-key vterm-toggle use-package treemacs-tab-bar treemacs-projectile treemacs-icons-dired treemacs-all-the-icons tramp ssh sqlup-mode sqlformat restart-emacs resize-window rainbow-delimiters py-autopep8 org-babel-eval-in-repl ob-sql-mode ob-powershell ob-ipython ob-ess-julia ob-elixir lsp-ui lsp-treemacs helm doom-themes doom-modeline all-the-icons-completion)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
Thank you all so much!