diff --git a/.gitignore b/.gitignore index 005b535b..32ee1918 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ nvim spell/ lazy-lock.json +.lazy.lua diff --git a/after/sql.lua b/after/sql.lua index 8ef0ac3c..5a4913cb 100644 --- a/after/sql.lua +++ b/after/sql.lua @@ -1,10 +1,10 @@ -vim.api.nvim_create_autocmd('FileType', { - pattern = 'sql', - callback = function() - vim.lsp.start { - name = 'sqls', - cmd = { 'sqls', 'stdio' }, - root_dir = vim.fn.getcwd(), - } - end, -}) +-- vim.api.nvim_create_autocmd('FileType', { +-- pattern = 'sql', +-- callback = function() +-- vim.lsp.start { +-- name = 'sqls', +-- cmd = { 'sqls', 'stdio' }, +-- root_dir = vim.fn.getcwd(), +-- } +-- end, +-- }) diff --git a/init.lua b/init.lua index e2980fc8..bbcc1a0d 100644 --- a/init.lua +++ b/init.lua @@ -91,11 +91,7 @@ I hope you enjoy your Neovim journey, -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) P.S. You can delete this when you're done too. It's your config now! :) --]] -vim.lsp.config('sqls', {}) -vim.lsp.enable('sqls') -vim.g.db_ui_env_variable_url = 'postgres' -vim.g.db_ui_env_variable_name = 'test' - +vim.api.nvim_set_keymap('n', ':', 'FineCmdline', { noremap = true }) vim.cmd [[ autocmd VimEnter * Neotree position=left ]] --AUTO RELOAD ON SAVE vim.api.nvim_create_autocmd('BufWritePost', { @@ -593,33 +589,7 @@ require('lazy').setup({ opts = { servers = { eslint = {}, - -- sqls = { - -- on_attach = function(client, bufnr) - -- client.supports_method('textDocument/formatting') = true - -- vim.api.nvim_create_autocmd('BufWritePre', { - -- buffer = bufnr, - -- callback = function() - -- vim.lsp.buf.format { - -- filter = function(c) - -- return c.name == 'sqls' - -- end, - -- } - -- end, - -- }) - -- end, - -- }, }, - -- setup = { - -- eslint = function() - -- require('lazyvim.util').lsp.on_attach(function(client) - -- if client.name == 'eslint' then - -- client.server_capabilities.documentFormattingProvider = true - -- elseif client.name == 'tsserver' then - -- client.server_capabilities.documentFormattingProvider = false - -- end - -- end) - -- end, - -- }, }, dependencies = { 'saghen/blink.cmp', @@ -635,15 +605,6 @@ require('lazy').setup({ ensure_installed = { 'lua_ls' }, automatic_installation = true, } - - local lspconfig = require 'lspconfig' - -- lspconfig.sqls.setup { - -- on_attach = function(client, bufnr) - -- require('sqls').on_attach(client, bufnr) - -- end, - -- } - -- Setup tsserver - lspconfig.ts_ls.setup {} end, }, -- Mason must be loaded before its dependents so we need to set it up here. @@ -861,8 +822,7 @@ require('lazy').setup({ -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`tsserver`) will work just fine - -- ts_ls = {} - + ts_ls = {}, lua_ls = { -- cmd = { ... }, -- filetypes = { ... }, @@ -914,7 +874,6 @@ require('lazy').setup({ } end, }, - { -- Autoformat 'stevearc/conform.nvim', event = { 'BufWritePre' }, @@ -929,6 +888,7 @@ require('lazy').setup({ desc = '[F]ormat buffer', }, }, + opts = { -- notify_on_error = false, -- format_on_save = function(bufnr) @@ -961,8 +921,21 @@ require('lazy').setup({ }, formatters = { sqlfluff = { - command = 'sqlfluff', - args = { 'format', '--dialect', 'postgres', '-' }, + conmmand = 'sqlfluff', + args = { + 'fix', + '--dialect', + 'postgres', + '-n', + '-', + }, + stdin = true, + condition = function() + return vim.fn.executable 'sqlfluff' == 1 + end, + cwd = function(ctx) + return ctx.dirname or vim.fn.getcwd() + end, }, }, }, @@ -1111,12 +1084,14 @@ require('lazy').setup({ -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. -- vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'ash' -- vim.cmd.colorscheme 'kanagawa' - -- vim.cmd.colorscheme 'material-darker' - vim.cmd.colorscheme 'material-darker' + -- vim.cmd.colorscheme 'material-palenight' + -- vim.cmd.colorscheme 'material-deep-ocean' -- vim.cmd.colorscheme 'obscure' -- vim.cmd.colorscheme 'rose-pine' -- vim.cmd.colorscheme 'nordfox' + -- vim.cmd.colorscheme 'gruvbox-material' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, @@ -1164,12 +1139,14 @@ require('lazy').setup({ }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', + optional = true, build = ':TSUpdate', event = { 'BufReadPre', 'BufNewFile' }, main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { + 'sql', 'bash', 'c', 'diff', diff --git a/lua/custom/plugins/angelic.lua b/lua/custom/plugins/angelic.lua new file mode 100644 index 00000000..d187bd8c --- /dev/null +++ b/lua/custom/plugins/angelic.lua @@ -0,0 +1 @@ +return { 'sponkurtus2/angelic.nvim' } diff --git a/lua/custom/plugins/ash.lua b/lua/custom/plugins/ash.lua new file mode 100644 index 00000000..4fef8e00 --- /dev/null +++ b/lua/custom/plugins/ash.lua @@ -0,0 +1 @@ +return { 'drewxs/ash.nvim' } diff --git a/lua/custom/plugins/ashen.lua b/lua/custom/plugins/ashen.lua new file mode 100644 index 00000000..c5ede81e --- /dev/null +++ b/lua/custom/plugins/ashen.lua @@ -0,0 +1 @@ +return { 'ficcdaf/ashen.nvim' } diff --git a/lua/custom/plugins/e-ink.lua b/lua/custom/plugins/e-ink.lua index 18c97ff5..91260030 100644 --- a/lua/custom/plugins/e-ink.lua +++ b/lua/custom/plugins/e-ink.lua @@ -1,19 +1,24 @@ return { 'alexxGmZ/e-ink.nvim', config = function() - -- Set background BEFORE applying colorscheme + -- -- Set background BEFORE applying colorscheme + vim.opt.background = 'dark' -- or 'dark' -- vim.opt.background = 'light' -- or 'dark' - -- local mono = require('e-ink.palette').mono() - -- vim.api.nvim_set_hl(0, 'Cursor', { bg = mono[16] }) - -- vim.api.nvim_set_hl(0, 'Cursor', { fg = mono[1], bg = mono[16] }) -- require('e-ink').setup() - - -- Get palette AFTER colorscheme setup + -- -- -- Get palette AFTER colorscheme setup -- local everforest = require('e-ink.palette').everforest() - - -- Target a VALID highlight group - -- vim.api.nvim_set_hl(0, 'CursorColumn', { fg = mono[16] }) - -- vim.api.nvim_set_hl(0, 'CursorLine', { fg = mono[16] }) + -- local mono = require('e-ink.palette').mono() + -- -- Target a VALID highlight group + -- vim.api.nvim_set_hl(0, 'CursorColumn', { fg = mono[16] }) + -- vim.api.nvim_set_hl(0, 'CursorLine', { fg = mono[16] }) + -- vim.api.nvim_set_hl(0, 'Comment', { fg = mono[5] }) + -- vim.api.nvim_set_hl(0, 'Function', { fg = everforest.statusline3 }) + -- vim.api.nvim_set_hl(0, 'Constant', { fg = everforest.blue2 }) + -- vim.api.nvim_set_hl(0, 'String', { fg = everforest.green }) + -- vim.api.nvim_set_hl(0, 'Operator', { fg = everforest.orange }) + -- vim.api.nvim_set_hl(0, 'Delimiter', { fg = everforest.yellow }) + -- vim.api.nvim_set_hl(0, '@keyword.return', { fg = everforest.red }) + -- vim.api.nvim_set_hl(0, 'Identifier', { fg = everforest.statusline3 }) + -- -- vim.api.nvim_set_hl(0, 'FloatBorder', { fg = '#000000' }) end, } - diff --git a/lua/custom/plugins/fine-cmdline.lua b/lua/custom/plugins/fine-cmdline.lua new file mode 100644 index 00000000..584298c1 --- /dev/null +++ b/lua/custom/plugins/fine-cmdline.lua @@ -0,0 +1,3 @@ +return { 'vonHeikemen/fine-cmdline.nvim', requires = { + { 'MunifTanjim/nui.nvim' }, +} } diff --git a/lua/custom/plugins/github.lua b/lua/custom/plugins/github.lua new file mode 100644 index 00000000..b87cbfe2 --- /dev/null +++ b/lua/custom/plugins/github.lua @@ -0,0 +1 @@ +return { 'projekt0n/github-nvim-theme' }