mirror of https://github.com/E-Almqvist/dotfiles
Compare commits
8 Commits
7219f02482
...
f7f53d03d2
Author | SHA1 | Date |
---|---|---|
Elias Almqvist | f7f53d03d2 | 4 months ago |
Elias Almqvist | 20cb11b3d9 | 4 months ago |
Elias Almqvist | 0ca2d3bd8b | 4 months ago |
Elias Almqvist | c096e5bea1 | 4 months ago |
Elias Almqvist | 0d7ea5ee59 | 4 months ago |
Elias Almqvist | 7049151967 | 4 months ago |
Elias Almqvist | 6a021b8a8c | 4 months ago |
Elias Almqvist | 50ed31dfde | 4 months ago |
@ -0,0 +1,22 @@ |
||||
local on_attach = require("nvchad.configs.lspconfig").on_attach |
||||
local on_init = require("nvchad.configs.lspconfig").on_init |
||||
local capabilities = require("nvchad.configs.lspconfig").capabilities |
||||
|
||||
local lspconfig = require "lspconfig" |
||||
local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" } |
||||
|
||||
-- lsps with default config |
||||
for _, lsp in ipairs(servers) do |
||||
lspconfig[lsp].setup { |
||||
on_attach = on_attach, |
||||
on_init = on_init, |
||||
capabilities = capabilities, |
||||
} |
||||
end |
||||
|
||||
-- typescript |
||||
lspconfig.tsserver.setup { |
||||
on_attach = on_attach, |
||||
on_init = on_init, |
||||
capabilities = capabilities, |
||||
} |
@ -1,18 +0,0 @@ |
||||
local on_attach = require("plugins.configs.lspconfig").on_attach |
||||
local capabilities = require("plugins.configs.lspconfig").capabilities |
||||
|
||||
local lspconfig = require("lspconfig") |
||||
|
||||
-- if you just want default config for the servers then put them in a table |
||||
local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" } |
||||
|
||||
for _, lsp in ipairs(servers) do |
||||
lspconfig[lsp].setup({ |
||||
on_attach = on_attach, |
||||
capabilities = capabilities, |
||||
}) |
||||
end |
||||
|
||||
-- |
||||
-- lspconfig.pyright.setup { blabla} |
||||
-- |
@ -1,66 +0,0 @@ |
||||
local M = {} |
||||
|
||||
M.treesitter = { |
||||
ensure_installed = { |
||||
"vim", |
||||
"lua", |
||||
"html", |
||||
"css", |
||||
"javascript", |
||||
"typescript", |
||||
"tsx", |
||||
"c", |
||||
"markdown", |
||||
"markdown_inline", |
||||
"prisma", |
||||
"haskell", |
||||
"python", |
||||
"zig", |
||||
}, |
||||
indent = { |
||||
enable = true, |
||||
-- disable = { |
||||
-- "python" |
||||
-- }, |
||||
}, |
||||
} |
||||
|
||||
M.mason = { |
||||
ensure_installed = { |
||||
-- lua stuff |
||||
"lua-language-server", |
||||
"stylua", |
||||
|
||||
-- web dev stuff |
||||
"css-lsp", |
||||
"html-lsp", |
||||
"typescript-language-server", |
||||
"deno", |
||||
"prettier", |
||||
|
||||
-- c/cpp stuff |
||||
"clangd", |
||||
"clang-format", |
||||
|
||||
-- Fun/joke langs |
||||
"hls", |
||||
}, |
||||
} |
||||
|
||||
-- git support in nvimtree |
||||
M.nvimtree = { |
||||
git = { |
||||
enable = true, |
||||
}, |
||||
|
||||
renderer = { |
||||
highlight_git = true, |
||||
icons = { |
||||
show = { |
||||
git = true, |
||||
}, |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
return M |
@ -1,12 +0,0 @@ |
||||
-- local autocmd = vim.api.nvim_create_autocmd |
||||
|
||||
-- Auto resize panes when resizing nvim window |
||||
-- autocmd("VimResized", { |
||||
-- pattern = "*", |
||||
-- command = "tabdo wincmd =", |
||||
-- }) |
||||
vim.filetype.add({ |
||||
extension = { |
||||
mdx = 'mdx' |
||||
} |
||||
}) |
@ -1,38 +0,0 @@ |
||||
---@type MappingsTable |
||||
local M = {} |
||||
|
||||
M.general = { |
||||
n = { |
||||
[";"] = { ":", "enter command mode", opts = { nowait = true } }, |
||||
|
||||
-- format with conform |
||||
["<leader>fm"] = { |
||||
function() |
||||
require("conform").format() |
||||
end, |
||||
"formatting", |
||||
}, |
||||
}, |
||||
|
||||
v = { |
||||
-- Indentation |
||||
[">"] = { ">gv", "indent" }, |
||||
-- Move selection up/down with K/J |
||||
["J"] = { ":m '>+1<CR>gv=gv", "move selection down" }, |
||||
["K"] = { ":m '<-2<CR>gv=gv", "move selection up" }, |
||||
}, |
||||
|
||||
i = { |
||||
["<C-l>"] = { |
||||
function() |
||||
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "") |
||||
end, |
||||
"Copilot Accept", |
||||
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true }, |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
-- more keybinds! |
||||
|
||||
return M |
@ -0,0 +1,25 @@ |
||||
---@type MappingsTable |
||||
|
||||
require "nvchad.mappings" |
||||
|
||||
local map = vim.keymap.set |
||||
|
||||
-- General |
||||
map("n", ";", ":", { desc = "enter command mode", nowait = true }) |
||||
|
||||
-- Format with conform |
||||
map("n", "<leader>fm", function() |
||||
require("conform").format() |
||||
end, { desc = "formatting" }) |
||||
|
||||
-- Indentation in visual mode |
||||
map("v", ">", ">gv", { desc = "indent" }) |
||||
|
||||
-- Move selection up/down with K/J in visual mode |
||||
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "move selection down" }) |
||||
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "move selection up" }) |
||||
|
||||
-- Copilot accept in insert mode |
||||
map("i", "<C-l>", function() |
||||
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "") |
||||
end, { desc = "Copilot Accept", replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true }) |
@ -0,0 +1,6 @@ |
||||
require "nvchad.options" |
||||
|
||||
-- add yours here! |
||||
|
||||
-- local o = vim.o |
||||
-- o.cursorlineopt ='both' -- to enable cursorline! |
Loading…
Reference in new issue