Compare commits

..

No commits in common. "95a39b404f6cee259441ccb54438c135d8cbcbe6" and "b4c4201d65dd668f513629f89af83945d00a9810" have entirely different histories.

14 changed files with 201 additions and 132 deletions

View file

@ -22,9 +22,10 @@
"hypr".source = ./hypr;
};
xdg.dataFile = {
"nvim/lazy-lock.json".source = config.lib.file.mkOutOfStoreSymlink "/home/nikos/.dotfiles/lazy-lock.json";
};
# TODO: Broken due to bug probably, remove when fixed
# xdg.dataFile = {
# "nvim/lazy-lock.json".source = config.lib.file.mkOutOfStoreSymlink "/home/nikos/.dotfiles/lazy-lock.json";
# };
# The home.packages option allows you to install Nix packages into your
# environment.

View file

@ -1,31 +1,26 @@
{
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
"catppuccin": { "branch": "main", "commit": "40dc9f0621c55bd40da4ad0731fac44d15bb393a" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" },
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"mini.nvim": { "branch": "main", "commit": "64e95aa77587d04f97a5579b2106a82a08a7d968" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "98e8b9d593a5547c126a39212d6f5e954a2d85dd" },
"nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" },
"nvim-treesitter": { "branch": "master", "commit": "fa915a30c5cdf1d18129e9ef6ac2ee0fa799904f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" },
"indent-blankline.nvim": { "branch": "v3", "commit": "b9b0e7c3fcfdad9860d43321eddc9b4f06d7fdd7" },
"lazy.nvim": { "branch": "main", "commit": "16603c6917435d8446f7357cb61095138a417085" },
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
"nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },
"nvim-lspconfig": { "branch": "master", "commit": "d0467b9574b48429debf83f8248d8cee79562586" },
"nvim-treesitter": { "branch": "master", "commit": "198015cca117d41e7d1fd404e0cdf3235084749b" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "e69a504baf2951d52e1f1fbb05145d43f236cbf1" },
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
"oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"vim-dadbod": { "branch": "master", "commit": "f740950d0703099e0f172016f10e0e39f50fd0ba" },
"vim-dadbod-completion": { "branch": "master", "commit": "9e354e86fcc67a5ec2c104f312e374ea2f89c799" },
"vim-dadbod-ui": { "branch": "master", "commit": "0fec59e3e1e619e302198cd491b7d27f8d398b7c" }
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }
}

View file

@ -1,30 +0,0 @@
{
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" },
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"mini.nvim": { "branch": "main", "commit": "64e95aa77587d04f97a5579b2106a82a08a7d968" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "98e8b9d593a5547c126a39212d6f5e954a2d85dd" },
"nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" },
"nvim-treesitter": { "branch": "master", "commit": "fa915a30c5cdf1d18129e9ef6ac2ee0fa799904f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" },
"oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"vim-dadbod": { "branch": "master", "commit": "f740950d0703099e0f172016f10e0e39f50fd0ba" },
"vim-dadbod-completion": { "branch": "master", "commit": "9e354e86fcc67a5ec2c104f312e374ea2f89c799" },
"vim-dadbod-ui": { "branch": "master", "commit": "0fec59e3e1e619e302198cd491b7d27f8d398b7c" }
}

View file

@ -1,6 +1,8 @@
local lspconfig = require "lspconfig"
require "neodev".setup()
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single" })
local capabilities = {}
local has_cmp, cmp_lsp = pcall(require, "cmp_nvim_lsp")
@ -8,6 +10,24 @@ if has_cmp then
capabilities = cmp_lsp.default_capabilities()
end
local has_lsp_format, lsp_format = pcall(require, "lsp-format")
if has_lsp_format then
lsp_format.setup {
typescript = { exclude = { "ts_ls" } },
javascript = { exclude = { "ts_ls" } },
typescriptreact = { exclude = { "ts_ls" } },
javascriptreact = { exclude = { "ts_ls" } },
}
end
local prettier = {
formatCommand = 'prettierd "${INPUT}"',
formatStdin = true,
-- env = {
-- string.format('PRETTIERD_DEFAULT_CONFIG=%s', vim.fn.expand('~/.config/nvim/utils/linter-config/.prettierrc.json')),
-- },
}
local eslint = {
lintCommand = [[eslint_d -f visualstudio --stdin --stdin-filename ${INPUT}]],
lintIgnoreExitCode = true,
@ -31,16 +51,17 @@ local shellcheck = {
local servers = {
efm = {
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "sh" },
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "sh", "php" },
init_options = { documentFormatting = true },
settings = {
rootMarkers = { ".git/" },
languages = {
typescript = { eslint },
typescriptreact = { eslint },
javascript = { eslint },
javascriptreact = { eslint },
typescript = { prettier, eslint },
typescriptreact = { prettier, eslint },
javascript = { prettier, eslint },
javascriptreact = { prettier, eslint },
sh = { shellcheck },
php = { prettier },
},
},
},
@ -110,13 +131,87 @@ local servers = {
intelephense = {
files = { maxSize = 1000000000 },
format = { enable = false },
stubs = { "apache", "bcmath", "bz2", "calendar", "com_dotnet", "Core", "ctype", "curl", "date", "dba", "dom", "enchant", "exif", "FFI", "fileinfo", "filter", "fpm", "ftp", "gd", "gettext", "gmp", "hash", "iconv", "imap", "intl", "json", "ldap", "libxml", "mbstring", "meta", "mysqli", "oci8", "odbc", "openssl", "pcntl", "pcre", "PDO", "pdo_ibm", "pdo_mysql", "pdo_pgsql", "pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection", "session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium", "SPL", "sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm", "tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", "wordpress", "Zend OPcache", "zip", "zlib", },
stubs = {
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"FFI",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"gettext",
"gmp",
"hash",
"iconv",
"imap",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"meta",
"mysqli",
"oci8",
"odbc",
"openssl",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"Reflection",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"xsl",
"wordpress",
"Zend OPcache",
"zip",
"zlib",
},
},
}
},
zls = {},
bashls = {},
}
for lsp, settings in pairs(servers) do
lspconfig[lsp].setup(vim.tbl_extend("force", { capabilities = capabilities }, settings))
end
@ -135,5 +230,9 @@ vim.api.nvim_create_autocmd("LspAttach", {
buffer = args.buf,
})
end
if has_lsp_format then
lsp_format.on_attach(client)
end
end,
})

View file

@ -1,5 +0,0 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {}
}

View file

@ -8,7 +8,6 @@ return {
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"onsails/lspkind.nvim",
{ "nvim-tree/nvim-web-devicons", lazy = true },
},
config = function()
local cmp = require "cmp"

View file

@ -1,20 +0,0 @@
return {
'stevearc/conform.nvim',
event = { "BufWritePre" },
cmd = { "ConformInfo" },
opts = {
formatters_by_ft = {
javascript = { "prettierd" },
typescript = { "prettierd" },
php = { "pint" }
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
},
init = function()
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}

View file

@ -1,4 +1,3 @@
return {
"github/copilot.vim",
event = "InsertEnter"
"github/copilot.vim"
}

View file

@ -1,11 +0,0 @@
return {
"lewis6991/gitsigns.nvim",
event = "VeryLazy",
opts = {
current_line_blame = true,
current_line_blame_opts = {
delay = 300,
},
on_attach = require "my.keymaps".gitsigns_keymaps,
}
}

68
nvim/lua/plugins/init.lua Normal file
View file

@ -0,0 +1,68 @@
return {
{
"nvim-telescope/telescope.nvim",
event = "VeryLazy",
branch = "0.1.x",
dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
{ "nvim-telescope/telescope-ui-select.nvim" },
"nvim-lua/plenary.nvim",
},
config = function()
require "my.telescope"
end
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {}
},
{
"lewis6991/gitsigns.nvim",
event = "VeryLazy",
opts = {
current_line_blame = true,
current_line_blame_opts = {
delay = 300,
},
on_attach = require "my.keymaps".gitsigns_keymaps,
}
},
{ "lukas-reineke/lsp-format.nvim", tag = "v2.5.1" },
{ "nvim-tree/nvim-web-devicons", lazy = true },
{
"L3MON4D3/LuaSnip",
version = "v2.*",
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
'echasnovski/mini.nvim',
version = '*',
config = function()
require "mini.statusline".setup()
require "mini.surround".setup()
end
},
-- {
-- "yetone/avante.nvim",
-- event = "VeryLazy",
-- build = "make BUILD_FROM_SOURCE=true luajit",
-- opts = {
-- -- add any opts here
-- },
-- dependencies = {
-- "stevearc/dressing.nvim",
-- "nvim-lua/plenary.nvim",
-- "MunifTanjim/nui.nvim",
-- --- The below is optional, make sure to setup it properly if you have lazy=true
-- {
-- 'MeanderingProgrammer/render-markdown.nvim',
-- opts = {
-- file_types = { "markdown", "Avante" },
-- },
-- ft = { "markdown", "Avante" },
-- },
-- },
-- }
}

View file

@ -10,7 +10,7 @@ return {
},
{
"j-hui/fidget.nvim",
tag = "v1.5.0",
tag = "v1.4.0",
opts = {
progress = {
display = {

View file

@ -1,6 +0,0 @@
return {
"L3MON4D3/LuaSnip",
version = "v2.*",
-- install jsregexp (optional!).
build = "make install_jsregexp"
}

View file

@ -1,8 +0,0 @@
return {
'echasnovski/mini.nvim',
version = '*',
config = function()
require "mini.statusline".setup()
require "mini.surround".setup()
end
}

View file

@ -1,12 +0,0 @@
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
{ "nvim-telescope/telescope-ui-select.nvim" },
"nvim-lua/plenary.nvim",
},
config = function()
require "my.telescope"
end
}