Compare commits

..

14 Commits

12 changed files with 96 additions and 39 deletions

6
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1775423009,
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
"lastModified": 1777578337,
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab",
"type": "github"
},
"original": {

View File

@@ -14,7 +14,8 @@
# LSPs
lua-language-server
vscode-langservers-extracted
emmet-ls
emmet-language-server
svelte-language-server
rust-analyzer
ast-grep
prettier

View File

@@ -1,6 +1,10 @@
vim.g.mapleader = " "
vim.g.maplocalleader = ","
-- Scrolloff
local scrolloff = math.floor(vim.o.lines / 2) - 3
vim.opt.scrolloff = scrolloff
require("plugins.init")
require("config.autocmd")
require("config.binds")
@@ -39,9 +43,6 @@ vim.opt.incsearch = true
-- Nowrap
vim.opt.wrap = false
-- Scrolloff
vim.opt.scrolloff = math.floor(vim.o.lines / 2) - 3
-- Indent
vim.o.autoindent = true

View File

@@ -27,6 +27,13 @@ vim.api.nvim_create_autocmd("VimEnter", {
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "svelte" },
callback = function()
vim.treesitter.start()
end,
})
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {

View File

@@ -27,6 +27,7 @@ end
Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter
Keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>") -- Diagnostics for Linter
-- Flash keymaps
Keymap("n", "ss", function()
@@ -82,5 +83,22 @@ Keymap("n", "<leader>fg", function()
end)
Keymap("n", "<leader>fb", function()
builtin.buffers({ cwd = vim.fn.expand("%:p:h") }) -- buffers dont need cwd, but harmless
builtin.buffers({ show_all_buffers = true })
end)
-- Tab binds
Keymap("n", "<C-T>l", function()
vim.cmd("tabnext")
end)
Keymap("n", "<C-T>h", function()
vim.cmd("tabprevious")
end)
Keymap("n", "<C-T>j", function()
vim.cmd("tabnew")
end)
Keymap("n", "<C-T>q", function()
vim.cmd("tabclose")
end)

View File

@@ -7,6 +7,9 @@ require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
typescript = { "prettier" },
html = { "prettier" },
svelte = { "prettier" },
python = { "black" },
nix = { "nixfmt" },
css = { "prettier" },

View File

@@ -1,6 +1,7 @@
vim.pack.add({
{ src = "https://github.com/neovim/nvim-lspconfig", name = "lspconfig" },
{ src = "https://github.com/saghen/blink.cmp", name = "blink" },
{ src = "https://github.com/saghen/blink.lib", name = "blink-lib" },
})
vim.lsp.config("lua_ls", {
@@ -17,25 +18,31 @@ vim.lsp.config("lua_ls", {
},
},
})
vim.lsp.config("emmet_ls", {
-- capabilities = require("cmp_nvim_lsp").default_capabilities(),
filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
init_options = {
html = {
options = {
["bem.enabled"] = true,
},
},
},
})
-- vim.lsp.config("emmet_language_server", {
-- -- capabilities = require("cmp_nvim_lsp").default_capabilities(),
-- filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
-- init_options = {
-- preferences = {},
-- show_expanded_abbreviation = "always",
-- show_abbreviation_suggestions = true,
-- show_suggestions_as_snippets = true,
-- html = {
-- options = {
-- ["bem.enabled"] = true,
-- ["output.selfClosingStyle"] = "xhtml",
-- },
-- },
-- },
-- })
vim.lsp.enable({
"lua_ls",
"ts_ls",
"pylsp",
"cssls",
"svelte",
"nixd",
"rust_analyzer",
"emmet_ls",
"emmet_language_server",
})
vim.o.pumborder = "rounded"

View File

@@ -8,6 +8,7 @@ require("nvim-treesitter").setup({
require("nvim-treesitter").install({
"bash",
"html",
"svelte",
"latex",
"javascript",
"json",

View File

@@ -20,4 +20,16 @@ require("auto-save").setup({
require("remember").setup({})
-- enable scrolleof
require("scrollEOF").setup()
require("scrollEOF").setup({
-- The pattern used for the internal autocmd to determine
-- where to run scrollEOF. See https://neovim.io/doc/user/autocmd.html#autocmd-pattern
pattern = "*",
-- Whether or not scrollEOF should be enabled in insert mode
insert_mode = false,
-- Whether or not scrollEOF should be enabled in floating windows
floating = true,
-- List of filetypes to disable scrollEOF for.
disabled_filetypes = { "terminal" },
-- List of modes to disable scrollEOF for. see https://neovim.io/doc/user/builtin.html#mode()
disabled_modes = { "t", "nt" },
})

View File

@@ -8,11 +8,23 @@ vim.pack.add({
{ src = "https://github.com/2kabhishek/nerdy.nvim", name = "telescope-nerdy" },
})
local actions = require("telescope.actions")
require("telescope").setup({
defaults = {
file_ignore_patterns = { ".git", ".venv", ".node_modules" },
file_ignore_patterns = { ".git", ".venv", ".node_modules", "node_modules", ".svelte-kit", ".vscode" },
},
pickers = {
buffers = {
show_all_buffers = true,
mappings = {
i = {
["<CR>"] = actions.select_drop,
},
n = {
["<CR>"] = actions.select_drop,
},
},
},
live_grep = {
additional_args = function()
return { "--hidden" }

View File

@@ -5,19 +5,23 @@
"src": "https://github.com/okuuva/auto-save.nvim"
},
"blink": {
"rev": "456d38d1cd3743926f329204c2340f3e7840aad6",
"rev": "2ef3db111181c5eef22a462aa0122349a6027f28",
"src": "https://github.com/saghen/blink.cmp"
},
"blink-lib": {
"rev": "f29d8bac6549bc1e7d699c83f680823d7def98bd",
"src": "https://github.com/saghen/blink.lib"
},
"catppuccin": {
"rev": "426dbebe06b5c69fd846ceb17b42e12f890aedf1",
"src": "https://github.com/catppuccin/nvim"
},
"conform": {
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
"rev": "dca1a190aa85f9065979ef35802fb77131911106",
"src": "https://github.com/stevearc/conform.nvim"
},
"devicons": {
"rev": "c72328a5494b4502947a022fe69c0c47e53b6aa6",
"rev": "2795c26c916bb3c57dde308b82be51971fa92747",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"flash": {
@@ -33,15 +37,11 @@
"src": "https://github.com/mfussenegger/nvim-lint"
},
"lspconfig": {
"rev": "c588db330592fa477a70d2fee6ba20a57194bdc3",
"rev": "451d4ef9abd4f0f08e379ef0d55d1c391b6125a7",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"lspkind": {
"rev": "c7274c48137396526b59d86232eabcdc7fed8a32",
"src": "https://github.com/onsails/lspkind.nvim"
},
"lualine": {
"rev": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8",
"rev": "131a558e13f9f28b15cd235557150ccb23f89286",
"src": "https://github.com/nvim-lualine/lualine.nvim"
},
"lualine-time": {
@@ -49,13 +49,9 @@
"src": "https://github.com/archibate/lualine-time"
},
"mini": {
"rev": "69b7433355664cf76898eb86a12a019f39bd86d1",
"rev": "a5fda91040763cf9ad70bdce1c656b0f4ba1d16e",
"src": "https://github.com/echasnovski/mini.nvim"
},
"neorg": {
"rev": "1f14d72aad7165eac307a2a2f6be0fb97a04b3c2",
"src": "https://github.com/nvim-neorg/neorg"
},
"noice": {
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
"src": "https://github.com/folke/noice.nvim"
@@ -81,7 +77,7 @@
"src": "https://github.com/Aasim-A/scrollEOF.nvim"
},
"telescope": {
"rev": "471eebb1037899fd942cc0f52c012f8773505da1",
"rev": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59",
"src": "https://github.com/nvim-telescope/telescope.nvim"
},
"telescope-file-browser": {
@@ -89,7 +85,7 @@
"src": "https://github.com/nvim-telescope/telescope-file-browser.nvim"
},
"telescope-fzf": {
"rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c",
"rev": "b25b749b9db64d375d782094e2b9dce53ad53a40",
"src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
},
"telescope-nerdy": {

View File

@@ -1 +0,0 @@