more stuff

This commit is contained in:
Tawfeeq 2025-04-01 10:57:06 +02:00
parent b9199efb56
commit fbbbd26e08
9 changed files with 58 additions and 68 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ nvim
spell/
lazy-lock.json
.lazy.lua

View File

@ -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,
-- })

View File

@ -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', ':', '<cmd>FineCmdline<CR>', { 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',

View File

@ -0,0 +1 @@
return { 'sponkurtus2/angelic.nvim' }

View File

@ -0,0 +1 @@
return { 'drewxs/ash.nvim' }

View File

@ -0,0 +1 @@
return { 'ficcdaf/ashen.nvim' }

View File

@ -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
-- 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,
}

View File

@ -0,0 +1,3 @@
return { 'vonHeikemen/fine-cmdline.nvim', requires = {
{ 'MunifTanjim/nui.nvim' },
} }

View File

@ -0,0 +1 @@
return { 'projekt0n/github-nvim-theme' }