Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# yamllint disable-line rule:document-start
name: Lint

# yamllint disable-line rule:truthy
on: push

jobs:
shell:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Shellcheck
uses: azohra/shell-linter@latest

lua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run Stylua
uses: JohnnyMorganz/stylua-action@v1
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
# yamllint disable-line rule:line-length
args: --quote-style AutoPreferSingle --indent-type Spaces --indent-width 2 --check .
6 changes: 3 additions & 3 deletions nvim/lua/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local lsp_formatting = function(bufnr)
vim.lsp.buf.format({
bufnr = bufnr,
filter = function(client)
return client.name ~= 'tsserver' and client.name ~= 'intelephense'
return client.name == 'null-ls'
end,
})
end
Expand Down Expand Up @@ -61,7 +61,7 @@ end
local servers = {
'ansiblels',
'bashls',
'cssls',
-- 'cssls',
'dockerls',
'eslint',
'gopls',
Expand All @@ -74,7 +74,7 @@ local servers = {
'pyright',
'rust_analyzer',
'stylelint_lsp',
'tsserver',
'ts_ls',
'volar',
'yamlls',
'tailwindcss',
Expand Down
6 changes: 6 additions & 0 deletions nvim/lua/lsp/servers/cssls.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
local _M = {}
--Enable (broadcasting) snippet capability for completion
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
-- capabilities.textDocument.completion.completionItem.snippetSupport = true

_M.setup = function(on_attach, capabilities)
require('lspconfig').cssls.setup({
Expand All @@ -7,6 +10,9 @@ _M.setup = function(on_attach, capabilities)
flags = {
debounce_text_changes = 150,
},
init_options = {
provideFormatter = false,
},
})
end

Expand Down
24 changes: 24 additions & 0 deletions nvim/lua/lsp/servers/ts_ls.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
local _M = {}

_M.setup = function(on_attach, capabilities)
require('lspconfig').ts_ls.setup({
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = '/usr/local/lib/node_modules/@vue/typescript-plugin',
languages = { 'javascript', 'typescript', 'vue' },
},
},
},
filetypes = {
'javascript',
'typescript',
'typescriptreact',
'typescript.tsx',
'vue',
},
})
end

return _M
21 changes: 0 additions & 21 deletions nvim/lua/lsp/servers/tsserver.lua

This file was deleted.

21 changes: 16 additions & 5 deletions nvim/lua/plugins/configs/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,34 @@ cmp.setup({
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-- ['<CR>'] = cmp.mapping(function(fallback)
-- local fallback_key = vim.api.nvim_replace_termcodes('<Tab>', true, true, true)
-- local resolved_key = vim.fn['copilot#Accept'](fallback)
-- if fallback_key == resolved_key then
-- cmp.confirm({ select = true })
-- else
-- vim.api.nvim_feedkeys(resolved_key, 'n', true)
-- end
-- end), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
['<Tab>'] = cmp.mapping(tab, { 'c', 'i', 's' }),
['<S-Tab>'] = cmp.mapping(shift_tab, { 'c', 'i', 's' }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'emoji' },
{ name = 'path' },
{ name = 'copilot', group_index = 2 },
{ name = 'nvim_lsp', group_index = 2 },
{ name = 'path', group_index = 2 },
{ name = 'luasnip', group_index = 2 },
-- { name = 'emoji' },
}, {
{ name = 'buffer' },
{ name = 'emoji' },
{ name = 'path' },
}),
formatting = {
format = lspkind.cmp_format({
with_text = true,
mode = 'symbol',
maxwidth = 50,
symbol_map = { Copilot = '' },
}),
},
})
Expand Down
12 changes: 7 additions & 5 deletions nvim/lua/plugins/configs/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ telescope.setup({
},
},
pickers = {
live_grep = {
theme = 'dropdown',
layout_config = {
prompt_position = 'bottom',
width = 0.75,
},
},
git_branches = {
mappings = {
i = {
Expand Down Expand Up @@ -82,11 +89,6 @@ M.find_files_no_ignore = function()
local theme = require('telescope.themes').get_dropdown({
hidden = true,
no_ignore = true,
theme = 'dropdown',
layout_config = {
prompt_position = 'bottom',
width = 0.5,
},
})
require('telescope.builtin').find_files(theme)
end
Expand Down
26 changes: 25 additions & 1 deletion nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ require('lazy').setup({
{
'folke/neodev.nvim',
'neovim/nvim-lspconfig',
'jose-elias-alvarez/typescript.nvim',
{
'jose-elias-alvarez/null-ls.nvim',
dependencies = {
Expand Down Expand Up @@ -231,6 +230,31 @@ require('lazy').setup({
'saadparwaiz1/cmp_luasnip',
'petertriho/cmp-git',
'onsails/lspkind-nvim',
{
'zbirenbaum/copilot-cmp',
dependencies = {
{
'zbirenbaum/copilot.lua',
config = function()
require('copilot').setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
end,
},
},
config = function()
require('copilot_cmp').setup({
method = 'getCompletionsCycling',
format = {
before = function(entry, vim_item)
vim_item.kind = require('lspkind').presets.default[vim_item.kind] .. ' Copilot'
return vim_item
end,
},
})
end,
},
{
'L3MON4D3/LuaSnip',
dependencies = {
Expand Down
14 changes: 12 additions & 2 deletions shell/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ if [ -f "${HOME}/.shell_variables" ]; then
source "${HOME}/.shell_variables"
fi

# eval $(ssh-agent)

# Zinit
source ~/.zinit/bin/zinit.zsh

Expand Down Expand Up @@ -117,8 +119,8 @@ spaceship add --before char vi_mode

# Setup history
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=1000
HISTSIZE=100000
SAVEHIST=10000
setopt SHARE_HISTORY

autoload -U compinit && compinit
Expand Down Expand Up @@ -196,3 +198,11 @@ bindkey -M vicmd 'j' history-substring-search-down
export WORDCHARS=${WORDCHARS/\//}
export EDITOR=nvim
setopt HIST_IGNORE_SPACE

# Because WSL does not have
# XDG_RUNTIME_DIR unless GUI enabled
# many programs will fail due to
# write permission issues
if is_wsl; then
unset XDG_RUNTIME_DIR
fi
2 changes: 1 addition & 1 deletion terminals/alacritty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ family = "JetBrainsMono NFM"
decorations_theme_variant = "Dark"
dynamic_padding = true
dynamic_title = true
opacity = 1
opacity = 0.75
startup_mode = "Maximized"

[window.padding]
Expand Down